/* ========================================
   🍎辅助助手 - 主样式表 v2.0
   Premium Glassmorphism Design
   ======================================== */

/* 变量定义 */
:root {
    /* =========================================
       Design System 2.0 - Ultra Premium Glass
       ========================================= */

    /* Core Palette - Vivid Gradient Colors */
    --primary: #818cf8;
    --primary-light: #a5b4fc;
    --primary-dark: #6366f1;
    --primary-hover: #a5b4fc;
    --primary-bg: rgba(99, 102, 241, 0.15);
    --primary-glow: rgba(99, 102, 241, 0.4);

    /* Premium Gradient Presets */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-info: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    --gradient-aurora: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-ocean: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --gradient-sunset: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-emerald: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);

    /* Semantic Colors - Vibrant */
    --success: #34d399;
    --success-light: #6ee7b7;
    --success-bg: rgba(16, 185, 129, 0.15);
    --success-glow: rgba(16, 185, 129, 0.4);

    --warning: #fbbf24;
    --warning-light: #fde68a;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --warning-glow: rgba(245, 158, 11, 0.4);

    --danger: #f87171;
    --danger-light: #fca5a5;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --danger-glow: rgba(239, 68, 68, 0.4);

    --info: #38bdf8;
    --info-light: #7dd3fc;
    --info-bg: rgba(14, 165, 233, 0.15);
    --info-glow: rgba(14, 165, 233, 0.4);

    /* Dark Mode Base - Deep & Rich */
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --bg-hover: rgba(255, 255, 255, 0.08);

    /* Premium Glass Cards */
    --bg-card: linear-gradient(145deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.75) 100%);
    --bg-card-hover: linear-gradient(145deg, rgba(45, 55, 75, 0.9) 0%, rgba(25, 35, 55, 0.85) 100%);
    --bg-card-solid: #1e293b;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;

    /* Borders & Separators */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.15);
    --border-highlight: rgba(129, 140, 248, 0.5);
    --border-glow: rgba(129, 140, 248, 0.3);

    /* Premium Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
    --shadow-glow-sm: 0 0 20px rgba(99, 102, 241, 0.15);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.2);

    /* Glass Effects */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-bg-light: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shine: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    --card-border: 1px solid rgba(255, 255, 255, 0.08);
    --backdrop-blur: blur(24px);
    --backdrop-blur-sm: blur(12px);

    /* Animation Timing */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-spring: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Border Radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --topbar-height: 72px;

    /* Terminal Colors */
    --terminal-bg: #0d1117;
    --terminal-header: #161b22;
    --terminal-border: #30363d;
    --terminal-text: #c9d1d9;
}

/* =========================================
   Light Theme Configuration
   ========================================= */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    /* Slate 50 - Cleaner background */
    --bg-secondary: #ffffff;
    /* White */
    --bg-tertiary: #f1f5f9;
    /* Slate 100 */
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-hover: #f1f5f9;

    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --text-inverse: #ffffff;

    --border-color: rgba(148, 163, 184, 0.2);
    --border-light: rgba(148, 163, 184, 0.3);

    /* Vibrant Semantic Colors for Light Mode */
    --primary: #4f46e5;
    /* Indigo 600 */
    --primary-light: #6366f1;
    /* Indigo 500 */
    --primary-bg: rgba(79, 70, 229, 0.1);

    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.1);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.1);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.1);
    --info: #0284c7;
    --info-bg: rgba(2, 132, 199, 0.1);

    /* Shadows - Soft & Diffused */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 30px rgba(79, 70, 229, 0.15);

    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
}

/* Light Theme Specific Overrides */
[data-theme="light"] .sidebar,
[data-theme="light"] .top-bar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color);
    /* Changed to standard border for better visibility */
}

/* 玻璃拟态效果类 */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* ========================================
   Glass Card System - Ultra Premium
   ======================================== */
.card,
.stat-card,
.auth-container {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md), var(--shadow-glow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

/* 内部光泽层 */
.card::before,
.stat-card::before,
.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--glass-shine);
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

/* 悬浮效果（简化版：只添加轻微阴影） */
.card:hover,
.stat-card:hover {
    box-shadow: var(--shadow-lg);
}

.card:hover::before,
.stat-card:hover::before {
    opacity: 1;
}

/* 卡片彩虹边框效果（可选激活） */
.card.rainbow-border {
    border: none;
    background-clip: padding-box;
}

.card.rainbow-border::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 300% 300%;
    animation: gradient-shift 3s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.card-header {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 28px;
    position: relative;
    z-index: 2;
}


/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    /* Modern System Font Stack - Fast & Native */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei", "微软雅黑", sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

input,
select,
textarea,
button {
    font-family: inherit;
    font-size: inherit;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ========================================
   现代化 UI 覆盖样式
   ======================================== */

/* 背景动效容器 */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-primary);
    transition: background 0.5s ease;
}

/* 玻璃拟态基础 */
.glass-panel {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

/* 覆盖加载动画背景 */
.loader {
    background: var(--bg-primary);
    /* 保持与主题一致 */
}


.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader p {
    margin-top: 16px;
    color: var(--text-secondary);
}

/* ========================================
   认证页面
   ======================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow: auto;
}

.auth-page.hidden {
    display: none;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    /* background: var(--bg-card); */
    /* Removed as it's now handled by .card styles */
    /* border-radius: var(--radius-xl); */
    /* Removed as it's now handled by .card styles */
    padding: 24px;
    position: relative;
    z-index: 10;
    /* box-shadow: var(--shadow-lg); */
    /* Removed as it's now handled by .card styles */
    /* border: 1px solid var(--border-color); */
    /* Removed as it's now handled by .card styles */
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 32px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 背景装饰 */
.auth-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.auth-bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: pulse 8s ease-in-out infinite;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: #f093fb;
    bottom: -50px;
    left: -50px;
    animation: pulse 6s ease-in-out infinite reverse;
}

.circle-3 {
    width: 200px;
    height: 200px;
    background: #4facfe;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 10s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

/* ========================================
   表单样式
   ======================================== */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

/* Form Inputs - High Contrast */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    /* Darker background for inputs */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group label {
    color: var(--text-secondary);
    /* Updated from muted for better headings */
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 38px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.btn-toggle-password:hover {
    opacity: 1;
}

/* ========================================
   Toggle Switch 开关按钮
   ======================================== */
.toggle-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.toggle-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(100, 116, 139, 0.4);
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(100, 116, 139, 0.3);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 开启状态 */
.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(26px);
}

/* 悬停效果 */
.toggle-switch:hover .toggle-slider {
    border-color: rgba(100, 116, 139, 0.5);
}

.toggle-switch:hover input:checked+.toggle-slider {
    border-color: rgba(16, 185, 129, 0.7);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* ========================================
   按钮样式 - Ultra Premium
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
    border: none;
}

/* 按钮光泽扫描动画 */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled::before {
    display: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    filter: brightness(1.1);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur-sm);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
    filter: brightness(1.1);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    filter: brightness(1.1);
}

.btn-warning {
    background: var(--gradient-warning);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
    filter: brightness(1.1);
}

.btn-info {
    background: var(--gradient-info);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.5);
    filter: brightness(1.1);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    box-shadow: none;
    padding: 8px 16px;
    transition: all var(--transition-base);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-outline-primary:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-xl {
    padding: 20px 40px;
    font-size: 18px;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--backdrop-blur-sm);
}

.btn-icon:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn.loading .btn-loader {
    display: block;
}

.btn.loading span {
    display: none;
}

.btn-logout {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-logout:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
    transform: translateY(-2px);
}

/* ========================================
   主应用布局
   ======================================== */
.app-page {
    display: flex;
    min-height: 100vh;
}

.app-page.hidden {
    display: none;
}

/* 侧边栏 */
/* ========================================
   现代化侧边栏 (Floating Sidebar)
   ======================================== */
.sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - 32px);
    /* 悬浮留白 */
    margin: 16px;
    /* 悬浮间距 */
    background: var(--bg-card);
    border-right: none;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: all var(--transition-normal);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    /* Deep shadow for dark mode */
}

/* Light Mode Sidebar Overrides */
[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.85);
    /* 半透明白 */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .user-details,
.sidebar.collapsed .sidebar-header span,
.sidebar.collapsed .btn-logout span {
    display: none;
}

.sidebar.collapsed .logo {
    justify-content: center;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 14px;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    margin-bottom: 0;
    justify-content: flex-start;
}

.sidebar-header .logo-icon {
    font-size: 28px;
}

.sidebar-header .logo span {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-toggle span {
    width: 16px;
    height: 2px;
    background: currentColor;
    transition: transform var(--transition-fast);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    margin-bottom: 8px;
    border-radius: 16px;
    /* More rounded */
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(4px);
}

[data-theme="light"] .nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    /* Glowing effect */
}

[data-theme="light"] .nav-item.active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}


.nav-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

/* 主内容区 */
/* Main Content Layout Adjustment */
.main-content {
    flex: 1;
    margin-left: calc(var(--sidebar-width) + 32px);
    /* +32px for margins */
    margin-right: 16px;
    /* Right margin */
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
    padding-bottom: 32px;
}

.sidebar.collapsed~.main-content {
    margin-left: calc(var(--sidebar-collapsed) + 32px);
}


/* 顶部栏 */
/* 顶部栏 (Floating Topbar) */
.top-bar {
    height: 72px;
    margin-top: 16px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border-bottom: none;
    border-radius: 20px;
    /* Rounded */
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 16px;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .top-bar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
}


.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-right: 16px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    transition: all var(--transition-fast);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--success-bg);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--success);
}

.connection-status .status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.connection-status.error {
    background: var(--danger-bg);
    color: var(--danger);
}

.connection-status.error .status-dot {
    background: var(--danger);
    animation: none;
}

/* 页面容器 */
.page-container {
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================
   统计卡片 - Ultra Premium
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

/* 统计卡片背景装饰 */
.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.1;
    filter: blur(40px);
    z-index: 0;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
    border-color: var(--border-light);
}

.stat-card:hover::after {
    transform: scale(1.5);
    opacity: 0.15;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.stat-info {
    position: relative;
    z-index: 1;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 数字跳动动画 */
.stat-info h3.counting {
    animation: countPulse 0.3s ease;
}

@keyframes countPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   快捷操作 - Premium
   ======================================== */
.quick-actions {
    margin-bottom: 32px;
}

.quick-actions h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--glass-shine);
    pointer-events: none;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.action-btn:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
    border-color: var(--border-light);
}

.action-btn:hover::before {
    opacity: 1;
}

.action-btn:active {
    transform: translateY(-4px) scale(1.01);
}

.action-icon {
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--glass-bg-light);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.action-btn:hover .action-icon {
    transform: scale(1.1);
}

.action-btn span:last-child {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* ========================================
   警告/提示框
   ======================================== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    margin-bottom: 4px;
}

.alert-content p {
    font-size: 14px;
    opacity: 0.8;
}

.alert-warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-danger {
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success);
    color: var(--success);
}

/* ========================================
   工具栏
   ======================================== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group select,
.filter-group input {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========================================
   数据表格
   ======================================== */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.loading-cell {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
}

.empty-cell {
    text-align: center;
    padding: 60px !important;
    color: var(--text-muted);
}

.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    margin-right: 8px;
}

.product-name-cell {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-badge.waiting {
    background: var(--info-bg);
    color: var(--info);
}

.status-badge.completed {
    background: var(--success-bg);
    color: var(--success);
}



.status-badge.stopped {
    background: var(--danger-bg);
    color: var(--danger);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ========================================
   公告卡片
   ======================================== */
.announcement-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.announcement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #a855f7, #ec4899);
}

.announcement-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.announcement-icon {
    font-size: 24px;
}

.announcement-header h3 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
}

.announcement-date {
    font-size: 13px;
    color: var(--text-muted);
}

.announcement-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.announcement-content ul {
    margin: 12px 0;
    padding-left: 20px;
}

.announcement-content li {
    margin-bottom: 8px;
}

.announcement-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
}

/* ========================================
   混合模式/用户极速抢单状态卡片
   ======================================== */
.hybrid-status-card {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, var(--bg-card), rgba(99, 102, 241, 0.05));
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
}

.hybrid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
    border-bottom: 1px solid var(--border-color);
}

.hybrid-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hybrid-mode-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.hybrid-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-stop {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-stop:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.hybrid-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.hybrid-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.hybrid-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.hybrid-stat-icon.received {
    background: var(--info-bg);
    color: var(--info);
}

.hybrid-stat-icon.grabbed {
    background: var(--success-bg);
    color: var(--success);
}

.hybrid-stat-icon.failed {
    background: var(--danger-bg);
    color: var(--danger);
}

.hybrid-stat-icon.status {
    background: var(--primary-bg);
    color: var(--primary);
}

.hybrid-stat-content {
    flex: 1;
}

.hybrid-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.hybrid-stat-value.success {
    color: var(--success);
}

.hybrid-stat-value.error {
    color: var(--danger);
}

.hybrid-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   终端风格日志
   ======================================== */
.terminal-container {
    background: var(--terminal-bg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    /* border-top: 1px solid var(--border-color); */
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--terminal-header);
    border-bottom: 1px solid var(--terminal-border);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn.red {
    background: #ff5f56;
}

.terminal-btn.yellow {
    background: #ffbd2e;
}

.terminal-btn.green {
    background: #27c93f;
}

.terminal-title {
    flex: 1;
    font-size: 13px;
    color: var(--text-muted);
    font-family: monospace;
}

.terminal-body {
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--terminal-text);
}

.log-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.log-time {
    color: #6e7681;
    font-size: 12px;
    white-space: nowrap;
    min-width: 70px;
}

.log-text {
    flex: 1;
    word-break: break-word;
}

.log-item.log-success .log-text {
    color: #3fb950;
}

.log-item.log-error .log-text {
    color: #f85149;
}

.log-item.log-warning .log-text {
    color: #d29922;
}

.log-item.log-info .log-text {
    color: #58a6ff;
}

/* ========================================
   抢单任务
   ======================================== */
.product-selector {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    min-height: 100px;
    margin-bottom: 12px;
}

.product-selector .empty-hint {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.selected-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.selected-product:last-child {
    margin-bottom: 0;
}

.selected-product-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selected-product-name {
    font-weight: 500;
}

.selected-product-price {
    color: var(--success);
    font-size: 14px;
}

.selected-product .btn-remove {
    width: 28px;
    height: 28px;
    padding: 0;
    background: var(--danger-bg);
    color: var(--danger);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.tasks-grid .empty-hint {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.task-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--transition-fast);
}

.task-card:hover {
    border-color: var(--border-light);
}

.task-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.task-card-title {
    font-weight: 600;
    font-size: 16px;
}

.task-card-body {
    margin-bottom: 16px;
}

.task-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.task-stat:last-child {
    border-bottom: none;
}

.task-stat-label {
    color: var(--text-secondary);
}

.task-stat-value {
    font-weight: 500;
}

.task-message {
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.task-card-actions {
    display: flex;
    gap: 8px;
}

.task-card-actions .btn {
    flex: 1;
}

/* ========================================
   收藏产品
   ======================================== */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.favorites-grid .empty-hint {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

.favorite-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-fast);
}

.favorite-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.favorite-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.favorite-card-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.favorite-card-id {
    font-size: 12px;
    color: var(--text-muted);
}

.favorite-card-body {
    margin-bottom: 16px;
}

.favorite-price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.favorite-price-range span:first-child {
    color: var(--text-secondary);
}

.favorite-price-range .price {
    color: var(--success);
    font-weight: 600;
}

.favorite-card-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   设置页面
   ======================================== */
.account-info-card {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.account-info-card h4 {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span:first-child {
    color: var(--text-secondary);
}

.info-row .highlight {
    color: var(--success);
    font-weight: 600;
    font-size: 18px;
}

/* ========================================
   模态框
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   Toast通知
   ======================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.removing {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-secondary);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

/* ========================================
   响应式设计
   ======================================== */
/* ========================================
   移动端优化 (Mobile Experience)
   ======================================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-105%);
        /* 完全移出屏幕 */
        width: 70%;
        /* Reduced from 85% to be less overwhelming */
        max-width: 260px;
        /* Capped at standard sidebar width */
        height: 100vh;
        /* 全高 */
        margin: 0;
        /* 移除悬浮边距 */
        border-radius: 0;
        /* 移除圆角 */
        top: 0;
        left: 0;
        z-index: 1000;
        /* 确保在最上层 */
        background: var(--bg-secondary);
        /* 纯色背景防止透视杂乱 */
        border-right: 1px solid var(--border-color);
        /* Add border for separation */
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 50px rgba(0, 0, 0, 0.5);
    }

    /* 遮罩层 */
    .sidebar.open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 100%;
        /* 从侧边栏右侧开始 */
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: -1;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 60px;
        /* 为顶部导航栏留出空间 */
    }

    .menu-toggle {
        display: flex;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* =================================
       GLOBAL MOBILE LAYOUT (APP-LIKE)
       ================================= */
    body {
        background: #f0f2f5;
        /* slightly darker background for contrast */
    }

    .page-container {
        padding: 16px;
        padding-bottom: 90px;
        /* More space for bottom toasts/nav if added */
    }

    /* Top Navigation Bar */
    .top-bar {
        position: sticky;
        top: 0;
        z-index: 900;
        margin-bottom: 16px;
        padding: 12px 16px;
        height: auto;
        border-radius: 0 0 16px 16px;
        /* Rounded bottom corners */
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
        border: none;
    }

    .top-bar-content {
        justify-content: space-between;
    }

    .toggle-sidebar-btn {
        width: 40px;
        height: 40px;
        background: transparent;
        color: #333;
    }

    .user-profile {
        display: none;
    }

    /* Page Headers */
    .page-header {
        margin-bottom: 20px;
        padding: 0 4px;
    }

    .page-header h2 {
        font-size: 24px;
        margin-bottom: 4px;
        color: #1a1a1a;
    }

    .page-header p {
        font-size: 14px;
        opacity: 0.7;
    }

    /* Stats Grid - Compact Cards */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        /* Two columns for stats */
        gap: 12px;
        margin-bottom: 24px;
    }

    .stat-card {
        padding: 16px;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        border: 1px solid rgba(0, 0, 0, 0.03);
    }

    .stat-card:nth-child(3) {
        /* If there's an odd one, span it? Or keep 2x2 grid */
        grid-column: span 2;
    }

    /* Toolbar & Actions */
    .toolbar {
        flex-direction: column;
        background: transparent;
        padding: 0;
        margin-bottom: 16px;
        gap: 12px;
        box-shadow: none;
        border: none;
    }

    .search-box {
        width: 100%;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .search-box input {
        height: 48px;
        /* Larger touch target */
        font-size: 16px;
    }

    .toolbar .btn {
        width: 100%;
        height: 48px;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    /* =================================
       PREMIUM MOBILE CARD TABLES
       ================================= */
    .table-container {
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .data-table {
        background: transparent;
        border: none;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .data-table tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
        border: 1px solid rgba(0, 0, 0, 0.02);
        overflow: hidden;
        transition: transform 0.2s;
        margin: 0;
    }

    .data-table tr:active {
        transform: scale(0.98);
    }

    /* Card Header (First Cell) */
    .data-table td:first-child {
        background: linear-gradient(to right, #f8f9fa, #fff);
        border-bottom: 1px solid #eee;
        padding: 16px;
        font-size: 16px;
        font-weight: 700;
        color: #1a1a1a;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
    }

    .data-table td:first-child::before {
        display: none !important;
        /* Hide label for header/title */
    }

    /* Card Body (Data Cells) */
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        border-bottom: 1px solid #f5f5f5;
        font-size: 14px;
        min-height: 48px;
    }

    /* Labels styling */
    .data-table td::before {
        content: attr(data-label);
        display: block !important;
        font-size: 13px;
        color: #888;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: 16px;
        flex-shrink: 0;
    }

    /* Value styling */
    .data-table td>*:not(::before) {
        text-align: right;
        font-weight: 500;
        color: #333;
        font-size: 15px;
    }

    /* Action Footer (Last Cell) */
    .data-table td:last-child {
        background: #fafafa;
        border-top: 1px solid #eee;
        border-bottom: none;
        padding: 16px;
        justify-content: center;
        gap: 12px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        /* Two buttons per row standard */
    }

    .data-table td:last-child .btn {
        width: 100%;
        margin: 0;
        height: 40px;
        border-radius: 8px;
        font-size: 14px;
    }

    /* Empty State */
    .data-table tr:has(.empty-cell) {
        background: transparent;
        box-shadow: none;
        border: none;
    }

    .data-table td.empty-cell {
        display: block;
        text-align: center;
        padding: 40px;
        background: transparent;
        color: #999;
        border: none;
    }

    .data-table td.empty-cell::before {
        display: none !important;
    }

    /* =================================
       COMPONENT OVERRIDES
       ================================= */
    /* Form Groups */
    .form-group label {
        font-size: 14px;
        color: #555;
        margin-bottom: 8px;
    }

    .form-control {
        height: 48px;
        /* Touch friendly */
        border-radius: 12px;
        font-size: 16px;
        padding: 0 16px;
    }

    /* Modal - Bottom Sheet Style */
    .modal {
        align-items: flex-end;
        padding: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        padding: 24px 20px;
        max-height: 85vh;
        overflow-y: auto;
        animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .modal-header {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 20px;
    }

    .modal-header h3 {
        font-size: 20px;
    }

    .modal-footer {
        flex-direction: column-reverse;
        /* Confirm on top, Cancel on bottom */
        gap: 12px;
        padding-top: 20px;
    }

    .modal-footer .btn {
        width: 100%;
        height: 48px;
        border-radius: 12px;
        font-size: 16px;
    }

    .modal-footer .btn-secondary {
        background: #f5f5f5;
        border: none;
        color: #666;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }
}

/* ========================================
   实用工具类
   ======================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.gap-2 {
    gap: 8px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.empty-hint {
    color: var(--text-muted);
    font-style: italic;
}

/* ========================================
   Switch Toggle 开关
   ======================================== */
.switch-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
}

.switch-input {
    display: none;
}

.switch-slider {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(0, 0, 0, 0.4);
    /* Darker background for contrast */
    border-radius: 26px;
    border: 2px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.switch-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    /* Slightly adjusted for 2px border */
    height: 18px;
    /* Slightly adjusted for 2px border */
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

/* Hover state for better interactivity */
.switch-label:hover .switch-slider {
    border-color: var(--primary-light);
}

.switch-input:checked+.switch-slider {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    /* Add glow effect when checked */
}

.switch-input:checked+.switch-slider::before {
    transform: translateX(22px);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    /* Add shadow to the knob */
}

/* ========================================
   Alert Info 样式
   ======================================== */
.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

/* ========================================
   抢单成功弹窗样式
   ======================================== */
.success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.success-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.success-popup-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 0deg,
            transparent 0deg 10deg,
            rgba(16, 185, 129, 0.1) 10deg 20deg,
            transparent 20deg 30deg,
            rgba(16, 185, 129, 0.1) 30deg 40deg,
            transparent 40deg 50deg,
            rgba(16, 185, 129, 0.1) 50deg 60deg,
            transparent 60deg 70deg,
            rgba(16, 185, 129, 0.1) 70deg 80deg,
            transparent 80deg 90deg,
            rgba(16, 185, 129, 0.1) 90deg 100deg,
            transparent 100deg 110deg,
            rgba(16, 185, 129, 0.1) 110deg 120deg,
            transparent 120deg 130deg,
            rgba(16, 185, 129, 0.1) 130deg 140deg,
            transparent 140deg 150deg,
            rgba(16, 185, 129, 0.1) 150deg 160deg,
            transparent 160deg 170deg,
            rgba(16, 185, 129, 0.1) 170deg 180deg,
            transparent 180deg 190deg,
            rgba(16, 185, 129, 0.1) 190deg 200deg,
            transparent 200deg 210deg,
            rgba(16, 185, 129, 0.1) 210deg 220deg,
            transparent 220deg 230deg,
            rgba(16, 185, 129, 0.1) 230deg 240deg,
            transparent 240deg 250deg,
            rgba(16, 185, 129, 0.1) 250deg 260deg,
            transparent 260deg 270deg,
            rgba(16, 185, 129, 0.1) 270deg 280deg,
            transparent 280deg 290deg,
            rgba(16, 185, 129, 0.1) 290deg 300deg,
            transparent 300deg 310deg,
            rgba(16, 185, 129, 0.1) 310deg 320deg,
            transparent 320deg 330deg,
            rgba(16, 185, 129, 0.1) 330deg 340deg,
            transparent 340deg 350deg,
            rgba(16, 185, 129, 0.1) 350deg 360deg);
    border-radius: 50%;
    animation: rotate-rays 20s linear infinite;
}

@keyframes rotate-rays {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -20px;
    animation: confetti-fall 3s ease-out forwards;
    opacity: 0;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.success-popup {
    position: relative;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: popup-scale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

@keyframes popup-scale {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.success-popup-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.success-popup-icon {
    font-size: 72px;
    margin-bottom: 16px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.success-popup-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 8px;
}

.success-popup-count {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.success-popup-count span {
    font-size: 32px;
    font-weight: 700;
    color: var(--success);
}

.success-popup-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.success-popup-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.success-popup-actions .btn {
    min-width: 120px;
}

/* ========================================
   筛选设置模态框样式
   ======================================== */
.screen-options-container {
    max-height: 400px;
    overflow-y: auto;
}

.screen-group {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}

.screen-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.screen-group-header label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    cursor: pointer;
}

.screen-group-actions {
    display: flex;
    gap: 8px;
}

.screen-group-actions button {
    padding: 4px 12px;
    font-size: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.screen-group-actions button:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.screen-children {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.screen-child {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.screen-child:hover {
    background: var(--bg-hover);
}

.screen-checkbox {
    position: relative;
    width: 18px;
    height: 18px;
    min-width: 18px;
}

.screen-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.screen-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.screen-checkbox input:checked~.checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.screen-checkbox .checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.screen-checkbox input:checked~.checkmark::after {
    display: block;
}

.screen-child-name {
    font-size: 13px;
    color: var(--text-primary);
}

.screen-summary {
    padding: 16px;
    background: var(--success-bg);
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 16px;
}

.screen-summary span {
    color: var(--success);
    font-weight: 600;
    font-size: 18px;
}

/* ========================================
   抢单日志样式 (Deprecated - use Terminal Styles)
   ======================================== */
.log-container {
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 12px;
}

.log-info {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.log-success {
    background: var(--success-bg);
    color: var(--success);
}

.log-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.log-error {
    background: var(--danger-bg);
    color: var(--danger);
}

.log-new {
    animation: log-flash 0.5s ease;
}

@keyframes log-flash {

    0%,
    50% {
        background: rgba(255, 255, 255, 0.2);
    }

    100% {}
}

/* ========================================
   Background Blobs Animation (New)
   ======================================== */
.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.4;
    border-radius: 50%;
    animation: blob-float 10s infinite alternate;
    z-index: -1;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: #a855f7;
    /* Purple */
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 500px;
    height: 500px;
    background: #3b82f6;
    /* Blue */
    animation-delay: -2s;
    opacity: 0.3;
}

@keyframes blob-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
}

/* Additional Utilities for JS Components */
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-faith);
}

.btn-outline:disabled {
    border-color: var(--border-light);
    color: var(--text-muted);
    background: transparent;
}

/* Status Text Utilities */
.status-text.pending,
.text-pending {
    color: var(--warning);
}

.status-text.running,
.text-running {
    color: var(--info);
}

.status-text.completed,
.text-completed {
    color: var(--success);
}

.status-text.failed,
.text-failed {
    color: var(--danger);
}

.status-text.stopped,
.text-stopped {
    color: var(--text-muted);
}

.status-text.waiting,
.text-waiting {
    color: var(--info);
}

.status-text.closed,
.text-closed {
    color: var(--text-muted);
}

/* ========================================
   Premium Visual Effects Library
   ======================================== */

/* 发光文字效果 */
.text-glow {
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
}

.text-glow-primary {
    text-shadow: 0 0 10px var(--primary-glow), 0 0 30px var(--primary-glow);
}

.text-glow-success {
    text-shadow: 0 0 10px var(--success-glow), 0 0 30px var(--success-glow);
}

/* 渐变文字 */
.text-gradient {
    background: var(--gradient-aurora);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 呼吸灯效果 */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px var(--primary-glow), 0 0 10px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-glow);
    }
}

/* 悬浮动画 */
.float-animation {
    animation: float-gentle 4s ease-in-out infinite;
}

@keyframes float-gentle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* 闪烁动画 */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* 边框发光效果 */
.border-glow {
    box-shadow: 0 0 0 1px var(--primary), 0 0 15px var(--primary-glow);
}

.border-glow-success {
    box-shadow: 0 0 0 1px var(--success), 0 0 15px var(--success-glow);
}

.border-glow-danger {
    box-shadow: 0 0 0 1px var(--danger), 0 0 15px var(--danger-glow);
}

/* 高级徽章样式 */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.badge-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 2px 8px var(--success-glow);
}

.badge-warning {
    background: var(--gradient-warning);
    color: white;
    box-shadow: 0 2px 8px var(--warning-glow);
}

.badge-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 2px 8px var(--danger-glow);
}

.badge-info {
    background: var(--gradient-info);
    color: white;
    box-shadow: 0 2px 8px var(--info-glow);
}

.badge-outline {
    background: transparent;
    border: 1px solid currentColor;
}

/* 高级分割线 */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

.divider-gradient {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 24px 0;
}

.divider-glow {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 10px var(--primary-glow);
    margin: 24px 0;
}

/* 图标容器 */
.icon-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 24px;
    transition: all var(--transition-base);
}

.icon-box-sm {
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: var(--radius-sm);
}

.icon-box-lg {
    width: 64px;
    height: 64px;
    font-size: 32px;
    border-radius: var(--radius-lg);
}

.icon-box-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.icon-box-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px var(--success-glow);
}

.icon-box-warning {
    background: var(--gradient-warning);
    color: white;
    box-shadow: 0 4px 15px var(--warning-glow);
}

.icon-box-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 15px var(--danger-glow);
}

.icon-box-info {
    background: var(--gradient-info);
    color: white;
    box-shadow: 0 4px 15px var(--info-glow);
}

/* 进度条 */
.progress {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-success .progress-bar {
    background: var(--gradient-success);
}

.progress-warning .progress-bar {
    background: var(--gradient-warning);
}

.progress-danger .progress-bar {
    background: var(--gradient-danger);
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: var(--radius-lg);
}

/* 工具提示 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* 数字计数器样式 */
.counter {
    font-size: 48px;
    font-weight: 800;
    background: var(--gradient-aurora);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.counter-sm {
    font-size: 32px;
}

.counter-lg {
    font-size: 64px;
}

/* 状态指示器 */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.online {
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-bg);
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-indicator.offline {
    background: var(--text-muted);
}

.status-indicator.busy {
    background: var(--warning);
    box-shadow: 0 0 0 3px var(--warning-bg);
}

.status-indicator.error {
    background: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-bg);
}

/* 头像组件 */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

.avatar-xl {
    width: 80px;
    height: 80px;
    font-size: 32px;
}

/* 选中效果 */
.selectable {
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.selectable:hover {
    border-color: var(--border-light);
    background: var(--bg-hover);
}

.selectable.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
}

/* 脉冲效果按钮 */
.btn-pulse {
    position: relative;
}

.btn-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 var(--primary-glow);
    animation: btn-pulse-ring 2s infinite;
}

@keyframes btn-pulse-ring {
    0% {
        box-shadow: 0 0 0 0 var(--primary-glow);
    }

    70% {
        box-shadow: 0 0 0 15px transparent;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

/* 倒计时样式 */
.countdown {
    display: flex;
    gap: 8px;
    align-items: center;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    min-width: 60px;
}

.countdown-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.countdown-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.countdown-separator {
    font-size: 24px;
    color: var(--text-muted);
    font-weight: 300;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* 数据高亮效果 */
.highlight-success {
    animation: highlight-success 0.5s ease;
}

@keyframes highlight-success {

    0%,
    100% {
        background: transparent;
    }

    50% {
        background: var(--success-bg);
    }
}

.highlight-danger {
    animation: highlight-danger 0.5s ease;
}

@keyframes highlight-danger {

    0%,
    100% {
        background: transparent;
    }

    50% {
        background: var(--danger-bg);
    }
}

/* 滑入动画 */
.slide-in-right {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-in {
    animation: scaleIn 0.3s var(--transition-bounce);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 文字截断 */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 响应式隐藏 */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
}

/* ========================================
   管理员后台样式
   ======================================== */

/* 管理员标签导航 */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.admin-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.admin-tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

/* 管理员内容区 */
.admin-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-content.active {
    display: block;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group select,
.filter-group input {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* 搜索框 */
.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.5;
}

/* 活动列表 */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.activity-item:hover {
    border-color: var(--border-light);
    background: var(--bg-hover);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.activity-icon.auth {
    background: var(--primary-bg);
}

.activity-icon.grab {
    background: var(--success-bg);
}

.activity-icon.order {
    background: var(--warning-bg);
}

.activity-icon.settings {
    background: var(--info-bg);
}

.activity-icon.admin {
    background: var(--danger-bg);
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-info .username {
    font-weight: 600;
    color: var(--primary);
}

.activity-info .description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.activity-info .time {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

/* 图表容器 */
.chart-container {
    padding: 20px 0;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chart-bar-fill {
    width: 100%;
    max-width: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    min-height: 4px;
    transition: height var(--transition-normal);
    position: relative;
}

.chart-bar-fill::after {
    content: attr(data-value);
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.chart-bar-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* 用户操作按钮组 */
.user-actions {
    display: flex;
    gap: 8px;
}

.user-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* 状态标签 */
.status-tag {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.status-tag.active {
    background: var(--success-bg);
    color: var(--success);
}

.status-tag.inactive {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-tag.admin {
    background: var(--gradient-aurora);
    color: white;
}

.status-tag.user {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* 管理员入口样式 */
.nav-item[data-page="admin"] {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.nav-item[data-page="admin"]:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(168, 85, 247, 0.3);
}

.nav-item[data-page="admin"].active {
    background: var(--gradient-aurora);
    border: none;
}

/* 管理员后台标题 */
#admin-page .page-header h2 {
    background: var(--gradient-aurora);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 表格加载状态 */
.loading-cell {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
}

/* 空提示 */
.empty-hint {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* 用户详情模态框 */
.user-detail-modal {
    max-width: 800px;
}

.user-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.user-detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
}

.user-detail-info h3 {
    font-size: 24px;
    margin-bottom: 4px;
}

.user-detail-info p {
    color: var(--text-muted);
}

.user-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.user-detail-stat {
    text-align: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.user-detail-stat h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.user-detail-stat p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========================================
   公益提示弹窗样式
   ======================================== */
.public-notice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.public-notice-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.public-notice-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.public-notice-content {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl), 0 0 60px rgba(99, 102, 241, 0.2);
    animation: notice-appear 0.5s ease-out;
}

@keyframes notice-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.public-notice-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.public-notice-content h2 {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
}

.public-notice-body {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 28px;
}

.public-notice-body p {
    margin-bottom: 12px;
}

.public-notice-body strong {
    color: var(--text-primary);
}

.public-notice-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--primary-bg);
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    margin: 20px 0;
    color: var(--primary-light);
    font-weight: 600;
}

.public-notice-highlight .highlight-icon {
    font-size: 24px;
}

.public-notice-note {
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
}

.public-notice-content .btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
}

/* ========================================
   Toggle Switch 开关组件
   ======================================== */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.switch input:checked+.slider {
    background: var(--gradient-success);
    border-color: var(--success);
}

.switch input:checked+.slider:before {
    transform: translateX(24px);
}

.switch input:focus+.slider {
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.switch .slider.round {
    border-radius: 28px;
}

.switch .slider.round:before {
    border-radius: 50%;
}

/* 申请状态标签 */
.app-status-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.app-status-tag.pending {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.app-status-tag.approved {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}

.app-status-tag.rejected {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.app-status-tag.cancelled {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
    border: 1px solid #6b7280;
}

/* 图片上传区域样式 */
.image-upload-area {
    transition: all 0.3s ease;
}

.image-upload-area:hover {
    border-color: var(--primary) !important;
    background: var(--primary-bg);
}

.image-upload-area:hover .image-upload-placeholder {
    color: var(--primary);
}

/* btn-warning 按钮样式 */
.btn-warning {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ========================================
   可视化选品页面样式
   ======================================== */

/* 商品选择卡片 */
.product-select-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.product-select-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-select-card.selected {
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.product-select-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
}

/* 分类选择器样式 */
#ps-category-filter {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 150px;
    cursor: pointer;
}

#ps-category-filter:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

/* 商品网格响应式 */
@media (max-width: 768px) {
    .product-select-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    .product-select-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================
   可视化选品 - 三步流程样式
   ======================================== */

/* 步骤指示器 */
.ps-stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.ps-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
}

.ps-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.ps-step-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
}

.ps-step.active .ps-step-number {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.ps-step.active .ps-step-label {
    color: var(--primary);
}

.ps-step.completed .ps-step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.ps-step.completed .ps-step-number::after {
    content: '✓';
}

.ps-step-line {
    width: 60px;
    height: 3px;
    background: var(--border-color);
    margin: 0 -10px;
    margin-top: -20px;
    transition: all 0.3s ease;
}

/* 面板过渡 */
.ps-panel {
    animation: fadeIn 0.3s ease;
}

.ps-panel.hidden {
    display: none !important;
}

/* 卡种分类卡片 */
.ps-category-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary) !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

/* 卡类商品卡片 */
.ps-product-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary) !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

/* 规格卡片 */
.ps-format-card:hover {
    transform: translateY(-4px);
    border-color: var(--success) !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
}

/* 响应式 */
@media (max-width: 768px) {
    .ps-step {
        padding: 0 10px;
    }

    .ps-step-line {
        width: 30px;
    }

    .ps-step-label {
        font-size: 11px;
    }
}