/* ==================== 云创薪酬绩效数据台 样式 ==================== */

/* ---- 重置与变量 ---- */
:root {
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #ea580c;
    --warning-light: #fed7aa;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --info: #0891b2;
    --info-light: #cffafe;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --bg-main: #f0f2f5;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --sidebar-w: 220px;
    --ai-panel-w: 300px;
    --topbar-h: 56px;
    --statusbar-h: 32px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-main);
    color: var(--gray-800);
    font-size: 14px;
    overflow: hidden;
    height: 100vh;
}

.hidden { display: none !important; }

/* ---- 登录界面 ---- */
.login-screen {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #0891b2 100%);
}
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}
.login-logo { margin-bottom: 32px; }
.login-logo .logo-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.login-logo h1 { font-size: 22px; color: var(--gray-800); margin-bottom: 8px; }
.login-subtitle { color: var(--gray-500); font-size: 14px; }
.login-form { text-align: left; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 13px; color: var(--gray-600);
    margin-bottom: 6px; font-weight: 500;
}
.form-group input, .form-group select {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px; outline: none;
    transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.login-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.btn-login {
    width: 100%; padding: 12px;
    background: var(--primary); color: #fff;
    border: none; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600;
    cursor: pointer; transition: background .2s;
}
.btn-login:hover { background: var(--primary-dark); }
.login-footer {
    display: flex; justify-content: center; gap: 12px;
    padding-top: 20px; border-top: 1px solid var(--gray-100);
}
.security-badge {
    font-size: 12px; color: var(--gray-500);
    background: var(--gray-50); padding: 4px 10px;
    border-radius: 20px;
}

/* ---- 主应用布局 ---- */
.app {
    height: 100vh;
    display: flex; flex-direction: column;
}
.topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    padding: 0 16px; gap: 16px;
    box-shadow: var(--shadow-sm);
    z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-left .logo-icon { font-size: 20px; }
.app-title { font-size: 16px; font-weight: 600; color: var(--gray-800); white-space: nowrap; }
.topbar-center { flex: 1; display: flex; justify-content: center; }
.refresh-controls { display: flex; align-items: center; gap: 10px; }
.auto-refresh-toggle { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--gray-600); cursor: pointer; }
.auto-refresh-toggle input { cursor: pointer; }
.select-sm {
    padding: 4px 8px; border: 1px solid var(--gray-300);
    border-radius: 4px; font-size: 12px; background: #fff;
}
.last-refresh { font-size: 12px; color: var(--gray-400); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.user-info { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.user-avatar {
    width: 32px; height: 32px;
    background: var(--primary); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
}
.user-detail { display: flex; flex-direction: column; }
.user-name { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.user-role { font-size: 11px; color: var(--gray-400); }

/* ---- 按钮 ---- */
.btn-primary, .btn-secondary, .btn-danger, .btn-sm {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border: none; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.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(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border: none; border-radius: var(--radius-sm);
    background: transparent; color: var(--gray-600);
    cursor: pointer; transition: background .2s;
}
.btn-icon:hover { background: var(--gray-100); }
.btn-send {
    width: 36px; height: 36px;
    background: var(--primary); color: #fff;
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s;
}
.btn-send:hover { background: var(--primary-dark); }

/* ---- 应用主体 ---- */
.app-body {
    flex: 1; display: flex;
    overflow: hidden;
}

/* ---- 侧边栏 ---- */
.sidebar {
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    overflow-y: auto; flex-shrink: 0;
}
.nav-section { padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.nav-section:last-child { border-bottom: none; }
.nav-section-title {
    font-size: 11px; color: var(--gray-400);
    text-transform: uppercase; letter-spacing: 1px;
    padding: 0 16px; margin-bottom: 8px;
}
.nav-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 16px; font-size: 13px;
    color: var(--gray-600); cursor: pointer;
    transition: all .15s; border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--gray-50); color: var(--gray-800); }
.nav-item.active {
    background: var(--primary-light); color: var(--primary-dark);
    border-left-color: var(--primary); font-weight: 500;
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--gray-100); }
.version-info { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray-400); }
.encryption-status { color: var(--success); }

/* ---- 主内容区 ---- */
.main-content {
    flex: 1; overflow-y: auto;
    padding: 20px; background: var(--bg-main);
}

/* ---- KPI卡片 ---- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 20px;
}
.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: box-shadow .2s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-label { font-size: 12px; color: var(--gray-500); margin-bottom: 8px; }
.kpi-value { font-size: 24px; font-weight: 700; color: var(--gray-800); }
.kpi-change { font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.kpi-change.up { color: var(--success); }
.kpi-change.down { color: var(--danger); }
.kpi-change.neutral { color: var(--gray-400); }
.kpi-icon { font-size: 28px; float: right; opacity: 0.3; }

/* ---- 内容卡片 ---- */
.content-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 600; color: var(--gray-800); }
.card-actions { display: flex; gap: 8px; align-items: center; }
.detail-name-filter {
    width: 220px; padding: 6px 12px; font-size: 13px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--gray-50); color: var(--gray-800); outline: none;
}
.detail-name-filter:focus { border-color: var(--primary); background: #fff; }
.card-body { padding: 20px; }
.card-body.no-padding { padding: 0; }

/* ---- 数据表格 ---- */
.data-table {
    width: 100%; border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    background: var(--gray-50);
    padding: 10px 14px; text-align: left;
    font-weight: 600; color: var(--gray-600);
    border-bottom: 2px solid var(--border);
    white-space: nowrap; position: sticky; top: 0;
}
.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table .col-amount { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .col-actions { text-align: center; white-space: nowrap; }
.data-table .editable { cursor: pointer; border-bottom: 1px dashed transparent; }
.data-table .editable:hover { border-bottom-color: var(--primary); background: var(--primary-light); }
.table-actions { display: flex; gap: 4px; justify-content: center; }
.table-action-btn {
    padding: 3px 8px; font-size: 12px;
    border: 1px solid var(--gray-300); border-radius: 4px;
    background: #fff; cursor: pointer; transition: all .15s;
}
.table-action-btn:hover { border-color: var(--primary); color: var(--primary); }
.table-action-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ---- 状态标签 ---- */
.status-tag {
    display: inline-block; padding: 2px 10px;
    border-radius: 20px; font-size: 12px; font-weight: 500;
}
.status-tag.success { background: var(--success-light); color: var(--success); }
.status-tag.warning { background: var(--warning-light); color: var(--warning); }
.status-tag.danger { background: var(--danger-light); color: var(--danger); }
.status-tag.info { background: var(--info-light); color: var(--info); }
.status-tag.neutral { background: var(--gray-100); color: var(--gray-500); }

/* ---- 图表容器 ---- */
.chart-container {
    position: relative;
    height: 300px;
}
.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.chart-grid .chart-container { height: 260px; }

/* ---- AI助手面板 ---- */
.ai-panel {
    width: var(--ai-panel-w);
    background: #fff;
    border-left: 1px solid var(--border);
    display: flex; flex-direction: column;
    flex-shrink: 0;
    transition: width .35s cubic-bezier(.4,0,.2,1);
    box-shadow: -6px 0 18px rgba(15,23,42,.05);
}
.ai-panel.collapsed { width: 0; min-width: 0; overflow: hidden; border-left: none; box-shadow: none; }
.ai-panel.wide { width: 460px; }
.ai-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 14px;
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
    color: #fff;
}
.ai-title { font-size: 14px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 6px; letter-spacing: .3px; }
.ai-header-actions { display: flex; align-items: center; gap: 4px; }
.btn-wide, .btn-collapse {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border: none; border-radius: 8px;
    background: rgba(255,255,255,.14); color: #fff;
    cursor: pointer; transition: background .2s, transform .15s;
}
.btn-wide:hover, .btn-collapse:hover { background: rgba(255,255,255,.3); transform: scale(1.05); }
.btn-wide.active { background: rgba(255,255,255,.42); }
.ai-quick-actions {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 12px 16px; border-bottom: 1px solid var(--gray-100);
}
.quick-btn {
    padding: 5px 10px; font-size: 12px;
    background: var(--primary-light); color: var(--primary-dark);
    border: none; border-radius: 20px;
    cursor: pointer; transition: all .15s;
}
.quick-btn:hover { background: var(--primary); color: #fff; }
.ai-messages {
    flex: 1; overflow-y: auto;
    padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.ai-message {
    display: flex; gap: 10px; max-width: 95%;
    animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ai-message.ai-bot { align-self: flex-start; }
.ai-message.ai-user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
    width: 32px; height: 32px; flex-shrink: 0;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 18px; background: var(--primary-light);
}
.ai-message.ai-user .msg-avatar { background: var(--success-light); }
.msg-content {
    background: var(--gray-50);
    border-radius: 12px 12px 12px 4px;
    padding: 10px 14px; font-size: 13px;
    color: var(--gray-700); line-height: 1.6;
}
.ai-message.ai-user .msg-content {
    background: var(--primary); color: #fff;
    border-radius: 12px 12px 4px 12px;
}
.msg-content p { margin-bottom: 4px; }
.msg-content ul { padding-left: 16px; margin: 4px 0; }
.msg-content .insight-card {
    background: var(--warning-light); border-left: 3px solid var(--warning);
    padding: 8px 12px; margin: 8px 0; border-radius: 4px;
    font-size: 12px;
}
.msg-content .metric-row {
    display: flex; justify-content: space-between;
    padding: 4px 0; border-bottom: 1px solid var(--gray-200);
}
.msg-content .metric-row:last-child { border-bottom: none; }
.ai-input-area {
    display: flex; gap: 8px;
    padding: 12px 16px; border-top: 1px solid var(--border);
}
.ai-input-area input {
    flex: 1; padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 20px; font-size: 13px; outline: none;
}
.ai-input-area input:focus { border-color: var(--primary); }

.ai-expand-btn {
    width: 40px; padding: 18px 4px;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    border: none;
    border-radius: 12px 0 0 12px;
    box-shadow: -4px 4px 14px rgba(15,23,42,.18);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    cursor: pointer; color: #fff;
    flex-shrink: 0; transition: transform .18s, box-shadow .18s;
}
.ai-expand-btn:hover { transform: translateX(-2px); box-shadow: -6px 6px 18px rgba(15,23,42,.26); }
.ai-expand-icon { font-size: 18px; }
.ai-expand-text {
    writing-mode: vertical-rl; font-size: 12px;
    font-weight: 600; letter-spacing: 3px;
}

/* ---- 状态栏 ---- */
.statusbar {
    height: var(--statusbar-h);
    background: var(--gray-800);
    color: var(--gray-300);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; font-size: 12px;
    flex-shrink: 0;
}
.status-left, .status-right { display: flex; align-items: center; gap: 8px; }
.status-divider { color: var(--gray-500); }
.connection-status { color: var(--success); }

/* ---- 全局加载遮罩 ---- */
.global-loading {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);
}
.global-loading .loading-spinner {
    width: 44px; height: 44px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.global-loading .loading-text {
    margin-top: 16px;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 弹窗 ---- */
.modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.4);
}
.modal-content {
    position: relative; background: #fff;
    border-radius: var(--radius-lg);
    width: 700px; max-height: 85vh;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
    z-index: 1;
}
.modal-content.modal-sm { width: 500px; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 16px; font-weight: 600; }
.btn-close {
    width: 28px; height: 28px;
    border: none; background: transparent;
    font-size: 20px; color: var(--gray-400); cursor: pointer;
}
.btn-close:hover { color: var(--gray-700); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }

/* ---- 导入区域 ---- */
.import-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 40px 20px; text-align: center;
    margin-bottom: 16px; transition: border-color .2s;
}
.import-area.dragover { border-color: var(--primary); background: var(--primary-light); }
.import-area .import-icon { font-size: 48px; margin-bottom: 12px; }
.import-area p { color: var(--gray-600); margin-bottom: 8px; }
.import-hint { font-size: 12px; color: var(--gray-400); }
.import-target { margin-bottom: 16px; }
.import-target label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--gray-600); }
.import-target select {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
}
.import-preview { border-top: 1px solid var(--border); padding-top: 16px; }
.preview-info { font-size: 13px; color: var(--gray-600); margin-bottom: 12px; padding: 8px 12px; background: var(--info-light); border-radius: var(--radius-sm); }
.preview-table-wrap { max-height: 300px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 16px; }
.import-actions { display: flex; justify-content: flex-end; gap: 8px; }
.import-template { text-align: center; font-size: 12px; color: var(--gray-400); margin-top: 12px; }
.import-template a { color: var(--primary); text-decoration: none; }
.import-backup { margin-top: 14px; padding: 12px; background: var(--gray-50); border: 1px dashed var(--gray-300); border-radius: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.import-backup .backup-label { font-size: 12px; color: var(--gray-600); font-weight: 600; }

/* ---- 编辑表单 ---- */
.edit-form { display: grid; gap: 12px; }
.edit-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-form .form-group label { font-size: 12px; color: var(--gray-600); }
.edit-form .form-group input, .edit-form .form-group select {
    padding: 8px 10px; font-size: 13px;
}
.edit-form-actions {
    display: flex; justify-content: flex-end; gap: 8px;
    padding-top: 16px; border-top: 1px solid var(--border);
}

/* ---- Toast通知 ---- */
.toast-container {
    position: fixed; top: 70px; right: 20px; z-index: 2000;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: #fff; border-radius: var(--radius);
    padding: 12px 20px; box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; min-width: 280px;
    animation: slideIn .3s ease;
    border-left: 4px solid var(--primary);
}
@keyframes slideIn { from { transform: translateX(120%); } to { transform: translateX(0); } }
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }
.toast-icon { font-size: 18px; }

/* ---- 安全中心 ---- */
.security-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.security-section {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.security-section h3 {
    font-size: 14px; font-weight: 600; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.security-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--gray-100);
}
.security-item:last-child { border-bottom: none; }
.security-item-label { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.security-item-value { font-size: 13px; font-weight: 500; }
.toggle-switch {
    width: 40px; height: 22px;
    background: var(--gray-300); border-radius: 20px;
    position: relative; cursor: pointer; transition: background .2s;
}
.toggle-switch.active { background: var(--success); }
.toggle-switch::after {
    content: ''; position: absolute;
    width: 18px; height: 18px; background: #fff;
    border-radius: 50%; top: 2px; left: 2px;
    transition: left .2s;
}
.toggle-switch.active::after { left: 20px; }

/* ---- 审计日志 ---- */
.audit-log { max-height: 400px; overflow-y: auto; }
.audit-entry {
    padding: 8px 0; border-bottom: 1px solid var(--gray-100);
    display: flex; gap: 12px; font-size: 12px;
}
.audit-time { color: var(--gray-400); white-space: nowrap; }
.audit-user { color: var(--primary); font-weight: 500; min-width: 60px; }
.audit-action { color: var(--gray-600); }

/* ---- 自动化任务 ---- */
.automation-list { display: flex; flex-direction: column; gap: 12px; }
.automation-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: var(--bg-card);
    border-radius: var(--radius); border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.automation-info { display: flex; align-items: center; gap: 12px; }
.automation-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.automation-icon.active { background: var(--success-light); }
.automation-icon.inactive { background: var(--gray-100); }
.automation-detail h4 { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.automation-detail p { font-size: 12px; color: var(--gray-500); }
.automation-schedule {
    display: flex; align-items: center; gap: 12px;
}
.automation-next { font-size: 12px; color: var(--gray-400); }

/* ---- 模块标题 ---- */
.module-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.module-title { font-size: 20px; font-weight: 700; color: var(--gray-800); }
.module-subtitle { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.module-actions { display: flex; gap: 8px; }

/* ---- 搜索栏 ---- */
.search-bar {
    display: flex; gap: 8px; margin-bottom: 16px;
}
.search-bar input {
    flex: 1; padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm); font-size: 13px; outline: none;
}
.search-bar input:focus { border-color: var(--primary); }
.filter-select {
    padding: 8px 12px; border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm); font-size: 13px;
}

/* ---- 空状态 ---- */
.empty-state {
    text-align: center; padding: 60px 20px; color: var(--gray-400);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 14px; }

/* ---- 数字格式化 ---- */
.currency { font-variant-numeric: tabular-nums; }
.percent { font-variant-numeric: tabular-nums; }

/* ---- 响应式 ---- */
@media (max-width: 1200px) {
    .chart-grid { grid-template-columns: 1fr; }
    .security-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .ai-panel { display: none; }
    .sidebar { width: 180px; }
}

/* ==================== 台账改版新增样式 ==================== */
.section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 28px 0 12px;
    padding-left: 10px;
    border-left: 4px solid #2563eb;
    display: flex;
    align-items: center;
    gap: 4px;
}
.data-table.compact {
    font-size: 13px;
}
.data-table.compact th,
.data-table.compact td {
    padding: 7px 16px;
}
.data-table.compact tbody tr:hover {
    background: #f8fafc;
}
.btn-link {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    text-decoration: none;
}
.btn-link:hover {
    text-decoration: underline;
}
.btn-active {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}
details summary {
    user-select: none;
    list-style: none;
}
details summary::-webkit-details-marker {
    display: none;
}
details summary::before {
    content: '▸ ';
}
details[open] summary::before {
    content: '▾ ';
}

/* ==================== 专属分享链接 & 访客水印 ==================== */
.share-manager {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.share-input {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #334155;
}
.share-input:focus {
    outline: none;
    border-color: #2563eb;
}
.share-mod-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 6px 0;
}
.share-mod-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    user-select: none;
}
.share-link-box {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    border-radius: 8px;
    font-size: 12px;
}
.share-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.share-link-row label {
    width: 36px;
    color: #64748b;
    flex-shrink: 0;
}
.share-link-row input {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 11px;
    color: #334155;
    background: #fff;
    font-family: monospace;
}
.guest-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-24deg);
    font-size: 42px;
    font-weight: 700;
    color: #94a3b8;
    opacity: 0.10;
    white-space: nowrap;
    pointer-events: none;
    z-index: 9999;
    letter-spacing: 4px;
    text-shadow: 0 0 1px #cbd5e1;
}

/* ============================================================
   云创2026 · UI 美化增强（蓝灰专业风）
   ============================================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #eff6ff;
    --bg-main: #eef2f7;
    --sidebar-bg: linear-gradient(180deg, #0f2747 0%, #14315c 100%);
    --sidebar-text: #c7d2e8;
    --sidebar-active: #3b82f6;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.06);
    --shadow-md: 0 8px 20px rgba(15,23,42,0.10);
    --shadow-lg: 0 16px 40px rgba(15,23,42,0.14);
}

/* 侧边栏：深色专业风 */
.sidebar {
    background: var(--sidebar-bg);
    border-right: none;
    box-shadow: 2px 0 12px rgba(15,23,42,0.18);
}
.nav-section-title { color: #6b86b3; }
.nav-item { color: var(--sidebar-text); border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(59,130,246,0.28), rgba(59,130,246,0.04));
    color: #fff; border-left-color: var(--sidebar-active); font-weight: 600;
}
.nav-icon { filter: grayscale(0.1); }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.08); }
.version-info { color: #6b86b3; }

/* 顶栏：毛玻璃 */
.topbar {
    background: rgba(255,255,255,0.86);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}

/* 卡片悬浮微动效 */
.content-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: box-shadow .25s, transform .25s;
}
.content-card:hover { box-shadow: var(--shadow-md); }

/* 模块标题 */
.module-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 16px; gap: 16px; flex-wrap: wrap;
}
.module-title { font-size: 19px; font-weight: 700; color: var(--gray-800); letter-spacing: .3px; }
.module-subtitle { font-size: 12.5px; color: var(--gray-500); margin-top: 4px; }
.module-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 按钮美化 */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 2px 8px rgba(37,99,235,0.30);
}
.btn-primary:hover { background: linear-gradient(135deg, #2563eb, #1e40af); transform: translateY(-1px); }
.btn-secondary { background: #fff; border: 1px solid var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-300); }

/* 表格 */
.data-table { border-radius: var(--radius); overflow: hidden; }
.data-table th {
    background: var(--gray-50); color: var(--gray-600);
    font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--border);
}
.data-table tbody tr:hover { background: var(--primary-light); }

/* 绩效 / 薪酬 洞察块 */
.insight-pos {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 14px; margin-bottom: 12px; background: #fff;
    box-shadow: var(--shadow-sm);
}
.insight-pos-title { font-size: 13.5px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; }
.insight-pos-list { display: flex; flex-direction: column; gap: 6px; }
.insight-person {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 10px; background: var(--gray-50); border-radius: 8px; font-size: 13px;
}
.ip-name { font-weight: 600; color: var(--gray-800); }
.ip-meta { font-size: 11.5px; color: var(--gray-500); }

.kpi-card { border-radius: var(--radius-lg); }
.kpi-value { letter-spacing: .5px; }

/* ===== 总览多模块集成视图（成本拆解 / 占比 / 标的费率 / 绩效跟踪）===== */
.cost-bar-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--gray-200); }
.cost-bar-row:last-child { border-bottom: none; }
.cost-bar-label { width: 84px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--gray-700); }
.cost-bar-track { flex: 1; height: 14px; background: var(--gray-100); border-radius: 7px; overflow: hidden; }
.cost-bar-track.wide { height: 18px; margin-top: 10px; }
.cost-bar-fill { display: block; height: 100%; border-radius: 7px; transition: width .6s ease; }
.cost-bar-val { width: 220px; flex-shrink: 0; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--gray-800); }
.cost-bar-val em { font-style: normal; color: var(--gray-500); margin-left: 6px; font-size: 12px; }

.ratio-big { font-size: 44px; font-weight: 800; line-height: 1; color: var(--primary); font-variant-numeric: tabular-nums; }
.ratio-unit { font-size: 20px; font-weight: 700; margin-left: 2px; color: var(--gray-400); }
.ratio-sub { font-size: 12.5px; color: var(--gray-500); margin-top: 8px; }

.tag-pill { display: inline-block; margin: 3px 6px 3px 0; padding: 4px 10px; background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 999px; font-size: 12.5px; color: var(--gray-700); }
.tag-pill b { color: var(--gray-900); font-variant-numeric: tabular-nums; }

.tr-delta-list { padding: 8px 4px; }
.tr-delta-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; }
.tr-delta-row:nth-child(odd) { background: var(--gray-50); }
.tr-name { width: 110px; flex-shrink: 0; font-weight: 600; color: var(--gray-800); font-size: 13px; }
.tr-range { flex: 1; font-variant-numeric: tabular-nums; color: var(--gray-600); font-size: 13px; }
.tr-delta { width: 96px; flex-shrink: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }

.kpi-clickable { transition: transform .15s ease, box-shadow .15s ease; }
.kpi-clickable:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ===== 总览深色沉浸式驾驶舱（借鉴但不照搬截图风格） ===== */
.overview-dashboard {
    margin: -20px; padding: 24px;
    min-height: calc(100% + 40px);
    background: linear-gradient(135deg, #0b1220 0%, #0f172a 50%, #111827 100%);
    color: #f8fafc;
    overflow-x: hidden;
}

/* 顶部 KPI 卡行 */
.db-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px; margin-bottom: 20px;
}
.db-kpi-card {
    position: relative;
    background: rgba(17, 28, 46, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.1);
    border-radius: 14px;
    padding: 18px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.db-kpi-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #34d399);
    opacity: 0.8;
}
.db-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.14);
}
.db-kpi-value {
    font-size: 25px; font-weight: 800; color: #f8fafc;
    font-variant-numeric: tabular-nums; line-height: 1.2;
}
.db-kpi-primary .db-kpi-value {
    background: linear-gradient(90deg, #38bdf8, #34d399);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.db-kpi-success .db-kpi-value { color: #34d399; }
.db-kpi-title { font-size: 13.5px; color: #94a3b8; margin-top: 8px; }
.db-kpi-sub { font-size: 11.5px; color: #64748b; margin-top: 4px; }

/* 网格布局 */
.db-grid {
    display: grid; gap: 16px; margin-bottom: 20px;
}
.db-grid-3 { grid-template-columns: 2fr 1.1fr 1.1fr; }
.db-grid-2 { grid-template-columns: 1fr 1fr; }
.db-card-wide { grid-column: 1 / -1; }

/* 深色卡片 */
.db-card {
    position: relative;
    background: rgba(17, 28, 46, 0.82);
    border: 1px solid rgba(56, 189, 248, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.db-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #34d399);
    opacity: 0.7;
}
.db-card:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(56, 189, 248, 0.12); }
.db-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    position: relative; z-index: 1;
}
.db-card-title { font-size: 15px; font-weight: 700; color: #f8fafc; }
.db-card-subtitle { font-size: 12px; color: #64748b; }
.db-card-body { padding: 18px; position: relative; z-index: 1; }
.db-card-center { display: flex; justify-content: center; align-items: center; position: relative; min-height: 200px; }
.db-card-split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 16px; }

/* 成本 hero */
.db-cost-hero {
    font-size: 38px; font-weight: 800; color: #f8fafc;
    font-variant-numeric: tabular-nums; margin-bottom: 6px;
}
.db-cost-sub { font-size: 12.5px; color: #94a3b8; margin-bottom: 18px; }
.db-cost-breakdown {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px;
}
.db-cost-mini {
    display: flex; flex-direction: column; gap: 4px;
    padding: 12px; background: rgba(15, 23, 42, 0.65);
    border-radius: 10px;
}
.db-cost-mini b { font-size: 14px; color: #f8fafc; font-variant-numeric: tabular-nums; }
.db-cost-mini span { font-size: 11px; color: #94a3b8; }

/* 环形图 */
.db-ring-wrap { width: 170px; height: 170px; position: relative; }
.db-ring-center-label {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; pointer-events: none;
}
.db-ring-center-label span { display: block; font-size: 11px; color: #94a3b8; }
.db-ring-center-label b { display: block; font-size: 15px; font-weight: 700; color: #f8fafc; margin-top: 3px; font-variant-numeric: tabular-nums; }
.db-ring-legend { display: flex; flex-direction: column; gap: 10px; }
.db-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.db-legend-name { flex: 1; color: #cbd5e1; }
.db-legend-pct { color: #94a3b8; font-variant-numeric: tabular-nums; }
.db-legend-amount { color: #f8fafc; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 进度条 */
.db-progress-list { display: flex; flex-direction: column; gap: 13px; }
.db-progress-row { display: flex; flex-direction: column; gap: 6px; }

/* 调薪类型分布 */
.db-adj-list { display: flex; flex-direction: column; gap: 14px; }
.db-adj-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(30,41,59,0.5); border: 1px solid rgba(148,163,184,0.10); border-radius: 10px; }
.db-adj-name { flex: 1; color: #e2e8f0; font-size: 13px; font-weight: 500; }
.db-adj-count { color: #94a3b8; font-size: 12px; font-variant-numeric: tabular-nums; }
.db-adj-amount { color: #f8fafc; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-amount-wan { color: #fbbf24; }
.db-progress-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.db-progress-name { flex: 1; color: #e2e8f0; }
.db-progress-pct { color: #94a3b8; font-variant-numeric: tabular-nums; }
.db-progress-track { height: 8px; background: rgba(148, 163, 184, 0.15); border-radius: 4px; overflow: hidden; }
.db-progress-fill { display: block; height: 100%; border-radius: 4px; transition: width .6s ease; }
.db-progress-amount { text-align: right; font-size: 12px; color: #f8fafc; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* 绩效卡片 */
.db-perf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.db-perf-card {
    padding: 14px; border-radius: 12px; cursor: pointer; text-align: center;
    background: rgba(15, 23, 42, 0.65); border: 1px solid rgba(56, 189, 248, 0.08);
    transition: transform .15s ease, box-shadow .15s ease;
}
.db-perf-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(56, 189, 248, 0.12); }
.db-perf-top { border-top: 2px solid #34d399; }
.db-perf-bottom { border-top: 2px solid #f87171; }
.db-perf-icon { font-size: 22px; }
.db-perf-value { font-size: 26px; font-weight: 800; color: #f8fafc; margin: 4px 0; font-variant-numeric: tabular-nums; }
.db-perf-label { font-size: 12px; color: #94a3b8; }
.db-perf-hint { font-size: 11px; color: #64748b; margin-top: 4px; }

/* 图表容器 */
.db-chart-container { height: 260px; }

/* 总览第一行：总成本紧凑卡 + 标的费率卡 */
.db-card-cost .db-cost-hero { font-size: 30px; font-weight: 800; color: #f8fafc; letter-spacing: -0.5px; line-height: 1.15; }
.db-card-cost .db-cost-sub { font-size: 12px; color: #94a3b8; margin-top: 6px; }
.db-cost-chips { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 14px; }
.db-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #cbd5e1; background: rgba(148,163,184,0.10); padding: 3px 8px; border-radius: 999px; }
.db-chip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.db-card-rate .db-card-body { display: flex; flex-direction: column; }
.db-chart-sm { height: 200px; flex: 1; }
.db-card-rate .db-delta { margin-top: 8px; }

/* 通用小元素 */
.db-empty { padding: 24px; color: #64748b; text-align: center; font-size: 13px; }
.db-delta { font-size: 12px; font-weight: 600; }
.db-delta.up { color: #34d399; }
.db-delta.down { color: #f87171; }
.db-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* 深色驾驶舱响应式 */
@media (max-width: 1400px) {
    .db-grid-3 { grid-template-columns: 1fr 1fr; }
    .db-card-large { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
    .db-grid-3, .db-grid-2 { grid-template-columns: 1fr; }
    .db-card-split { grid-template-columns: 1fr; }
    .db-card-center { min-height: auto; padding-bottom: 12px; }
    .db-ring-wrap { margin: 0 auto; }
}

/* ============================================================
   云创2026 · 全局深色主题统一
   ============================================================ */
:root {
    --bg-main: #0b1220;
    --bg-card: rgba(17, 28, 46, 0.82);
    --border: rgba(148, 163, 184, 0.14);
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}

body { background: var(--bg-main); color: var(--text-main); }

/* 顶栏深色毛玻璃 */
.topbar {
    background: rgba(11, 18, 32, 0.86);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.app-title { color: var(--text-main); }
.topbar-center .auto-refresh-toggle { color: var(--text-secondary); }
.topbar-center .select-sm {
    background: rgba(30, 41, 59, 0.8); border-color: var(--border);
    color: var(--text-main);
}
.last-refresh { color: var(--text-muted); }
.user-name { color: #e2e8f0; }
.user-role { color: var(--text-muted); }
.user-avatar { background: linear-gradient(135deg, #3b82f6, #0891b2); }

/* 主内容区深色 */
.main-content {
    background: var(--bg-main);
    color: var(--text-main);
}

/* 通用按钮深色化 */
.btn-secondary {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(148, 163, 184, 0.25);
}
.btn-icon { color: var(--text-secondary); }
.btn-icon:hover { background: rgba(148, 163, 184, 0.12); color: var(--text-main); }

/* 模块标题深色 */
.module-title { color: var(--text-main); }
.module-subtitle { color: var(--text-muted); }

/* KPI 卡片深色 */
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.kpi-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.22); }
.kpi-label { color: var(--text-muted); }
.kpi-value { color: var(--text-main); }
.kpi-change.neutral { color: var(--text-muted); }

/* 内容卡片深色 */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.content-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.22); }
.card-header { border-bottom: 1px solid var(--border); }
.card-title { color: var(--text-main); }

/* 数据表格深色 */
.data-table th {
    background: rgba(15, 23, 42, 0.75);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}
.data-table td {
    border-bottom: 1px solid var(--border);
    color: #e2e8f0;
}
.data-table tbody tr:hover { background: rgba(59, 130, 246, 0.10); }
.table-action-btn {
    background: rgba(30, 41, 59, 0.7);
    border-color: var(--border);
    color: var(--text-main);
}
.table-action-btn:hover { border-color: #3b82f6; color: #60a5fa; }

/* 输入框深色 */
.detail-name-filter,
.form-group input, .form-group select,
.import-target select,
.edit-form .form-group input, .edit-form .form-group select,
.select-sm, .ai-input {
    background: rgba(15, 23, 42, 0.7);
    border-color: var(--border);
    color: var(--text-main);
}
.detail-name-filter:focus,
.form-group input:focus, .form-group select:focus {
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

/* 弹窗深色 */
.modal-content { background: #0f172a; border: 1px solid var(--border); }
.modal-header { border-bottom: 1px solid var(--border); }
.modal-header h2 { color: var(--text-main); }
.btn-close { color: var(--text-muted); }
.btn-close:hover { color: var(--text-main); }

/* 导入区域深色 */
.import-area { border-color: var(--border); }
.import-area p { color: var(--text-secondary); }
.import-hint { color: var(--text-muted); }
.import-area.dragover { background: rgba(59, 130, 246, 0.08); }
.preview-info { background: rgba(8, 145, 178, 0.10); color: #67e8f9; }
.preview-table-wrap { border-color: var(--border); }
.import-backup { background: rgba(15, 23, 42, 0.6); border-color: var(--border); }
.import-backup .backup-label { color: var(--text-secondary); }

/* Toast 深色 */
.toast {
    background: rgba(17, 28, 46, 0.95);
    border: 1px solid var(--border);
    color: var(--text-main);
}

/* 安全中心深色 */
.security-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.security-section h3 { color: var(--text-main); }
.security-item { border-bottom: 1px solid var(--border); }
.security-item-label { color: var(--text-secondary); }
.security-item-value { color: var(--text-main); }

/* 洞察块深色 */
.insight-pos {
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.insight-pos-title { color: var(--text-main); }
.insight-person { background: rgba(15, 23, 42, 0.6); }
.ip-name { color: var(--text-main); }
.ip-meta { color: var(--text-muted); }

/* 标签/状态深色 */
.tag-pill {
    background: rgba(30, 41, 59, 0.7);
    border-color: var(--border);
    color: var(--text-secondary);
}
.tag-pill b { color: var(--text-main); }
.status-tag.success { background: rgba(22, 163, 74, 0.14); color: #86efac; }
.status-tag.warning { background: rgba(234, 88, 12, 0.14); color: #fdba74; }
.status-tag.danger { background: rgba(220, 38, 38, 0.14); color: #fca5a5; }
.status-tag.info { background: rgba(8, 145, 178, 0.14); color: #67e8f9; }
.status-tag.neutral { background: rgba(148, 163, 184, 0.12); color: var(--text-secondary); }

/* 加载遮罩深色 */
.global-loading { background: rgba(11, 18, 32, 0.85); }
.global-loading .loading-spinner { border-color: rgba(148, 163, 184, 0.18); }
.global-loading .loading-text { color: var(--text-secondary); }

/* AI 面板深色统一 */
.ai-panel {
    background: rgba(11, 18, 32, 0.96);
    border-left: 1px solid var(--border);
    box-shadow: -6px 0 18px rgba(0,0,0,0.25);
}
.ai-quick-actions { border-bottom: 1px solid var(--border); }
.quick-btn {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.quick-btn:hover { background: rgba(59, 130, 246, 0.18); color: var(--text-main); }
.ai-input-wrap { border-top: 1px solid var(--border); }
.ai-input {
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-main);
}
.ai-input::placeholder { color: var(--text-muted); }

/* 登录页卡片深色玻璃 */
.login-card {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.login-logo h1 { color: var(--text-main); }
.login-subtitle { color: var(--text-secondary); }
.login-footer { border-top: 1px solid var(--border); }

/* 滚动条深色 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.5); }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.5); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.7); }

/* 表格行 hover 高亮（确保深色下可见，覆盖前面的浅色 hover） */
.data-table tbody tr:hover,
.data-table tbody tr:hover td { background: rgba(59, 130, 246, 0.12) !important; }

/* 左侧导航链接去掉下划线 */
a.nav-item, a.nav-item:hover, a.nav-item:visited,
.nav-item, .nav-item:hover, .nav-item.active { text-decoration: none !important; }

/* 兜底：强制把内联浅色文字转成深色主题可读色 */
[style*="color:#334155"],
[style*="color:#475569"],
[style*="color:#64748b"] { color: #e2e8f0 !important; }

/* 兜底：强制把残留的浅色内联背景转成深色 */
[style*="background:#f8fafc"],
[style*="background:#fff"] { background: rgba(30, 41, 59, 0.7) !important; }

/* ===== 通用弹层（快照访问记录等） ===== */
.yc-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(2, 6, 23, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.yc-modal {
  width: min(560px, 92vw);
  max-height: 86vh; overflow: auto;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.yc-modal-title {
  font-size: 15px; font-weight: 700; color: #f1f5f9; margin-bottom: 6px;
}
.yc-modal .data-table th { color: #94a3b8; }
.yc-modal .data-table td { color: #e2e8f0; }
