/* ========== 全局变量 - 科技暗黑主题 ========== */
:root {
    --primary: #00d4ff;
    --primary-glow: rgba(0, 212, 255, 0.35);
    --primary-hover: #00b8e6;
    --primary-dark: #005f73;
    --accent: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.35);
    --accent-hover: #9333ea;
    --success: #00e676;
    --success-glow: rgba(0, 230, 118, 0.3);
    --warning: #ffab00;
    --warning-glow: rgba(255, 171, 0, 0.3);
    --danger: #ff5252;
    --danger-glow: rgba(255, 82, 82, 0.3);
    --info: #40c4ff;
    --info-glow: rgba(64, 196, 255, 0.3);

    --bg: #0a0e1a;
    --bg-secondary: #0f1422;
    --bg-card: rgba(15, 20, 40, 0.85);
    --bg-card-solid: #111827;
    --bg-elevated: rgba(20, 28, 50, 0.9);
    --bg-input: rgba(10, 14, 30, 0.7);

    --text: #e2e8f0;
    --text-primary: #f1f5f9;
    --text-secondary: #8899b4;
    --text-muted: #5a6e8a;
    --text-dim: #3a4d6a;

    --border: rgba(0, 212, 255, 0.15);
    --border-light: rgba(100, 140, 200, 0.12);
    --border-glow: rgba(0, 212, 255, 0.3);

    --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--primary-glow), 0 0 60px rgba(0, 212, 255, 0.1);
    --shadow-accent: 0 0 20px var(--accent-glow), 0 0 60px rgba(168, 85, 247, 0.1);
    --radius: 8px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --glass-bg: rgba(15, 20, 40, 0.6);
    --glass-border: rgba(0, 212, 255, 0.12);
    --glass-blur: blur(16px);
}

/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", "JetBrains Mono", monospace, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 全局科技网格背景 */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        linear-gradient(rgba(0, 212, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* 全局扫描线效果 */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 0;
}

a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-dark), var(--accent));
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--primary), var(--accent)); }

/* ========== 布局 ========== */
.layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* 侧边栏 - 科技暗黑风格 */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg,
        rgba(5, 10, 25, 0.98) 0%,
        rgba(10, 18, 40, 0.96) 40%,
        rgba(15, 25, 50, 0.94) 100%);
    backdrop-filter: var(--glass-blur);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    border-right: 1px solid var(--border);
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

/* 侧边栏装饰边线 */
.sidebar::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--primary) 15%,
        transparent 50%,
        var(--accent) 85%,
        transparent 100%);
    opacity: 0.5;
}

.sidebar-logo {
    padding: 24px 20px 20px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    position: relative;
    letter-spacing: 1px;
}

.sidebar-logo::after {
    content: "";
    position: absolute;
    bottom: 0; left: 20px; right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.sidebar-logo .icon {
    font-size: 30px;
    filter: drop-shadow(0 0 8px var(--primary-glow));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 8px var(--primary-glow)); }
    50% { filter: drop-shadow(0 0 16px var(--accent-glow)); }
}

.sidebar-logo span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

/* 导航项悬停光效 */
.nav-item::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.06), transparent);
    transition: left 0.5s ease;
}

.nav-item:hover::before { left: 100%; }

.nav-item:hover {
    background: rgba(0, 212, 255, 0.06);
    color: var(--primary);
    border-left: 2px solid var(--primary);
    padding-left: 14px;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(168, 85, 247, 0.08));
    color: var(--primary);
    font-weight: 500;
    border-left: 3px solid var(--primary);
    padding-left: 13px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1), inset 0 0 20px rgba(0, 212, 255, 0.03);
}

.nav-item .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    filter: grayscale(0.3);
    transition: var(--transition);
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    filter: grayscale(0) drop-shadow(0 0 6px var(--primary-glow));
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(0, 212, 255, 0.08);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 24px 28px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* 页面标题 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-left: 16px;
    letter-spacing: 1px;
}

.page-header h2::before {
    content: "";
    position: absolute;
    left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 20px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ========== 卡片 - 玻璃态科技风 ========== */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    position: relative;
    transition: var(--transition);
}

.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow), 0 0 30px rgba(0, 212, 255, 0.05);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* 统计卡片 - 科技光效 */
.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    top: -50%; right: -50%;
    width: 150px; height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.04), transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 212, 255, 0.08);
}

.stat-card:hover::after {
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08), transparent 70%);
}

.stat-icon {
    width: 50px; height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.15), inset 0 0 8px rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.stat-icon.green {
    background: rgba(0, 230, 118, 0.1);
    color: var(--success);
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.15), inset 0 0 8px rgba(0, 230, 118, 0.05);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.stat-icon.orange {
    background: rgba(255, 171, 0, 0.1);
    color: var(--warning);
    box-shadow: 0 0 16px rgba(255, 171, 0, 0.15), inset 0 0 8px rgba(255, 171, 0, 0.05);
    border: 1px solid rgba(255, 171, 0, 0.2);
}

.stat-icon.red {
    background: rgba(255, 82, 82, 0.1);
    color: var(--danger);
    box-shadow: 0 0 16px rgba(255, 82, 82, 0.15), inset 0 0 8px rgba(255, 82, 82, 0.05);
    border: 1px solid rgba(255, 82, 82, 0.2);
}

.stat-icon.cyan {
    background: rgba(64, 196, 255, 0.1);
    color: var(--info);
    box-shadow: 0 0 16px rgba(64, 196, 255, 0.15), inset 0 0 8px rgba(64, 196, 255, 0.05);
    border: 1px solid rgba(64, 196, 255, 0.2);
}

.stat-info .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stat-info .stat-value {
    font-size: 26px;
    font-weight: 700;
    font-family: "JetBrains Mono", "SF Mono", "Consolas", monospace;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== 按钮 - 科技霓虹风格 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.4s ease;
}

.btn:hover::before { left: 100%; }
.btn:active { transform: scale(0.96); }

.btn-primary {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 180, 220, 0.1));
    color: var(--primary);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(0, 180, 220, 0.18));
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.15), rgba(0, 200, 100, 0.1));
    color: var(--success);
    border-color: rgba(0, 230, 118, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.25), rgba(0, 200, 100, 0.18));
    border-color: var(--success);
    box-shadow: 0 0 20px var(--success-glow);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, rgba(255, 171, 0, 0.15), rgba(220, 150, 0, 0.1));
    color: var(--warning);
    border-color: rgba(255, 171, 0, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, rgba(255, 171, 0, 0.25), rgba(220, 150, 0, 0.18));
    border-color: var(--warning);
    box-shadow: 0 0 20px var(--warning-glow);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, rgba(255, 82, 82, 0.15), rgba(220, 60, 60, 0.1));
    color: var(--danger);
    border-color: rgba(255, 82, 82, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, rgba(255, 82, 82, 0.25), rgba(220, 60, 60, 0.18));
    border-color: var(--danger);
    box-shadow: 0 0 20px var(--danger-glow);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-glow);
    color: var(--text-primary);
}

.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 11px 26px; font-size: 15px; }

/* ========== 表单 - 科技暗黑输入 ========== */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    background: var(--bg-input);
    backdrop-filter: blur(8px);
    transition: var(--transition);
    font-family: inherit;
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-dim);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1), 0 0 12px rgba(0, 212, 255, 0.1);
    background: rgba(10, 18, 35, 0.9);
}

.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238899b4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-select option {
    background: var(--bg-card-solid);
    color: var(--text);
    padding: 8px;
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* ========== 搜索栏 ========== */
.search-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 18px;
}

.search-bar .form-input,
.search-bar .form-select {
    max-width: 200px;
}

/* ========== 表格 - 科技数据风格 ========== */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background: rgba(10, 15, 28, 0.4);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead th {
    background: rgba(0, 212, 255, 0.04);
    padding: 13px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--primary);
    font-size: 12px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    position: relative;
}

thead th::after {
    content: "";
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(100, 140, 200, 0.06);
    color: var(--text);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(0, 212, 255, 0.04);
}

tbody tr:last-child td { border-bottom: none; }

/* 状态标签 - 科技徽章 */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(0, 230, 118, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 230, 118, 0.25);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.08);
}

.badge-warning {
    background: rgba(255, 171, 0, 0.1);
    color: var(--warning);
    border: 1px solid rgba(255, 171, 0, 0.25);
    box-shadow: 0 0 8px rgba(255, 171, 0, 0.08);
}

.badge-danger {
    background: rgba(255, 82, 82, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 82, 82, 0.25);
    box-shadow: 0 0 8px rgba(255, 82, 82, 0.08);
}

.badge-info {
    background: rgba(64, 196, 255, 0.1);
    color: var(--info);
    border: 1px solid rgba(64, 196, 255, 0.25);
    box-shadow: 0 0 8px rgba(64, 196, 255, 0.08);
}

.badge-default {
    background: rgba(136, 153, 180, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(136, 153, 180, 0.15);
}

/* ========== 模态框 - 玻璃态弹窗 ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-elevated);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 90%;
    max-width: 620px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 212, 255, 0.08);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.modal-close {
    width: 36px; height: 36px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.03);
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 82, 82, 0.1);
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: 0 0 12px rgba(255, 82, 82, 0.2);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

/* ========== 分页 - 科技风格 ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 7px 14px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
    color: var(--text-secondary);
    font-family: inherit;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 212, 255, 0.06);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}

.pagination button:disabled { opacity: 0.3; cursor: not-allowed; }

.pagination button.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(168, 85, 247, 0.1));
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.pagination-info {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 10px;
    font-family: "JetBrains Mono", "SF Mono", monospace;
}

/* ========== Toast 通知 - 科技风格 ========== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 13px 22px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 220px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.toast-success {
    background: linear-gradient(135deg, rgba(0, 200, 100, 0.9), rgba(0, 180, 80, 0.85));
    box-shadow: 0 4px 20px rgba(0, 230, 118, 0.3);
}

.toast-error {
    background: linear-gradient(135deg, rgba(230, 60, 60, 0.9), rgba(200, 40, 40, 0.85));
    box-shadow: 0 4px 20px rgba(255, 82, 82, 0.3);
}

.toast-warning {
    background: linear-gradient(135deg, rgba(230, 150, 20, 0.9), rgba(200, 120, 0, 0.85));
    box-shadow: 0 4px 20px rgba(255, 171, 0, 0.3);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(120%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    filter: grayscale(0.5);
    opacity: 0.5;
}

/* ========== 隐藏页面 ========== */
.page { display: none; }
.page.active { display: block; animation: pageFadeIn 0.35s ease; }

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 顶部用户栏 ========== */
.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0 22px 0;
}

.user-dropdown { position: relative; cursor: pointer; z-index: 50; }

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    border-radius: 25px;
    transition: var(--transition);
    font-size: 13px;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
}

.user-trigger:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.08);
}

.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 0 14px var(--primary-glow);
}

.user-menu {
    position: absolute;
    right: 0; top: calc(100% + 8px);
    background: var(--bg-elevated);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.4);
    min-width: 170px;
    padding: 6px;
    display: none;
    z-index: 200;
    border: 1px solid var(--border);
    backdrop-filter: var(--glass-blur);
}

.user-dropdown:hover .user-menu { display: block; animation: modalIn 0.2s ease; }

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.user-menu-item:hover {
    background: rgba(0, 212, 255, 0.06);
    color: var(--primary);
}

.user-menu-item.danger { color: var(--danger); }
.user-menu-item.danger:hover {
    background: rgba(255, 82, 82, 0.1);
    color: #ff6b6b;
}

/* ========== Canvas 图表 ========== */
#revenue-chart {
    width: 100%;
    border-radius: var(--radius);
}

/* ========== 加载遮罩 ========== */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 10, 25, 0.8);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 44px; height: 44px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    box-shadow: 0 0 20px var(--primary-glow);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .sidebar { width: 200px; }
    .main-content { margin-left: 200px; padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .search-bar .form-input,
    .search-bar .form-select { max-width: 100%; flex: 1; }
}

@media (max-width: 576px) {
    .sidebar { width: 60px; }
    .sidebar-logo span:not(.icon) { display: none; }
    .nav-item span:not(.nav-icon) { display: none; }
    .nav-item { justify-content: center; padding: 12px; }
    .main-content { margin-left: 60px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .sidebar-footer { display: none; }
}

/* ========== 登录页面 - 科技暗黑 ========== */
.login-body {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 登录页粒子/光点背景 */
.login-body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 70%);
    z-index: 0;
}

.login-body::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        linear-gradient(rgba(0, 212, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(0, 212, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

.login-header {
    text-align: center;
    margin-bottom: 34px;
}

.login-header .login-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(168, 85, 247, 0.15));
    border: 1px solid var(--border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 18px;
    color: var(--primary);
    box-shadow: 0 0 30px var(--primary-glow), inset 0 0 20px rgba(0, 212, 255, 0.05);
    animation: logoPulse 3s ease-in-out infinite;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.login-header p {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.login-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 28px;
    position: relative;
}

.login-tab {
    flex: 1;
    padding: 11px 0;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
    letter-spacing: 0.5px;
    position: relative;
}

.login-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.login-form { display: none; }
.login-form.active { display: block; animation: pageFadeIn 0.35s ease; }

.login-form .form-group { margin-bottom: 20px; }

.login-form .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 7px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.login-form .form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-input);
    color: var(--text);
}

.login-form .form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1), 0 0 12px rgba(0, 212, 255, 0.1);
    background: rgba(10, 18, 35, 0.9);
}

.login-form .form-input::placeholder { color: var(--text-dim); }

.login-form .btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    border-radius: var(--radius);
    justify-content: center;
    letter-spacing: 1px;
}

.login-form .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.25);
    color: #ff6b6b;
    padding: 11px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 18px;
    display: none;
    box-shadow: 0 0 12px rgba(255, 82, 82, 0.08);
}

.login-error.show { display: block; animation: pageFadeIn 0.25s ease; }

.form-error {
    color: var(--danger);
    font-size: 11px;
    margin-top: 5px;
    display: none;
    letter-spacing: 0.3px;
}

.form-error.show { display: block; }

/* ========== 用户管理页表格 ========== */
#users-table-body td { vertical-align: middle; }

/* ========== 选中文字高亮 ========== */
::selection {
    background: rgba(0, 212, 255, 0.25);
    color: #fff;
}

/* ========== 主题切换器 ========== */
.theme-switcher {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 16px;
}

.theme-switcher-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
}
.theme-switcher-trigger:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.08);
    color: var(--text);
}

.theme-preview-dot {
    display: inline-block;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    background: conic-gradient(var(--primary) 0deg 180deg, var(--accent) 180deg 360deg);
}

.theme-dropdown {
    position: absolute;
    right: 0; top: calc(100% + 8px);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0,0,0,0.4);
    min-width: 210px;
    padding: 8px;
    display: none;
    z-index: 300;
    border: 1px solid var(--border);
    backdrop-filter: var(--glass-blur);
}
.theme-switcher:hover .theme-dropdown { display: block; animation: modalIn 0.2s ease; }

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}
.theme-option:hover { background: rgba(0,212,255,0.06); color: var(--primary); }
.theme-option.active { background: rgba(0,212,255,0.08); color: var(--text-primary); }

.theme-option .theme-dot {
    width: 22px; height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--border);
}
.theme-option .theme-check {
    margin-left: auto; color: var(--primary);
    font-size: 14px; display: none;
}
.theme-option.active .theme-check { display: block; }

/* ============================================================
   多主题变量定义 - 通过 [data-theme="..."] 切换
   ============================================================ */

/* --- 主题2: 赛博蓝 Cyber Blue --- */
[data-theme="cyber-blue"] {
    --primary: #3b82f6; --primary-glow: rgba(59,130,246,0.35); --primary-hover: #2563eb; --primary-dark: #1e3a5f;
    --accent: #60a5fa; --accent-glow: rgba(96,165,250,0.35); --accent-hover: #3b82f6;
    --success: #22c55e; --success-glow: rgba(34,197,94,0.3);
    --warning: #eab308; --warning-glow: rgba(234,179,8,0.3);
    --danger: #ef4444; --danger-glow: rgba(239,68,68,0.3);
    --info: #38bdf8; --info-glow: rgba(56,189,248,0.3);
    --bg: #080c18; --bg-secondary: #0d1225;
    --bg-card: rgba(10,18,40,0.85); --bg-card-solid: #0f172a;
    --bg-elevated: rgba(15,23,46,0.9); --bg-input: rgba(8,12,28,0.7);
    --text: #e0e7ff; --text-primary: #eef2ff; --text-secondary: #8b9dc3; --text-muted: #5b6f94; --text-dim: #3a4d6e;
    --border: rgba(59,130,246,0.15); --border-light: rgba(80,130,220,0.12); --border-glow: rgba(59,130,246,0.3);
    --glass-bg: rgba(10,18,40,0.6); --glass-border: rgba(59,130,246,0.12);
}
[data-theme="cyber-blue"] .theme-preview-dot { background: conic-gradient(#3b82f6, #60a5fa); }

/* --- 主题3: 午夜金 Midnight Gold --- */
[data-theme="midnight-gold"] {
    --primary: #f59e0b; --primary-glow: rgba(245,158,11,0.35); --primary-hover: #d97706; --primary-dark: #78350f;
    --accent: #fbbf24; --accent-glow: rgba(251,191,36,0.35); --accent-hover: #f59e0b;
    --success: #10b981; --success-glow: rgba(16,185,129,0.3);
    --warning: #f97316; --warning-glow: rgba(249,115,22,0.3);
    --danger: #ef4444; --danger-glow: rgba(239,68,68,0.3);
    --info: #06b6d4; --info-glow: rgba(6,182,212,0.3);
    --bg: #0b0712; --bg-secondary: #110d1a;
    --bg-card: rgba(14,10,22,0.88); --bg-card-solid: #0f0a1a;
    --bg-elevated: rgba(18,13,28,0.92); --bg-input: rgba(8,5,14,0.7);
    --text: #fef3c7; --text-primary: #fef9c3; --text-secondary: #bba67a; --text-muted: #8b7a56; --text-dim: #5c4e32;
    --border: rgba(245,158,11,0.15); --border-light: rgba(180,130,50,0.12); --border-glow: rgba(245,158,11,0.3);
    --glass-bg: rgba(14,10,22,0.6); --glass-border: rgba(245,158,11,0.12);
}
[data-theme="midnight-gold"] .theme-preview-dot { background: conic-gradient(#f59e0b, #fbbf24); }

/* --- 主题4: 极光绿 Aurora Green --- */
[data-theme="aurora-green"] {
    --primary: #10b981; --primary-glow: rgba(16,185,129,0.35); --primary-hover: #059669; --primary-dark: #064e3b;
    --accent: #34d399; --accent-glow: rgba(52,211,153,0.35); --accent-hover: #10b981;
    --success: #22c55e; --success-glow: rgba(34,197,94,0.3);
    --warning: #eab308; --warning-glow: rgba(234,179,8,0.3);
    --danger: #ef4444; --danger-glow: rgba(239,68,68,0.3);
    --info: #14b8a6; --info-glow: rgba(20,184,166,0.3);
    --bg: #061a12; --bg-secondary: #0a2218;
    --bg-card: rgba(8,28,18,0.85); --bg-card-solid: #0a2416;
    --bg-elevated: rgba(10,30,20,0.9); --bg-input: rgba(4,16,10,0.7);
    --text: #d1fae5; --text-primary: #ecfdf5; --text-secondary: #8bb7a0; --text-muted: #5a8a70; --text-dim: #3a5c48;
    --border: rgba(16,185,129,0.15); --border-light: rgba(50,160,110,0.12); --border-glow: rgba(16,185,129,0.3);
    --glass-bg: rgba(8,28,18,0.6); --glass-border: rgba(16,185,129,0.12);
}
[data-theme="aurora-green"] .theme-preview-dot { background: conic-gradient(#10b981, #34d399); }

/* --- 主题5: 纯净白 Light Mode --- */
[data-theme="light"] {
    --primary: #4f6ef7; --primary-glow: rgba(79,110,247,0.25); --primary-hover: #3b5de7; --primary-dark: #3730a3;
    --accent: #818cf8; --accent-glow: rgba(129,140,248,0.25); --accent-hover: #6366f1;
    --success: #16a34a; --success-glow: rgba(22,163,74,0.2);
    --warning: #d97706; --warning-glow: rgba(217,119,6,0.2);
    --danger: #dc2626; --danger-glow: rgba(220,38,38,0.2);
    --info: #0891b2; --info-glow: rgba(8,145,178,0.2);
    --bg: #f0f4ff; --bg-secondary: #e8edf8;
    --bg-card: rgba(255,255,255,0.9); --bg-card-solid: #ffffff;
    --bg-elevated: rgba(255,255,255,0.95); --bg-input: rgba(240,244,255,0.8);
    --text: #1e293b; --text-primary: #0f172a; --text-secondary: #475569; --text-muted: #64748b; --text-dim: #94a3b8;
    --border: rgba(79,110,247,0.12); --border-light: rgba(148,163,184,0.2); --border-glow: rgba(79,110,247,0.2);
    --shadow: 0 1px 3px rgba(0,0,0,0.06); --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
    --glass-bg: rgba(255,255,255,0.8); --glass-border: rgba(79,110,247,0.08);
    --glass-blur: blur(12px);
}
[data-theme="light"] .theme-preview-dot { background: conic-gradient(#4f6ef7, #818cf8); }

/* Light 模式覆盖 - 侧边栏/文字/登录页适配 */
[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(240,244,255,0.96) 40%, rgba(225,232,248,0.94) 100%);
    border-right-color: rgba(79,110,247,0.1);
    box-shadow: 2px 0 20px rgba(0,0,0,0.06);
}
[data-theme="light"] .sidebar-logo span {
    background: linear-gradient(135deg, #4f6ef7, #818cf8);
    -webkit-background-clip: text; background-clip: text;
}
[data-theme="light"] .sidebar-logo { border-bottom-color: rgba(79,110,247,0.08); }
[data-theme="light"] .nav-item { color: #475569; }
[data-theme="light"] .nav-item:hover { background: rgba(79,110,247,0.06); color: #4f6ef7; }
[data-theme="light"] .nav-item.active {
    background: linear-gradient(135deg, rgba(79,110,247,0.1), rgba(129,140,248,0.06));
    color: #4f6ef7;
    box-shadow: 0 0 12px rgba(79,110,247,0.08), inset 0 0 12px rgba(79,110,247,0.02);
}
[data-theme="light"] .sidebar-footer { color: #94a3b8; }
[data-theme="light"] .sidebar::after {
    background: linear-gradient(180deg, transparent 0%, #4f6ef7 15%, transparent 50%, #818cf8 85%, transparent 100%);
}
[data-theme="light"] .stat-info .stat-value {
    -webkit-text-fill-color: #0f172a; background: none; color: #0f172a;
}
[data-theme="light"] .login-header h1 {
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] .form-select option { background: #ffffff; color: #1e293b; }
[data-theme="light"] ::-webkit-scrollbar-track { background: #f0f4ff; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #a5b4fc, #818cf8); }

/* Firefox 下拉框背景 */
@-moz-document url-prefix() { .form-select option { background: #111827; color: #e2e8f0; } }
