/* ============================================
   教培管理系统 - 全局样式
   深色科技感主题，毛玻璃效果，渐变色
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
    /* 主色调 */
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #4834d4;
    --primary-glow: rgba(108, 92, 231, 0.4);

    /* 辅助色 */
    --accent: #00cec9;
    --accent-light: #81ecec;
    --accent-glow: rgba(0, 206, 201, 0.4);
    --warning: #fdcb6e;
    --danger: #ff7675;
    --success: #00b894;
    --info: #74b9ff;

    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-accent: linear-gradient(135deg, #00cec9, #81ecec);
    --gradient-warm: linear-gradient(135deg, #fd79a8, #fdcb6e);
    --gradient-cool: linear-gradient(135deg, #6c5ce7, #00cec9);
    --gradient-bg: linear-gradient(135deg, #0c0c1d 0%, #1a1a2e 50%, #16213e 100%);

    /* 背景色 */
    --bg-body: #0a0a1a;
    --bg-sidebar: rgba(15, 15, 35, 0.85);
    --bg-header: rgba(15, 15, 35, 0.7);
    --bg-card: rgba(25, 25, 55, 0.6);
    --bg-card-hover: rgba(35, 35, 75, 0.7);
    --bg-input: rgba(20, 20, 45, 0.8);
    --bg-modal: rgba(10, 10, 30, 0.95);
    --bg-overlay: rgba(0, 0, 0, 0.6);

    /* 文字色 */
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6c6c80;
    --text-link: #a29bfe;

    /* 边框色 */
    --border-color: rgba(108, 92, 231, 0.15);
    --border-color-light: rgba(255, 255, 255, 0.06);
    --border-color-hover: rgba(108, 92, 231, 0.4);

    /* 毛玻璃 */
    --glass-bg: rgba(25, 25, 55, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px 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);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* 布局 */
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
    --header-height: 56px;

    /* 动画 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ---------- 亮色主题 ---------- */
[data-theme="light"] {
    --bg-body: #f0f0f5;
    --bg-sidebar: rgba(255, 255, 255, 0.85);
    --bg-header: rgba(255, 255, 255, 0.8);
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-input: rgba(240, 240, 250, 0.9);
    --bg-modal: rgba(255, 255, 255, 0.98);
    --bg-overlay: rgba(0, 0, 0, 0.3);
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #8888a0;
    --text-link: #6c5ce7;
    --border-color: rgba(108, 92, 231, 0.2);
    --border-color-light: rgba(0, 0, 0, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 科技感网格背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(108, 92, 231, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 92, 231, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-light);
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 92, 231, 0.5);
}

/* ============================================
   侧边栏
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Logo 区域 */
.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    gap: 10px;
}

.sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.sidebar-logo .logo-text {
    font-size: 16px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-normal);
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    pointer-events: none;
}

/* 导航区域 */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-group-title {
    padding: 8px 20px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-normal);
}

.sidebar.collapsed .nav-group-title {
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 40px;
    margin: 2px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    gap: 10px;
    position: relative;
}

.nav-item:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary-light);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active svg,
.nav-item:hover svg {
    opacity: 1;
}

.nav-item .nav-text {
    opacity: 1;
    transition: opacity var(--transition-normal);
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    pointer-events: none;
}

/* 侧边栏底部用户信息 */
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.sidebar-footer .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-cool);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-footer .user-info {
    opacity: 1;
    transition: opacity var(--transition-normal);
    overflow: hidden;
}

.sidebar.collapsed .user-info {
    opacity: 0;
    pointer-events: none;
}

.sidebar-footer .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.sidebar-footer .user-role {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================
   顶部栏
   ============================================ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    transition: left var(--transition-normal);
}

body.sidebar-collapsed .topbar {
    left: var(--sidebar-collapsed-width);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border: none;
    background: transparent;
}

.topbar-toggle:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
    border: none;
    background: transparent;
}

.topbar-btn:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

.topbar-btn .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-header);
}

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    background: transparent;
    color: var(--text-primary);
}

.user-dropdown-btn:hover {
    background: rgba(108, 92, 231, 0.1);
}

.user-dropdown-btn .avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gradient-cool);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: #fff;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-modal);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 1001;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a,
.user-dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all var(--transition-fast);
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}

.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

.user-dropdown-menu .divider {
    height: 1px;
    background: var(--glass-border);
    margin: 4px 0;
}

/* ============================================
   主内容区
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 24px;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left var(--transition-normal);
    position: relative;
    z-index: 1;
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ============================================
   卡片
   ============================================ */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-color-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color-light);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 统计卡片 */
.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-card .stat-icon.purple {
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary-light);
}
.stat-card .stat-icon.cyan {
    background: rgba(0, 206, 201, 0.15);
    color: var(--accent);
}
.stat-card .stat-icon.green {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}
.stat-card .stat-icon.orange {
    background: rgba(253, 203, 110, 0.15);
    color: var(--warning);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-card .stat-trend {
    font-size: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card .stat-trend.up {
    color: var(--success);
}
.stat-card .stat-trend.down {
    color: var(--danger);
}

/* ============================================
   表格
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: rgba(108, 92, 231, 0.05);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color-light);
    white-space: nowrap;
}

table tbody tr:hover {
    background: rgba(108, 92, 231, 0.05);
}

table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

table tbody tr:nth-child(even):hover {
    background: rgba(108, 92, 231, 0.05);
}

/* ============================================
   表单
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236c6c80' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ============================================
   按钮
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary-light);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(108, 92, 231, 0.2);
    border-color: var(--border-color-hover);
}

.btn-success {
    background: linear-gradient(135deg, #00b894, #55efc4);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #ff7675, #fab1a0);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 15px;
    border-radius: var(--radius-md);
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* ============================================
   分页
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-item:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.page-item.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 4px;
}

.page-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 12px;
}

/* ============================================
   模态框
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-modal);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    border: none;
    background: transparent;
    font-size: 18px;
}

.modal-close:hover {
    background: rgba(255, 118, 117, 0.1);
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
}

/* ============================================
   Toast 提示
   ============================================ */
.toast-container {
    position: fixed;
    top: 70px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-modal);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 280px;
    max-width: 400px;
    animation: toastIn 0.3s ease forwards;
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast-message {
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
}

.toast-close {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    padding: 0 4px;
    border: none;
    background: none;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ============================================
   标签 / 徽章
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary-light);
}
.badge-success {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}
.badge-warning {
    background: rgba(253, 203, 110, 0.15);
    color: var(--warning);
}
.badge-danger {
    background: rgba(255, 118, 117, 0.15);
    color: var(--danger);
}
.badge-info {
    background: rgba(116, 185, 255, 0.15);
    color: var(--info);
}
.badge-muted {
    background: rgba(108, 108, 128, 0.15);
    color: var(--text-muted);
}

/* ============================================
   确认对话框
   ============================================ */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.confirm-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirm-box {
    background: var(--bg-modal);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.confirm-overlay.show .confirm-box {
    transform: scale(1);
}

.confirm-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: rgba(253, 203, 110, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--warning);
}

.confirm-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.confirm-message {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ============================================
   工具类
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--primary-light) !important; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.ml-1 { margin-left: 8px; }
.mr-1 { margin-right: 8px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-1 { flex: 1; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ============================================
   登录页
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-bg);
    position: relative;
    overflow: hidden;
}

/* 登录页背景装饰 */
.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15), transparent 70%);
    top: -150px;
    right: -100px;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 206, 201, 0.1), transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon-lg {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.login-logo p {
    font-size: 13px;
    color: var(--text-muted);
}

.login-card .form-control {
    background: rgba(10, 10, 30, 0.6);
    border-color: rgba(108, 92, 231, 0.2);
}

.login-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--primary-glow);
}

.login-btn:active {
    transform: translateY(0);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.login-error {
    background: rgba(255, 118, 117, 0.1);
    border: 1px solid rgba(255, 118, 117, 0.2);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.login-error.show {
    display: block;
}

/* ============================================
   移动端遮罩
   ============================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .topbar {
        left: 0 !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 16px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .modal {
        width: 95%;
        margin: 16px;
    }

    .topbar-title {
        font-size: 14px;
    }

    .toast-container {
        right: 16px;
        left: 16px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .login-card {
        margin: 16px;
        padding: 24px;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }
}
