
/* === 主容器 === */
.app-container {
    height: 100vh; display: flex; flex-direction: column;
    background: var(--bg-page); overflow: hidden; position: relative;
}

/* 赛博朋克网格背景 */
.app-container::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 0, 255, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 255, 0.012) 1px, transparent 1px);
    background-size: 32px 32px, 32px 32px, 128px 128px, 128px 128px;
    mask-image: radial-gradient(ellipse at 50% 0, black 15%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0, black 15%, transparent 75%);
}

/* 双光源光晕 */
.app-container::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 500px;
    z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 25% 0, rgba(0, 240, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 0, rgba(255, 0, 255, 0.04) 0%, transparent 50%);
}

/* === Header === */
.app-header {
    height: var(--header-h);
    background: rgba(4, 6, 10, 0.95);
    backdrop-filter: blur(16px);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 14px; position: sticky; top: 0; z-index: 100;
    border-radius: var(--radius-sm);
    margin: 4px 4px 3px 4px;
    border: 1px solid var(--border-active);
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 240, 255, 0.06);
}
.app-header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--primary), transparent);
    opacity: 0.5;
}
.app-header::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--primary), transparent);
    opacity: 0.5;
}

.header-left { display: flex; align-items: center; gap: 10px; }
.app-logo {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: #000; font-size: 14px;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.5), 0 0 8px rgba(255, 0, 255, 0.15);
    animation: logoPulse 3s ease-in-out infinite;
}
.app-title {
    font-size: 15px; font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.6), 0 0 12px rgba(0, 240, 255, 0.4), 0 0 24px rgba(0, 240, 255, 0.2);
    letter-spacing: 1px;
}

/* 汉堡菜单 */
.sidebar-toggle {
    width: 28px; height: 28px; background: none; border: none;
    cursor: pointer; display: none; flex-direction: column;
    justify-content: center; gap: 4px; padding: 4px;
}
.sidebar-toggle span {
    display: block; height: 1.5px; background: var(--primary);
    border-radius: 1px; transition: all var(--transition);
    box-shadow: 0 0 4px rgba(0, 240, 255, 0.4);
}
.sidebar-toggle span:nth-child(1) { width: 16px; }
.sidebar-toggle span:nth-child(2) { width: 12px; }
.sidebar-toggle span:nth-child(3) { width: 14px; }

/* 时钟 */
.header-center {
    position: absolute; left: 50%; transform: translateX(-50%);
    font-size: 14px; color: var(--primary);
    font-variant-numeric: tabular-nums; letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.2);
    font-family: 'SF Mono', 'Courier New', monospace;
}

/* 用户区 */
.header-right { display: flex; align-items: center; gap: 10px; }
.header-user {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm);
    transition: all var(--transition); position: relative;
}
.header-user:hover { background: rgba(0, 240, 255, 0.05); }
.header-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    color: #000; font-size: 12px; font-weight: 700;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}
.user-name { font-size: 13px; color: var(--text-body); }
.user-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 6px;
    background: rgba(6, 10, 16, 0.98);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-sm); min-width: 160px;
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.1);
    display: none; z-index: 200;
}
.user-dropdown.show { display: block; }
.dropdown-item {
    padding: 10px 14px; font-size: 13px; color: var(--text-body);
    cursor: pointer; transition: all var(--transition);
    display: flex; align-items: center; gap: 8px;
}
.dropdown-item:hover {
    background: rgba(0, 240, 255, 0.06); color: var(--primary);
}

/* === Sidebar === */
.app-sidebar {
    width: 60px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden; flex-shrink: 0;
    position: relative;
    border-right: 1px solid var(--border-active);
    box-shadow: inset 0 0 30px rgba(0, 240, 255, 0.04), 4px 0 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 240, 255, 0.08);
}
.app-sidebar::before {
    content: ''; position: absolute; top: 0; right: 0;
    width: 1px; height: 100%;
    background: linear-gradient(to bottom, transparent 0%, var(--primary) 15%, var(--secondary) 50%, var(--primary) 85%, transparent 100%);
    opacity: 0.5;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
}

/* 顶部留白 */
.sidebar-top-spacer { height: 16px; flex-shrink: 0; }
.sidebar-brand {
    font-size: 9px; font-weight: 700; color: var(--primary);
    letter-spacing: 3px; text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

/* 导航菜单 */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 10px;
}

/* 分隔线 */
.sidebar-divider {
    width: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.15), transparent);
    margin: 8px 0;
}

.menu-item {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 500;
    position: relative;
    flex-shrink: 0;
}
.menu-item i {
    font-size: 16px;
    transition: all 0.25s ease;
}
.menu-item:hover {
    background: rgba(0, 240, 255, 0.06);
    color: var(--primary);
}
.menu-item:hover i {
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.5));
}
.menu-item.active {
    background: rgba(0, 240, 255, 0.14);
    color: var(--primary);
    border-radius: 8px;
    margin: 3px 5px;
}
.menu-item.active i {
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.6));
    transform: scale(1.1);
}
.menu-text {
    font-size: 10.5px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* 底部 */
.sidebar-footer {
    padding: 12px 0;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.15);
    text-align: center;
    letter-spacing: 2px;
}

/* === 主体布局 === */
.app-body {
    display: flex; flex: 1; overflow: hidden;
    position: relative; z-index: 1;
    padding: 0 4px 4px 4px; gap: 3px;
}
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.main-breadcrumb {
    padding: 10px 14px;
    min-height: 32px;
    flex-shrink: 0;
}
.main-content {
    flex: 1; padding: 0 12px 6px 12px;
    overflow-y: auto; overflow-x: hidden;
    position: relative; z-index: 1;
}
.main-content-inner { max-width: 1400px; margin: 0 auto; }

/* === 统计卡片 === */
.stat-card {
    background: var(--bg-card); border-radius: var(--radius-sm);
    border: 1px solid var(--border); padding: 18px;
    transition: all var(--transition); position: relative; overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.03), 0 4px 12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 40px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: inset 0 0 24px rgba(0, 240, 255, 0.04), 0 0 20px rgba(0, 240, 255, 0.08);
}
.stat-card-icon {
    width: 38px; height: 38px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; margin-bottom: 10px;
    background: rgba(0, 240, 255, 0.1); color: var(--primary);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.2);
}
.stat-card-value {
    font-size: 26px; font-weight: 700; color: var(--text-main);
    line-height: 1.2;
}
.stat-card-label {
    font-size: 13px; color: var(--text-muted);
    margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.stat-card-change {
    font-size: 13px; margin-top: 8px; font-weight: 500;
}
.stat-card-change.up { color: var(--accent); }
.stat-card-change.down { color: var(--danger); }

/* === 统计卡片网格 === */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

/* === 图表容器 === */
.chart-container {
    background: rgba(8, 14, 24, 0.75);
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: inset 0 0 16px rgba(0, 240, 255, 0.015);
    position: relative;
    overflow: hidden;
}
.chart-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 40px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.chart-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chart-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--primary), transparent);
    border-radius: 2px;
}

/* === 搜索栏 === */
.search-bar {
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.02);
}
.search-bar input { flex: 1; border: none; background: none; color: var(--text-main); font-size: 14px; }
.search-bar input:focus { outline: none; }
.search-bar input::placeholder { color: var(--text-muted); }

/* === 页面标题 === */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin: 0 0 8px 0;
    padding: 3px 12px 3px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(8, 12, 20, 0.85);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
.page-header::after {
    content: ''; position: absolute; bottom: -1px; left: 0;
    width: 60px; height: 1px;
    background: linear-gradient(90deg, var(--primary), transparent);
}
.page-title { font-size: 16px; font-weight: 700; color: var(--text-main); }
.page-title i { color: var(--primary); margin-right: 8px; }

/* === 工具栏 === */
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; gap: 8px; flex-wrap: wrap;
}

/* === 表格 === */
.table-container {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); overflow: hidden;
    box-shadow: inset 0 0 16px rgba(0, 240, 255, 0.015);
}

/* === 分页 === */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; margin-top: 12px; padding-top: 10px;
    border-top: 1px solid var(--border);
}
.page-btn {
    min-width: 34px; height: 34px; padding: 0 10px;
    background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-muted);
    font-size: 13px; cursor: pointer; transition: all var(--transition);
    display: inline-flex; align-items: center; justify-content: center;
}
.page-btn:hover { color: var(--primary); }
.page-btn.active {
    background: rgba(0, 240, 255, 0.1); border-color: var(--primary);
    color: var(--primary); font-weight: 600;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.page-info { font-size: 12px; color: var(--text-muted); margin: 0 10px; }

/* === 面包屑 === */
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-muted); opacity: 0.4; }
.breadcrumb .current { color: var(--text-body); }

/* === Tab === */
.tab-bar {
    display: flex; border-bottom: 1px solid var(--border); margin-bottom: 14px; gap: 0;
}
.tab-item {
    padding: 10px 16px; font-size: 13px; color: var(--text-muted);
    cursor: pointer; transition: all var(--transition);
    border-bottom: 1.5px solid transparent; margin-bottom: -1px;
    font-weight: 500;
}
.tab-item:hover { color: var(--text-body); }
.tab-item.active {
    color: var(--primary); border-bottom-color: var(--primary);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

/* === 表单内Tab（弹窗4Tab） === */
.form-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
    gap: 0;
}
.form-tab {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    border-bottom: 1.5px solid transparent;
    margin-bottom: -1px;
    font-weight: 500;
    white-space: nowrap;
}
.form-tab:hover { color: var(--text-body); }
.form-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}
/* AI分析tab - 非激活状态保持正常，不额外发光 */
.form-tab.ai-tab {
    color: var(--text-muted);
}
.form-tab.ai-tab.active {
    color: var(--primary);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}
/* 激活form-tab内的badge需要对比色 */
.form-tab.active .badge {
    background: rgba(0, 0, 0, 0.5);
    color: var(--primary);
    border: 1px solid rgba(0, 240, 255, 0.3);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* === 按钮组 === */
.btn-group {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.btn-group-item {
    padding: 5px 12px;
    font-size: 13px;
    background: var(--bg-base);
    border: none;
    border-right: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-group-item:last-child { border-right: none; }
.btn-group-item:hover {
    background: rgba(0, 240, 255, 0.05);
    color: var(--text-body);
}
.btn-group-item.active {
    background: rgba(0, 240, 255, 0.12);
    color: var(--primary);
    box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.08);
}

/* === 标签 === */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.3px;
}
.tag-primary {
    background: rgba(0, 240, 255, 0.08);
    color: var(--primary);
    border: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.08);
}
.tag-success {
    background: rgba(0, 230, 118, 0.08);
    color: var(--success);
    border: 1px solid rgba(0, 230, 118, 0.2);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.08);
}
.tag-danger {
    background: rgba(255, 82, 82, 0.08);
    color: var(--danger);
    border: 1px solid rgba(255, 82, 82, 0.2);
    box-shadow: 0 0 8px rgba(255, 82, 82, 0.08);
}
.tag-warning {
    background: rgba(255, 215, 64, 0.08);
    color: var(--warning);
    border: 1px solid rgba(255, 215, 64, 0.2);
    box-shadow: 0 0 8px rgba(255, 215, 64, 0.08);
}

/* === 搜索栏项 === */
.search-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.search-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}

/* === 权限复选框 === */
.perm-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
    color: var(--text-body);
}
.perm-checkbox:hover {
    background: rgba(0, 240, 255, 0.05);
}
.perm-checkbox input[type="checkbox"] {
    accent-color: var(--primary);
}

/* === 卡片组 === */
.card-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* === 卡片选项（单选/多选卡片） === */
.card-option {
    padding: 4px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
    color: var(--text-body);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.card-option:hover {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.03);
}
.card-option.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.12), inset 0 0 8px rgba(0, 240, 255, 0.04);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

/* === 页面操作栏 === */
.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === 表单操作栏 === */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* === 详情展示 (标签在上/内容在下) === */
.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 3px 0;
}
.detail-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.detail-value {
    font-size: 12px;
    color: var(--text-main);
    font-weight: 500;
    word-break: break-word;
    line-height: 1.4;
}

/* === 统计页面 === */
.stat-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: inset 0 0 16px rgba(0, 240, 255, 0.015);
    position: relative;
    overflow: hidden;
}
.stat-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 40px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.stat-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 16px rgba(0, 240, 255, 0.02);
}
.stat-kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 40px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.stat-kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}
.stat-kpi-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-table-container {
    overflow-x: auto;
    margin-top: 10px;
}
.stat-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    font-size: 13px;
}
.stat-table th, .stat-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.stat-table th {
    background: rgba(0, 240, 255, 0.04);
    font-weight: 600;
    font-size: 10px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}
.stat-table tbody tr:hover {
    background: rgba(0, 240, 255, 0.05);
}
.stat-table tbody tr:last-child td { border-bottom: none; }

/* === 图表网格 === */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

/* === Tab按钮 === */
.tab-btn {
    padding: 6px 14px;
    font-size: 13px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
}
.tab-btn:hover {
    border-color: rgba(0, 240, 255, 0.3);
    color: var(--text-body);
}
.tab-btn.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.12);
}
/* 激活tab内的badge需要对比色 */
.tab-btn.active .badge {
    background: rgba(0, 0, 0, 0.5);
    color: var(--primary);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

/* === 用户Tab面板 === */
.user-tab-panel { display: none; }
.user-tab-panel.active { display: block; }

/* === 日期选择器 === */
.date-picker {
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: all var(--transition);
}
.date-picker:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.08);
}

/* === 文件芯片 === */
.file-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--primary);
}

/* === 角标 === */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    background: var(--primary);
    color: var(--bg-base);
}

/* === 权限树项 === */
.auth-tree-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
    color: var(--text-body);
}
.auth-tree-item:hover {
    background: rgba(0, 240, 255, 0.05);
}
.auth-tree-item input[type="checkbox"] {
    accent-color: var(--primary);
}

/* === 审批锚点/流程标记 === */
.flow-anchor {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
    border: 2px solid var(--bg-card);
}

/* === 抽屉内部间距 === */
.drawer-body .form-section + .form-section {
    margin-top: 16px;
}
.drawer-body .form-item + .form-item {
    margin-top: 10px;
}
.drawer-body .form-row + .form-row {
    margin-top: 10px;
}
.drawer-body .form-label + .card-group {
    margin-top: 6px;
}
@media (max-width: 768px) {
    .app-sidebar { position: fixed; left: -200px; top: 0; bottom: 0; z-index: 90; margin: 0; border-radius: 0; }
    .app-sidebar.open { left: 0; }
    .sidebar-toggle { display: flex; }
    .app-title { display: none; }
    .header-center { display: none; }
}


/* ============================================================
   亮色主题覆盖层 - main.css
   ============================================================ */

[data-theme="light"] .app-main {
    background: var(--bg-page);
}

/* 顶部六边形网格装饰 - 降低透明度 */
[data-theme="light"] .app-main::before {
    opacity: 0.3;
}

/* 背景光晕 - 降低透明度 */
[data-theme="light"] .app-main::after {
    opacity: 0.3;
}

/* 顶部栏 */
[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
[data-theme="light"] .app-header::before {
    opacity: 0.6;
}
[data-theme="light"] .app-header::after {
    opacity: 0.6;
}

/* Logo */
[data-theme="light"] .app-logo {
    box-shadow: 0 0 12px rgba(0, 160, 170, 0.2);
    color: #000;
}
[data-theme="light"] .app-title {
    text-shadow: 0 0 6px rgba(0, 160, 170, 0.2), 0 0 12px rgba(0, 160, 170, 0.1), 0 0 24px rgba(0, 160, 170, 0.05);
}

/* 时钟 */
[data-theme="light"] .header-center {
    text-shadow: 0 0 6px rgba(0, 160, 170, 0.2);
}

/* 用户信息 */
[data-theme="light"] .header-user:hover {
    background: rgba(0, 160, 170, 0.05);
}
[data-theme="light"] .header-user .user-name {
    color: var(--text-body);
}
[data-theme="light"] .user-avatar {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 0 8px rgba(0, 160, 170, 0.2);
    color: #fff;
}

/* 用户下拉菜单 */
[data-theme="light"] .user-dropdown {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .user-dropdown .dropdown-item {
    color: var(--text-body);
}
[data-theme="light"] .user-dropdown .dropdown-item:hover {
    background: rgba(0, 160, 170, 0.06);
    color: var(--primary);
}
[data-theme="light"] .user-dropdown .dropdown-divider {
    border-top-color: var(--border-light);
}

/* 导航栏 */
[data-theme="light"] .app-sidebar {
    background: rgba(245, 247, 250, 0.98);
    border-right-color: var(--border-active);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.01), 4px 0 16px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .app-sidebar::before {
    opacity: 0.4;
    box-shadow: 0 0 12px rgba(0, 160, 170, 0.15);
}

/* Logo区域 */
[data-theme="light"] .sidebar-brand {
    background: rgba(0, 0, 0, 0.02);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.01), 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* 菜单项 */
[data-theme="light"] .menu-item {
    color: var(--text-muted);
}
[data-theme="light"] .menu-item:hover {
    background: rgba(0, 160, 170, 0.06);
    color: var(--primary);
}
[data-theme="light"] .menu-item.active {
    background: rgba(0, 160, 170, 0.12);
    color: var(--primary);
    border-radius: 8px;
    margin: 3px 5px;
}
[data-theme="light"] .menu-item.active::before {
    opacity: 0.5;
}

/* 子菜单 */
[data-theme="light"] .sub-menu-item {
    color: var(--text-muted);
}
[data-theme="light"] .sub-menu-item:hover {
    color: var(--primary);
    background: rgba(0, 160, 170, 0.04);
}
[data-theme="light"] .sub-menu-item.active {
    color: var(--primary);
    background: rgba(0, 160, 170, 0.06);
}

/* 侧边栏底部 */
[data-theme="light"] .sidebar-footer {
    border-top-color: var(--border);
    background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .sidebar-footer .menu-item {
    color: var(--text-muted);
}
[data-theme="light"] .sidebar-footer .menu-item:hover {
    color: var(--primary);
    background: rgba(0, 160, 170, 0.06);
}

/* 主内容区域 */
[data-theme="light"] .main-content {
    color: var(--text-body);
}

/* 页面头部 */
[data-theme="light"] .page-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    border-bottom-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin: 0 0 8px 0;
    padding: 3px 12px 3px 16px;
}
[data-theme="light"] .page-title {
    color: var(--text-main);
}
[data-theme="light"] .page-subtitle {
    color: var(--text-muted);
}

/* 表格行悬浮 */
[data-theme="light"] .table-row-hover:hover {
    background: rgba(0, 160, 170, 0.03);
}

/* 全局搜索 */
[data-theme="light"] .global-search-container {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .global-search-container input {
    color: var(--text-main);
}
[data-theme="light"] .global-search-container input::placeholder {
    color: var(--text-muted);
}

/* 移动端菜单遮罩 */
[data-theme="light"] .mobile-menu-overlay {
    background: rgba(0, 0, 0, 0.2);
}


/* --- 发光色亮色适配 --- */

[data-theme="light"] .app-container::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 500px;
    z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 25% 0, rgba(0, 160, 170, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 0, rgba(255, 0, 255, 0.04) 0%, transparent 50%);
}

[data-theme="light"] .app-container::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 160, 170, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 160, 170, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 0, 255, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 255, 0.012) 1px, transparent 1px);
    background-size: 32px 32px, 32px 32px, 128px 128px, 128px 128px;
    mask-image: radial-gradient(ellipse at 50% 0, black 15%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0, black 15%, transparent 75%);
}

/* 图表容器 - 亮色主题 */
[data-theme="light"] .chart-container {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 16px rgba(0, 160, 170, 0.015);
}

/* Tab badge - 亮色主题 */
[data-theme="light"] .tab-btn.active .badge,
[data-theme="light"] .form-tab.active .badge {
    color: #ffffff;
}

      