        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html, body {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            overflow-x: hidden;
        }
        
        /* CSS变量定义 - 深色主题（默认） */
        :root {
            /* 灰金高级感（深色默认） */
            --bg-primary: #0b0c0e;
            --bg-secondary: #0f1114;
            --bg-tertiary: #141821;
            --bg-hover: #1a1f2a;
            --bg-card: #0f1114;
            --bg-sidebar: #0f1114;
            --bg-navbar: linear-gradient(135deg, rgba(16, 18, 20, 0.96) 0%, rgba(11, 12, 14, 0.96) 100%);
            --bg-input: #0d1016;
            --bg-modal: #0f1114;

            --text-primary: #e7e3da;
            --text-secondary: #b9b3a6;
            --text-tertiary: #9a9488;
            --text-muted: #7d776d;

            --border-color: rgba(231, 227, 218, 0.10);
            --border-hover: rgba(231, 227, 218, 0.18);

            --shadow: rgba(0, 0, 0, 0.55);
            --shadow-light: rgba(0, 0, 0, 0.32);

            /* 品牌主色（灰金） */
            --accent: #c4a160;
            --accent-strong: #ddc07c;
            --accent-soft-bg: rgba(196, 161, 96, 0.12);
            --accent-soft-bg-2: rgba(196, 161, 96, 0.08);
            --accent-gradient: linear-gradient(135deg, rgba(196, 161, 96, 0.28) 0%, rgba(196, 161, 96, 0.12) 100%);
            --accent-gradient-strong: linear-gradient(135deg, #c4a160 0%, #ddc07c 100%);
            --focus-ring: rgba(196, 161, 96, 0.20);

            /* 状态色（更柔和） */
            --success: #41c17b;
            --success-bg: rgba(65, 193, 123, 0.14);
            --danger: #ff6b6b;
            --danger-bg: rgba(255, 107, 107, 0.14);
            --info: #7aa2ff;
            --info-bg: rgba(122, 162, 255, 0.14);
            --warning: #f2c46d;
            --warning-bg: rgba(242, 196, 109, 0.16);

            /* 统一层级与尺寸（减少“凌乱感”） */
            --radius-sm: 10px;
            --radius-md: 14px;
            --radius-lg: 18px;
            --elev-1: 0 8px 22px rgba(0, 0, 0, 0.28);
            --elev-2: 0 14px 36px rgba(0, 0, 0, 0.34);
            --elev-inset: inset 0 1px 1px rgba(255, 255, 255, 0.03);
            --hairline: 1px solid var(--border-color);
        }
        
        /* 浅色主题 */
        body.light-theme {
            --bg-primary: #f5f5f5;
            --bg-secondary: #ffffff;
            --bg-tertiary: #f8f9fa;
            --bg-hover: #e9ecef;
            --bg-card: #ffffff;
            --bg-sidebar: #ffffff;
            --bg-navbar: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
            --bg-input: #ffffff;
            --bg-modal: #ffffff;
            --text-primary: #212529;
            --text-secondary: #495057;
            --text-tertiary: #6c757d;
            --text-muted: #adb5bd;
            --border-color: #dee2e6;
            --border-hover: #ced4da;
            --shadow: rgba(0,0,0,0.1);
            --shadow-light: rgba(0,0,0,0.05);

            /* 浅色主题下主色也统一为金色（更“高级”），但更克制 */
            --accent: #b08b3e;
            --accent-strong: #c9a86a;
            --accent-soft-bg: rgba(176, 139, 62, 0.12);
            --accent-soft-bg-2: rgba(176, 139, 62, 0.08);
            --accent-gradient: linear-gradient(135deg, rgba(176, 139, 62, 0.18) 0%, rgba(176, 139, 62, 0.08) 100%);
            --accent-gradient-strong: linear-gradient(135deg, #b08b3e 0%, #c9a86a 100%);
            --focus-ring: rgba(176, 139, 62, 0.20);

            --success: #15803d;
            --success-bg: rgba(21, 128, 61, 0.10);
            --danger: #dc2626;
            --danger-bg: rgba(220, 38, 38, 0.10);
            --info: #2563eb;
            --info-bg: rgba(37, 99, 235, 0.10);
            --warning: #b45309;
            --warning-bg: rgba(180, 83, 9, 0.10);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background:
                radial-gradient(1200px 900px at 20% -10%, rgba(196, 161, 96, 0.08), transparent 55%),
                radial-gradient(1000px 800px at 110% 10%, rgba(231, 227, 218, 0.04), transparent 60%),
                var(--bg-primary);
            min-height: 100vh;
            position: relative;
            color: var(--text-primary);
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        /* ==================== LIVE 页面体验优化（仅作用于开播/直播页） ==================== */
        #page-live .live-hero-card {
            margin-bottom: 28px;
            background:
                radial-gradient(1000px 520px at 10% 0%, rgba(255, 107, 107, 0.18), transparent 55%),
                radial-gradient(900px 520px at 100% 30%, rgba(201, 168, 106, 0.16), transparent 60%),
                linear-gradient(135deg, rgba(20, 24, 33, 0.92) 0%, rgba(15, 17, 20, 0.92) 100%);
            border: 1px solid rgba(255, 107, 107, 0.18);
            color: var(--text-primary);
        }

        /* 开播页：让“话术引擎”区域上下更松弛，进度信息下沉也不拥挤 */
        #page-live .live-auto-player-status {
            padding: 22px 18px;
            text-align: center;
        }

        #page-live .live-auto-player-status .live-status-box {
            padding: 16px 14px;
            background: rgba(0,0,0,0.18);
            border: 1px solid rgba(231,227,218,0.10);
            border-radius: 14px;
            line-height: 1.8;
        }

        #page-live .live-hero-card .card-title {
            border-bottom-color: rgba(231, 227, 218, 0.10);
        }

        /* 顶部标题更醒目一些 */
        #page-live .live-hero-card .card-title > span {
            font-size: 18px;
            font-weight: 900;
            letter-spacing: 0.2px;
        }

        #page-live .live-layout {
            display: grid;
            grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
            gap: 18px;
            align-items: start;
        }

        #page-live .live-main,
        #page-live .live-side {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        #page-live .live-hero-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        #page-live .live-hero-text {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        #page-live .live-hero-title {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            font-size: 18px;
            font-weight: 900;
            color: var(--text-primary);
        }

        #page-live .live-hero-subtitle {
            font-size: 12px;
            color: var(--text-tertiary);
            letter-spacing: 0.2px;
        }

        #page-live .live-hero-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(231, 227, 218, 0.16);
            font-size: 18px;
        }

        #page-live .live-card-actions {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

        #page-live .live-btn {
            appearance: none;
            border: 1px solid rgba(231, 227, 218, 0.18);
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-primary);
            padding: 6px 14px;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        #page-live .live-btn:hover {
            transform: translateY(-1px);
            border-color: rgba(231, 227, 218, 0.32);
        }

        #page-live .live-btn-ghost {
            background: rgba(255, 255, 255, 0.9);
            color: #15803d;
            border-color: rgba(255, 255, 255, 0.8);
        }

        #page-live .live-btn-danger {
            background: rgba(220, 53, 69, 0.9);
            color: #fff;
            border-color: rgba(220, 53, 69, 0.9);
        }

        #page-live .live-btn-outline {
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            border-color: rgba(255, 255, 255, 0.22);
        }

        #page-live .live-queue-card {
            background: linear-gradient(135deg, rgba(122, 162, 255, 0.22) 0%, rgba(201, 168, 106, 0.12) 100%);
            border: 1px solid rgba(231, 227, 218, 0.12);
            color: var(--text-primary);
            margin-bottom: 20px;
        }

        #page-live .live-queue-header {
            border-bottom: 1px solid rgba(231, 227, 218, 0.12);
        }

        #page-live .live-queue-body {
            padding: 15px;
        }

        #page-live .live-queue-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 12px;
        }

        #page-live .live-queue-card-item {
            text-align: center;
            padding: 10px 12px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            border: 1px solid rgba(231, 227, 218, 0.12);
        }

        #page-live .live-queue-card-item div:first-child {
            font-size: 24px;
            margin-bottom: 4px;
        }

        #page-live .live-queue-card-item div:nth-child(2) {
            font-size: 20px;
            font-weight: 800;
            margin-bottom: 4px;
        }

        #page-live .live-queue-card-item div:last-child {
            font-size: 12px;
            opacity: 0.8;
        }

        #page-live .live-queue-card-item.live-queue-live {
            padding: 14px 14px;
            border: 2px solid rgba(255, 107, 107, 0.45);
            background: linear-gradient(135deg, rgba(255, 0, 0, 0.18) 0%, rgba(255, 100, 100, 0.12) 100%);
            box-shadow: 0 10px 24px rgba(255, 107, 107, 0.2);
        }

        #page-live .live-queue-card-item.live-queue-live div:nth-child(2) {
            font-size: 22px;
        }

        #page-live .live-queue-card-item.live-queue-live div:nth-child(3) {
            font-size: 16px;
            font-weight: 800;
        }

        #page-live .live-section-subtitle {
            font-size: 12px;
            color: var(--text-tertiary);
            font-weight: 600;
        }

        #page-live .live-last-card {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(231, 227, 218, 0.12);
        }

        #page-live .live-empty {
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-items: center;
            justify-content: center;
            padding: 20px 10px;
            color: var(--text-tertiary);
        }

        #page-live .live-empty-icon {
            font-size: 28px;
        }

        #page-live .live-last-content {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 14px;
            border-radius: 12px;
            background: var(--accent-gradient);
            border: 1px solid rgba(201, 168, 106, 0.22);
        }

        #page-live .live-last-title {
            font-weight: 800;
            color: var(--text-primary);
        }

        #page-live .live-last-meta {
            font-size: 12px;
            color: var(--text-secondary);
        }

        #page-live .live-last-action {
            align-self: flex-start;
            margin-top: 4px;
        }

        @media (max-width: 1200px) {
            #page-live .live-layout {
                grid-template-columns: 1fr;
            }
        }

        #page-live .live-pill {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 10px 18px;
            border-radius: 999px;
            border: 2px solid rgba(255, 107, 107, 0.4);
            background: rgba(255, 107, 107, 0.15);
            color: #ffd0d0;
            font-size: 16px;
            font-weight: 900;
            letter-spacing: 1.5px;
            white-space: nowrap;
            cursor: pointer;
            transition: all 0.3s ease;
            transform: scale(1);
            box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
            animation: livePillPulse 2s ease-out infinite;
        }

        #page-live .live-pill:hover {
            transform: scale(1.05);
            border-color: rgba(255, 107, 107, 0.6);
            background: rgba(255, 107, 107, 0.25);
            box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
        }

        #page-live .live-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #ff6b6b;
            box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
            animation: livePulse 1.4s ease-out infinite;
        }

        @keyframes livePulse {
            0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
            70% { box-shadow: 0 0 0 14px rgba(255, 107, 107, 0.0); }
            100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.0); }
        }

        @keyframes livePillPulse {
            0%, 100% { 
                box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
            }
            50% { 
                box-shadow: 0 0 0 8px rgba(255, 107, 107, 0.0);
            }
        }

        #page-live .live-now-title {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            text-align: center;
            font-size: 18px;
            font-weight: 900;
            color: var(--text-primary);
            margin-bottom: 10px;
        }

        #page-live .live-now-mic {
            font-size: 20px;
            line-height: 1;
            flex: 0 0 auto;
        }

        #page-live .live-now-heading {
            display: inline-block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        #page-live .live-now-copy {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-secondary);
            line-height: 3.6; /* 段落/行间距：约为当前的2倍 */
            white-space: pre-line; /* 保留换行，按段落展示 */
            background: rgba(0, 0, 0, 0.14);
            border: 1px solid rgba(231, 227, 218, 0.10);
            border-radius: 14px;
            padding: 12px 14px;
            max-height: 220px;
            overflow: auto;
            word-break: break-word;
        }

        /* 右下角：当前音色徽标 */
        #page-live .live-voice-badge {
            position: absolute;
            right: 12px;
            bottom: 12px;
            padding: 6px 10px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.10);
            border: 1px solid rgba(231, 227, 218, 0.16);
            color: rgba(255, 255, 255, 0.92);
            font-size: 12px;
            font-weight: 800;
            letter-spacing: 0.2px;
            max-width: 60%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            backdrop-filter: blur(8px);
        }

        #page-live .live-now-actions {
            margin-top: 10px;
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            flex-wrap: wrap;
        }

        #page-live .live-muted {
            color: var(--text-tertiary);
            font-size: 12px;
        }

        /* 展开面板样式（右侧展开） */
        #page-live .live-expand-panel {
            display: none;
            position: fixed;
            top: 80px;
            right: 0;
            width: 450px;
            max-width: calc(100vw - 280px);
            max-height: calc(100vh - 100px);
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-right: none;
            border-radius: var(--radius-md) 0 0 var(--radius-md);
            box-shadow: var(--elev-2);
            z-index: 1000;
            overflow: hidden;
            animation: slideInRight 0.3s ease-out;
        }

        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        #page-live .live-hero-card.expanded {
            margin-right: 470px;
            transition: margin-right 0.3s ease-out;
        }

        #page-live .live-expand-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 20px;
            border-bottom: var(--hairline);
            background: var(--bg-secondary);
        }

        #page-live .live-expand-title {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-primary);
            margin: 0;
        }

        #page-live .live-expand-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: var(--radius-sm);
            transition: all 0.2s;
        }

        #page-live .live-expand-close:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        #page-live .live-expand-body {
            padding: 20px;
            max-height: calc(100vh - 220px);
            overflow-y: auto;
        }

        #page-live .live-expand-script-title {
            font-weight: 700;
            font-size: 14px;
            color: var(--text-primary);
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: var(--hairline);
        }

        #page-live .live-expand-textarea {
            width: 100%;
            min-height: 200px;
            max-height: 400px;
            padding: 12px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border-color);
            background: var(--bg-input);
            color: var(--text-primary);
            line-height: 1.7;
            resize: vertical;
            font-size: 14px;
            font-family: inherit;
        }

        #page-live .live-expand-textarea:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--focus-ring);
        }

        #page-live .live-expand-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            padding: 16px 20px;
            border-top: var(--hairline);
            background: var(--bg-secondary);
        }

        /* 顶部导航栏 */
        .navbar {
            background: var(--bg-navbar);
            color: var(--text-primary);
            padding: 0 30px;
            box-shadow: var(--elev-1);
            border-bottom: var(--hairline);
            position: sticky;
            top: 0;
            z-index: 1000;
            transition: background 0.3s ease, border-color 0.3s ease;
        }

        /* 右上角：收敛为“算力胶囊 + 账号菜单” */
        .navbar-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0 12px;
        }

        .power-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid rgba(201, 168, 106, 0.22);
            background: var(--accent-gradient);
            cursor: pointer;
            user-select: none;
            transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease;
        }

        body.light-theme .power-pill {
            /* 浅色模式：避免“金底金字”低对比，改为白底 + 细金边，更清爽也更易读 */
            border: 1px solid rgba(176, 139, 62, 0.28);
            background: var(--bg-card);
        }

        .power-pill:hover {
            transform: translateY(-1px);
            border-color: rgba(201, 168, 106, 0.35);
        }

        .power-pill-icon {
            font-size: 16px;
            line-height: 1;
        }

        .power-pill-hours {
            font-weight: 900;
            font-variant-numeric: tabular-nums;
            color: var(--accent-strong);
        }

        body.light-theme .power-pill-hours,
        body.light-theme #power-balance-hours {
            /* 浅色模式：大红色更醒目（加 !important 防止被旧样式/浏览器扩展覆盖） */
            color: #dc2626 !important;
            text-shadow: none;
        }

        .power-pill-unit {
            font-size: 12px;
            font-weight: 700;
            color: rgba(231, 227, 218, 0.82);
        }

        body.light-theme .power-pill-unit {
            color: #6b7280;
        }

        /* 算力管理页：深色模式下“算力剩余”数值用白色（覆盖内联色值） */
        body:not(.light-theme) #page-power-balance #balance-hours-display {
            color: #ffffff !important;
        }

        .account-menu {
            position: relative;
        }

        .account-btn {
            appearance: none;
            border: 1px solid var(--border-color);
            background: var(--bg-hover);
            color: var(--text-primary);
            border-radius: 999px;
            height: 36px;
            padding: 0 10px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
            user-select: none;
        }

        .account-btn:hover {
            background: var(--bg-tertiary);
            border-color: var(--border-hover);
            transform: translateY(-1px);
        }

        .account-avatar {
            width: 22px;
            height: 22px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(231, 227, 218, 0.08);
            border: 1px solid rgba(231, 227, 218, 0.12);
            font-size: 14px;
            line-height: 1;
        }

        .account-name {
            font-size: 13px;
            font-weight: 800;
            max-width: 140px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .account-caret {
            font-size: 12px;
            opacity: 0.75;
        }

        .account-panel {
            position: absolute;
            right: 0;
            top: calc(100% + 10px);
            min-width: 180px;
            border-radius: var(--radius-md);
            border: 1px solid var(--border-color);
            background: var(--bg-card);
            box-shadow: var(--elev-2);
            overflow: hidden;
            z-index: 2000;
        }

        .account-item {
            width: 100%;
            border: none;
            background: transparent;
            color: var(--text-primary);
            padding: 10px 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            text-align: left;
            font-size: 13px;
            font-weight: 700;
            transition: background 0.15s ease;
        }

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

        .account-item-icon {
            width: 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .account-divider {
            height: 1px;
            background: var(--border-color);
            margin: 4px 0;
        }

        .account-item.danger {
            color: var(--danger);
        }

        /* 侧边栏折叠按钮 */
        .sidebar-toggle {
            appearance: none;
            border: 1px solid var(--border-color);
            background: var(--bg-hover);
            color: var(--text-primary);
            border-radius: 10px;
            height: 36px;
            width: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease;
        }

        .sidebar-toggle:hover {
            background: var(--bg-tertiary);
        }

        /* 移动端侧边栏遮罩 */
        .sidebar-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.55);
            z-index: 1400;
        }
        
        /* 主题切换按钮 */
        .theme-toggle {
            background: rgba(255,255,255,0.08) !important;
            border: 1px solid rgba(255,255,255,0.12) !important;
            color: var(--text-primary) !important;
            padding: 8px 14px !important;
            border-radius: 8px !important;
            cursor: pointer !important;
            font-size: 14px !important;
            display: flex !important;
            align-items: center !important;
            gap: 6px !important;
            transition: all 0.3s ease !important;
            margin-right: 10px !important;
            white-space: nowrap !important;
            font-weight: 500 !important;
        }
        
        body.light-theme .theme-toggle {
            background: rgba(0,0,0,0.08) !important;
            border: 1px solid rgba(0,0,0,0.15) !important;
            color: var(--text-primary) !important;
        }
        
        .theme-toggle:hover {
            background: rgba(255,255,255,0.12) !important;
            transform: translateY(-1px) !important;
            box-shadow: 0 2px 10px var(--shadow-light) !important;
        }
        
        body.light-theme .theme-toggle:hover {
            background: rgba(0,0,0,0.12) !important;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        }
        
        .theme-toggle-icon {
            font-size: 18px !important;
            line-height: 1 !important;
        }
        
        /* 算力余额显示 */
        .power-balance-display {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            border-radius: 8px;
            backdrop-filter: blur(10px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        /* 深色主题下的算力显示 */
        .power-balance-display {
            background: var(--accent-gradient);
            border: 1px solid rgba(201, 168, 106, 0.22);
        }
        
        /* 浅色主题下的算力显示 */
        body.light-theme .power-balance-display {
            background: var(--accent-gradient);
            border: 1px solid rgba(176, 139, 62, 0.25);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        
        .power-balance-icon {
            font-size: 18px;
            line-height: 1;
        }
        
        .power-balance-value-wrapper {
            display: flex;
            align-items: baseline;
            gap: 4px;
        }
        
        .power-balance-hours {
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 0.5px;
            transition: color 0.3s ease;
        }
        
        /* 深色模式：使用金色高亮，确保在深色背景上清晰可见 */
        .power-balance-hours {
            color: var(--accent-strong) !important; /* 金色 #e0c185，更亮更清晰 */
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 8px rgba(224, 193, 133, 0.2);
        }
        
        /* 浅色模式：使用红色保持原有风格 */
        body.light-theme .power-balance-hours {
            color: #dc2626 !important; /* 大红色 */
            text-shadow: none;
        }
        
        .power-balance-unit {
            font-size: 12px;
            font-weight: 500;
            color: rgba(231, 227, 218, 0.82);
            transition: color 0.3s ease;
        }
        
        body.light-theme .power-balance-unit {
            color: rgba(176, 139, 62, 0.75);
        }
        
        /* 右上角已去掉“购买”按钮：避免信息噪音 */
        
        /* 退出登录按钮 */
        .logout-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            padding: 6px 12px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.3s ease;
        }
        
        .logout-btn:hover {
            background: rgba(255,255,255,0.3);
        }
        
        body.light-theme .logout-btn {
            background: rgba(0,0,0,0.08);
            color: var(--text-primary);
        }
        
        body.light-theme .logout-btn:hover {
            background: rgba(0,0,0,0.12);
        }
        
        /* 分类列表项样式 */
        .category-item {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 20px;
            padding: 20px 25px;
        }
        
        .category-content {
            flex: 1;
            min-width: 0; /* 允许内容收缩 */
        }
        
        .category-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0 0 12px 0;
            word-break: break-word;
        }
        
        .category-meta {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .category-meta-item {
            display: flex;
            align-items: flex-start;
            gap: 6px;
            font-size: 14px;
            line-height: 1.6;
            color: var(--text-secondary);
        }
        
        .category-meta-label {
            flex-shrink: 0;
            white-space: nowrap;
        }
        
        .category-meta-value {
            flex: 1;
            word-break: break-word;
            color: var(--text-secondary);
        }
        
        .category-actions {
            flex-shrink: 0;
            display: flex;
            gap: 8px;
            align-items: flex-start;
            padding-top: 4px; /* 与标题对齐 */
        }
        
        /* 响应式：小屏幕时按钮换行 */
        @media (max-width: 768px) {
            .category-item {
                flex-direction: column;
                gap: 15px;
            }
            
            .category-actions {
                width: 100%;
                justify-content: flex-end;
            }
        }

        .navbar-content {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 70px;
        }

        .navbar-brand {
            font-size: 24px;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .navbar-links {
            display: flex;
            gap: 5px;
        }

        .navbar-links a {
            color: var(--text-primary);
            text-decoration: none;
            padding: 8px 15px;
            border-radius: 5px;
            transition: background 0.3s;
        }

        .navbar-links a:hover {
            background: rgba(255,255,255,0.1);
        }
        
        body.light-theme .navbar-links a:hover {
            background: rgba(0,0,0,0.05);
        }

        /* 主容器 */
        .container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 30px 40px;
        }

        /* 侧边栏 + 内容区布局 */
        .main-layout {
            display: grid;
            grid-template-columns: 200px 1fr;
            gap: 25px;
            margin-top: 20px;
        }

        /* 侧边栏菜单 */
        .sidebar {
            background: var(--bg-sidebar);
            border-radius: var(--radius-lg);
            padding: 15px;
            box-shadow: var(--elev-1);
            border: var(--hairline);
            height: fit-content;
            position: sticky;
            top: 100px;
            transition: background 0.3s ease, border-color 0.3s ease;
        }

        .sidebar-title {
            font-size: 14px;
            color: var(--text-tertiary);
            text-transform: uppercase;
            margin-bottom: 15px;
            font-weight: 600;
        }

        .menu-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 15px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            color: var(--text-primary);
            margin-bottom: 5px;
        }

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

        .menu-item.active {
            background: var(--accent-gradient);
            color: var(--text-primary);
            border: 1px solid rgba(201, 168, 106, 0.22);
        }

        .menu-icon {
            font-size: 20px;
            width: 24px;
            text-align: center;
        }

        /* ==================== 简洁扁平风格（Flat UI，全站） ==================== */
        .flat-ui .navbar {
            box-shadow: none;
            border-bottom: 1px solid var(--border-color);
        }

        .flat-ui .container {
            padding: 22px 28px;
        }

        .flat-ui .sidebar,
        .flat-ui .page-header,
        .flat-ui .card,
        .flat-ui .stat-card {
            box-shadow: none;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
        }

        .flat-ui .sidebar {
            padding: 12px;
        }

        .flat-ui .page-header {
            padding: 18px 20px;
            margin-bottom: 18px;
        }

        .flat-ui .page-title {
            font-size: 22px;
        }

        .flat-ui .card {
            padding: 18px 20px;
        }

        .flat-ui .card-title {
            font-size: 15px;
            font-weight: 800;
            margin-bottom: 14px;
        }

        .flat-ui .menu-item {
            border-radius: 10px;
            padding: 10px 12px;
            transition: background 0.15s ease, border-color 0.15s ease;
        }

        .flat-ui .menu-item:hover {
            background: var(--bg-hover);
        }

        .flat-ui .menu-item.active {
            background: var(--accent-soft-bg);
            border: 1px solid var(--border-color);
            border-left: 3px solid var(--accent);
        }

        .flat-ui .btn-primary:hover,
        .flat-ui .btn-success:hover,
        .flat-ui .btn-danger:hover {
            transform: none;
            box-shadow: none;
        }

        .flat-ui .theme-toggle:hover {
            transform: none !important;
            box-shadow: none !important;
        }

        /* ==================== 侧边栏折叠（桌面） ==================== */
        body.sidebar-collapsed .main-layout {
            grid-template-columns: 72px 1fr;
        }

        body.sidebar-collapsed .sidebar-title,
        body.sidebar-collapsed .menu-text,
        body.sidebar-collapsed .device-info-section {
            display: none !important;
        }

        body.sidebar-collapsed .sidebar {
            padding: 10px;
        }

        body.sidebar-collapsed .menu-item {
            justify-content: center;
            padding: 12px 10px;
            gap: 0;
        }

        body.sidebar-collapsed .menu-icon {
            width: auto;
        }

        /* ==================== 侧边栏抽屉（移动端） ==================== */
        @media (max-width: 1024px) {
            .main-layout {
                grid-template-columns: 1fr;
            }

            .sidebar {
                display: block;
                position: fixed;
                left: 0;
                top: 70px; /* navbar 高度 */
                height: calc(100vh - 70px);
                width: 260px;
                max-width: 84vw;
                overflow-y: auto;
                z-index: 1500;
                transform: translateX(-110%);
                transition: transform 0.2s ease;
                border-radius: 0;
            }

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

            body.sidebar-open .sidebar-backdrop {
                display: block;
            }
        }

        /* 内容区 */
        .content-area {
            min-height: 70vh;
        }

        .page {
            display: none;
        }

        .page.active {
            display: block;
            animation: fadeIn 0.3s;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.05); opacity: 0.9; }
        }

        /* 页面标题 */
        .page-header {
            background: var(--bg-card);
            padding: 25px 30px;
            border-radius: var(--radius-lg);
            margin-bottom: 25px;
            box-shadow: var(--elev-1);
            border: var(--hairline);
            transition: background 0.3s ease, border-color 0.3s ease;
        }

        .page-title {
            font-size: 28px;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .page-description {
            color: var(--text-secondary);
            font-size: 14px;
        }

        /* 卡片 */
        .card {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            padding: 25px;
            box-shadow: var(--elev-1);
            border: var(--hairline);
            margin-bottom: 20px;
            transition: background 0.3s ease, border-color 0.3s ease;
        }

        .card-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

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

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

        .form-control {
            width: 100%;
            padding: 12px;
            border: 2px solid var(--border-color);
            border-radius: var(--radius-sm);
            font-size: 14px;
            transition: border-color 0.3s, background 0.3s;
            background: var(--bg-input);
            color: var(--text-primary);
        }

        .form-control:focus {
            outline: none;
            border-color: var(--accent);
            background: var(--bg-tertiary);
            box-shadow: 0 0 0 3px var(--focus-ring);
        }

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

        .form-row {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

        /* 按钮 */
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: var(--radius-sm);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background: var(--accent-gradient-strong);
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 26px rgba(201, 168, 106, 0.28);
        }

        .btn-secondary {
            background: var(--bg-hover);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }

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

        .btn-danger {
            background: #ff4757;
            color: white;
        }

        .btn-danger:hover {
            background: #ff3838;
        }

        .btn-success {
            background: #2ed573;
            color: white;
        }

        .btn-icon {
            width: 34px;
            height: 34px;
            border-radius: var(--radius-sm);
            border: none;
            background: var(--bg-hover);
            color: var(--text-primary);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 16px;
        }

        .btn-icon:hover {
            background: var(--border-hover);
            transform: translateY(-1px);
        }

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

        .btn-icon-danger {
            background: rgba(244, 63, 94, 0.12);
            color: #f43f5e;
        }

        .btn-icon-danger:hover {
            background: rgba(244, 63, 94, 0.2);
        }

        .btn-icon.btn-success {
            background: rgba(34, 197, 94, 0.18);
            color: #15803d;
        }

        .btn-icon.btn-success:hover {
            background: rgba(34, 197, 94, 0.28);
        }

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

        /* 表格 */
        .table {
            width: 100%;
            border-collapse: collapse;
        }

        .table thead {
            background: var(--bg-secondary);
        }

        .table th {
            padding: 12px;
            text-align: left;
            font-weight: 600;
            color: var(--text-primary);
            font-size: 14px;
            border-bottom: 2px solid var(--border-color);
        }

        .table td {
            padding: 15px 12px;
            border-bottom: 1px solid var(--border-color);
            font-size: 14px;
            color: var(--text-secondary);
        }

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

        .data-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            overflow: hidden;
            border-radius: var(--radius-md);
            border: var(--hairline);
        }

        .data-table thead th {
            background: var(--accent-gradient) !important;
            color: var(--text-primary) !important;
            font-size: 14px !important;
            font-weight: 600 !important;
            text-align: left !important;
            text-transform: none !important;
            letter-spacing: 0 !important;
            border-bottom: 1px solid var(--border-color) !important;
            padding: 15px 12px !important;
        }
        
        body.light-theme .data-table thead th {
            background: var(--accent-gradient) !important;
        }

        .data-table tbody td {
            border-bottom: 1px solid var(--border-color);
            vertical-align: middle;
            color: var(--text-secondary);
        }

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

        .data-table tbody tr:nth-child(even) {
            background: var(--bg-tertiary);
        }

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

        .table-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* 表格操作列：按钮不换行（会员卡管理等） */
        .table-actions {
            flex-wrap: nowrap;
            white-space: nowrap;
        }

        .table-actions .btn {
            white-space: nowrap;
        }

        .table-scroll {
            width: 100%;
            overflow-x: auto;
        }

        /* 会员卡管理：操作列保持一行（避免按钮/文字换行） */
        #page-license-keys .data-table th:last-child,
        #page-license-keys .data-table td:last-child {
            white-space: nowrap;
        }

        #page-license-keys .table-actions {
            gap: 6px;
        }

        #page-license-keys .table-actions .btn.btn-sm {
            padding: 6px 10px;
            font-size: 12px;
        }

        /* 算力卡管理：操作列保持一行（避免按钮/文字换行） */
        #page-power-cards .data-table th:last-child,
        #page-power-cards .data-table td:last-child {
            white-space: nowrap;
        }

        #page-power-cards .table-actions {
            gap: 6px;
        }

        #page-power-cards .table-actions .btn.btn-sm {
            padding: 6px 10px;
            font-size: 12px;
        }

        .user-cell {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 6px;
        }

        .user-meta {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .user-name {
            font-weight: 600;
            color: var(--text-primary);
        }

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

        .user-id-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 4px 10px;
            background: var(--accent-soft-bg);
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            color: var(--accent-strong);
            border: 1px solid rgba(201, 168, 106, 0.22);
        }

        .role-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            background: var(--info-bg);
            color: var(--info);
        }

        .role-pill.admin {
            background: var(--warning-bg);
            color: var(--warning);
        }

        .role-pill.owner {
            background: var(--accent-soft-bg);
            color: var(--accent-strong);
            border: 1px solid rgba(201, 168, 106, 0.22);
        }

        .status-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .status-pill .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: currentColor;
            box-shadow: 0 0 0 3px rgba(231, 227, 218, 0.08);
        }

        .status-pill.active {
            background: rgba(74, 222, 128, 0.15);
            color: #16a34a;
        }

        .status-pill.active .status-dot {
            box-shadow: 0 0 0 3px rgba(65, 193, 123, 0.18);
        }

        .status-pill.inactive {
            background: rgba(248, 113, 113, 0.15);
            color: #dc2626;
        }

        .status-pill.inactive .status-dot {
            box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.16);
        }

        .user-created {
            font-size: 12px;
            color: var(--text-tertiary);
            font-weight: 500;
        }

        .muted {
            color: var(--text-tertiary);
        }

        .plan-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            align-items: center;
            justify-content: space-between;
        }

        .plan-toolbar .plan-summary {
            min-width: 220px;
            flex: 1;
        }

        .plan-summary-label {
            font-size: 12px;
            text-transform: uppercase;
            color: #888;
            letter-spacing: 0.8px;
            margin-bottom: 6px;
        }

        .plan-summary-value {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .plan-toolbar-actions {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
            justify-content: flex-end;
        }

        .plan-quick-select {
            min-width: 220px;
            padding: 10px 12px;
            border-radius: 8px;
            border: 2px solid var(--border-color);
            font-size: 14px;
            background: var(--bg-input);
            color: var(--text-primary);
            transition: border-color 0.2s, background 0.3s, color 0.3s;
        }

        .plan-quick-select:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--focus-ring);
        }

        .plan-quick-buttons {
            display: flex;
            gap: 6px;
        }

        .plan-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
        }

        .plan-filters .form-group {
            margin-bottom: 0;
        }

        .plan-stats-summary {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .plan-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .plan-item {
            background: var(--bg-card);
            border-radius: 14px;
            border: 1px solid var(--border-color);
            padding: 18px 20px;
            transition: all 0.2s;
            cursor: pointer;
        }

        .plan-item:hover {
            border-color: var(--border-hover);
            box-shadow: 0 8px 24px var(--shadow);
        }

        .plan-item.active {
            border-color: var(--accent);
            box-shadow: 0 12px 30px rgba(201, 168, 106, 0.18);
            background: linear-gradient(180deg, var(--accent-soft-bg), var(--accent-soft-bg-2));
        }

        .plan-item-header {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: flex-start;
            margin-bottom: 14px;
        }

        .plan-name {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .plan-status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            background: var(--bg-hover);
            color: var(--text-secondary);
        }

        .plan-status.running {
            background: rgba(56, 189, 248, 0.18);
            color: #0ea5e9;
        }

        .plan-status.idle {
            background: rgba(148, 163, 184, 0.16);
            color: #64748b;
        }

        .plan-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            color: var(--text-secondary);
            font-size: 13px;
        }

        .plan-tag {
            background: var(--bg-tertiary);
            padding: 4px 10px;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .plan-item-body {
            display: flex;
            flex-wrap: wrap;
            gap: 14px;
            align-items: center;
            justify-content: space-between;
        }

        .plan-stats {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
            color: var(--text-secondary);
            font-size: 13px;
        }

        .plan-stat {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .plan-dates {
            font-size: 12px;
            color: var(--text-tertiary);
        }

        .plan-actions {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .code-input {
            font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
            background: var(--bg-input);
            color: var(--text-primary);
            border-color: var(--border-color);
            min-height: 180px;
            line-height: 1.5;
            padding: 14px;
            border-radius: 10px;
            resize: vertical;
            transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
        }
        
        body.light-theme .code-input {
            background: #f8f9fa;
        }

        .code-input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--focus-ring);
            outline: none;
        }

        .json-preview {
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 12px;
            font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
            font-size: 12px;
            color: var(--text-primary);
            white-space: pre-wrap;
            word-break: break-word;
            transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
        }
        
        body.light-theme .json-preview {
            background: #f8f9fa;
        }
            max-width: 320px;
        }

        .json-preview::before {
            content: "";
            display: block;
            width: 100%;
            height: 4px;
            border-radius: 8px 8px 0 0;
            background: var(--accent-gradient-strong);
            margin-bottom: 8px;
            opacity: 0.4;
        }

        /* 状态标签 */
        .badge {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        .badge-success {
            background: var(--success-bg);
            color: var(--success);
            border: 1px solid rgba(65, 193, 123, 0.25);
        }

        .badge-danger {
            background: var(--danger-bg);
            color: var(--danger);
            border: 1px solid rgba(255, 107, 107, 0.25);
        }

        .badge-secondary {
            background: var(--bg-tertiary);
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
        }

        /* 上传区域 */
        .upload-area {
            border: 2px dashed var(--accent);
            border-radius: 10px;
            padding: 40px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            background: var(--bg-card);
            color: var(--text-primary);
        }

        .upload-area:hover {
            border-color: var(--accent-strong);
            background: var(--bg-tertiary);
        }

        .upload-area.dragging {
            border-color: var(--accent-strong);
            background: var(--bg-hover);
        }

        /* 通知消息 */
        .alert {
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: none;
        }

        .alert.show {
            display: block;
            animation: slideDown 0.3s;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .alert-success {
            background: rgba(34, 197, 94, 0.15);  /* 深色主题的成功提示 */
            color: #4ade80;  /* 浅绿色文字 */
            border: 1px solid rgba(34, 197, 94, 0.3);
        }
        
        body.light-theme .alert-success {
            background: rgba(34, 197, 94, 0.1);
            color: #15803d;
            border: 1px solid rgba(34, 197, 94, 0.2);
        }

        .alert-error {
            background: rgba(239, 68, 68, 0.15);  /* 深色主题的错误提示 */
            color: #f87171;  /* 浅红色文字 */
            border: 1px solid rgba(239, 68, 68, 0.3);
        }
        
        body.light-theme .alert-error {
            background: rgba(239, 68, 68, 0.1);
            color: #dc2626;
            border: 1px solid rgba(239, 68, 68, 0.2);
        }

        .alert-info {
            background: rgba(59, 130, 246, 0.15);  /* 深色主题的信息提示 */
            color: #60a5fa;  /* 浅蓝色文字 */
            border: 1px solid rgba(59, 130, 246, 0.3);
        }

        .device-message {
            font-size: 11px;
            color: #2c9e62;
            min-height: 16px;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .device-message.error {
            color: #dc3545;
        }

        .device-message.show {
            opacity: 1;
        }

        /* Toast 提示 */
        #toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 2000;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .toast {
            min-width: 180px;
            max-width: 260px;
            padding: 10px 14px;
            border-radius: 6px;
            color: #fff;
            font-size: 12px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
            opacity: 0;
            transform: translateY(-10px);
            animation: toastFadeIn 0.3s forwards;
        }

        .toast-success {
            background: linear-gradient(45deg, rgba(65, 193, 123, 0.95), rgba(44, 158, 98, 0.95));
        }

        .toast-error {
            background: linear-gradient(45deg, rgba(255, 107, 107, 0.95), rgba(239, 68, 68, 0.95));
        }

        .toast.hide {
            animation: toastFadeOut 0.3s forwards;
        }

        @keyframes toastFadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes toastFadeOut {
            from { opacity: 1; transform: translateY(0); }
            to { opacity: 0; transform: translateY(-10px); }
        }

        /* 空状态 */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #888;
        }

        .empty-state-icon {
            font-size: 60px;
            margin-bottom: 15px;
        }

        /* 统计卡片 */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: var(--bg-card);
            padding: 25px;
            border-radius: var(--radius-lg);
            box-shadow: var(--elev-1);
            border: var(--hairline);
            transition: background 0.3s ease, border-color 0.3s ease;
        }

        .stat-value {
            font-size: 32px;
            font-weight: bold;
            color: var(--accent);
            margin-bottom: 5px;
        }

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

        /* 数据概览：扁平化（Flat UI）——仅作用于 dashboard 页面 */
        .flat-dashboard .stats-grid {
            gap: 12px;
            margin-bottom: 18px;
        }

        .flat-dashboard .stat-card {
            padding: 16px 16px;
            border-radius: var(--radius-md);
            box-shadow: none;
            border: 1px solid var(--border-color);
            background: var(--bg-card);
        }

        .flat-dashboard .stat-card:hover {
            background: var(--bg-hover);
        }

        .flat-dashboard .stat-value {
            font-size: 26px;
            font-weight: 800;
            letter-spacing: 0.2px;
        }

        .flat-dashboard .stat-label {
            font-size: 13px;
            color: var(--text-tertiary);
        }

        .flat-dashboard .card {
            border-radius: var(--radius-md);
            box-shadow: none;
            border: 1px solid var(--border-color);
        }

        .flat-dashboard .card-title {
            font-size: 14px;
            font-weight: 800;
            letter-spacing: 0.2px;
        }

        /* ===== 个人资产面板（更“产品化”的灰金扁平风） ===== */
        .flat-dashboard #personal-assets .personal-kpi-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .flat-dashboard #personal-assets .kpi-card {
            background:
                radial-gradient(900px 260px at 20% -10%, rgba(201, 168, 106, 0.10), transparent 55%),
                var(--bg-card);
            border: 1px solid rgba(201, 168, 106, 0.18);
        }

        .flat-dashboard #personal-assets .kpi-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
        }

        .flat-dashboard #personal-assets .kpi-label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--text-tertiary);
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.2px;
        }

        .flat-dashboard #personal-assets .kpi-icon {
            display: inline-flex;
            width: 22px;
            height: 22px;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            background: var(--accent-soft-bg);
            border: 1px solid rgba(201, 168, 106, 0.18);
            font-size: 14px;
        }

        .flat-dashboard #personal-assets .kpi-value {
            font-size: 28px;
            font-weight: 900;
            letter-spacing: 0.2px;
            color: var(--accent-strong);
            line-height: 1.15;
        }

        .flat-dashboard #personal-assets .kpi-value--datetime {
            font-size: 15px;
            font-weight: 800;
            color: var(--text-primary);
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
            line-height: 1.35;
            letter-spacing: 0;
            white-space: normal;
            word-break: break-word;
        }

        .flat-dashboard #personal-assets .kpi-value--power {
            display: flex;
            align-items: baseline;
            gap: 10px;
        }

        .flat-dashboard #personal-assets .kpi-power-num {
            font-variant-numeric: tabular-nums;
        }

        .flat-dashboard #personal-assets .kpi-power-unit {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-tertiary);
        }

        .flat-dashboard #personal-assets .kpi-badge {
            display: inline-flex;
            align-items: center;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid var(--border-color);
            background: var(--bg-tertiary);
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 800;
            letter-spacing: 0.1px;
        }
        .flat-dashboard #personal-assets .kpi-badge--active {
            border-color: rgba(65, 193, 123, 0.30);
            background: var(--success-bg);
            color: var(--success);
        }
        .flat-dashboard #personal-assets .kpi-badge--warn {
            border-color: rgba(242, 196, 109, 0.30);
            background: var(--warning-bg);
            color: var(--warning);
        }
        .flat-dashboard #personal-assets .kpi-badge--expired {
            border-color: rgba(255, 107, 107, 0.30);
            background: var(--danger-bg);
            color: var(--danger);
        }

        .flat-dashboard #personal-assets .personal-actions {
            margin-top: 12px;
        }

        .flat-dashboard #personal-assets .quick-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
            margin-top: 10px;
        }

        .flat-dashboard #personal-assets .action-tile {
            appearance: none;
            border: 1px solid rgba(201, 168, 106, 0.18);
            background: var(--accent-gradient);
            color: var(--text-primary);
            border-radius: var(--radius-md);
            padding: 14px 14px;
            text-align: left;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
        }

        .flat-dashboard #personal-assets .action-tile:hover {
            background: var(--accent-gradient-strong);
            border-color: rgba(201, 168, 106, 0.35);
            transform: translateY(-1px);
        }

        .flat-dashboard #personal-assets .action-tile-title {
            font-size: 14px;
            font-weight: 900;
            letter-spacing: 0.2px;
        }

        .flat-dashboard #personal-assets .action-tile-desc {
            margin-top: 6px;
            font-size: 12px;
            color: rgba(231, 227, 218, 0.82);
        }

        body.light-theme .flat-dashboard #personal-assets .action-tile-desc {
            color: var(--text-secondary);
        }

        .flat-dashboard #personal-assets .personal-tip {
            margin-top: 10px;
            color: var(--text-tertiary);
            font-size: 12px;
        }

        .flat-dashboard .table thead th {
            background: transparent;
            border-bottom: 1px solid var(--border-color);
        }

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

        /* 响应式 */
        @media (max-width: 1024px) {
            .main-layout {
                grid-template-columns: 1fr;
            }

            .sidebar {
                display: none;
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .form-row {
                grid-template-columns: 1fr;
            }

            .stats-grid {
                grid-template-columns: 1fr;
            }
        }

        /* 加载动画 */
        .loading {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255,255,255,.3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 0.6s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* 操作按钮组 */
        .action-buttons {
            display: flex;
            gap: 8px;
        }

        /* Modal 对话框 */
        .modal {
            display: none;
            position: fixed;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            width: 100vw !important;
            height: 100vh !important;
            min-width: 100vw !important;
            min-height: 100vh !important;
            max-width: 100vw !important;
            max-height: 100vh !important;
            margin: 0 !important;
            padding: 0 !important;
            background: rgba(0,0,0,0.8) !important;
            z-index: 99999 !important;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            box-sizing: border-box;
        }

        .modal.show {
            display: flex;
        }
        
        /* 提示弹窗样式 - 专业版 */
        .alert-dialog {
            display: none;
            opacity: 0;
            transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(8px) saturate(180%);
            -webkit-backdrop-filter: blur(8px) saturate(180%);
        }
        
        .alert-dialog[style*="display: block"] {
            display: flex !important;
            opacity: 1;
        }
        
        .alert-dialog .modal-content {
            animation: modalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 
                0 20px 25px -5px rgba(0, 0, 0, 0.8),
                0 10px 10px -5px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.1);
            border: 1px solid var(--border-color);
            overflow: hidden;
            background: var(--bg-modal);
            position: relative;
            color: var(--text-primary);
            transition: background 0.3s ease, border-color 0.3s ease;
        }
        
        body.light-theme .alert-dialog .modal-content {
            box-shadow: 
                0 20px 25px -5px rgba(0, 0, 0, 0.15),
                0 10px 10px -5px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(0, 0, 0, 0.05);
        }
        
        .alert-dialog .modal-content::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, 
                rgba(102, 126, 234, 0.8) 0%, 
                rgba(118, 75, 162, 0.8) 100%);
            z-index: 1;
        }
        
        .alert-dialog .modal-header {
            padding: 24px 28px 20px;
            border-bottom: 1px solid var(--border-color);
            position: relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: var(--bg-modal);
            transition: background 0.3s ease, border-color 0.3s ease;
        }
        
        .alert-dialog .modal-title {
            font-size: 18px;
            font-weight: 600;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 12px;
            color: var(--text-primary);
            letter-spacing: -0.01em;
        }
        
        .alert-dialog .modal-title .icon-wrapper {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }
        
        .alert-dialog .modal-close {
            background: var(--bg-hover);
            border: none;
            color: var(--text-secondary);
            width: 36px;
            height: 36px;
            border-radius: 8px;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            line-height: 1;
            font-weight: 500;
        }
        
        .alert-dialog .modal-close:hover {
            background: var(--border-hover);
            color: var(--text-primary);
            transform: scale(1.05);
        }
        
        .alert-dialog .modal-close:active {
            transform: scale(0.95);
        }
        
        .alert-dialog .modal-body {
            padding: 28px;
            font-size: 15px;
            line-height: 1.7;
            color: var(--text-primary);
            background: var(--bg-modal);
            transition: background 0.3s ease, color 0.3s ease;
        }
        
        .alert-dialog .modal-body pre {
            white-space: pre-wrap;
            word-wrap: break-word;
            margin: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            color: var(--text-primary);
            background: var(--bg-input);
            padding: 16px 20px;
            border-radius: 10px;
            border: 1px solid var(--border-color);
            font-size: 14px;
            line-height: 1.6;
            box-shadow: inset 0 1px 2px var(--shadow-light);
            transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
        }
        
        .alert-dialog .modal-footer {
            padding: 16px 28px 24px;
            border-top: 1px solid var(--border-color);
            background: var(--bg-modal);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            transition: background 0.3s ease, border-color 0.3s ease;
        }
        
        .alert-dialog .modal-footer button {
            min-width: 100px;
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: 500;
            font-size: 14px;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            border: none;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }
        
        .alert-dialog .modal-footer button::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            transform: translate(-50%, -50%);
            transition: width 0.4s, height 0.4s;
        }
        
        .alert-dialog .modal-footer button:hover::before {
            width: 300px;
            height: 300px;
        }
        
        .alert-dialog .modal-footer button:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        
        .alert-dialog .modal-footer button:active {
            transform: translateY(0);
        }
        
        @keyframes modalSlideIn {
            0% {
                transform: translateY(-20px) scale(0.96);
                opacity: 0;
            }
            100% {
                transform: translateY(0) scale(1);
                opacity: 1;
            }
        }
        
        /* 不同类型弹窗的图标背景色 */
        .alert-dialog.error .modal-title .icon-wrapper {
            background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
            color: #dc2626;
        }
        
        .alert-dialog.success .modal-title .icon-wrapper {
            background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
            color: #059669;
        }
        
        .alert-dialog.warning .modal-title .icon-wrapper {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            color: #d97706;
        }
        
        .alert-dialog.info .modal-title .icon-wrapper {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            color: #2563eb;
        }

        .modal-content {
            background: var(--bg-modal);
            border-radius: 15px;
            padding: 30px;
            max-width: 600px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
        }
        
        .confirm-dialog {
            max-width: 550px;
            width: 90%;
        }
        
        .confirm-dialog .modal-content {
            padding: 25px;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            overflow: hidden; /* 防止整个内容区域滚动 */
            background: var(--bg-modal);
            color: var(--text-primary);
        }
        
        .confirm-dialog .modal-body {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 15px 0;
            line-height: 1.8;
            font-size: 15px;
            color: var(--text-primary);
            min-height: 0; /* 允许 flex 子元素缩小 */
            transition: color 0.3s ease;
        }
        
        .confirm-dialog .modal-body pre {
            white-space: pre-wrap;
            word-wrap: break-word;
            word-break: break-word;
            margin: 0;
            font-family: inherit;
            padding: 12px;
            color: var(--text-primary);
            background: var(--bg-input);
            border-radius: 6px;
            border: 1px solid var(--border-color);
            transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
        }
        
        .confirm-dialog .modal-footer {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid var(--border-color);
            flex-shrink: 0; /* 防止 footer 被压缩 */
            background: var(--bg-modal);
            transition: background 0.3s ease, border-color 0.3s ease;
        }
        
        .confirm-dialog .btn {
            min-width: 100px;
            padding: 10px 20px;
        }
        
        /* 确保模态框在移动端也能正常显示 */
        @media (max-height: 600px) {
            .confirm-dialog .modal-content {
                max-height: 95vh;
            }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            background: var(--bg-modal);
            color: var(--text-primary);
            transition: background 0.3s ease, color 0.3s ease;
        }

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

        .modal-close {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: var(--text-secondary);
            transition: color 0.3s ease;
        }

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

        /* VIP信息样式 */
        .vip-info {
            padding: 20px;
        }

        .vip-status, .vip-expires {
            margin-bottom: 15px;
            font-size: 16px;
        }

        .vip-status strong, .vip-expires strong {
            color: var(--text-primary);
            margin-right: 10px;
        }

        .status-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 500;
        }

        .status-badge.active {
            background: var(--success-bg);
            color: var(--success);
            border: 1px solid rgba(65, 193, 123, 0.22);
        }

        .status-badge.expired {
            background: var(--danger-bg);
            color: var(--danger);
            border: 1px solid rgba(255, 107, 107, 0.22);
        }

        /* 设备信息区域样式 */
        .device-info-section {
            margin-top: auto;
            padding: 16px;
            border-top: 1px solid var(--border-color);
            background: var(--bg-tertiary);
            border-radius: 0 0 15px 15px;
            transition: background 0.3s ease, border-color 0.3s ease;
        }

        .device-info-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .device-info-copy-btn {
            padding: 4px 10px;
            font-size: 11px;
            border-radius: 6px;
            background: var(--bg-hover);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            font-weight: 500;
        }

        .device-info-copy-btn:hover {
            background: var(--accent-soft-bg);
            border-color: var(--accent-color);
            color: var(--accent-color);
            transform: translateY(-1px);
        }

        .device-info-content {
            margin-bottom: 12px;
            padding: 10px 12px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 12px;
            line-height: 1.5;
            transition: background 0.3s ease, border-color 0.3s ease;
        }

        .device-info-nickname {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .device-info-id {
            font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
            font-size: 11px;
            color: var(--text-secondary);
            opacity: 0.8;
            word-break: break-all;
            cursor: pointer;
            transition: opacity 0.2s;
        }

        .device-info-id:hover {
            opacity: 1;
            color: var(--accent-color);
        }

        .device-info-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .device-info-btn {
            width: 100%;
            padding: 10px 12px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            background: var(--bg-card);
            color: var(--text-primary);
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .device-info-btn:hover {
            background: var(--bg-hover);
            border-color: var(--border-hover);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px var(--shadow-light);
        }

        .device-info-btn.primary {
            background: var(--accent-soft-bg);
            border-color: var(--accent-color);
            color: var(--accent-color);
        }

        .device-info-btn.primary:hover {
            background: var(--accent-color);
            color: var(--bg-primary);
        }

        .device-info-btn.danger {
            background: rgba(244, 63, 94, 0.12);
            border-color: rgba(244, 63, 94, 0.3);
            color: #f43f5e;
        }

        .device-info-btn.danger:hover {
            background: rgba(244, 63, 94, 0.2);
            border-color: rgba(244, 63, 94, 0.5);
        }

        .device-message {
            font-size: 11px;
            color: var(--accent-color);
            min-height: 16px;
            opacity: 0;
            transition: opacity 0.2s;
            margin-top: 8px;
        }

        .device-message.error {
            color: #f43f5e;
        }

        .device-message.show {
            opacity: 1;
        }

        /* 消费记录页面样式 */
        .consumption-filters {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .consumption-filters-label {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-tertiary);
        }

        .consumption-filters-buttons {
            display: flex;
            gap: 8px;
        }

        .consumption-summary {
            margin-bottom: 20px;
            padding: 16px 20px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-sm);
            display: flex;
            align-items: baseline;
            gap: 12px;
            transition: background 0.3s ease, border-color 0.3s ease;
        }

        .consumption-summary-label {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-secondary);
        }

        .consumption-summary-value {
            font-size: 20px;
            font-weight: 700;
            color: var(--accent-strong);
            letter-spacing: 0.3px;
        }

        .consumption-table {
            width: 100%;
        }

        .consumption-table thead th {
            font-weight: 600;
            text-align: left;
            padding: 14px 16px;
        }

        .consumption-table tbody td {
            padding: 14px 16px;
            vertical-align: middle;
        }

        .consumption-date {
            font-weight: 500;
            color: var(--text-primary);
            font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
            font-size: 13px;
        }

        .consumption-hours {
            font-weight: 600;
            color: var(--accent-strong);
            font-size: 15px;
            text-align: right;
        }

        /* 深色主题下：兜底修复 HTML 内联的浅色 style（避免多页面逐个改） */
        body:not(.light-theme) [style*="background: #ffffff"] { background: var(--bg-modal) !important; }
        body:not(.light-theme) [style*="background:#ffffff"] { background: var(--bg-modal) !important; }
        body:not(.light-theme) [style*="background: #fafbfc"] { background: var(--bg-tertiary) !important; }
        body:not(.light-theme) [style*="background: #f8f9fa"] { background: var(--bg-tertiary) !important; }
        body:not(.light-theme) [style*="background:#f8f9fa"] { background: var(--bg-tertiary) !important; }
        body:not(.light-theme) [style*="background: white"] { background: var(--bg-tertiary) !important; }

        body:not(.light-theme) [style*="color: #111827"] { color: var(--text-primary) !important; }
        body:not(.light-theme) [style*="color: #374151"] { color: var(--text-secondary) !important; }
        body:not(.light-theme) [style*="color: #6b7280"] { color: var(--text-tertiary) !important; }
        body:not(.light-theme) [style*="color: #666"] { color: var(--text-secondary) !important; }
        body:not(.light-theme) [style*="color: #999"] { color: var(--text-tertiary) !important; }

        body:not(.light-theme) [style*="border-top: 1px solid #e0e0e0"] { border-top-color: var(--border-color) !important; }
        body:not(.light-theme) [style*="border: 1px solid #ddd"] { border-color: var(--border-color) !important; }
        body:not(.light-theme) [style*="border-bottom: 1px solid rgba(0,0,0,0.06)"] { border-bottom-color: var(--border-color) !important; }
        body:not(.light-theme) [style*="border-top: 1px solid rgba(0,0,0,0.06)"] { border-top-color: var(--border-color) !important; }

        /* 按钮类的浅色内联背景兜底 */
        body:not(.light-theme) [style*="background: #f3f4f6"] { background: var(--bg-hover) !important; }
        body:not(.light-theme) [style*="background: #fff5f5"] { background: var(--danger-bg) !important; }
        body:not(.light-theme) [style*="border: 1px solid #ffcdd2"] { border-color: rgba(255, 107, 107, 0.25) !important; }

        /* ==================== 播放列表卡片样式 ==================== */
        #page-playlists .playlist-live-section {
            border: 1px solid rgba(255, 107, 107, 0.28);
            background:
                radial-gradient(1200px 360px at 5% 0%, rgba(255, 107, 107, 0.18), transparent 60%),
                linear-gradient(135deg, rgba(20, 24, 33, 0.98) 0%, rgba(15, 17, 20, 0.96) 100%);
            box-shadow: 0 16px 40px rgba(255, 107, 107, 0.12);
        }

        #page-playlists .playlist-live-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        #page-playlists .playlist-live-title {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            font-size: 16px;
            font-weight: 800;
            color: var(--text-primary);
        }

        #page-playlists .playlist-live-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #ff6b6b;
            box-shadow: 0 0 0 6px rgba(255, 107, 107, 0.18);
            animation: livePulse 1.6s ease-out infinite;
        }

        #page-playlists .playlist-live-badge {
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.6px;
            padding: 4px 8px;
            border-radius: 999px;
            background: rgba(255, 107, 107, 0.2);
            border: 1px solid rgba(255, 107, 107, 0.45);
            color: #ffd2d2;
        }

        #page-playlists .playlist-live-hint {
            font-size: 12px;
            color: rgba(231, 227, 218, 0.7);
            font-weight: 600;
        }

        #page-playlists .playlist-live-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        #page-playlists .playlist-live-list .playlist-row {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 107, 107, 0.22);
        }

        #page-playlists .playlist-live-list .playlist-row:hover {
            border-color: rgba(255, 107, 107, 0.4);
            box-shadow: 0 10px 26px rgba(255, 107, 107, 0.16);
        }

        #page-playlists .playlist-desc-live {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.6;
            color: rgba(231, 227, 218, 0.76);
        }

        #page-playlists .playlist-live-card .playlist-status-badge.status-live {
            font-weight: 800;
        }

        #page-playlists .card-title.playlist-header {
            align-items: center;
        }

        #page-playlists .playlist-create-btn {
            font-size: 13px;
            padding: 8px 14px;
        }

        #page-playlists .playlist-toolbar {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-color);
            background: var(--bg-tertiary);
            border-radius: 10px;
            margin-bottom: 14px;
        }

        #page-playlists .playlist-search-label {
            font-size: 12px;
            color: var(--text-tertiary);
            white-space: nowrap;
            font-weight: 600;
            letter-spacing: 0.2px;
        }

        #page-playlists .playlist-search-input {
            flex: 1;
            min-width: 220px;
            padding: 9px 12px;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: var(--bg-input);
            color: var(--text-primary);
            font-size: 13px;
        }

        #page-playlists .playlist-search-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--focus-ring);
        }

        #page-playlists .playlist-toolbar-actions {
            display: flex;
            gap: 8px;
            flex-wrap: nowrap;
        }

        #page-playlists .playlist-summary {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 10px;
            border-radius: 999px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            font-size: 12px;
            color: var(--text-secondary);
            white-space: nowrap;
        }

        #page-playlists .playlist-live-only {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid rgba(255, 107, 107, 0.35);
            background: rgba(255, 107, 107, 0.12);
            color: #ffd2d2;
            font-size: 12px;
            font-weight: 700;
            white-space: nowrap;
            cursor: pointer;
        }

        #page-playlists .playlist-live-only input {
            accent-color: #ff6b6b;
        }

        #page-playlists .playlist-summary-item {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        #page-playlists .playlist-summary-label {
            color: var(--text-tertiary);
        }

        #page-playlists .playlist-summary-value {
            font-weight: 800;
            color: var(--text-primary);
        }

        #page-playlists .playlist-list-container {
            padding-top: 6px;
            overflow: visible;
        }

        #page-playlists .playlist-table {
            display: flex;
            flex-direction: column;
            gap: 8px;
            position: relative;
            z-index: 1;
        }

        #page-playlists .playlist-row {
            display: grid;
            grid-template-columns: minmax(240px, 2fr) 120px 80px 160px 1.4fr;
            gap: 12px;
            align-items: center;
            padding: 12px 14px;
            border-radius: 14px;
            border: 1px solid rgba(231, 227, 218, 0.12);
            background: rgba(255, 255, 255, 0.02);
            backdrop-filter: blur(6px);
            transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
            overflow: visible;
            position: relative;
            z-index: 1;
        }

        #page-playlists .playlist-row.is-actions-open {
            z-index: 50;
        }

        #page-playlists .playlist-row.playlist-card-live {
            border-color: rgba(255, 107, 107, 0.35);
            background: rgba(255, 107, 107, 0.06);
        }

        #page-playlists .playlist-row.playlist-row-live {
            border-color: rgba(255, 107, 107, 0.35);
            background: rgba(255, 107, 107, 0.08);
        }

        #page-playlists .playlist-row.playlist-row-head {
            background: rgba(255, 255, 255, 0.04);
            border-style: solid;
            border-color: rgba(231, 227, 218, 0.1);
            font-size: 11px;
            color: rgba(231, 227, 218, 0.6);
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        #page-playlists .playlist-col-name {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        #page-playlists .playlist-col-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            justify-content: flex-end;
        }

        #page-playlists .playlist-actions-menu {
            position: relative;
            z-index: 60;
        }

        #page-playlists .playlist-actions-trigger {
            min-width: 70px;
        }

        #page-playlists .playlist-actions-dropdown {
            position: absolute;
            right: 0;
            top: calc(100% + 6px);
            min-width: 140px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
            padding: 6px;
            display: none;
            z-index: 2000;
        }

        #page-playlists .playlist-actions-dropdown.drop-up {
            top: auto;
            bottom: calc(100% + 6px);
        }

        #page-playlists .playlist-actions-dropdown.open {
            display: grid;
            gap: 4px;
        }

        #page-playlists .playlist-action-item {
            background: transparent;
            border: none;
            color: var(--text-primary);
            padding: 8px 10px;
            border-radius: 8px;
            text-align: left;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
        }

        #page-playlists .playlist-action-item:hover {
            background: var(--bg-hover);
        }

        #page-playlists .playlist-action-item.danger {
            color: var(--danger);
        }

        #page-playlists .playlist-live-list .playlist-row,
        #page-playlists .playlist-live-list .playlist-row.playlist-row-head {
            grid-template-columns: minmax(240px, 2fr) 120px 1fr;
        }

        #page-playlists .playlist-live-list .playlist-col-actions {
            flex-wrap: nowrap;
            white-space: nowrap;
        }

        #page-playlists .playlist-col-count,
        #page-playlists .playlist-col-created,
        #page-playlists .playlist-col-status {
            font-size: 12px;
            color: var(--text-secondary);
        }

        #page-playlists .playlist-name {
            font-size: 15px;
            font-weight: 800;
            color: var(--text-primary);
        }

        #page-playlists .playlist-desc {
            font-size: 12px;
            color: rgba(231, 227, 218, 0.68);
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        #page-playlists .playlist-status-badge {
            padding: 4px 10px;
        }

        #page-playlists .playlist-row:hover {
            border-color: rgba(201, 168, 106, 0.32);
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
            transform: translateY(-1px);
        }

        #page-playlists .playlist-col-actions .btn {
            padding: 6px 10px;
            border-radius: 8px;
        }

        @media (max-width: 1280px) {
            #page-playlists .playlist-row {
                grid-template-columns: minmax(220px, 1.8fr) 110px 70px 140px 1.2fr;
            }
        }

        @media (max-width: 1024px) {
            #page-playlists .playlist-row {
                grid-template-columns: minmax(220px, 1fr) 110px 70px;
            }
            #page-playlists .playlist-col-created,
            #page-playlists .playlist-col-actions {
                grid-column: span 3;
                justify-content: flex-start;
            }
        }

        @media (max-width: 768px) {
            #page-playlists .playlist-summary {
                width: 100%;
                justify-content: space-between;
            }
            #page-playlists .playlist-row {
                grid-template-columns: 1fr;
            }
            #page-playlists .playlist-col-actions {
                justify-content: flex-start;
            }
        }
        .playlists-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 14px;
            padding: 0;
        }

        .playlist-card {
            background: var(--bg-card);
            border: var(--hairline);
            border-radius: var(--radius-md);
            padding: 16px;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            gap: 12px;
            position: relative;
            overflow: hidden;
        }

        .playlist-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--accent-gradient);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .playlist-card:hover {
            border-color: var(--accent);
            box-shadow: var(--elev-1);
            transform: translateY(-2px);
        }

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

        .playlist-card-live::before {
            background: linear-gradient(90deg, var(--success) 0%, var(--success) 100%);
            opacity: 1;
        }

        .playlist-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
        }

        .playlist-card-title {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
            width: 100%;
        }

        .playlist-name {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-primary);
            margin: 0;
            flex: 1;
            line-height: 1.4;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
        }

        .playlist-status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .playlist-status-badge .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            display: inline-block;
        }

        .playlist-status-badge.status-live {
            background: var(--success-bg);
            color: var(--success);
            border: 1px solid rgba(65, 193, 123, 0.25);
        }

        .playlist-status-badge.status-live .status-dot {
            background: var(--success);
            box-shadow: 0 0 6px rgba(65, 193, 123, 0.5);
            animation: pulse 2s infinite;
        }

        .playlist-status-badge.status-draft {
            background: var(--bg-tertiary);
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
        }

        .playlist-status-badge.status-draft .status-dot {
            background: var(--text-tertiary);
        }

        .playlist-status-badge.status-ended {
            background: rgba(148, 163, 184, 0.16);
            color: #64748b;
            border: 1px solid rgba(148, 163, 184, 0.28);
        }

        .playlist-status-badge.status-ended .status-dot {
            background: #64748b;
        }

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

        .playlist-card-body {
            display: flex;
            flex-direction: column;
            gap: 10px;
            flex: 1;
        }

        .playlist-description {
            display: flex;
            gap: 8px;
            padding: 10px 12px;
            background: var(--bg-tertiary);
            border-radius: var(--radius-sm);
            border-left: 3px solid var(--accent);
        }

        .playlist-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-tertiary);
            white-space: nowrap;
            flex-shrink: 0;
        }

        .playlist-text {
            font-size: 12px;
            color: var(--text-secondary);
            line-height: 1.5;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
        }

        .playlist-meta {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px 12px;
        }

        .playlist-meta-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
        }

        .playlist-card-footer {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            padding-top: 12px;
            border-top: var(--hairline);
        }

        .playlist-action-btn {
            flex: 1;
            min-width: 80px;
            justify-content: center;
        }

        #page-playlists .playlist-action-btn.btn {
            padding: 6px 10px;
            font-size: 12px;
            border-radius: 8px;
        }

        /* 响应式 */
        @media (max-width: 768px) {
            .playlists-grid {
                grid-template-columns: 1fr;
            }

            .playlist-card-footer {
                flex-direction: column;
            }

            .playlist-action-btn {
                width: 100%;
            }
        }

        @media (max-width: 1024px) {
            #page-playlists .playlist-toolbar {
                flex-direction: column;
                align-items: stretch;
            }

            #page-playlists .playlist-toolbar-actions {
                justify-content: flex-end;
            }
        }

        /* 浅色主题适配 */
        body.light-theme .playlist-card {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }

        body.light-theme .playlist-card:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        }
        body:not(.light-theme) [style*="color: #dc3545"] { color: var(--danger) !important; }

        /* 深色模式下的提示框样式修复 */
        body:not(.light-theme) [style*="background: #fff3e0"] {
            background: rgba(255, 152, 0, 0.15) !important;
            border-left-color: #ff9800 !important;
        }
        body:not(.light-theme) [style*="background: #fff3e0"] strong {
            color: #ffb74d !important;
        }
        body:not(.light-theme) [style*="background: #fff3e0"] div {
            color: #e0e0e0 !important;
        }
        body:not(.light-theme) [style*="background: #fff3e0"] code {
            background: rgba(255, 152, 0, 0.3) !important;
            color: #ffcc80 !important;
            padding: 2px 6px;
            border-radius: 4px;
        }

        body:not(.light-theme) [style*="background: #e8f5e9"] {
            background: rgba(76, 175, 80, 0.15) !important;
            border-left-color: #4caf50 !important;
        }
        body:not(.light-theme) [style*="background: #e8f5e9"] strong {
            color: #81c784 !important;
        }
        body:not(.light-theme) [style*="background: #e8f5e9"] ul,
        body:not(.light-theme) [style*="background: #e8f5e9"] li {
            color: #e0e0e0 !important;
        }

/* ==================== 2026 UI/UX 全站优化（现代化层级/间距/布局） ==================== */
:root {
    --page-max: 1280px;
    --page-padding: 28px;
    --content-gap: 18px;
    --text-strong: var(--text-primary);
    --text-normal: var(--text-secondary);
    --text-weak: var(--text-tertiary);
    --surface-1: var(--bg-secondary);
    --surface-2: var(--bg-card);
    --surface-3: var(--bg-tertiary);
}

body {
    font-size: 14px;
    line-height: 1.65;
    letter-spacing: 0.1px;
}

h1, h2, h3 {
    font-weight: 800;
    color: var(--text-strong);
    letter-spacing: 0.2px;
}

p, li, span {
    color: var(--text-normal);
}

.container {
    max-width: var(--page-max);
    padding: var(--page-padding);
}

.main-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: var(--content-gap);
    align-items: start;
}

.navbar {
    height: 64px;
}

.navbar-content {
    height: 64px;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 800;
}

.sidebar {
    border-radius: 16px;
    padding: 12px;
}

.sidebar-title {
    font-size: 12px;
    letter-spacing: 0.6px;
}

.menu-item {
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 600;
}

.content-area {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    min-height: calc(100vh - 180px);
            overflow: visible;
}

.page-header {
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--surface-2);
}

.page-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
}

.page-description {
    font-size: 13px;
}

.card {
    border-radius: 16px;
    padding: 18px 20px;
    background: var(--surface-2);
            overflow: visible;
}

.card-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

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

.form-label {
    font-size: 13px;
    font-weight: 600;
}

.form-control {
    min-height: 44px;
    padding: 10px 12px;
    border-width: 1px;
    border-radius: 10px;
    background: var(--surface-3);
}

textarea.form-control {
    min-height: 120px;
}

.btn {
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.btn-primary {
    box-shadow: 0 6px 16px rgba(196, 161, 96, 0.18);
}

.btn-secondary {
    background: var(--surface-3);
}

.table th,
.table td {
    padding: 12px 14px;
}

.table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-weak);
}

.data-table {
    border-radius: 14px;
}

.stats-grid {
    gap: 16px;
}

.stat-card {
    border-radius: 16px;
    padding: 18px;
}

.empty-state {
    padding: 40px 20px;
}

@media (max-width: 1024px) {
    .content-area {
        border-radius: 12px;
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 18px 16px 50px;
    }
}

/* ==================== UI/UX 提升（管理面板 Flat UI） ==================== */
.flat-ui .navbar-content {
    height: 64px;
}

.flat-ui .navbar-brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.flat-ui .navbar-brand img {
    width: 28px !important;
    height: 28px !important;
    border-radius: 10px !important;
}

.flat-ui .container {
    max-width: 1360px;
    padding: 24px 32px 60px;
}

.flat-ui .main-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.flat-ui .sidebar {
    border-radius: 16px;
    padding: 12px;
    top: 88px;
}

.flat-ui .sidebar-title {
    font-size: 12px;
    letter-spacing: 0.6px;
}

.flat-ui .content-area {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    min-height: calc(100vh - 180px);
}

.flat-ui .page-header {
    padding: 18px 20px;
    border-radius: 14px;
}

.flat-ui .page-title {
    font-size: 20px;
    font-weight: 800;
}

.flat-ui .page-description {
    font-size: 13px;
}

.flat-ui .card {
    border-radius: 16px;
    padding: 18px 20px;
}

.flat-ui .card-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.flat-ui .table th,
.flat-ui .table td {
    padding: 12px 14px;
}

.flat-ui .table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-tertiary);
}

.flat-ui .form-control {
    min-height: 44px;
    padding: 10px 12px;
    border-width: 1px;
    border-radius: 10px;
}

.flat-ui textarea.form-control {
    min-height: 120px;
}

.flat-ui .btn {
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.flat-ui .btn:focus-visible,
.flat-ui .form-control:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.flat-ui .btn-primary {
    box-shadow: 0 6px 16px rgba(196, 161, 96, 0.18);
}

.flat-ui .btn-secondary {
    background: var(--bg-tertiary);
}

.flat-ui .data-table {
    border-radius: 14px;
}

@media (max-width: 1024px) {
    .flat-ui .content-area {
        border-radius: 12px;
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .flat-ui .container {
        padding: 18px 16px 50px;
    }
}
