:root {
    color-scheme: dark;
    /* 核心科技色系 */
    --primary: #00e5ff;
    --primary-glow: rgba(0, 229, 255, 0.4);
    --secondary: #7000ff;
    --secondary-glow: rgba(112, 0, 255, 0.3);
    --accent: #ff007a;
    
    /* 背景体系 - 深邃且具层次感 */
    --bg-deep: #05070a;
    --bg-main: #0a0e17;
    --bg-card: rgba(16, 23, 36, 0.75);
    --bg-glass: rgba(20, 28, 45, 0.6);
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-table-header: rgba(255, 255, 255, 0.03);
    
    /* 文字体系 */
    --text-main: #e2e8f0;
    --text-dim: #94a3b8;
    --text-bright: #ffffff;
    
    /* 边框与阴影 */
    --border-glow: rgba(0, 229, 255, 0.2);
    --border-line: rgba(255, 255, 255, 0.08);
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 15px var(--primary-glow);
}

/* 基础重置与背景设定 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    overflow: hidden;
    position: relative;
    background-clip: padding-box;
}

/* 科技感背景网格 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* 渐变装饰 */
body::after {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 150vw;
    height: 150vh;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(112, 0, 255, 0.05) 0%, rgba(5, 7, 10, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* 布局容器 */
.container, .page-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    background: transparent;
}

/* 头部样式 - 玻璃写实感 */
.header, .page-header {
    height: 70px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
    gap: 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-line);
    border-radius: 20px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.user-info i, .user-info::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #00ff84;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff84;
    display: inline-block;
}

.user-info .user-name {
    color: var(--primary);
    font-weight: 700;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-glow);
}

.page-title, .header h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-bright);
    text-transform: uppercase;
    background: linear-gradient(to right, #ffffff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    margin: 0;
    white-space: nowrap; /* 禁止标题换行 */
    flex-shrink: 0; /* 防止标题被挤压 */
}

.page-title::before, .header h1::before {
    content: "";
    width: 6px;
    height: 24px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    margin-right: 12px;
    border-radius: 2px;
}

/* 侧边栏/导航 */
.sidebar {
    width: 240px;
    background: rgba(16, 23, 36, 0.9);
    backdrop-filter: blur(8px);
    border-right: 1px solid var(--border-line);
    padding: 24px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item {
    padding: 14px 28px;
    color: var(--text-dim);
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(0, 229, 255, 0.05);
    color: var(--primary);
}

.menu-item.active {
    background: linear-gradient(to right, rgba(0, 229, 255, 0.1), transparent);
    color: var(--primary);
    border-left-color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* 玻璃卡片 */
.chart-card, .page-card, .filter-bar {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-main);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
}

.chart-card:hover, .page-card:hover {
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
    transform: translateY(-2px);
}

.chart-card h3, .page-card h3 {
    color: var(--primary);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-line);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 通用控制项 */
input, select, button {
    font-family: inherit;
}

input, select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-line);
    color: var(--text-bright);
    padding: 10px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

/* 优化下拉框选项样式，彻底适配暗黑科技主题 */
select option {
    background-color: var(--bg-main);
    color: var(--text-bright);
    font-size: 14px;
    padding: 10px;
}

/* 日期选择器下拉图标反色，使其在暗色背景下清晰可见 */
::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.6);
    cursor: pointer;
    transition: all 0.2s;
}

::-webkit-calendar-picker-indicator:hover {
    filter: invert(1) opacity(1);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
    background: rgba(255, 255, 255, 0.08);
}

/* 扫描线效果 */
@keyframes scan-line {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to bottom, transparent, rgba(0, 229, 255, 0.05), transparent);
    z-index: 9999;
    pointer-events: none;
    animation: scan-line 8s linear infinite;
}

/* 移动端导航与切换器 - 科技感 */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1001;
    }

    .mobile-nav-toggle span {
        width: 28px;
        height: 3px;
        background: var(--primary);
        box-shadow: 0 0 5px var(--primary-glow);
        transition: 0.3s;
        border-radius: 2px;
    }

    .mobile-nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .mobile-nav-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

    .mobile-nav {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: var(--bg-deep);
        backdrop-filter: blur(15px);
        z-index: 1000;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        padding: 24px 0;
        border-left: 1px solid var(--border-line);
    }

    .mobile-nav.active {
        right: 0;
    }

    .mobile-nav-menu {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-nav-item a {
        display: block;
        padding: 16px 32px;
        color: var(--text-dim);
        text-decoration: none;
        font-size: 16px;
        font-weight: 600;
        border-bottom: 1px solid var(--border-line);
        transition: 0.3s;
    }

    .mobile-nav-item.active a {
        color: var(--primary);
        background: rgba(0, 229, 255, 0.05);
        text-shadow: 0 0 10px var(--primary-glow);
    }
}