/* CRS 合规应对产品 — 全局样式 */
:root {
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --red: #dc2626;
    --green: #16a34a;
    --yellow: #ca8a04;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

/* ========== 登录页 ========== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a56db 0%, #1e40af 100%);
}
.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 400px;
}
.login-card h1 { font-size: 24px; margin-bottom: 8px; color: var(--gray-900); }
.login-card p { color: var(--gray-500); margin-bottom: 24px; font-size: 14px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; }
.login-card input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300);
    border-radius: var(--radius); font-size: 14px; transition: border-color 0.2s;
}
.login-card input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.login-card .btn-login {
    width: 100%; padding: 12px; background: var(--primary); color: var(--white);
    border: none; border-radius: var(--radius); font-size: 16px; font-weight: 500;
    cursor: pointer; transition: background 0.2s;
}
.login-card .btn-login:hover { background: var(--primary-dark); }
.login-error { color: var(--red); font-size: 14px; margin-top: 12px; text-align: center; }

/* ========== 通用布局 ========== */
.navbar {
    background: var(--white); border-bottom: 1px solid var(--gray-200);
    padding: 0 24px; height: 60px; display: flex; align-items: center;
    justify-content: space-between; position: sticky; top: 0; z-index: 100;
}
.navbar-brand { font-size: 18px; font-weight: 700; color: var(--primary); }
.navbar-right { display: flex; align-items: center; gap: 16px; }
.navbar-user { font-size: 14px; color: var(--gray-600); }
.navbar-logout { color: var(--gray-500); cursor: pointer; font-size: 14px; }
.navbar-logout:hover { color: var(--red); }

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* ========== 统计卡片 ========== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--white); padding: 20px; border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--gray-900); }

/* ========== 表格 ========== */
.table-container {
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
th { background: var(--gray-50); padding: 12px 16px; text-align: left; font-size: 13px; color: var(--gray-600); font-weight: 600; }
td { padding: 12px 16px; border-top: 1px solid var(--gray-100); font-size: 14px; }
tr:hover { background: var(--gray-50); cursor: pointer; }

/* ========== 状态标签 ========== */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-in-progress { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #d1fae5; color: #065f46; }

/* ========== 按钮 ========== */
.btn {
    padding: 8px 16px; border: none; border-radius: var(--radius); font-size: 14px;
    font-weight: 500; cursor: pointer; transition: all 0.2s; display: inline-flex;
    align-items: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ========== 步骤条 ========== */
.steps { display: flex; margin-bottom: 32px; background: var(--white); border-radius: var(--radius); padding: 16px 24px; box-shadow: var(--shadow); }
.step { flex: 1; text-align: center; position: relative; }
.step .step-num {
    width: 32px; height: 32px; border-radius: 50%; background: var(--gray-200);
    color: var(--gray-500); display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px; font-weight: 600; font-size: 14px;
}
.step.active .step-num { background: var(--primary); color: var(--white); }
.step.completed .step-num { background: var(--green); color: var(--white); }
.step .step-label { font-size: 12px; color: var(--gray-600); }
.step.active .step-label { color: var(--primary); font-weight: 600; }

/* ========== 表单 ========== */
.form-section { background: var(--white); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.form-section h3 { font-size: 16px; margin-bottom: 16px; color: var(--gray-900); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--gray-600); font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 8px 12px; border: 1px solid var(--gray-300);
    border-radius: var(--radius); font-size: 14px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}

/* ========== 提示框 ========== */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-warning { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; }
.alert-danger { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-info { background: #dbeafe; border: 1px solid #93c5fd; color: #1e40af; }

/* ========== 模态框 ========== */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 200; justify-content: center; align-items: center;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--white); border-radius: var(--radius-lg); padding: 24px;
    width: 500px; max-height: 80vh; overflow-y: auto;
}
.modal h2 { font-size: 18px; margin-bottom: 16px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ========== 工具类 ========== */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none; }
.text-danger { color: var(--red); }
.text-success { color: var(--green); }
.fw-bold { font-weight: 700; }
.fs-sm { font-size: 13px; }
.fs-lg { font-size: 18px; }
