/* ===== 基础重置与布局 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* ===== 顶部标题 ===== */
.header {
    background: #409eff;
    color: #fff;
    padding: 16px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-title {
    font-size: 20px;
    font-weight: 600;
}

/* ===== 页面容器 ===== */
#app {
    max-width: 960px;
    margin: 24px auto;
    padding: 0 16px;
}

/* ===== 查询区域 ===== */
.query-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-row .form-input {
    flex: 1;
    max-width: none;
}

/* ===== 表单样式 ===== */
.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #606266;
}

.form-input {
    width: 100%;
    max-width: 360px;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: #409eff;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    min-width: 80px;
    white-space: nowrap;
}

.btn-primary {
    background: #409eff;
    color: #fff;
}

.btn-primary:hover {
    background: #66b1ff;
}

.btn-success {
    background: #67c23a;
    color: #fff;
}

.btn-success:hover {
    background: #85ce61;
}

.btn-warning {
    background: #e6a23c;
    color: #fff;
}

.btn-warning:hover {
    background: #ebb563;
}

.btn-danger {
    background: #f56c6c;
    color: #fff;
}

.btn-danger:hover {
    background: #f78989;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== 订单卡片样式 ===== */
.order-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ebeef5;
}

.order-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #303133;
}

.order-status {
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.order-status-active {
    background: #e1f3d8;
    color: #67c23a;
}

.order-status-paused {
    background: #fdf6ec;
    color: #e6a23c;
}

.order-status-done {
    background: #f4f4f5;
    color: #909399;
}

.order-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.order-info-item {
    font-size: 13px;
    color: #606266;
}

.order-info-label {
    color: #909399;
    margin-right: 4px;
}

.order-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== 加载指示器 ===== */
.btn .loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== 消息提示 ===== */
#message-container {
    position: fixed;
    top: 68px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    animation: messageIn 0.3s ease;
    max-width: 360px;
    word-break: break-word;
}

.message.fade-out {
    animation: messageOut 0.3s ease forwards;
}

.message-success {
    background: #f0f9eb;
    color: #67c23a;
    border: 1px solid #e1f3d8;
}

.message-error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fde2e2;
}

.message-info {
    background: #f4f4f5;
    color: #909399;
    border: 1px solid #e9e9eb;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes messageOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(20px); }
}

/* ===== 模态对话框（密码修改） ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #303133;
}

.modal .form-group {
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    color: #909399;
    padding: 40px 0;
    font-size: 14px;
}

/* ===== 响应式布局 ===== */
@media (max-width: 768px) {
    #app {
        margin: 16px auto;
    }

    .input-row {
        flex-direction: column;
    }

    .input-row .btn {
        width: 100%;
    }

    .order-info {
        grid-template-columns: 1fr;
    }

    .order-actions {
        flex-direction: column;
    }

    .order-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-input {
        max-width: 100%;
    }

    .modal {
        width: 95%;
        padding: 16px;
    }
}
