/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0D0D12;
    --bg-secondary: #16161D;
    --bg-tertiary: #1E1E2A;
    --bg-card: #1A1A24;
    --bg-hover: #242432;
    --accent-cyan: #25F4EE;
    --accent-pink: #FE2C55;
    --accent-purple: #7C3AED;
    --accent-gold: #FFB800;
    --text-primary: #FFFFFF;
    --text-secondary: #8C8CA0;
    --text-tertiary: #5C5C6F;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --success: #00D26A;
    --warning: #FFB800;
    --danger: #FF3B30;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { font-size: 14px; }

body {
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== App Layout ===== */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px rgba(37, 244, 238, 0.3));
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    padding: 12px 12px 8px;
}

/* Submenu */
.nav-submenu {
    margin-left: 16px;
    margin-top: 4px;
    border-left: 1px solid var(--border-color);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.1), rgba(254, 44, 85, 0.08));
    color: var(--text-primary);
}

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

.nav-item svg {
    flex-shrink: 0;
    color: currentColor;
}

.nav-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.nav-badge.live-badge {
    background: rgba(254, 44, 85, 0.15);
    color: var(--accent-pink);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.guild-status {
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.status-label {
    color: var(--text-secondary);
}

.status-value {
    font-weight: 600;
    color: var(--text-primary);
}

.status-value.gold { color: var(--accent-gold); }
.status-value.cyan { color: var(--accent-cyan); }

/* ===== Main Area ===== */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ===== Topbar ===== */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

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

.mobile-menu-btn {
    display: none;
    padding: 8px;
    color: var(--text-secondary);
}

.page-title {
    font-size: 20px;
    font-weight: 700;
}

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

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    width: 280px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.1);
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    flex: 1;
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.search-box.small {
    width: 200px;
    padding: 6px 12px;
}

.icon-btn {
    position: relative;
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--accent-pink);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

/* ===== Language Toggle ===== */
.lang-toggle {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.12), rgba(254, 44, 85, 0.12));
    border: 1px solid rgba(37, 244, 238, 0.3);
    color: var(--accent-cyan);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: var(--transition);
}

.lang-toggle:hover {
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.25), rgba(254, 44, 85, 0.2));
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(37, 244, 238, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.user-profile:hover {
    background: var(--bg-hover);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--bg-primary);
}

.user-info {
    line-height: 1.3;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
}

.user-role {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ===== Content ===== */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== KPI Cards ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
    opacity: 0;
    transition: var(--transition);
}

.kpi-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.revenue-icon {
    background: rgba(37, 244, 238, 0.1);
    color: var(--accent-cyan);
}

.streamer-icon {
    background: rgba(254, 44, 85, 0.1);
    color: var(--accent-pink);
}

.fans-icon {
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent-purple);
}

.gift-icon {
    background: rgba(255, 184, 0, 0.1);
    color: var(--accent-gold);
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.kpi-trend.up {
    color: var(--success);
    background: rgba(0, 210, 106, 0.1);
}

.kpi-trend.down {
    color: var(--danger);
    background: rgba(255, 59, 48, 0.1);
}

.kpi-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.kpi-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 6px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.card-title {
    font-size: 15px;
    font-weight: 700;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-pink);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px var(--accent-pink);
}

/* ===== Chart Row ===== */
.chart-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card .chart-body {
    padding: 20px;
    height: 300px;
}

.chart-card-sm .chart-body {
    padding: 20px;
    height: 220px;
}

.chart-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.chart-tab {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.chart-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.chart-tab:hover:not(.active) {
    color: var(--text-primary);
}

.income-legend {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.dot.cyan { background: var(--accent-cyan); }
.dot.pink { background: var(--accent-pink); }
.dot.purple { background: var(--accent-purple); }
.dot.gold { background: var(--accent-gold); }

/* ===== Bottom Row ===== */
.bottom-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ===== Table ===== */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead th {
    text-align: left;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    white-space: nowrap;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Sortable table headers */
.th-sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.th-sortable:hover {
    color: var(--accent-cyan);
}

.th-sortable .sort-indicator {
    display: inline-block;
    width: 14px;
    margin-left: 4px;
    font-size: 11px;
    color: var(--accent-cyan);
    vertical-align: middle;
}

.th-sortable .sort-indicator::after {
    content: '\2195'; /* up-down arrow */
    opacity: 0.3;
}

.th-sortable.sort-asc .sort-indicator::after {
    content: '\2191'; /* up arrow */
    opacity: 1;
}

.th-sortable.sort-desc .sort-indicator::after {
    content: '\2193'; /* down arrow */
    opacity: 1;
}

.streamer-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.streamer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
}

.rank-1 { background: linear-gradient(135deg, #FFD700, #FFA500); color: #000; }
.rank-2 { background: linear-gradient(135deg, #C0C0C0, #8A8A8A); color: #000; }
.rank-3 { background: linear-gradient(135deg, #CD7F32, #A0522D); color: #fff; }
.rank-default { background: var(--bg-tertiary); color: var(--text-secondary); }

.level-badge {
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.level-S { background: rgba(254, 44, 85, 0.15); color: var(--accent-pink); }
.level-A { background: rgba(37, 244, 238, 0.15); color: var(--accent-cyan); }
.level-B { background: rgba(124, 58, 237, 0.15); color: var(--accent-purple); }
.level-C { background: rgba(140, 140, 160, 0.15); color: var(--text-secondary); }

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-online { background: rgba(0, 210, 106, 0.1); color: var(--success); }
.status-offline { background: rgba(140, 140, 160, 0.1); color: var(--text-secondary); }

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-online .status-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-offline .status-dot { background: var(--text-tertiary); }

/* ===== Trend Mini Chart ===== */
.mini-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

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

/* ===== Live List ===== */
.live-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
}

.live-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.live-item:hover {
    background: var(--bg-hover);
}

.live-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--bg-primary);
    flex-shrink: 0;
    position: relative;
}

.live-item-avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: var(--accent-pink);
    border: 2px solid var(--bg-card);
    border-radius: 50%;
}

.live-item-info {
    flex: 1;
    min-width: 0;
}

.live-item-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.live-item-stats {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
}

.live-item-revenue {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent-cyan), #00D9D0);
    color: var(--bg-primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 244, 238, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.btn-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
    transition: var(--transition);
}

.btn-text:hover {
    color: var(--accent-pink);
}

.btn-action {
    padding: 4px;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-action:hover {
    background: var(--bg-hover);
    color: var(--accent-cyan);
}

/* ===== Page Toolbar ===== */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-select {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:hover, .filter-select:focus {
    border-color: var(--border-hover);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 16px 20px;
    justify-content: center;
}

.page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.page-btn:hover:not(:disabled):not(.active) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), #00D9D0);
    color: var(--bg-primary);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

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

/* ===== Live Monitoring Page ===== */
.live-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.live-stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
}

.live-stat-value {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

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

.live-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.live-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.live-card:hover {
    border-color: var(--accent-pink);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(254, 44, 85, 0.15);
}

.live-card-header {
    position: relative;
    height: 120px;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.live-card-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(254, 44, 85, 0.1), transparent 70%);
}

.live-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--bg-primary);
    z-index: 1;
}

.live-badge-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--accent-pink);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}

.live-card-body {
    padding: 16px;
}

.live-card-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.live-card-id {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.live-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.live-card-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.live-card-stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
}

.live-card-stat-value {
    font-size: 15px;
    font-weight: 700;
}

.live-card-stat-value.cyan { color: var(--accent-cyan); }
.live-card-stat-value.pink { color: var(--accent-pink); }

/* ===== Settings ===== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.settings-card .settings-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 18px;
}

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

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.1);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-cyan);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(37, 244, 238, 0.4);
}

.slider-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-cyan);
    min-width: 50px;
    text-align: right;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.toggle-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.toggle-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-hover);
    border-radius: 22px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--accent-cyan), #00D9D0);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(18px);
    background: var(--bg-primary);
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 480px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ===== Responsive ===== */
@media (max-width: 1280px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .live-grid { grid-template-columns: repeat(3, 1fr); }
    .live-stats-bar { grid-template-columns: repeat(2, 1fr); }
    .chart-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { position: fixed; left: -260px; top: 0; transition: var(--transition); }
    .sidebar.open { left: 0; }
    .mobile-menu-btn { display: block; }
    .search-box { width: 160px; }
    .kpi-grid { grid-template-columns: 1fr; }
    .live-grid { grid-template-columns: 1fr; }
    .live-stats-bar { grid-template-columns: repeat(2, 1fr); }
    .bottom-row { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .user-info { display: none; }
    .content { padding: 16px; }
    .outfit-grid { grid-template-columns: 1fr !important; }
    .sop-grid, .knowledge-grid, .custom-suggestion-grid { grid-template-columns: 1fr !important; }
}

/* ===== Outfit Planning Grid ===== */
.outfit-grid-wrap {
    overflow-x: auto;
}

.outfit-grid {
    display: grid;
    grid-template-columns: 120px repeat(7, minmax(140px, 1fr));
    min-width: 1100px;
}

.outfit-cell {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    font-size: 12px;
    min-height: 72px;
}

.outfit-cell.header {
    background: var(--bg-tertiary);
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 2;
}

.outfit-cell.streamer {
    background: var(--bg-tertiary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    left: 0;
    z-index: 1;
}

.outfit-cell .outfit-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
}

.outfit-tag.elegant { background: rgba(124, 58, 237, 0.15); color: var(--accent-purple); }
.outfit-tag.casual { background: rgba(37, 244, 238, 0.15); color: var(--accent-cyan); }
.outfit-tag.formal { background: rgba(254, 44, 85, 0.15); color: var(--accent-pink); }
.outfit-tag.cute { background: rgba(255, 184, 0, 0.15); color: var(--accent-gold); }
.outfit-tag.empty { background: var(--bg-hover); color: var(--text-tertiary); }

.outfit-detail {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.4;
}

/* ===== SOP Document Grid ===== */
.sop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.sop-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.sop-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 244, 238, 0.1);
}

.sop-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sop-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.sop-cat-直播规范 { background: rgba(254, 44, 85, 0.15); color: var(--accent-pink); }
.sop-cat-安全制度 { background: rgba(255, 59, 48, 0.15); color: var(--danger); }
.sop-cat-财务制度 { background: rgba(37, 244, 238, 0.15); color: var(--accent-cyan); }
.sop-cat-人事制度 { background: rgba(124, 58, 237, 0.15); color: var(--accent-purple); }
.sop-cat-运营手册 { background: rgba(255, 184, 0, 0.15); color: var(--accent-gold); }

.sop-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.sop-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
}

.sop-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sop-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-tertiary);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.sop-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== Knowledge Base Grid ===== */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.knowledge-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.knowledge-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(37, 244, 238, 0.12);
}

.knowledge-thumb {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.knowledge-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.06), transparent 60%);
}

.knowledge-thumb-icon {
    z-index: 1;
    color: var(--text-primary);
    opacity: 0.7;
}

.knowledge-type-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 1;
}

.knowledge-type-video { background: rgba(254, 44, 85, 0.9); color: #fff; }
.knowledge-type-article { background: rgba(37, 244, 238, 0.9); color: #000; }
.knowledge-type-replay { background: rgba(124, 58, 237, 0.9); color: #fff; }

.knowledge-body {
    padding: 16px;
}

.knowledge-dept {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 6px;
}

.knowledge-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.knowledge-progress {
    margin-bottom: 10px;
}

.progress-bar {
    height: 5px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.progress-text {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}

.knowledge-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-tertiary);
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

/* ===== Custom Module ===== */
.custom-empty {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 24px;
}

.custom-empty-icon {
    color: var(--text-tertiary);
}

.custom-suggestion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.custom-suggestion {
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.custom-suggestion:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.suggestion-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.1), rgba(254, 44, 85, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--accent-cyan);
}

.suggestion-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.suggestion-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ===== Inventory Status ===== */
.inv-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.inv-status.ok { background: rgba(0, 210, 106, 0.1); color: var(--success); }
.inv-status.low { background: rgba(255, 184, 0, 0.1); color: var(--warning); }
.inv-status.out { background: rgba(255, 59, 48, 0.1); color: var(--danger); }
.inv-status.expiring { background: rgba(255, 184, 0, 0.1); color: var(--warning); }
.inv-status.expired { background: rgba(255, 59, 48, 0.1); color: var(--danger); }

/* ===== Category Tags ===== */
.cat-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* ===== Attendance Rate Bar ===== */
.attendance-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.attendance-bar-track {
    width: 60px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.attendance-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--success), #00B85C);
}

.attendance-bar-fill.warning { background: linear-gradient(90deg, var(--warning), #E0A100); }
.attendance-bar-fill.danger { background: linear-gradient(90deg, var(--danger), #D63030); }

/* ===== Approval Buttons ===== */
.approval-actions {
    display: flex;
    gap: 6px;
}

.btn-approve {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0, 210, 106, 0.1);
    color: var(--success);
    transition: var(--transition);
}

.btn-approve:hover { background: var(--success); color: #fff; }

.btn-reject {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger);
    transition: var(--transition);
}

.btn-reject:hover { background: var(--danger); color: #fff; }

.status-pending { background: rgba(255, 184, 0, 0.1); color: var(--warning); }
.status-approved { background: rgba(0, 210, 106, 0.1); color: var(--success); }
.status-rejected { background: rgba(255, 59, 48, 0.1); color: var(--danger); }

/* ===== Dashboard Revenue Section ===== */
.dashboard-revenue-section {
    margin-bottom: 24px;
}

.revenue-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.revenue-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.revenue-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0.8;
}

.revenue-card.group::before { background: linear-gradient(90deg, var(--accent-cyan), #00D9D0); }
.revenue-card.individual::before { background: linear-gradient(90deg, var(--accent-pink), #FF5577); }
.revenue-card.total::before { background: linear-gradient(90deg, var(--accent-purple), #A855F7); }

.revenue-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.revenue-card-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
}

.revenue-card-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.revenue-card.group .revenue-card-value { color: var(--accent-cyan); }
.revenue-card.individual .revenue-card-value { color: var(--accent-pink); }
.revenue-card.total .revenue-card-value {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.revenue-card-unit {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-left: 6px;
}

.revenue-card-growth {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    margin-top: 8px;
    display: inline-flex;
}

.revenue-card-growth.up { color: var(--success); background: rgba(0, 210, 106, 0.1); }
.revenue-card-growth.down { color: var(--danger); background: rgba(255, 59, 48, 0.1); }

.revenue-card-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

/* ===== Google Drive Sync Bar ===== */
.gdrive-sync-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.gdrive-sync-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gdrive-sync-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(37, 244, 238, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.gdrive-sync-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gdrive-sync-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.gdrive-sync-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gdrive-sync-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulse 2s ease-in-out infinite;
}

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

.gdrive-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--accent-cyan);
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.gdrive-link-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-cyan);
}

/* ===== Cost Items Grid ===== */
.cost-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

.cost-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: var(--transition);
}

.cost-item:hover {
    background: var(--bg-hover);
}

.cost-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cost-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.cost-item-percent {
    font-size: 16px;
    font-weight: 800;
}

.cost-item-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.cost-item-amounts .spent { color: var(--accent-cyan); font-weight: 600; }
.cost-item-amounts .budget { color: var(--text-tertiary); }

.budget-progress {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.budget-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
}

.budget-progress-fill.low { background: linear-gradient(90deg, var(--success), #00B85C); }
.budget-progress-fill.mid { background: linear-gradient(90deg, var(--warning), #E0A100); }
.budget-progress-fill.high { background: linear-gradient(90deg, var(--danger), #D63030); }

/* ===== Responsive additions ===== */
@media (max-width: 1280px) {
    .sop-grid, .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
    .custom-suggestion-grid { grid-template-columns: repeat(3, 1fr); }
    .revenue-cards-grid { grid-template-columns: 1fr 1fr; }
    .cost-items-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sop-grid, .knowledge-grid { grid-template-columns: 1fr; }
    .custom-suggestion-grid { grid-template-columns: repeat(2, 1fr); }
    .outfit-grid { grid-template-columns: 80px repeat(7, minmax(100px, 1fr)); font-size: 11px; }
    .revenue-cards-grid { grid-template-columns: 1fr; }
    .cost-items-grid { grid-template-columns: 1fr; }
    .gdrive-sync-bar { flex-direction: column; align-items: flex-start; }
    .login-card { padding: 32px 24px; }
    .login-card { width: calc(100% - 32px); }
}

/* ===== Login Overlay ===== */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: glowFloat 12s ease-in-out infinite;
}

.login-bg-glow.glow-1 {
    width: 480px;
    height: 480px;
    background: var(--accent-cyan);
    top: -120px;
    left: -120px;
    animation-delay: 0s;
}

.login-bg-glow.glow-2 {
    width: 520px;
    height: 520px;
    background: var(--accent-pink);
    bottom: -160px;
    right: -160px;
    animation-delay: -4s;
}

.login-bg-glow.glow-3 {
    width: 360px;
    height: 360px;
    background: var(--accent-purple);
    top: 40%;
    right: 10%;
    opacity: 0.25;
    animation-delay: -8s;
}

@keyframes glowFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.05); }
    66% { transform: translate(-30px, 40px) scale(0.95); }
}

.login-card {
    position: relative;
    z-index: 1;
    background: rgba(26, 26, 36, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 48px 44px;
    width: 420px;
    max-width: calc(100% - 32px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    animation: cardFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.login-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.login-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.12);
}

.login-input::placeholder {
    color: var(--text-tertiary);
}

.login-error {
    font-size: 12px;
    color: var(--danger);
    min-height: 16px;
    text-align: center;
    margin-top: -4px;
}

.login-error.visible {
    animation: shakeError 0.4s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(254, 44, 85, 0.3);
}

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

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-hint {
    text-align: center;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 24px;
    letter-spacing: 0.5px;
}

/* ===== 出勤大表（Excel 布局：全网格线 + 橙表头 + 黄 score 行 + 肉橙 MC 行） ===== */
#attTable {
    border-collapse: collapse;
}

#attTable th,
#attTable td {
    border: 1px solid var(--border-color);
}

#attTable thead th {
    /* 半透明橙改为「不透明底色+橙色叠加」，冻结吸顶时下层内容不会透出 */
    background-color: var(--bg-card);
    background-image: linear-gradient(rgba(255, 153, 0, 0.28), rgba(255, 153, 0, 0.28));
    color: var(--text-primary);
    font-weight: 700;
}

/* ===== 冻结窗格：表头两行吸顶 + 团队/姓名两列吸左 ===== */
#attTable thead {
    position: sticky;
    top: 0;
    z-index: 6;
}

/* 表头左侧两格（团队/姓名，rowspan=2）+ 第二行首个日期格（物理上位于姓名列） */
#attTable thead tr:first-child th:nth-child(1),
#attTable thead tr:first-child th:nth-child(2),
#attTable thead tr:nth-child(2) th:nth-child(1) {
    position: sticky;
    z-index: 8;
    box-shadow: inset -1px 0 0 var(--border-color);
}
#attTable thead tr:first-child th:nth-child(1) { left: 0; }
#attTable thead tr:first-child th:nth-child(2),
#attTable thead tr:nth-child(2) th:nth-child(1) { left: var(--att-c1, 90px); }

#attTable .att-team-td {
    position: sticky;
    left: 0;
    z-index: 4;
    background-color: var(--bg-card);
    background-image: linear-gradient(rgba(255, 153, 0, 0.10), rgba(255, 153, 0, 0.10));
    box-shadow: inset -1px 0 0 var(--border-color);
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    vertical-align: middle;
    color: var(--text-primary);
}

/* 姓名/团队列冻结（含空团队占位行、score 标签格，JS 加 att-name-td 类） */
#attTable td.att-name-td {
    position: sticky;
    left: var(--att-c1, 90px);
    z-index: 4;
    background-color: var(--bg-card);
    box-shadow: inset -1px 0 0 var(--border-color);
}

#attTable .att-score-td {
    background-color: var(--bg-card);
    background-image: linear-gradient(rgba(255, 184, 0, 0.16), rgba(255, 184, 0, 0.16));
    font-weight: 700;
}

#attTable .att-mc-row > td {
    background-color: var(--bg-card);
    background-image: linear-gradient(rgba(255, 178, 102, 0.18), rgba(255, 178, 102, 0.18));
}

#attTable .att-mc-row > td.att-score-td {
    background-image: linear-gradient(rgba(255, 184, 0, 0.16), rgba(255, 184, 0, 0.16));
}

/* 月份选择框：原生文字透明（英文标签由 #attMonthLabel 覆盖显示），隐藏上下箭头 */
#attMonth {
    color: transparent;
}
#attMonth::-webkit-inner-spin-button {
    display: none;
}

/* 团队块管理按钮（＋加成员 / －减成员） */
.att-team-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin: 6px 3px 0;
    border-radius: 50%;
    background: rgba(255, 153, 0, 0.18);
    color: var(--warning);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.att-team-btn:hover {
    background: rgba(255, 153, 0, 0.38);
    transform: scale(1.12);
}

.att-member-add, .att-member-del {
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.att-member-add {
    background: rgba(34, 197, 94, 0.14);
    color: #22C55E;
}

.att-member-add:hover {
    background: rgba(34, 197, 94, 0.28);
}

.att-member-del {
    background: rgba(254, 44, 85, 0.12);
    color: #FE2C55;
}

.att-member-del:hover {
    background: rgba(254, 44, 85, 0.24);
}

#attTable tbody tr:hover > td {
    background: var(--bg-hover);
}

