/* ============================================
   HR管理系统 - 多主题样式
   ============================================ */

/* ===== 主题1：深蓝科技（默认） ===== */
:root,
[data-theme="blue"] {
    --bg-primary: #0f1123;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-hover: #1f2b47;
    --border-color: #2d3748;
    --border-light: rgba(102,126,234,0.2);
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --accent: #667eea;
    --accent-hover: #5a67d8;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-rgb: 102,126,234;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #f56565;
    --info: #4299e1;
    --sidebar-width: 240px;
    --topbar-height: 60px;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --admin-accent: #f56565;
    --admin-accent2: #ed8936;
    --primary: #667eea;
    --primary-hover: #5a67d8;
    --primary-rgb: 102,126,234;
    --border: #2d3748;
    --bg-tertiary: #16213e;
    --admin-accent-rgb: 245,101,101;
}

/* ===== 主题2：极光冰蓝 ===== */
[data-theme="aurora"] {
    --bg-primary: #0b1426;
    --bg-secondary: #0f1d35;
    --bg-card: #132444;
    --bg-hover: #1a3058;
    --border-color: #1e3a5f;
    --border-light: rgba(56,189,248,0.2);
    --text-primary: #e0f2fe;
    --text-secondary: #93c5fd;
    --text-muted: #60a5fa;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --accent-rgb: 56,189,248;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
    --shadow: 0 4px 20px rgba(0,0,0,0.35);
    --admin-accent: #818cf8;
    --admin-accent2: #a78bfa;
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --primary-rgb: 56,189,248;
    --border: #1e3a5f;
    --bg-tertiary: #132444;
    --admin-accent-rgb: 129,140,248;
}

/* ===== 主题3：赛博朋克 ===== */
[data-theme="cyber"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121c;
    --bg-card: #1a1a2a;
    --bg-hover: #22223a;
    --border-color: #2a2a45;
    --border-light: rgba(0,255,136,0.15);
    --text-primary: #e0ffe0;
    --text-secondary: #88ddaa;
    --text-muted: #55bb88;
    --accent: #00ff88;
    --accent-hover: #00cc6a;
    --accent-gradient: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
    --accent-rgb: 0,255,136;
    --success: #22c55e;
    --warning: #ffcc00;
    --danger: #ff3366;
    --info: #00ccff;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    --admin-accent: #ff3366;
    --admin-accent2: #ff6b9d;
    --primary: #00ff88;
    --primary-hover: #00cc6a;
    --primary-rgb: 0,255,136;
    --border: #2a2a45;
    --bg-tertiary: #1a1a2a;
    --admin-accent-rgb: 255,51,102;
}

/* ===== 主题4：赤焰黑金 ===== */
[data-theme="crimson"] {
    --bg-primary: #0f0a08;
    --bg-secondary: #1a100c;
    --bg-card: #241812;
    --bg-hover: #30201a;
    --border-color: #3d2a20;
    --border-light: rgba(234,179,8,0.2);
    --text-primary: #fef3c7;
    --text-secondary: #fcd34d;
    --text-muted: #d4a017;
    --accent: #eab308;
    --accent-hover: #ca8a04;
    --accent-gradient: linear-gradient(135deg, #eab308 0%, #ef4444 100%);
    --accent-rgb: 234,179,8;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --info: #3b82f6;
    --shadow: 0 4px 20px rgba(0,0,0,0.45);
    --admin-accent: #ef4444;
    --admin-accent2: #f97316;
    --primary: #eab308;
    --primary-hover: #ca8a04;
    --primary-rgb: 234,179,8;
    --border: #3d2a20;
    --bg-tertiary: #241812;
    --admin-accent-rgb: 239,68,68;
}

/* ===== 主题5：莫兰迪灰 ===== */
[data-theme="morandi"] {
    --bg-primary: #1c1917;
    --bg-secondary: #292524;
    --bg-card: #352f2b;
    --bg-hover: #44403c;
    --border-color: #57534e;
    --border-light: rgba(168,162,158,0.2);
    --text-primary: #e7e5e4;
    --text-secondary: #a8a29e;
    --text-muted: #78716c;
    --accent: #d6d3d1;
    --accent-hover: #e7e5e4;
    --accent-gradient: linear-gradient(135deg, #a8a29e 0%, #78716c 100%);
    --accent-rgb: 168,162,158;
    --success: #86efac;
    --warning: #fde68a;
    --danger: #fca5a5;
    --info: #93c5fd;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --admin-accent: #fca5a5;
    --admin-accent2: #fde68a;
    --primary: #d6d3d1;
    --primary-hover: #e7e5e4;
    --primary-rgb: 214,211,209;
    --border: #57534e;
    --bg-tertiary: #352f2b;
    --admin-accent-rgb: 252,165,165;
}

/* ===== 主题6：樱花粉黛 ===== */
[data-theme="sakura"] {
    --bg-primary: #1a0f14;
    --bg-secondary: #261520;
    --bg-card: #331b2c;
    --bg-hover: #402238;
    --border-color: #4d2d44;
    --border-light: rgba(244,114,182,0.2);
    --text-primary: #fce7f3;
    --text-secondary: #f9a8d4;
    --text-muted: #c084a0;
    --accent: #ec4899;
    --accent-hover: #db2777;
    --accent-gradient: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
    --accent-rgb: 236,72,153;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #818cf8;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --admin-accent: #a855f7;
    --admin-accent2: #c084fc;
    --primary: #ec4899;
    --primary-hover: #db2777;
    --primary-rgb: 236,72,153;
    --border: #4d2d44;
    --bg-tertiary: #331b2c;
    --admin-accent-rgb: 168,85,247;
}

/* ===== 主题7：极简白 ===== */
[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #edf2f7;
    --border-color: #e2e8f0;
    --border-light: rgba(66,153,225,0.15);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent: #4299e1;
    --accent-hover: #3182ce;
    --accent-gradient: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
    --accent-rgb: 66,153,225;
    --success: #38a169;
    --warning: #b7791f;
    --danger: #e53e3e;
    --info: #3182ce;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --admin-accent: #e53e3e;
    --admin-accent2: #d69e2e;
    --primary: #4299e1;
    --primary-hover: #3182ce;
    --primary-rgb: 66,153,225;
    --border: #e2e8f0;
    --bg-tertiary: #edf2f7;
    --admin-accent-rgb: 229,62,62;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ===== 布局 ===== */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo.logo-centered {
    justify-content: center;
}

.logo i {
    font-size: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav { padding: 12px 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(var(--accent-rgb),0.1);
    color: var(--accent);
    border-left-color: var(--accent);
}

.nav-item i { width: 20px; text-align: center; font-size: 16px; }

/* 可展开导航组 */
.nav-group {}
.nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-size: 14px;
    border-left: 3px solid transparent;
    cursor: pointer;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
}
.nav-group-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-group-toggle.active { background: rgba(var(--accent-rgb),0.1); color: var(--accent); border-left-color: var(--accent); }
.nav-group-toggle i.nav-arrow { margin-left: auto; font-size: 10px; transition: transform 0.2s; }
.nav-group.open .nav-group-toggle i.nav-arrow { transform: rotate(90deg); }
.nav-group.open .nav-group-toggle { color: var(--accent); }
.nav-sub { display: none; }
.nav-group.open .nav-sub { display: block; }
.nav-sub .nav-item { padding: 9px 20px 9px 52px; font-size: 13px; }
.nav-sub .nav-item::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--text-muted); margin-right: 8px; flex-shrink: 0; }
.nav-sub .nav-item.active::before { background: var(--accent); }

.nav-divider { height: 1px; background: var(--border-color); margin: 12px 20px; }

.nav-group-title {
    padding: 8px 20px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-admin { border-right-color: rgba(var(--admin-accent-rgb, 245,101,101),0.3); }
.sidebar-admin .logo i { background: linear-gradient(135deg, var(--admin-accent), var(--admin-accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: none;
}

.admin-badge {
    background: linear-gradient(135deg, var(--admin-accent), var(--admin-accent2));
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-btn {
    color: var(--text-secondary);
    font-size: 18px;
    padding: 6px;
    transition: color 0.2s;
}

.topbar-btn:hover { color: var(--accent); }

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.user-menu:hover { background: var(--bg-hover); }

.user-avatar { font-size: 24px; color: var(--accent); }

.user-name { color: var(--text-secondary); font-size: 14px; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    min-width: 160px;
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 200;
}

.user-menu:hover .dropdown-menu { display: block; }

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.dropdown-menu a:hover { background: var(--bg-hover); color: var(--text-primary); }

.content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* ===== 页面头部 ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h2 i {
    color: var(--accent);
}

.page-actions { display: flex; gap: 8px; }

/* ===== 统计卡片 ===== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon {
    width: 56px; height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-blue .stat-icon { background: rgba(var(--accent-rgb),0.15); color: var(--accent); }
.stat-green .stat-icon { background: rgba(72,187,120,0.15); color: var(--success); }
.stat-purple .stat-icon { background: rgba(118,75,162,0.15); color: #764ba2; }
.stat-orange .stat-icon { background: rgba(237,137,54,0.15); color: var(--warning); }

.stat-info { display: flex; flex-direction: column; }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== 卡片 ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i { color: var(--accent); }

.card-link {
    font-size: 13px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-body { padding: 20px; }

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
}

/* ===== 表格 ===== */
.table-responsive { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tr:hover td { background: var(--bg-hover); }

.user-cell { display: flex; align-items: center; gap: 10px; }

.user-cell-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent);
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-success { background: var(--success); color: white; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

.action-btns { display: flex; gap: 4px; }

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success { background: rgba(72,187,120,0.15); color: var(--success); }
.badge-warning { background: rgba(237,137,54,0.15); color: var(--warning); }
.badge-danger { background: rgba(245,101,101,0.15); color: var(--danger); }
.badge-info { background: rgba(66,153,225,0.15); color: var(--info); }
.badge-primary { background: rgba(var(--accent-rgb),0.15); color: var(--accent); }
.badge-secondary { background: rgba(113,128,150,0.15); color: var(--text-muted); }
.badge-sm { padding: 2px 8px; font-size: 11px; }

/* ===== 表单 ===== */
.form-grid { max-width: 100%; }

.form-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.form-row .form-group { flex: 1; }

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.15);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:disabled { opacity: 0.6; cursor: not-allowed; }

textarea.form-control { resize: vertical; min-height: 60px; }

select.form-control { cursor: pointer; }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.search-form .form-row { flex-wrap: wrap; }

/* ===== 日报卡片 ===== */
.report-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.report-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.report-card-user { display: flex; align-items: center; gap: 10px; }

.report-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.report-card-meta { display: flex; align-items: center; gap: 12px; }

.report-card-body { padding: 16px; }

.report-section { margin-bottom: 12px; }
.report-section:last-child { margin-bottom: 0; }

.report-section label {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.report-section p { color: var(--text-secondary); font-size: 14px; }

.report-card-footer {
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ===== 日报列表(工作台) ===== */
.report-list .report-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.report-list .report-item:last-child { border-bottom: none; }

.report-list .report-avatar { width: 32px; height: 32px; font-size: 13px; }

.report-info { flex: 1; min-width: 0; }

.report-name { font-weight: 500; display: flex; align-items: center; gap: 8px; }

.report-dept { font-size: 12px; color: var(--text-muted); }

.report-content { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

.report-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ===== 公告 ===== */
.announcement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.announcement-item:last-child { border-bottom: none; }

.announcement-title { font-weight: 500; display: flex; align-items: center; gap: 6px; }

.announcement-meta { font-size: 12px; color: var(--text-muted); }

/* ===== 分页 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 0;
}

.page-info { font-size: 13px; color: var(--text-muted); }

/* ===== 弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-dialog { width: 90%; max-width: 520px; }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 { font-size: 18px; font-weight: 600; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 20px; }

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ===== 角色权限 ===== */
.role-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.role-section:last-child { border-bottom: none; }

.role-header { margin-bottom: 16px; }
.role-header h3 { font-size: 18px; margin-bottom: 4px; }

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.permission-group {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
}

.permission-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.permission-item:hover { color: var(--text-primary); }

.permission-item input[type="checkbox"] { accent-color: var(--accent); }

/* ===== 仪表盘网格 ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

/* ===== 登录页 ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-primary);
}

.login-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(var(--accent-rgb),0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(118,75,162,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(66,153,225,0.08) 0%, transparent 50%);
}

.login-container { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 20px; }

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.login-header { text-align: center; margin-bottom: 32px; }

.login-logo {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: var(--accent-gradient);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.login-form .form-group { margin-bottom: 20px; }

.input-icon { position: relative; }

.input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-icon input {
    padding-left: 42px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.mb-4 { margin-bottom: 24px; }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.stat-value-lg {
    font-size: 48px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    padding: 20px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; }
    .form-row .form-group { flex: auto; }
}

/* ===== 主题切换器 ===== */
.theme-switcher {
    position: relative;
    display: flex;
    align-items: center;
}

.theme-switcher-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-switcher-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    min-width: 260px;
    z-index: 300;
}

.theme-panel.active { display: block; }

.theme-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-panel-title i { color: var(--accent); }

.theme-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theme-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.theme-item:hover { background: var(--bg-hover); }

.theme-item.active {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb),0.08);
}

.theme-preview {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.theme-preview-blue { background: linear-gradient(135deg, #667eea, #764ba2); }
.theme-preview-aurora { background: linear-gradient(135deg, #38bdf8, #818cf8); }
.theme-preview-cyber { background: linear-gradient(135deg, #00ff88, #00ccff); }
.theme-preview-crimson { background: linear-gradient(135deg, #eab308, #ef4444); }
.theme-preview-morandi { background: linear-gradient(135deg, #a8a29e, #78716c); }
.theme-preview-sakura { background: linear-gradient(135deg, #ec4899, #a855f7); }
.theme-preview-light { background: linear-gradient(135deg, #4299e1, #667eea); }

.theme-info { flex: 1; }

.theme-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.theme-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.theme-check {
    color: var(--accent);
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.theme-item.active .theme-check { opacity: 1; }

/* 主题切换动画 */
body {
    transition: background-color 0.3s, color 0.3s;
}

.sidebar, .topbar, .card, .stat-card, .modal-content, .form-control,
.report-card, .permission-group, .login-card {
    transition: background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
