/* ============================================
   小紫AI智能交易站 - Premium Styles
   小紫专属智能交易台 UI
   ============================================ */

/* 店主入口与真实交付操作遵守原页面显隐与窄屏布局。 */
#ownerConsoleLink[hidden], #mysteryDownloadBtn[hidden] { display: none !important; }
#ownerConsoleLink { min-width: 0; padding: 8px 10px; font-size: 11px; }
#mysteryDownloadBtn { grid-column: 1 / -1; width: 100%; }
#mysteryDetailLongDescription, #mysteryDetailLicense, #mysteryDetailRefundPolicy { white-space: pre-line; }
.mystery-product-copy { margin: 16px 0 0; color: #b9a5c4; font-size: 12px; line-height: 1.8; }
#mysteryDetailLongDescription:empty, #mysteryDetailLicense:empty, #mysteryDetailRefundPolicy:empty { display: none; }
.mystery-product-cover { max-width: 100%; max-height: 92px; object-fit: contain; border-radius: 9px; }
.mystery-detail-cover { display: block; width: 100%; max-height: 220px; object-fit: contain; margin: 0 0 22px; border: 1px solid #b38bd333; border-radius: 12px; background: #100b19; padding: 12px; }
.mystery-detail-cover[hidden] { display: none; }
.mystery-product-cover[hidden], .mystery-product-art.has-cover svg { display: none !important; }
@media (max-width: 600px) {
    #ownerConsoleLink { width: 34px; height: 34px; padding: 0; font-size: 0; }
    #ownerConsoleLink::after { content: '密'; font-size: 14px; }
}

/* === CSS Variables (Dark Theme Default) === */
.email-code-row { display: flex; align-items: stretch; gap: 10px; min-width: 0; }
.email-code-row input { min-width: 0; flex: 1; }
.email-code-row button { flex-shrink: 0; white-space: nowrap; font-size: 11px; }
.auth-recovery-link { display: block; margin: 16px auto 0; padding: 5px; border: 0; background: transparent; color: #bca0d5; font: inherit; font-size: 12px; cursor: pointer; }
#registerEmailCodeGroup[hidden], #passwordRecoveryPanel[hidden], #travelerEmailDisclosure[hidden], #travelerEmailForm[hidden], .xiaozi-auth-tabs[hidden] { display: none !important; }
.mystery-invite-ledger { padding: 0 20px 20px; font-size: 12px; color: #bda6cb; }
.mystery-invite-ledger div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid #b99ad11a; }
.mystery-invite-ledger strong { color: #d8bb87; }
.mystery-invite-ledger time { display: block; margin-top: 4px; font-size: 10px; color: #a591b5; line-height: 1.7; }
.mystery-invite-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 0 20px 20px; font-size: 12px; color: #bda6cb; }
.mystery-invite-pagination[hidden] { display: none !important; }
:root {
    /* Colors - Dark Trading Desk */
    --bg-primary: #090a0d;
    --bg-secondary: #111319;
    --bg-tertiary: #171a22;
    --bg-elevated: #1d222d;
    --bg-hover: #252b37;
    
    --text-primary: #f6f7fb;
    --text-secondary: #a4aaba;
    --text-tertiary: #687083;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    
    --accent-primary: #8b6cff;
    --accent-secondary: #19c7b8;
    --accent-tertiary: #b9c5ff;
    --accent-gradient: linear-gradient(135deg, #8b6cff, #19c7b8);
    --accent-glow: rgba(139, 108, 255, 0.18);
    
    --glass-bg: var(--bg-secondary);
    --glass-bg-hover: var(--bg-hover);
    --glass-border: var(--border-color);
    --glass-blur: none;
    --glass-shadow: none;
    
    --success: #31d0aa;
    --warning: #f2b84b;
    --danger: #ff647c;
    --info: #48b7ff;
    
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 8px;
    --radius-xl: 10px;
    --radius-2xl: 12px;
    
    --sidebar-width: 240px;
    --topbar-height: 60px;
    
    --font-sans: 'Segoe UI Variable', 'Microsoft YaHei UI', 'Segoe UI', sans-serif;
    --font-mono: 'Cascadia Code', 'Cascadia Mono', Consolas, monospace;
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
    --focus-ring-width: 3px;
    --focus-ring-color: var(--accent-primary);
    --focus-ring-shadow: 0 0 0 5px rgba(139, 108, 255, 0.18);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f7f6fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #ffffff;
    
    --text-primary: #111827;
    --text-secondary: #5a5a6e;
    /* 原 #9999aa 在白底上仅 2.55:1，低于 WCAG AA；降到 #6f6f85 后约 4.85:1，仍比 secondary 更弱 */
    --text-tertiary: #6f6f85;
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    
    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-bg-hover: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-blur: blur(20px);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255,255,255,0.8);
    
    --accent-glow: rgba(168, 85, 247, 0.2);
}

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

html {
    font-size: 14px;
    color-scheme: dark;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 禁用交互元素上的双击缩放手势（iOS 连点按钮会缩放页面）；
   平移与捏合缩放不受影响，输入框不加以免干扰文本选择。 */
button, a, select, label { touch-action: manipulation; }

/* 键盘跳转链接：隐藏在视口外，获得焦点时从顶部滑入（跳过侧栏导航直达内容）。 */
.skip-link {
    position: fixed;
    top: -52px;
    left: 16px;
    z-index: 10001;
    padding: 12px 18px;
    border: 1px solid var(--accent-primary, #8b6cff);
    border-radius: 0 0 8px 8px;
    background: #2a1f3d;
    color: #f0e6ff;
    font-size: 14px;
    text-decoration: none;
    transition: top .15s ease;
}
.skip-link:focus { top: 0; }
.main-content:focus { outline: none; }

body {
    font-family: var(--font-sans);
    background:
        linear-gradient(90deg, rgba(255,255,255,0.024) 1px, transparent 1px) 0 0 / 36px 36px,
        linear-gradient(180deg, rgba(255,255,255,0.018) 1px, transparent 1px) 0 0 / 36px 36px,
        var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background var(--transition-normal), color var(--transition-normal);
}

.noscript-notice {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 12px;
    padding: 32px;
    text-align: center;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.noscript-notice img {
    width: 64px;
    height: 64px;
    border-radius: 18px;
}

.noscript-notice strong {
    font-size: 1.2rem;
}

.noscript-notice span {
    max-width: 460px;
    color: var(--text-secondary);
}

.app-boot-status {
    position: fixed;
    top: 72px;
    left: calc(var(--sidebar-width) + 20px);
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(520px, calc(100vw - var(--sidebar-width) - 40px));
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    opacity: 0;
    animation: app-boot-reveal 180ms ease 500ms forwards;
}

.app-boot-spinner {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: app-boot-spin 700ms linear infinite;
}

.app-boot-reload {
    display: none;
    flex: 0 0 auto;
    color: var(--accent-primary);
    font-weight: 700;
    text-decoration: none;
}

body[data-app-state="ready"] .app-boot-status {
    visibility: hidden;
    pointer-events: none;
    animation: none;
    opacity: 0;
}

body[data-app-state="error"] .app-boot-status {
    border-color: color-mix(in srgb, var(--danger) 42%, var(--border-color));
    color: var(--text-primary);
    animation: none;
    opacity: 1;
}

body[data-app-state="error"] .app-boot-spinner {
    border-color: var(--danger);
    animation: none;
}

body[data-app-state="error"] .app-boot-reload {
    display: inline-flex;
}

@keyframes app-boot-reveal {
    to { opacity: 1; }
}

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

@media (max-width: 768px) {
    .app-boot-status {
        top: 70px;
        left: 12px;
        right: 12px;
        max-width: none;
    }
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.page:focus {
    outline: none;
}

/* Background ambient effect */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: none;
    pointer-events: none;
    z-index: 0;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
    background: rgba(255,255,255,0.1); 
    border-radius: 3px; 
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }

[hidden],
html[data-user-role="user"] [data-admin-only] {
    display: none !important;
}

/* === Glass Card Base === */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal), background var(--transition-normal);
}

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

/* === Sidebar === */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-slow);
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 22px 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.logo-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(168,85,247,0.14);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 8px 22px rgba(168,85,247,0.22);
}

.logo-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.logo-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.logo-text {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.2;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    overflow-wrap: anywhere;
}

.logo-subtitle {
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

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

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

.nav-section-title {
    display: block;
    padding: 0 14px;
    margin-bottom: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 3px 0;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.93rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

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

.nav-item.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
    color: var(--text-primary);
    font-weight: 600;
}

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

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

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

.nav-badge {
    margin-left: auto;
    padding: 3px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--accent-gradient);
    color: white;
    border-radius: 10px;
    letter-spacing: 0.02em;
}

.nav-count {
    margin-left: auto;
    font-size: 0.76rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.nav-badge-dot {
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

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

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

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

.user-card.is-guest {
    align-items: center;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

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

.user-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 0.76rem;
    color: var(--accent-tertiary);
}

.user-menu-btn {
    padding: 7px;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.user-menu-btn:hover { background: var(--glass-bg-hover); color: var(--text-primary); }
.user-menu-btn svg { width: 18px; height: 18px; }

.auth-login-btn {
    flex-shrink: 0;
    padding: 8px 14px;
}

.auth-logout-btn {
    flex-shrink: 0;
}

.topbar-right .auth-top-hidden {
    display: none !important;
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

/* === Main Content === */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

/* === Topbar === */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 28px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
}

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

.menu-toggle {
    display: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.menu-toggle:hover { background: var(--glass-bg-hover); color: var(--text-primary); }
.menu-toggle svg { width: 22px; height: 22px; }

.breadcrumb-current { font-size: 1.02rem; font-weight: 600; }

.topbar-ai-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 5px 11px 5px 7px;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.18);
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.topbar-ai-status:hover {
    border-color: rgba(124, 92, 252, 0.42);
    background: rgba(124, 92, 252, 0.16);
    transform: translateY(-1px);
}

.topbar-ai-status img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.topbar-ai-status kbd {
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid rgba(124, 92, 252, 0.22);
    background: rgba(124, 92, 252, 0.1);
    color: var(--accent-tertiary);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    line-height: 1.2;
}

.topbar-center { flex: 1; max-width: 560px; margin: 0 auto; }

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    transition: all var(--transition-fast);
    max-width: 100%;
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon { width: 18px; height: 18px; color: var(--text-tertiary); flex-shrink: 0; }

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 0;
}

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

.search-shortcut {
    padding: 3px 8px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    border-radius: 5px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.topbar-right { position: relative; display: flex; align-items: center; gap: 10px; }

.topbar-balance {
    min-width: 132px;
    height: 42px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 2px;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.topbar-balance:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

[data-theme="light"] .topbar-balance:hover {
    background: rgba(0,0,0,0.05);
}

.topbar-balance-label {
    color: var(--text-tertiary);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.topbar-balance strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.1;
}

.topbar-balance.is-guest strong {
    font-family: inherit;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.global-search-panel,
.notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    z-index: 80;
    display: none;
    background: rgba(17, 17, 24, 0.96);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

[data-theme="light"] .global-search-panel,
[data-theme="light"] .notification-panel {
    background: rgba(255, 255, 255, 0.96);
}

.global-search-panel.open,
.notification-panel.open {
    display: block;
    animation: panelIn var(--transition-fast);
}

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

.global-search-panel {
    left: 0;
    right: 0;
    min-width: min(480px, calc(100vw - 32px));
    padding: 8px;
}

.search-panel-section + .search-panel-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.search-panel-title,
.notification-title {
    padding: 6px 10px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.search-result,
.notification-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-align: left;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.search-result:hover,
.search-result.is-active,
.notification-item:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.search-result:active,
.notification-item:active {
    transform: scale(0.99);
}

.search-result-icon,
.notification-item-dot {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent-tertiary);
}

.search-result-icon svg {
    width: 15px;
    height: 15px;
}

.search-result-body,
.notification-item-body {
    flex: 1;
    min-width: 0;
}

.search-result-title,
.notification-item-text {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta,
.notification-item-time {
    display: block;
    margin-top: 1px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-action {
    flex-shrink: 0;
    font-size: 0.68rem;
    color: var(--text-tertiary);
}

.panel-empty {
    padding: 20px 12px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

.notification-panel {
    right: 0;
    width: min(420px, calc(100vw - 32px));
    max-height: min(520px, calc(100vh - 88px));
    overflow-y: auto;
    padding: 10px;
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.notification-header .notification-title {
    padding: 0 4px;
}

.notification-count {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-ai-section {
    padding: 4px 2px 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.notification-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 6px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 900;
}

.notification-section-title button {
    min-height: 24px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    color: var(--accent-tertiary);
    background: rgba(124, 92, 252, 0.1);
    font-size: 0.72rem;
    font-weight: 800;
}

.notification-section-title button:hover {
    border-color: rgba(124, 92, 252, 0.42);
    background: rgba(124, 92, 252, 0.16);
}

.notification-section-title-plain {
    padding-top: 2px;
}

.notification-ai-list {
    display: grid;
    gap: 7px;
}

.notification-ai-item {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    text-align: left;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.notification-ai-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.notification-ai-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--info);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

.notification-ai-ok .notification-ai-dot {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(45, 212, 167, 0.08);
}

.notification-ai-warn .notification-ai-dot {
    background: var(--warning);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

.notification-ai-danger .notification-ai-dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(240, 80, 110, 0.1);
}

.notification-item-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
}

.notification-dot.is-hidden {
    display: none;
}

.topbar-btn {
    position: relative;
    padding: 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.topbar-btn:hover { background: var(--glass-bg-hover); color: var(--text-primary); }
.topbar-btn svg { width: 20px; height: 20px; }

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

/* Theme toggle icons */
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 12px var(--accent-glow);
}

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

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

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

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

.btn-glass:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--border-hover);
}

[data-theme="light"] .btn-glass:hover { background: rgba(0,0,0,0.05); }

.btn-ghost {
    color: var(--text-secondary);
    padding: 8px 14px;
}

.btn-ghost:hover { color: var(--accent-primary); background: rgba(99,102,241,0.08); }

.btn-lg { padding: 14px 28px; font-size: 0.98rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }

/* Magnetic button effect */
.magnetic-btn {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.magnetic-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

/* === Page Content === */
.page-content {
    flex: 1;
    padding: 30px;
    max-width: 1520px;
    width: 100%;
    margin: 0 auto;
}

.page { display: none; animation: pageIn 0.35s ease-out; }
.page.active { display: block; }

@keyframes pageIn {
    from { transform: translateY(8px); }
    to { transform: translateY(0); }
}

/* === Dashboard Trade Overview === */
.dashboard-trade-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(460px, 0.92fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 20px;
}

.dashboard-brief-stack {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.dashboard-price-board {
    padding: 20px;
    min-width: 0;
}

.dashboard-price-board-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-price-board-head h3 {
    color: var(--text-primary);
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.25;
}

.dashboard-price-board-head small {
    color: var(--text-tertiary);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-notice {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px;
    margin-bottom: 0;
    border-color: rgba(245, 158, 11, 0.46);
    background: rgba(254, 243, 199, 0.55);
    box-shadow: none;
}

.notice-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(253, 230, 138, 0.72);
    color: #b45309;
}

.notice-icon svg { width: 24px; height: 24px; }

.notice-body {
    min-width: 0;
    color: #475569;
}

.notice-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    color: #0f172a;
}

.notice-title-row strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.notice-title-row span,
.stats-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 12px;
    border-radius: var(--radius-sm);
    background: rgba(226, 232, 240, 0.74);
    color: #0f172a;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
}

.notice-body p {
    margin-top: 4px;
    line-height: 1.65;
    color: #475569;
}

.dashboard-status-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.dashboard-status-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 116px;
    padding: 18px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(203, 213, 225, 0.88);
    color: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    font: inherit;
    box-shadow: 0 2px 9px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.dashboard-status-card:hover {
    transform: translateY(-1px);
    border-color: rgba(20, 184, 166, 0.48);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.dashboard-status-card:focus-visible {
    outline: 3px solid rgba(45, 212, 191, 0.28);
    outline-offset: 2px;
}

.dashboard-status-card.is-selected {
    border-color: rgba(45, 212, 191, 0.88);
    background: rgba(240, 253, 250, 0.86);
    box-shadow: 0 8px 22px rgba(20, 184, 166, 0.12);
}

.dashboard-status-card.is-live {
    border-color: rgba(203, 213, 225, 0.88);
    background: rgba(255, 255, 255, 0.92);
}

.dashboard-status-card.is-live.is-selected {
    border-color: rgba(45, 212, 191, 0.88);
    background: rgba(240, 253, 250, 0.86);
}

.dashboard-status-card.is-warn {
    border-color: rgba(203, 213, 225, 0.88);
    background: rgba(255, 255, 255, 0.92);
}

.dashboard-status-card.is-warn.is-selected {
    border-color: rgba(45, 212, 191, 0.88);
    background: rgba(240, 253, 250, 0.86);
}

.dashboard-status-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    background: #10b981;
}

.dashboard-status-card.is-selected .dashboard-status-icon {
    background: #f59e0b;
}

.dashboard-status-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-status-meta {
    min-width: 0;
}

.dashboard-status-meta span {
    display: block;
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.dashboard-status-meta strong {
    display: block;
    color: #020617;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-price-board .dashboard-status-meta strong {
    font-size: 1.18rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.dashboard-status-meta small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-status-meta .stock-line {
    color: #475569;
    font-weight: 700;
}

.xiaozi-ai-panel {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    margin: 0;
    border: 1px solid rgba(168, 85, 247, 0.18);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(250, 245, 255, 0.88), rgba(240, 253, 250, 0.74));
    box-shadow: 0 8px 24px rgba(88, 28, 135, 0.08);
}

.dashboard-brief-stack .xiaozi-ai-panel {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
}

.dashboard-brief-stack .xiaozi-ai-metrics {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(88px, 1fr));
}

.xiaozi-ai-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 10px 24px rgba(168, 85, 247, 0.16);
}

.xiaozi-ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.xiaozi-ai-copy {
    min-width: 0;
}

.xiaozi-ai-copy .panel-kicker {
    display: inline-flex;
    margin-bottom: 4px;
    color: #7c3aed;
    font-size: 0.78rem;
    font-weight: 900;
}

.xiaozi-ai-copy h3 {
    margin: 0;
    color: #111827;
    font-size: 1.08rem;
    line-height: 1.3;
}

.xiaozi-ai-copy p {
    margin-top: 4px;
    color: #475569;
    font-size: 0.9rem;
}

.xiaozi-ai-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(86px, auto));
    gap: 8px;
}

.xiaozi-ai-metric {
    min-width: 88px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.xiaozi-ai-metric span {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 3px;
}

.xiaozi-ai-metric strong {
    color: #111827;
    font-size: 0.9rem;
    font-weight: 900;
    white-space: nowrap;
}

.merchant-panel {
    padding: 22px;
    margin-bottom: 32px;
}

.merchant-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.merchant-panel-header .section-title {
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.merchant-panel-header p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

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

.merchant-summary-row {
    display: flex;
    gap: 10px;
    padding: 12px 0 18px;
    overflow-x: auto;
}

.merchant-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 700;
}

.merchant-summary-chip strong {
    color: var(--text-primary);
}

.merchant-summary-chip .money {
    color: #60a5fa;
    font-family: var(--font-mono);
}

.merchant-summary-chip.is-active {
    color: #0369a1;
    border-color: rgba(14, 165, 233, 0.42);
    background: rgba(14, 165, 233, 0.1);
}

.merchant-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.merchant-table {
    min-width: 980px;
}

.merchant-table th:nth-child(2),
.merchant-table td:nth-child(2) {
    min-width: 130px;
}

.merchant-table th {
    background: var(--bg-tertiary);
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
}

.rank-pill,
.risk-pill,
.recommend-pill,
.decision-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.rank-pill {
    min-width: 34px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.merchant-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(16, 185, 129, 0.14);
    color: var(--success);
    font-weight: 900;
}

.merchant-name strong,
.merchant-product strong {
    display: block;
    color: var(--text-primary);
    font-weight: 800;
}

.merchant-name span,
.merchant-product span,
.merchant-subtext {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.recommend-pill { color: #047857; background: rgba(16, 185, 129, 0.16); }
.risk-low { color: #047857; background: rgba(16, 185, 129, 0.16); }
.risk-mid { color: #92400e; background: rgba(245, 158, 11, 0.18); }
.decision-pill { color: #0369a1; background: rgba(14, 165, 233, 0.14); }

.merchant-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Stats Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 26px;
    position: relative;
    overflow: hidden;
}

.stat-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.stat-label {
    display: block;
    font-size: 0.84rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 6px;
    padding: 4px 9px;
    border-radius: 20px;
}

.stat-change.positive { color: var(--success); background: rgba(16,185,129,0.1); }
.stat-change.negative { color: var(--danger); background: rgba(239,68,68,0.1); }
.stat-change.neutral { color: var(--text-secondary); background: rgba(255,255,255,0.05); }
.stat-change svg { width: 15px; height: 15px; }

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-wrap svg { width: 24px; height: 24px; }

.stat-card-gradient-1 .stat-icon-wrap { background: rgba(99,102,241,0.12); color: var(--accent-primary); }
.stat-card-gradient-2 .stat-icon-wrap { background: rgba(16,185,129,0.12); color: var(--success); }
.stat-card-gradient-3 .stat-icon-wrap { background: rgba(245,158,11,0.12); color: var(--warning); }
.stat-card-gradient-4 .stat-icon-wrap { background: rgba(59,130,246,0.12); color: var(--info); }

.stat-chart-sparkline {
    height: 42px;
    position: relative;
}

.stat-chart-sparkline svg { width: 100%; height: 100%; }

.sparkline {
    stroke: var(--accent-primary);
    stroke-width: 2;
    stroke-linecap: round;
}
.sparkline-green {
    stroke: var(--success);
    stroke-width: 2;
    stroke-linecap: round;
}

/* === Dashboard Grid === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 22px;
    margin-bottom: 32px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.04rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.section-title svg { width: 20px; height: 20px; color: var(--accent-primary); }

/* Quick Actions */
.quick-actions { padding: 28px; }

.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    text-align: left;
    transition: all var(--transition-normal);
}

.action-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

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

.action-icon svg { width: 20px; height: 20px; }

.action-icon-blue { background: rgba(99,102,241,0.12); color: var(--accent-primary); }
.action-icon-purple { background: rgba(139,92,246,0.12); color: var(--accent-secondary); }
.action-icon-orange { background: rgba(245,158,11,0.12); color: var(--warning); }
.action-icon-green { background: rgba(16,185,129,0.12); color: var(--success); }
.action-icon-pink { background: rgba(236,72,153,0.12); color: #ec4899; }
.action-icon-cyan { background: rgba(6,182,212,0.12); color: #06b6d4; }

.action-name { font-size: 0.94rem; font-weight: 600; }
.action-desc { font-size: 0.8rem; color: var(--text-tertiary); }

/* Recent Activity */
.recent-activity { padding: 28px; }

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

.activity-header .section-title { margin-bottom: 0; }

.view-all-link {
    font-size: 0.86rem;
    color: var(--accent-primary);
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.view-all-link:hover { color: var(--accent-tertiary); }

.activity-list { display: flex; flex-direction: column; gap: 6px; }

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 10px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

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

.activity-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-success { background: var(--success); }
.activity-warning { background: var(--warning); }
.activity-info { background: var(--info); }
.activity-danger { background: var(--danger); }
.activity-primary { background: var(--accent-primary); }

.activity-body { flex: 1; min-width: 0; }

.activity-text { font-size: 0.9rem; color: var(--text-secondary); }
.activity-text strong { color: var(--text-primary); }

.activity-time {
    display: block;
    font-size: 0.73rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* === Hot Accounts Section === */
.hot-accounts-section { margin-bottom: 32px; }

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

.hot-accounts-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

/* Account Card */
.account-card {
    padding: 24px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.account-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-type-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.type-gpt { background: rgba(16,163,127,0.15); color: #10b981; }

.account-quality {
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.quality-premium { background: rgba(251,191,36,0.15); color: #fbbf24; }
.quality-plus { background: rgba(99,102,241,0.15); color: var(--accent-primary); }
.quality-standard { background: rgba(156,163,175,0.15); color: #9ca3af; }

.account-model {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.account-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

.meta-item svg { width: 15px; height: 15px; }

.account-sla {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.account-sla span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 600;
}

.account-sla .stock-ok { color: var(--success); }
.account-sla .stock-low { color: var(--warning); }

.account-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.account-price {
    font-size: 1.32rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* ==================== MARKET PAGE ==================== */
.purchase-workbench-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    margin-bottom: 18px;
}

.panel-kicker {
    display: inline-flex;
    margin-bottom: 6px;
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.purchase-workbench-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 18px;
    margin-bottom: 18px;
}

.purchase-builder,
.purchase-confirm,
.market-list-panel,
.purchase-history-panel {
    padding: 20px;
}

.order-delivery-radar {
    padding: 22px;
    margin-bottom: 20px;
}

.order-delivery-radar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.order-delivery-radar-head h4 {
    font-size: 1.08rem;
    line-height: 1.25;
}

.delivery-target-pill {
    flex-shrink: 0;
    max-width: min(360px, 48vw);
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.045);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delivery-target-pill.is-ready {
    background: rgba(49,208,170,0.1);
    border-color: rgba(49,208,170,0.22);
    color: var(--success);
}

.order-delivery-radar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 12px;
}

.order-delivery-metric {
    min-width: 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--border-color);
}

.order-delivery-metric span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 800;
}

.order-delivery-metric strong {
    display: block;
    margin-top: 5px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.02rem;
    overflow-wrap: anywhere;
}

.order-delivery-advice {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(139,108,255,0.1);
    border: 1px solid rgba(139,108,255,0.22);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.5;
}

.workbench-card-header,
.market-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.workbench-card-header {
    justify-content: flex-start;
}

.workbench-card-header h4,
.market-list-header h4 {
    color: var(--text-primary);
    font-size: 1.02rem;
    font-weight: 800;
}

.workbench-card-header p,
.market-list-header p {
    margin-top: 3px;
    color: var(--text-tertiary);
    font-size: 0.84rem;
}

.step-badge {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 999px;
    color: white;
    background: var(--accent-gradient);
    font-weight: 800;
    box-shadow: 0 6px 18px var(--accent-glow);
}

.purchase-quantity-block {
    margin-top: 16px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.purchase-quantity-block > div:first-child,
.purchase-sort-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.purchase-quantity-block label {
    color: var(--text-primary);
    font-weight: 800;
}

.purchase-quantity-block span {
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

.quick-quantity-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.quick-quantity-row button {
    min-height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 700;
    transition: all var(--transition-fast);
}

.quick-quantity-row button:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.purchase-sort-row {
    margin-top: 14px;
}

.confirm-selected-product {
    min-height: 112px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.confirm-selected-product span,
.confirm-selected-product small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

.confirm-selected-product strong {
    display: block;
    margin: 8px 0 6px;
    color: var(--text-primary);
    font-size: 1.06rem;
}

.confirm-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.confirm-metrics div {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.confirm-metrics span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 700;
}

.confirm-metrics strong {
    display: block;
    margin-top: 5px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
}

.purchase-confirm .btn-lg {
    width: 100%;
    justify-content: center;
    margin-top: 14px;
}

.market-ai-advisor {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(360px, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    margin-bottom: 18px;
    border-color: rgba(20, 184, 166, 0.22);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 253, 250, 0.82)),
        var(--glass-bg);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.market-ai-head {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.market-ai-avatar {
    width: 50px;
    height: 50px;
    border-radius: 16px;
}

.market-ai-head h4 {
    margin: 0;
    color: #111827;
    font-size: 1.04rem;
    font-weight: 900;
    line-height: 1.3;
}

.market-ai-head p {
    margin-top: 4px;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.55;
}

.market-ai-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(82px, 1fr));
    gap: 8px;
}

.market-ai-metric {
    min-width: 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.72);
}

.market-ai-metric span {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 3px;
}

.market-ai-metric strong {
    display: block;
    color: #111827;
    font-size: 0.88rem;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.market-ai-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.market-list-panel {
    margin-bottom: 18px;
}

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

.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }

.filter-tab {
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.filter-tab:hover { color: var(--text-primary); background: var(--glass-bg-hover); }
.filter-tab.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 12px var(--accent-glow);
}

.sort-select {
    padding: 9px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: var(--font-sans);
    cursor: pointer;
    outline: none;
}

.toolbar-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.toolbar-search .search-icon { width: 18px; height: 18px; }

.toolbar-search input {
    flex: 1;
    min-width: 220px;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.92rem;
}

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

.search-filters { display: flex; gap: 8px; flex-wrap: wrap; }

.chip-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.chip-filter:hover, .chip-filter.active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.chip-filter svg { width: 14px; height: 14px; }

.chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dot-all { background: var(--text-tertiary); }
.dot-s { background: #fbbf24; }
.dot-a { background: var(--accent-primary); }
.dot-b { background: #9ca3af; }

.results-count { font-size: 0.9rem; color: var(--text-secondary); }
.results-count strong { color: var(--text-primary); font-weight: 700; }

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.market-purchase-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.market-product-row {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) minmax(190px, auto) minmax(150px, auto);
    align-items: center;
    gap: 16px;
    min-height: 82px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
}

.market-product-row.is-selected {
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.18), 0 10px 28px rgba(168, 85, 247, 0.14);
}

.market-product-main {
    min-width: 0;
}

.market-product-main p {
    margin-top: 4px;
    color: var(--text-tertiary);
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.market-product-row .account-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.market-product-row .account-sla {
    justify-content: flex-start;
}

.market-product-row .account-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    justify-content: flex-end;
    gap: 14px;
}

.purchase-history-table-wrap {
    overflow-x: auto;
}

.purchase-history-filters,
.purchase-history-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
}

.purchase-history-filters .toolbar-search {
    flex: 1;
    min-width: 240px;
}

.toolbar-search.compact {
    padding: 9px 12px;
}

.purchase-history-actions {
    justify-content: flex-start;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.purchase-history-actions span {
    color: var(--text-tertiary);
    font-size: 0.84rem;
    font-weight: 700;
}

.purchase-history-table {
    min-width: 1040px;
}

.table-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-tertiary);
}

.empty-state {
    grid-column: 1 / -1;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 32px;
}

.empty-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.empty-icon svg { width: 26px; height: 26px; }
.empty-state h3 { font-size: 1rem; }
.empty-state p { color: var(--text-secondary); font-size: 0.86rem; }

.orders-table-wrap { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table th {
    padding: 14px 18px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

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

.mono { font-family: var(--font-mono); font-size: 0.88rem; }

.type-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.type-gpt-sm { background: rgba(16,163,127,0.12); color: #10b981; }

.money { font-weight: 700; font-family: var(--font-mono); }

.status-badge {
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-completed { background: rgba(16,185,129,0.12); color: var(--success); }
.status-processing { background: rgba(59,130,246,0.12); color: var(--info); }
.status-pending { background: rgba(245,158,11,0.12); color: var(--warning); }
.status-refund { background: rgba(239,68,68,0.12); color: var(--danger); }

.time-col { color: var(--text-tertiary); font-size: 0.86rem; }

/* ==================== IMPORT PAGE ==================== */
.import-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 22px;
    margin-bottom: 28px;
}

.upload-zone {
    padding: 56px 38px;
    text-align: center;
    border-style: dashed !important;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-primary) !important;
    background: rgba(99,102,241,0.04) !important;
}

.upload-zone h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.upload-zone p { font-size: 0.92rem; color: var(--text-tertiary); margin-bottom: 22px; }
.upload-zone input[type="file"] { display: none; }

.upload-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    border-radius: var(--radius-lg);
    background: rgba(99,102,241,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon-wrap svg { width: 30px; height: 30px; color: var(--accent-primary); }

.upload-formats { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

.format-tag {
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    border: 1px solid var(--border-color);
}

.import-radar {
    padding: 22px;
    margin-bottom: 22px;
}

.import-radar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.import-radar-head h4 {
    font-size: 1.08rem;
    line-height: 1.25;
}

.import-radar-state {
    flex-shrink: 0;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.045);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 800;
}

.import-radar-state.is-ready {
    background: rgba(49,208,170,0.1);
    border-color: rgba(49,208,170,0.22);
    color: var(--success);
}

.import-radar-state.is-warn {
    background: rgba(242,184,75,0.1);
    border-color: rgba(242,184,75,0.22);
    color: var(--warning);
}

.import-radar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.import-radar-metric {
    min-width: 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--border-color);
}

.import-radar-metric span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 800;
}

.import-radar-metric strong {
    display: block;
    margin-top: 5px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.02rem;
    overflow-wrap: anywhere;
}

.import-radar-advice {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(139,108,255,0.1);
    border: 1px solid rgba(139,108,255,0.22);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.5;
}

.import-options { padding: 28px; }

.import-ai-card {
    grid-column: 1 / -1;
    padding: 22px;
    display: grid;
    gap: 14px;
    border-color: rgba(168, 85, 247, 0.18);
    background: linear-gradient(135deg, rgba(250, 245, 255, 0.86), rgba(240, 253, 250, 0.72));
}

.import-ai-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.import-ai-head img {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 10px 22px rgba(168, 85, 247, 0.14);
}

.import-ai-head h3 {
    margin: 2px 0;
    color: #111827;
    font-size: 1.1rem;
}

.import-ai-head p {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
}

.import-paste-area {
    width: 100%;
    min-height: 132px;
    resize: vertical;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.78);
    color: #111827;
    outline: none;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    line-height: 1.65;
}

.import-paste-area:focus {
    border-color: rgba(168, 85, 247, 0.62);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14);
}

.import-ai-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #475569;
    font-size: 0.86rem;
    font-weight: 750;
}

.import-ai-summary strong {
    color: #7c3aed;
    white-space: nowrap;
}

.import-ai-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.import-preview-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.import-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.import-preview-head strong {
    display: block;
    color: #111827;
    font-size: 0.96rem;
    font-weight: 900;
}

.import-preview-head span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
}

.import-preview-breakdown {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.import-preview-pill,
.import-quota-status,
.type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

.import-preview-pill {
    gap: 4px;
}

.import-preview-pill.ok,
.import-quota-status.ok {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
}

.import-preview-pill.warn,
.import-quota-status.warn {
    color: #92400e;
    background: rgba(245, 158, 11, 0.16);
}

.import-preview-pill.fail,
.import-quota-status.fail {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.14);
}

.import-quota-status.unknown {
    color: #64748b;
    background: rgba(226, 232, 240, 0.72);
}

.type-pill {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
}

.import-preview-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.52);
}

.import-preview-table {
    min-width: 760px;
}

.import-preview-table th {
    background: rgba(241, 245, 249, 0.88);
    color: #64748b;
    letter-spacing: 0;
    text-transform: none;
}

.import-preview-account strong,
.import-preview-account span {
    display: block;
}

.import-preview-account strong {
    color: #111827;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.import-preview-account span {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.76rem;
}

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

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

.form-select, .form-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color var(--transition-fast);
}

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

.radio-group { display: flex; flex-direction: column; gap: 9px; }

.radio-option {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.radio-option:hover { background: var(--glass-bg-hover); }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.import-history { overflow-x: auto; padding: 26px; }

.import-history .data-table {
    min-width: 880px;
}

.import-history-checks {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.success-rate {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.88rem;
}
.success-rate.high { color: var(--success); }
.success-rate.mid { color: var(--warning); }
.success-rate.low { color: var(--danger); }

/* ==================== QUALITY PAGE ==================== */
.quality-overview { padding: 24px; margin-bottom: 20px; }

.quality-stat {
    text-align: center;
    margin-bottom: 24px;
}

.quality-stat-value {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.quality-stat-label { font-size: 0.88rem; color: var(--text-tertiary); font-weight: 500; }

.quality-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.quality-snapshot-card {
    min-height: 94px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)),
        var(--bg-tertiary);
}

.quality-snapshot-card span,
.quality-snapshot-card small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 800;
}

.quality-snapshot-card strong {
    display: block;
    margin: 7px 0 5px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.34rem;
    line-height: 1.2;
}

.quality-bars { display: flex; flex-direction: column; gap: 14px; }

.quality-ai-note {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid rgba(25, 199, 184, 0.22);
    border-radius: var(--radius-sm);
    background: rgba(25, 199, 184, 0.07);
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.bar-val { color: var(--text-tertiary); font-family: var(--font-mono); }

.bar-track {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill { height: 100%; border-radius: 4px; transition: width 1s ease-out; }
.bar-fill-s { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.bar-fill-a { background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); }
.bar-fill-b { background: linear-gradient(90deg, #9ca3af, #6b7280); }

.quality-actions { padding: 24px; margin-bottom: 20px; }

.quality-controls { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

.quality-triage-panel {
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    overflow: hidden;
}

.quality-triage-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.quality-triage-head h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 900;
}

.quality-triage-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(139,108,255,0.24);
    border-radius: 999px;
    background: rgba(139,108,255,0.12);
    color: var(--accent-tertiary);
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

.quality-triage-state.is-ready {
    border-color: rgba(16,185,129,0.25);
    background: rgba(16,185,129,0.12);
    color: var(--success);
}

.quality-triage-state.is-warn {
    border-color: rgba(245,158,11,0.28);
    background: rgba(245,158,11,0.12);
    color: var(--warning);
}

.quality-triage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px;
}

.quality-triage-card {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.quality-triage-card span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
}

.quality-triage-card strong {
    display: block;
    margin-top: 5px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 900;
}

.quality-risk-table-wrap {
    overflow-x: auto;
    border-top: 1px solid var(--border-color);
}

.quality-risk-table {
    min-width: 840px;
}

.quality-risk-account {
    display: grid;
    gap: 4px;
}

.quality-risk-account code {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.quality-risk-account span {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
}

.detection-log {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    max-height: 280px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.log-entry {
    display: flex;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
}

.log-entry:last-child { border-bottom: none; }

.log-time { color: var(--text-tertiary); flex-shrink: 0; }

.log-ok .log-msg { color: var(--success); }
.log-warn .log-msg { color: var(--warning); }
.log-fail .log-msg { color: var(--danger); }

/* ==================== AUTO REFILL PAGE ==================== */
.refill-cards-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
}

.refill-config-card { padding: 24px; }

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

.config-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

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

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

.config-name { display: block; font-weight: 600; font-size: 0.88rem; }

.config-status {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.config-active { background: rgba(16,185,129,0.12); color: var(--success); }
.config-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.config-inactive { background: rgba(156,163,175,0.12); color: var(--text-tertiary); }

.config-detail { font-size: 0.8rem; color: var(--text-secondary); }
.config-detail strong { color: var(--text-primary); }
.config-sub { font-size: 0.74rem; color: var(--text-tertiary); margin-top: 2px; display: block; }

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-tertiary);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: white;
}

.refill-logs-card { padding: 24px; max-height: 520px; overflow-y: auto; }

.refill-timeline { display: flex; flex-direction: column; gap: 4px; }

.timeline-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.timeline-item:last-child { border-bottom: none; }

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.timeline-success { background: var(--success); }
.timeline-warning { background: var(--warning); }
.timeline-info { background: var(--info); }

.timeline-body p { font-size: 0.85rem; font-weight: 600; }
.timeline-body span { display: block; font-size: 0.75rem; color: var(--text-tertiary); margin-top: 2px; }

/* ==================== WARRANTY PAGE ==================== */
.warranty-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 22px;
    margin-bottom: 20px;
}

.warranty-stat-item {
    text-align: center;
    padding: 16px 8px;
}

.ws-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.ws-blue { color: var(--info); }
.ws-orange { color: var(--warning); }
.ws-green { color: var(--success); }

.ws-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.warranty-table-wrap { overflow-x: auto; padding: 4px; }

.warranty-toolbar {
    padding: 18px 18px 0;
}

/* ==================== WALLET PAGE ================= */
.wallet-overview {
    display: grid;
    grid-template-columns: minmax(320px, 0.86fr) minmax(360px, 1.14fr);
    align-items: stretch;
    gap: 20px;
    margin-bottom: 24px;
}

.wallet-balance-area {
    min-width: 0;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wallet-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 8px;
}

.wallet-balance {
    font-size: 3.15rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.auth-required-balance {
    display: inline-block;
    font-size: 1.45rem;
    color: var(--text-secondary);
    letter-spacing: 0;
}

.wallet-balance small { font-size: 1.55rem; }

.wallet-actions { display: flex; gap: 12px; margin-top: 20px; }

.wallet-radar-panel {
    min-width: 0;
    padding: 22px;
}

.wallet-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.wallet-chart-head span {
    color: var(--text-tertiary);
    font-size: 0.82rem;
    font-weight: 800;
}

.wallet-chart-head strong {
    font-family: var(--font-mono);
    font-size: 0.92rem;
}

.mini-chart {
    min-height: 128px;
}

.mini-chart svg {
    width: 100%;
    height: auto;
    display: block;
}

.wallet-trend-grid {
    stroke: rgba(255,255,255,0.08);
    stroke-width: 1;
}

.wallet-trend-area {
    fill: url(#walletTrendGrad);
}

.wallet-trend-line {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wallet-trend-dot {
    fill: var(--bg-elevated);
    stroke: #14b8a6;
    stroke-width: 2;
}

.wallet-trend-endpoint {
    fill: var(--accent-secondary);
    stroke: rgba(255,255,255,0.72);
    stroke-width: 2;
}

.wallet-radar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.wallet-radar-item {
    min-width: 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--border-color);
}

.wallet-radar-item span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
}

.wallet-radar-item strong {
    display: block;
    margin-top: 4px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.wallet-trend-note {
    margin-top: 10px;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 700;
}

.wallet-ai-advice {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(139,108,255,0.1);
    border: 1px solid rgba(139,108,255,0.22);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.5;
}

.wallet-transactions { padding: 26px; overflow-x: auto; }

.wallet-review-panel {
    padding: 0;
    overflow: hidden;
}

.wallet-review-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-color);
}

.wallet-review-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(139,108,255,0.12);
    border: 1px solid rgba(139,108,255,0.24);
    color: var(--accent-tertiary);
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.wallet-review-table-wrap {
    overflow-x: auto;
}

.wallet-review-table {
    min-width: 860px;
}

.wallet-review-id,
.wallet-review-qr {
    display: grid;
    gap: 4px;
}

.wallet-review-id code {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.wallet-review-id span,
.wallet-review-qr small,
.wallet-review-meta {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
}

.wallet-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#dashboardMerchantRows tr[data-account-id]:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: -3px;
    background: rgba(25, 199, 184, 0.08);
}

.wallet-review-qr-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 4px 8px 4px 4px;
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 10px;
    color: var(--primary-light);
    background: rgba(168, 85, 247, 0.08);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.wallet-review-qr-preview:hover,
.wallet-review-qr-preview:focus-visible {
    border-color: rgba(168, 85, 247, 0.6);
    background: rgba(168, 85, 247, 0.16);
}

.wallet-review-qr-preview img {
    width: 42px;
    height: 42px;
    border-radius: 7px;
    object-fit: cover;
    background: #fff;
}

.wallet-review-qr-missing {
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 800;
}

.withdraw-qr-modal {
    width: min(520px, calc(100vw - 28px));
}

.withdraw-qr-preview-body {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
}

.withdraw-qr-preview-body img {
    display: block;
    width: min(340px, 75vw);
    aspect-ratio: 1;
    object-fit: contain;
    padding: 12px;
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(76, 29, 149, 0.2);
}

.withdraw-qr-preview-body p {
    margin: 0;
    color: var(--text-primary);
    font-weight: 800;
}

.withdraw-qr-preview-body small {
    color: var(--text-tertiary);
}

.tx-type {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.tx-income { background: rgba(16,185,129,0.12); color: var(--success); }
.tx-expense { background: rgba(239,68,68,0.12); color: var(--danger); }
.tx-withdraw { background: rgba(99,102,241,0.12); color: var(--accent-primary); }
.tx-redeem { background: rgba(16,185,129,0.12); color: var(--success); }

.wallet-transaction-desc {
    display: grid;
    gap: 4px;
}

.wallet-transaction-desc small {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.74rem;
}

.tx-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.tx-status-reviewing { color: var(--warning); }
.tx-status-completed { color: var(--success); }
.tx-status-rejected { color: var(--danger); }

.order-push-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

.order-push-detail {
    display: block;
    margin-top: 4px;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.order-push-pushed { color: var(--success); }
.order-push-copied { color: var(--info); }
.order-push-failed { color: var(--danger); }
.order-push-pending { color: var(--text-tertiary); }

.money-pos { color: var(--success); }
.money-neg { color: var(--danger); }

.wallet-modal { max-width: 520px; }

.wallet-modal-badge {
    background: rgba(16,185,129,0.14);
    color: var(--success);
}

.wallet-modal-badge.withdraw {
    background: rgba(99,102,241,0.14);
    color: var(--accent-tertiary);
}

.wallet-balance-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.wallet-balance-note span {
    color: var(--text-tertiary);
    font-size: 0.84rem;
}

.wallet-balance-note strong {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.wallet-quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: -6px 0 20px;
}

.wallet-quick-amounts button {
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.wallet-quick-amounts button:hover,
.wallet-quick-amounts button.active {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: rgba(168,85,247,0.12);
}

.wallet-modal-tip {
    margin-top: -4px;
    color: var(--text-tertiary);
    font-size: 0.84rem;
    line-height: 1.6;
}

.redeem-console {
    padding: 26px;
    margin-bottom: 24px;
}

.redeem-entry,
.redeem-admin {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(380px, 1.3fr);
    gap: 22px;
    align-items: end;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 22px;
}

.redeem-admin {
    align-items: center;
}

.redeem-desc {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.redeem-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.redeem-generator {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.redeem-generator label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
}

.redeem-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.redeem-summary div {
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.redeem-summary span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.redeem-summary strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.08rem;
}

.redeem-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.redeem-filter-tabs {
    flex-wrap: wrap;
}

.redeem-code-table {
    overflow-x: auto;
}

.redeem-code-table .data-table td,
.redeem-code-table .data-table th {
    white-space: nowrap;
}

.redeem-code {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: var(--text-primary);
}

.redeem-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}

.redeem-unused { background: rgba(16,185,129,0.12); color: var(--success); }
.redeem-used { background: rgba(156,163,175,0.12); color: var(--text-tertiary); }
.redeem-void { background: rgba(239,68,68,0.12); color: var(--danger); }

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

/* ==================== SETTINGS PAGE ==================== */
.settings-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
}

.settings-nav {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: fit-content;
}

.settings-nav-item {
    text-align: left;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.settings-nav-item:hover { background: var(--glass-bg-hover); color: var(--text-primary); }
.settings-nav-item.active { background: var(--accent-gradient); color: white; font-weight: 600; }

.settings-main { padding: 28px; }

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.settings-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.settings-panel-head p {
    margin-top: 6px;
    color: var(--text-tertiary);
    font-size: 0.84rem;
    line-height: 1.55;
}

.settings-form { max-width: 680px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.settings-data-panel {
    margin-top: 24px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.settings-data-panel h4 {
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.settings-data-panel p {
    color: var(--text-tertiary);
    font-size: 0.82rem;
    line-height: 1.6;
}

.settings-data-actions {
    margin-top: 16px;
    padding-top: 16px;
    flex-wrap: wrap;
}

.settings-kv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.settings-kv-grid div {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}

.settings-kv-grid span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.settings-kv-grid strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.86rem;
}

.settings-inline-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.settings-api-card {
    margin-top: 18px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.settings-api-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.settings-api-card-head h4 {
    font-size: 1rem;
}

.api-status-pill {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.045);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 800;
}

.api-status-pill.is-ready {
    background: rgba(49,208,170,0.1);
    border-color: rgba(49,208,170,0.22);
    color: var(--success);
}

.api-status-pill.is-invalid {
    background: rgba(255,100,124,0.1);
    border-color: rgba(255,100,124,0.22);
    color: var(--danger);
}

.settings-api-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.settings-api-metric {
    min-width: 0;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}

.settings-api-metric span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.settings-api-metric strong {
    display: block;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.84rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-api-advice {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.83rem;
    line-height: 1.55;
}

.settings-api-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.settings-log-panel {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.settings-log-table {
    min-width: 720px;
}

.settings-log-table td:last-child {
    min-width: 360px;
}

.danger-action {
    color: var(--danger);
}

.danger-action:hover {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
}

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

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

/* 任一弹窗打开时锁定背景滚动，防触摸/滚轮穿透（弹窗内部 .room-dialog-scroll 独立滚动不受影响；
   mystery-detail / traveler-account 另有专用 body 类锁，此处是其余弹窗的统一兜底）。 */
body:has(.modal-overlay.show) { overflow: hidden; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    width: 90%;
    max-width: 560px;
    padding: 34px;
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.28rem;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

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

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.modal-type-badge {
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.76rem;
    font-weight: 700;
}

.modal-title { font-size: 1.28rem; font-weight: 700; }

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.detail-item { display: flex; flex-direction: column; gap: 6px; }

.detail-label { font-size: 0.82rem; color: var(--text-tertiary); }
.detail-value { font-size: 0.95rem; font-weight: 600; }

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.quality-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
}

.modal-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.modal-price-label { font-size: 0.88rem; color: var(--text-tertiary); }

.modal-price {
    font-size: 1.78rem;
    font-weight: 900;
}

.modal-stock {
    flex-basis: 100%;
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.purchase-panel {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 14px 18px;
    align-items: end;
    padding: 18px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.purchase-panel label,
.purchase-summary span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.purchase-quantity-control {
    display: grid;
    grid-template-columns: 40px minmax(80px, 108px) 40px;
    gap: 8px;
}

.purchase-quantity-control button,
.purchase-quantity-control input {
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-primary);
    text-align: center;
    font-weight: 800;
}

.purchase-quantity-control button:hover {
    border-color: var(--accent-primary);
    background: rgba(168,85,247,0.12);
}

.purchase-quantity-control input {
    font-family: var(--font-mono);
    outline: none;
}

.purchase-summary {
    min-width: 150px;
}

.purchase-summary strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.38rem;
}

.purchase-hint {
    grid-column: 1 / -1;
    color: var(--text-tertiary);
    font-size: 0.84rem;
    line-height: 1.5;
}

.purchase-hint.warning { color: var(--warning); }
.purchase-hint.danger { color: var(--danger); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.order-modal {
    max-width: 760px;
}

.order-modal-badge {
    background: rgba(168, 85, 247, 0.14);
    color: var(--accent-primary);
}

.warranty-modal {
    max-width: 700px;
}

.warranty-modal-badge {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
}

.order-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.order-detail-item {
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.order-detail-item span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.order-detail-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.order-delivery-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.order-delivery-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.order-delivery-head h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.order-delivery-head p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 0.84rem;
}

.order-export-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.order-delivery-list {
    display: grid;
    gap: 0;
    max-height: 320px;
    overflow: auto;
}

.order-delivery-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(130px, auto);
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-color);
}

.order-delivery-item:last-child {
    border-bottom: 0;
}

.delivery-index {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent-primary);
    font-weight: 900;
    font-size: 0.78rem;
}

.delivery-main {
    min-width: 0;
}

.delivery-main strong,
.delivery-main span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delivery-main strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.delivery-main span {
    color: var(--text-tertiary);
    font-size: 0.78rem;
    margin-top: 2px;
}

.order-delivery-item code {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.delivery-token-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.delivery-token-actions code {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delivery-token-actions .btn {
    flex: 0 0 auto;
}

.warranty-advice-panel {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(250, 245, 255, 0.84), rgba(240, 253, 250, 0.72));
    border: 1px solid rgba(168, 85, 247, 0.18);
}

.warranty-advice-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, #a855f7, #14b8a6);
    font-weight: 900;
}

.warranty-advice-panel strong {
    display: block;
    color: #111827;
    margin-bottom: 4px;
}

.warranty-advice-panel p {
    margin: 0;
    color: #475569;
    line-height: 1.65;
    font-size: 0.9rem;
}

.xiaozi-assistant {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 260;
    display: grid;
    justify-items: end;
    gap: 12px;
    pointer-events: none;
}

.xiaozi-assistant-fab,
.xiaozi-assistant-panel {
    pointer-events: auto;
}

.xiaozi-assistant-fab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 8px 15px 8px 8px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, #a855f7, #14b8a6);
    box-shadow: 0 14px 34px rgba(88, 28, 135, 0.26);
    font-weight: 900;
}

.xiaozi-assistant-fab img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.64);
}

.xiaozi-assistant-panel {
    display: none;
    width: min(360px, calc(100vw - 36px));
    padding: 16px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(168, 85, 247, 0.18);
    box-shadow: 0 18px 52px rgba(15, 23, 42, 0.2);
    color: #111827;
}

.xiaozi-assistant.is-open .xiaozi-assistant-panel {
    display: block;
    animation: modalIn 0.22s ease-out;
}

.assistant-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.assistant-head img {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    object-fit: cover;
}

.assistant-head div {
    min-width: 0;
    flex: 1;
}

.assistant-head strong,
.assistant-head span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-head strong {
    font-size: 0.98rem;
    font-weight: 900;
}

.assistant-head span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.assistant-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #64748b;
    background: rgba(148, 163, 184, 0.12);
    font-size: 1.1rem;
}

.assistant-message {
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 12px;
}

.assistant-insights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.assistant-insight {
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.assistant-insight span {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 850;
    margin-bottom: 3px;
}

.assistant-insight strong {
    display: block;
    color: #111827;
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assistant-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.assistant-command {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 12px;
}

.assistant-command input {
    min-width: 0;
    height: 38px;
    padding: 0 11px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(248, 250, 252, 0.94);
    color: #111827;
    outline: none;
}

.assistant-command input:focus {
    border-color: rgba(168, 85, 247, 0.64);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14);
}

.assistant-command button {
    min-width: 58px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    color: white;
    background: linear-gradient(135deg, #a855f7, #14b8a6);
    font-weight: 900;
}

.assistant-feedback {
    min-height: 20px;
    margin-top: 8px;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.5;
}

.assistant-feedback-ok { color: #047857; }
.assistant-feedback-warn { color: #b45309; }

.app-toast {
    position: fixed;
    top: 12px;
    left: calc((100% + var(--room-nav-offset, 0px)) / 2);
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: min(440px, calc(100vw - var(--room-nav-offset, 0px) - 40px));
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
    box-shadow: var(--glass-shadow);
    font-size: 12px;
    line-height: 1.8;
    overflow-wrap: anywhere;
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.app-toast::before {
    content: '✧';
    flex-shrink: 0;
    color: #d7b785;
    font-size: 22px;
    line-height: 1;
    text-shadow: 0 0 14px #cfad7866;
}

body:has(.modal-overlay.show) .app-toast { left: 50%; }

.app-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ==================== NEXUSVAULT-STYLE TRADING DESK SKIN ==================== */
.glass-card,
.stat-card,
.action-card,
.account-card,
.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.glass-card:hover,
.account-card:hover,
.action-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.sidebar {
    background: var(--bg-secondary);
    border-right-color: var(--border-color);
}

.sidebar-header {
    min-height: var(--topbar-height);
    padding: 12px 18px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.logo-text {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: currentColor;
    font-size: 1rem;
    letter-spacing: 0;
}

.logo-text::first-letter {
    color: var(--accent-primary);
}

.logo-subtitle {
    color: var(--text-tertiary);
    font-size: 0.72rem;
}

.sidebar-nav {
    padding: 12px 0;
}

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

.nav-section-title {
    padding: 13px 20px 6px;
    margin: 0;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.nav-item {
    margin: 0;
    padding: 10px 20px;
    border-radius: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

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

.nav-item.active {
    background: rgba(124, 92, 252, 0.1);
    color: var(--accent-primary);
    font-weight: 700;
}

.nav-item.active::before {
    top: 0;
    bottom: 0;
    left: 0;
    height: auto;
    width: 3px;
    transform: none;
    background: var(--accent-primary);
    border-radius: 0 3px 3px 0;
}

.nav-badge {
    background: var(--danger);
    box-shadow: none;
}

.sidebar-footer {
    padding: 12px;
}

.user-card {
    padding: 8px;
    border-radius: var(--radius-sm);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

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

.topbar {
    background: var(--bg-secondary);
    border-bottom-color: var(--border-color);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0 24px;
}

.breadcrumb-current {
    font-size: 1rem;
    font-weight: 700;
}

.topbar-ai-status {
    min-height: 30px;
    border-radius: var(--radius-sm);
    background: rgba(124, 92, 252, 0.1);
    border-color: rgba(124, 92, 252, 0.2);
    color: var(--accent-tertiary);
}

.search-box {
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
}

.topbar-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.topbar-balance {
    min-width: auto;
    height: 36px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    background: rgba(124, 92, 252, 0.1);
    border-color: rgba(124, 92, 252, 0.2);
}

.topbar-balance-label {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.topbar-balance strong {
    color: var(--accent-tertiary);
    font-size: 0.92rem;
}

.page-content {
    max-width: none;
    padding: 24px;
}

.purchase-workbench-header {
    padding: 18px 20px;
    margin-bottom: 16px;
}

.section-title {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.panel-kicker {
    color: var(--accent-tertiary);
    letter-spacing: 0.08em;
}

.dashboard-trade-shell {
    grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-price-board,
.merchant-panel,
.purchase-builder,
.purchase-confirm,
.market-list-panel,
.purchase-history-panel,
.import-options,
.upload-zone {
    padding: 20px;
}

.dashboard-notice {
    min-height: 96px;
    padding: 18px 20px;
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: none;
}

.notice-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(251, 191, 36, 0.12);
    color: var(--warning);
}

.notice-body,
.notice-body p {
    color: var(--text-secondary);
}

.notice-title-row strong {
    color: var(--text-primary);
}

.notice-title-row span,
.stats-badge {
    min-height: 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.xiaozi-ai-panel,
.market-ai-advisor,
.import-ai-card {
    background:
        linear-gradient(135deg, rgba(124, 92, 252, 0.12), rgba(45, 212, 167, 0.06)),
        var(--bg-secondary);
    border-color: rgba(124, 92, 252, 0.22);
    box-shadow: none;
}

.xiaozi-ai-avatar,
.import-ai-head img {
    border-radius: var(--radius-sm);
    border-color: rgba(124, 92, 252, 0.28);
    box-shadow: 0 8px 24px rgba(124, 92, 252, 0.12);
}

.xiaozi-ai-copy h3,
.market-ai-head h4,
.import-ai-head h3,
.import-preview-head strong {
    color: var(--text-primary);
}

.xiaozi-ai-copy p,
.market-ai-head p,
.import-ai-head p,
.import-preview-head span {
    color: var(--text-secondary);
}

.xiaozi-ai-metric,
.market-ai-metric,
.import-ai-summary,
.confirm-metrics div,
.confirm-selected-product,
.purchase-quantity-block {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.xiaozi-ai-metric span,
.market-ai-metric span,
.confirm-metrics span {
    color: var(--text-tertiary);
}

.xiaozi-ai-metric strong,
.market-ai-metric strong,
.confirm-metrics strong,
.confirm-selected-product strong,
.import-ai-summary strong {
    color: var(--text-primary);
}

.dashboard-price-board-head,
.merchant-panel-header,
.notification-header {
    border-bottom-color: var(--border-color);
}

.dashboard-status-strip {
    gap: 12px;
}

.dashboard-status-card {
    min-height: 110px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: none;
}

.dashboard-status-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.dashboard-status-card.is-selected,
.dashboard-status-card.is-live.is-selected,
.dashboard-status-card.is-warn.is-selected {
    border-color: rgba(124, 92, 252, 0.72);
    background: rgba(124, 92, 252, 0.1);
    box-shadow: 0 0 0 1px rgba(124, 92, 252, 0.12);
}

.dashboard-status-card.is-live,
.dashboard-status-card.is-warn {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.dashboard-status-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(45, 212, 167, 0.12);
    color: var(--success);
}

.dashboard-status-card.is-selected .dashboard-status-icon {
    background: rgba(124, 92, 252, 0.18);
    color: var(--accent-tertiary);
}

.dashboard-status-meta span,
.dashboard-status-meta small,
.dashboard-status-meta .stock-line {
    color: var(--text-secondary);
}

.dashboard-status-meta strong,
.dashboard-price-board .dashboard-status-meta strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.merchant-summary-chip,
.account-sla span,
.format-tag,
.chip-filter,
.filter-tab,
.sort-select,
.toolbar-search,
.quick-quantity-row button,
.purchase-quantity-control,
.form-input,
.form-select,
.form-textarea,
.import-paste-area {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.merchant-summary-chip.is-active,
.filter-tab.active,
.chip-filter.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
    box-shadow: none;
}

.merchant-summary-chip .money,
.money,
.account-price {
    color: var(--accent-tertiary);
}

.merchant-table-wrap,
.purchase-history-table-wrap,
.orders-table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: auto;
}

.data-table th,
.merchant-table th {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.12);
    border-bottom-color: var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
}

.data-table td {
    padding: 14px 16px;
    border-bottom-color: var(--border-color);
    color: var(--text-secondary);
}

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

.merchant-name strong,
.merchant-product strong,
.activity-text strong,
.account-model,
.purchase-quantity-block label,
.market-list-header h4,
.workbench-card-header h4 {
    color: var(--text-primary);
}

.merchant-name span,
.merchant-product span,
.merchant-subtext,
.market-product-main p,
.workbench-card-header p,
.market-list-header p,
.redeem-desc {
    color: var(--text-secondary);
}

.merchant-avatar,
.rank-pill {
    background: var(--bg-elevated);
    color: var(--accent-tertiary);
}

.recommend-pill,
.risk-low,
.status-completed,
.type-gpt,
.stock-ok {
    color: var(--success);
    background: rgba(45, 212, 167, 0.12);
}

.risk-mid,
.status-pending,
.stock-low {
    color: var(--warning);
    background: rgba(251, 191, 36, 0.12);
}

.status-processing,
.decision-pill {
    color: var(--info);
    background: rgba(56, 189, 248, 0.12);
}

.status-refund {
    color: var(--danger);
    background: rgba(240, 80, 110, 0.12);
}

.btn {
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.btn-primary {
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    color: #ffffff;
    box-shadow: none;
}

.btn-primary:hover {
    background: #6b4df0;
    box-shadow: 0 8px 20px var(--accent-glow);
}

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

.btn-glass:hover,
.btn-ghost:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.step-badge {
    width: 26px;
    height: 26px;
    background: var(--accent-primary);
    box-shadow: none;
}

.market-ai-advisor {
    grid-template-columns: minmax(300px, 1fr) minmax(340px, 0.85fr) auto;
}

.market-product-row {
    min-height: 78px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
}

.market-product-row.is-selected {
    border-color: rgba(124, 92, 252, 0.72);
    background: rgba(124, 92, 252, 0.08);
    box-shadow: 0 0 0 1px rgba(124, 92, 252, 0.12);
}

.account-type-badge,
.account-quality,
.status-badge,
.rank-pill,
.risk-pill,
.recommend-pill,
.decision-pill {
    border-radius: 999px;
}

.global-search-panel,
.notification-panel,
.modal {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

.modal-overlay {
    background: rgba(0, 0, 0, 0.62);
}

.wallet-modal-tip,
.purchase-hint {
    color: var(--text-secondary);
}

.upload-zone:hover,
.upload-zone.dragover {
    background: rgba(124, 92, 252, 0.08) !important;
}

.xiaozi-assistant-fab {
    min-height: 50px;
    background: linear-gradient(135deg, #7c5cfc, #2dd4a7);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(124, 92, 252, 0.2);
}

.xiaozi-assistant-panel {
    width: min(390px, calc(100vw - 36px));
    background: var(--bg-secondary);
    border-color: rgba(124, 92, 252, 0.28);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
    color: var(--text-primary);
}

.assistant-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.assistant-head img {
    border: 1px solid rgba(124, 92, 252, 0.26);
}

.assistant-head strong {
    color: var(--text-primary);
}

.assistant-head span,
.assistant-message,
.assistant-feedback {
    color: var(--text-secondary);
}

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

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

.assistant-insight {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.assistant-insight span {
    color: var(--text-tertiary);
}

.assistant-insight strong {
    color: var(--text-primary);
}

.assistant-risk-list {
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
}

.assistant-risk {
    position: relative;
    padding: 10px 12px 10px 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.assistant-risk::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 13px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--info);
}

.assistant-risk span {
    display: block;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 900;
    margin-bottom: 3px;
}

.assistant-risk p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.55;
}

.assistant-risk-ok {
    border-color: rgba(45, 212, 167, 0.24);
    background: rgba(45, 212, 167, 0.08);
}

.assistant-risk-ok::before { background: var(--success); }

.assistant-risk-info {
    border-color: rgba(56, 189, 248, 0.22);
    background: rgba(56, 189, 248, 0.07);
}

.assistant-risk-info::before { background: var(--info); }

.assistant-risk-warn {
    border-color: rgba(251, 191, 36, 0.26);
    background: rgba(251, 191, 36, 0.08);
}

.assistant-risk-warn::before { background: var(--warning); }

.assistant-risk-danger {
    border-color: rgba(240, 80, 110, 0.28);
    background: rgba(240, 80, 110, 0.08);
}

.assistant-risk-danger::before { background: var(--danger); }

.assistant-command input {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

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

.assistant-command input:focus {
    border-color: rgba(124, 92, 252, 0.72);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.18);
}

.assistant-command button {
    background: var(--accent-primary);
}

.assistant-feedback-ok { color: var(--success); }
.assistant-feedback-warn { color: var(--warning); }

/* ==================== XIAOZI TERMINAL TRADING DESK REFINEMENT ==================== */
.main-content {
    background: transparent;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.018), transparent 180px),
        #0d0f14;
}

.topbar {
    background: rgba(13, 15, 20, 0.98);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.search-box,
.topbar-btn,
.topbar-balance,
.topbar-ai-status,
.user-card,
.merchant-summary-chip,
.form-input,
.form-select,
.toolbar-search,
.sort-select {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.glass-card,
.market-product-row,
.account-card,
.modal {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.036), rgba(255,255,255,0.012)),
        var(--bg-secondary);
}

.page-content {
    padding: 22px;
}

.dashboard-trade-shell {
    grid-template-columns: minmax(420px, 0.92fr) minmax(0, 1.08fr);
    gap: 14px;
    margin-bottom: 14px;
}

.dashboard-brief-stack {
    gap: 14px;
}

.dashboard-notice {
    align-items: flex-start;
    min-height: 108px;
    padding: 16px 18px;
    border-left: 3px solid var(--warning);
    background:
        linear-gradient(90deg, rgba(242, 184, 75, 0.105), rgba(242, 184, 75, 0.018)),
        var(--bg-secondary);
}

.notice-icon {
    width: 38px;
    height: 38px;
    background: rgba(242, 184, 75, 0.12);
}

.notice-title-row {
    margin-bottom: 5px;
}

.notice-body p {
    margin-top: 2px;
}

.xiaozi-ai-panel,
.market-ai-advisor,
.import-ai-card {
    background:
        linear-gradient(115deg, rgba(139, 108, 255, 0.13), rgba(25, 199, 184, 0.055) 54%, rgba(255,255,255,0.018)),
        var(--bg-secondary);
}

.dashboard-brief-stack .xiaozi-ai-panel {
    min-height: 144px;
    border-left: 3px solid var(--accent-secondary);
}

.xiaozi-ai-metric,
.market-ai-metric,
.import-ai-summary,
.confirm-metrics div,
.confirm-selected-product,
.purchase-quantity-block {
    background: rgba(9, 10, 13, 0.34);
}

.dashboard-price-board {
    padding: 0;
    overflow: hidden;
}

.dashboard-price-board-head {
    align-items: center;
    margin: 0;
    padding: 16px 18px;
    background: rgba(9, 10, 13, 0.28);
}

.dashboard-price-board-head h3 {
    font-size: 1.02rem;
    letter-spacing: 0;
}

.dashboard-price-board-head small {
    min-height: 24px;
    padding: 3px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.025);
    color: var(--text-secondary);
}

.dashboard-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.dashboard-status-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: 12px;
    min-height: 146px;
    padding: 14px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.01)),
        #131720;
}

.dashboard-status-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: transparent;
}

.dashboard-status-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.2);
}

.dashboard-status-card.is-selected,
.dashboard-status-card.is-live.is-selected,
.dashboard-status-card.is-warn.is-selected {
    border-color: rgba(25, 199, 184, 0.62);
    background:
        linear-gradient(180deg, rgba(25, 199, 184, 0.105), rgba(139, 108, 255, 0.055)),
        #141820;
}

.dashboard-status-card.is-selected::before {
    background: var(--accent-secondary);
}

.dashboard-status-top,
.dashboard-status-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tier-token {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 2px 9px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    background: rgba(255,255,255,0.035);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 900;
}

.tier-state {
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.tier-state.is-live { color: var(--success); }
.tier-state.is-warn { color: var(--warning); }
.tier-state.is-empty { color: var(--danger); }

.dashboard-status-meta {
    min-width: 0;
}

.dashboard-status-meta strong,
.dashboard-price-board .dashboard-status-meta strong {
    display: block;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: clamp(1.02rem, 1.4vw, 1.34rem);
    line-height: 1.25;
    white-space: normal;
}

.dashboard-status-meta .stock-line {
    margin-top: 8px;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    line-height: 1.4;
    white-space: normal;
}

.dashboard-status-bottom span {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.dashboard-status-bottom strong {
    margin-right: 3px;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.dashboard-stock-meter {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,0.065);
}

.dashboard-stock-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
}

.merchant-panel {
    padding: 0;
    overflow: hidden;
}

.merchant-panel-header {
    padding: 16px 18px;
    background: rgba(9, 10, 13, 0.26);
}

.merchant-panel-header .section-title {
    font-size: 1.08rem;
}

.merchant-panel-header p {
    max-width: 720px;
}

.merchant-summary-row {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(9, 10, 13, 0.16);
}

.merchant-summary-chip {
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,0.028);
}

.merchant-summary-chip.is-active {
    background: rgba(25, 199, 184, 0.12);
    border-color: rgba(25, 199, 184, 0.34);
    color: var(--success);
}

.merchant-table-wrap {
    border: 0;
    border-radius: 0;
}

.merchant-table {
    min-width: 1120px;
}

.data-table th,
.merchant-table th {
    background: #0e1117;
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.data-table td {
    border-bottom-color: rgba(255,255,255,0.06);
}

.data-table tbody tr:hover,
.activity-item:hover {
    background: rgba(255,255,255,0.035);
}

.merchant-name strong,
.merchant-product strong {
    font-weight: 900;
}

.merchant-avatar,
.rank-pill {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
}

.merchant-avatar {
    color: var(--accent-secondary);
}

.rank-pill {
    color: var(--accent-tertiary);
}

.recommend-pill,
.risk-pill,
.status-badge,
.decision-pill {
    border: 1px solid currentColor;
    background: transparent;
}

.merchant-actions .btn {
    min-height: 32px;
}

.btn-primary {
    background: linear-gradient(135deg, #785cf2, #19a99e);
    border-color: rgba(255,255,255,0.08);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #876dff, #20c0b4);
}

.topbar-balance {
    background: rgba(25, 199, 184, 0.08);
    border-color: rgba(25, 199, 184, 0.22);
}

.topbar-balance strong {
    color: #9df1e7;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .quality-snapshot-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-trade-shell { grid-template-columns: 1fr; }
    .dashboard-status-strip { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
    .xiaozi-ai-panel { grid-template-columns: auto 1fr; }
    .xiaozi-ai-metrics { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
    .merchant-panel-header { flex-direction: column; }
    .merchant-header-actions { justify-content: flex-start; }
    .purchase-workbench-grid { grid-template-columns: 1fr; }
    .market-ai-advisor { grid-template-columns: 1fr; }
    .market-ai-actions { justify-content: flex-start; }
    .market-product-row {
        grid-template-columns: auto minmax(220px, 1fr) minmax(180px, auto);
    }
    .market-product-row .account-footer {
        grid-column: 1 / -1;
        justify-content: space-between;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }
    .warranty-stats { grid-template-columns: repeat(2, 1fr); }
    .refill-cards-grid { grid-template-columns: 1fr; }
    .import-layout { grid-template-columns: 1fr; }
    .import-radar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { flex-direction: row; flex-wrap: wrap; }
    .settings-api-grid { grid-template-columns: 1fr; }
    .settings-api-card-head { flex-direction: column; }
    .settings-api-actions .btn { flex: 1 1 160px; justify-content: center; }
}

@media (max-width: 768px) {
    html { font-size: 14.5px; }

    .sidebar {
        width: min(var(--sidebar-width), calc(100vw - 44px));
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    }
    .sidebar.open,
    #sidebar.sidebar.open { transform: translateX(0) !important; }
    .sidebar-overlay.show { display: block; opacity: 1; }
    
    .main-content { margin-left: 0; }
    .menu-toggle { display: flex; }
    .topbar-ai-status { display: none; }
    .topbar-center { display: none; }
    
    .page-content { padding: 18px; }
    
    .dashboard-notice {
        padding: 20px;
        flex-direction: column;
    }
    .notice-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
    .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(190px, 1fr));
    }
    .dashboard-price-board-head {
        flex-direction: column;
    }
    .dashboard-price-board-head small {
        white-space: normal;
    }
    .xiaozi-ai-panel {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .xiaozi-ai-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-brief-stack .xiaozi-ai-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    .xiaozi-ai-avatar {
        width: 54px;
        height: 54px;
    }
    .import-ai-head {
        align-items: flex-start;
    }
    .import-ai-summary {
        align-items: flex-start;
        flex-direction: column;
    }
    .import-preview-head {
        flex-direction: column;
    }
    .import-preview-breakdown {
        justify-content: flex-start;
    }
    .order-detail-grid {
        grid-template-columns: 1fr;
    }
    .order-delivery-head {
        flex-direction: column;
    }
    .order-export-actions {
        justify-content: flex-start;
    }
    .order-delivery-item {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .delivery-token-actions {
        grid-column: 2;
        justify-content: flex-start;
        width: 100%;
    }
    .xiaozi-assistant {
        right: 16px;
        bottom: 16px;
    }
    .assistant-insights {
        grid-template-columns: 1fr;
    }
    .merchant-panel { padding: 18px; }
    
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-value { font-size: 1.5rem; }
    
    .actions-grid { grid-template-columns: 1fr; }
    
    .hot-accounts-scroll { grid-template-columns: 1fr; }
    
    .toolbar-row { flex-direction: column; align-items: stretch; }
    .filter-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .toolbar-search input { min-width: 0; }
    .purchase-workbench-header {
        flex-direction: column;
        align-items: stretch;
    }
    .purchase-builder,
    .purchase-confirm,
    .market-list-panel,
    .purchase-history-panel {
        padding: 16px;
    }
    .confirm-metrics { grid-template-columns: 1fr; }
    .purchase-history-filters,
    .purchase-history-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .purchase-history-filters .toolbar-search,
    .purchase-history-filters .sort-select,
    .purchase-history-actions .btn {
        width: 100%;
    }
    .order-delivery-radar-head {
        flex-direction: column;
    }
    .delivery-target-pill {
        max-width: 100%;
    }
    .order-delivery-radar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .import-radar-head {
        flex-direction: column;
    }
    .market-ai-head {
        align-items: flex-start;
    }
    .market-ai-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    .market-ai-actions .btn {
        flex: 1 1 140px;
        justify-content: center;
    }
    .market-list-header {
        flex-direction: column;
        align-items: stretch;
    }
    .market-product-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .market-product-row .account-card-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .market-product-row .account-sla {
        justify-content: flex-start;
    }
    .market-product-row .account-footer {
        grid-column: auto;
    }
    
    .market-grid { grid-template-columns: 1fr; }
    
    .wallet-overview { grid-template-columns: 1fr; text-align: center; gap: 18px; }
    .wallet-radar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; }
    .wallet-actions { justify-content: center; }
    .wallet-quick-amounts { grid-template-columns: repeat(2, 1fr); }
    .redeem-entry,
    .redeem-admin {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .redeem-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    .redeem-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .redeem-form,
    .redeem-generator {
        grid-template-columns: 1fr;
    }
    
    .warranty-stats { grid-template-columns: 1fr 1fr; }
    
    .detail-grid { grid-template-columns: 1fr; }
    .purchase-panel { grid-template-columns: 1fr; }
    .purchase-summary { min-width: 0; }
    
    .form-row { grid-template-columns: 1fr; }
}

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

    .dashboard-status-strip { grid-template-columns: 1fr; }
    .xiaozi-ai-metrics { grid-template-columns: 1fr; }
    .dashboard-brief-stack .xiaozi-ai-metrics { grid-template-columns: 1fr; }
    .market-ai-metrics { grid-template-columns: 1fr; }
    .wallet-radar-grid { grid-template-columns: 1fr; }
    .order-delivery-radar-grid { grid-template-columns: 1fr; }
    .import-radar-grid { grid-template-columns: 1fr; }
    .market-ai-head { flex-direction: column; }
    .merchant-summary-row { flex-direction: column; }
    .merchant-summary-chip { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
    .quality-snapshot-grid { grid-template-columns: 1fr; }
    .warranty-stats { grid-template-columns: 1fr; }
    .topbar { padding: 0 12px; }
    .topbar-balance {
        min-width: 96px;
        padding: 7px 10px;
    }
    .topbar-balance-label { display: none; }
    .topbar-balance strong {
        font-size: 0.82rem;
        max-width: 82px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .topbar-right .btn span { display: none; }
    .topbar-right .btn svg { margin: 0; }
    .modal { padding: 24px; }
    .modal-footer { flex-direction: column-reverse; }
    .modal-footer .btn { justify-content: center; }
    .app-toast {
        top: 8px;
        max-width: calc(100vw - 32px);
        padding: 10px 14px;
    }
}

/* === Utility Classes === */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }

/* ==================== XIAOZI VAULT DESK UI - 20260704 ==================== */
:root {
    --bg-primary: #080a0f;
    --bg-secondary: #0f131b;
    --bg-tertiary: #141a24;
    --bg-elevated: #1a2230;
    --bg-hover: #202939;
    --border-color: rgba(164, 174, 193, 0.12);
    --border-hover: rgba(157, 241, 231, 0.28);
    --accent-primary: #815cff;
    --accent-secondary: #19c7b8;
    --accent-tertiary: #b9c5ff;
    --accent-gradient: linear-gradient(135deg, #815cff, #19c7b8);
    --accent-glow: rgba(129, 92, 255, 0.22);
    --radius-lg: 8px;
    --radius-xl: 8px;
    --radius-2xl: 10px;
    --sidebar-width: 252px;
    --topbar-height: 62px;
}

body {
    background:
        linear-gradient(90deg, rgba(255,255,255,0.026) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(180deg, rgba(255,255,255,0.018) 1px, transparent 1px) 0 0 / 32px 32px,
        #080a0f;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(129, 92, 255, 0.06), transparent 220px),
        #0b0e14;
}

.sidebar-header {
    border-bottom: 1px solid var(--border-color);
}

.logo {
    align-items: center;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(129, 92, 255, 0.26);
}

.logo-text {
    font-size: 1.03rem;
    font-weight: 900;
}

.logo-subtitle {
    margin-top: 1px;
    font-size: 0.76rem;
}

.nav-section-title {
    padding-top: 15px;
}

.nav-item {
    min-height: 42px;
    gap: 10px;
    padding: 10px 18px;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
}

.nav-item:hover {
    border-color: rgba(255,255,255,0.035);
}

.nav-item.active {
    background:
        linear-gradient(90deg, rgba(25, 199, 184, 0.13), rgba(129, 92, 255, 0.08));
    color: #c8fff8;
}

.nav-badge,
.nav-count {
    border: 1px solid rgba(255,255,255,0.12);
}

.topbar {
    height: var(--topbar-height);
    background: rgba(11, 14, 20, 0.98);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-size: 1.05rem;
}

.topbar-ai-status,
.topbar-balance {
    height: 38px;
    border-color: rgba(25, 199, 184, 0.25);
    background:
        linear-gradient(180deg, rgba(25, 199, 184, 0.1), rgba(129, 92, 255, 0.04));
}

.topbar-balance strong {
    color: #a5fff4;
    font-family: var(--font-mono);
    font-weight: 900;
}

.search-box {
    height: 38px;
    border-color: rgba(164, 174, 193, 0.14);
    background: rgba(20, 26, 36, 0.92);
}

.page-content {
    padding: 24px 26px;
}

.glass-card,
.market-product-row,
.account-card,
.modal,
.purchase-workbench-header,
.order-delivery-radar,
.import-radar {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012)),
        #0f131b;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.glass-card:hover,
.market-product-row:hover,
.account-card:hover {
    border-color: var(--border-hover);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.045),
        0 12px 28px rgba(0, 0, 0, 0.24);
}

.purchase-workbench-header {
    position: relative;
    min-height: 82px;
    padding: 16px 20px;
    margin-bottom: 14px;
    overflow: hidden;
    border-left: 3px solid var(--accent-secondary);
}

.purchase-workbench-header::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 18px;
    width: 180px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(25, 199, 184, 0.6), transparent);
}

.section-title {
    color: var(--text-primary);
    font-size: 1.16rem;
    font-weight: 900;
}

.panel-kicker {
    margin-bottom: 5px;
    color: #9df1e7;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.redeem-desc,
.market-list-header p,
.workbench-card-header p,
.merchant-panel-header p {
    color: var(--text-secondary);
}

.dashboard-trade-shell {
    grid-template-columns: minmax(380px, 0.92fr) minmax(0, 1.08fr);
    gap: 14px;
}

.dashboard-notice,
.dashboard-brief-stack .xiaozi-ai-panel {
    min-height: 132px;
}

.dashboard-notice {
    border-left-color: var(--warning);
}

.notice-title-row {
    justify-content: space-between;
}

.notice-title-row strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.notice-title-row strong::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--warning);
    box-shadow: 0 0 12px rgba(242, 184, 75, 0.75);
}

.xiaozi-ai-panel,
.market-ai-advisor,
.import-ai-card {
    border-left: 3px solid var(--accent-secondary);
}

.xiaozi-ai-avatar,
.market-ai-avatar,
.import-ai-head img {
    background: #0a0d13;
}

.xiaozi-ai-metrics,
.market-ai-metrics {
    gap: 10px;
}

.xiaozi-ai-metric,
.market-ai-metric,
.order-delivery-metric,
.import-radar-metric,
.confirm-metrics div {
    background: rgba(8, 10, 15, 0.62);
    border-color: rgba(164, 174, 193, 0.12);
}

.xiaozi-ai-metric strong,
.market-ai-metric strong,
.order-delivery-metric strong,
.import-radar-metric strong,
.confirm-metrics strong {
    color: #f8fbff;
    font-family: var(--font-mono);
}

.dashboard-price-board,
.merchant-panel,
.market-list-panel,
.purchase-history-panel,
.import-history {
    padding: 0;
    overflow: hidden;
}

.dashboard-price-board-head,
.merchant-panel-header,
.market-list-header {
    min-height: 60px;
    padding: 15px 18px;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(8, 10, 15, 0.36);
}

.dashboard-price-board-head h3,
.merchant-panel-header .section-title,
.market-list-header h4 {
    font-size: 1.04rem;
    font-weight: 900;
}

.dashboard-status-strip {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 0;
    padding: 0;
}

.dashboard-status-card {
    min-height: 166px;
    padding: 15px;
    border-width: 0 1px 0 0;
    border-radius: 0;
    background: rgba(15, 19, 27, 0.72);
}

.dashboard-status-card:last-child {
    border-right: 0;
}

.dashboard-status-card:hover {
    transform: none;
    background: rgba(20, 26, 36, 0.95);
}

.dashboard-status-card.is-selected,
.dashboard-status-card.is-live.is-selected,
.dashboard-status-card.is-warn.is-selected {
    border-color: rgba(25, 199, 184, 0.36);
    background:
        linear-gradient(180deg, rgba(25, 199, 184, 0.13), rgba(129, 92, 255, 0.06)),
        #121821;
}

.tier-token {
    border-color: rgba(25, 199, 184, 0.22);
    color: #d8fffb;
}

.dashboard-status-meta strong,
.dashboard-price-board .dashboard-status-meta strong {
    font-size: 1.08rem;
}

.merchant-summary-row {
    padding: 10px 16px;
}

.merchant-summary-chip,
.filter-tab,
.chip-filter,
.format-tag,
.status-badge,
.risk-pill,
.recommend-pill,
.decision-pill,
.type-pill {
    min-height: 28px;
    border: 1px solid rgba(164, 174, 193, 0.13);
    border-radius: 999px;
    background: rgba(8, 10, 15, 0.32);
}

.merchant-summary-chip.is-active,
.filter-tab.active,
.chip-filter.active {
    border-color: rgba(25, 199, 184, 0.42);
    background: rgba(25, 199, 184, 0.14);
    color: #a5fff4;
}

.data-table {
    font-size: 0.88rem;
}

.data-table th,
.merchant-table th {
    padding: 11px 14px;
    background: #0a0d13;
    color: #7e8798;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.data-table td {
    padding: 12px 14px;
    color: var(--text-secondary);
    background: rgba(15, 19, 27, 0.36);
}

.data-table tbody tr:nth-child(even) td {
    background: rgba(20, 26, 36, 0.26);
}

.data-table tbody tr:hover td {
    background: rgba(25, 199, 184, 0.055);
}

.merchant-name strong,
.merchant-product strong {
    color: var(--text-primary);
}

.rank-pill,
.merchant-avatar {
    background: rgba(25, 199, 184, 0.09);
    border-color: rgba(25, 199, 184, 0.2);
    color: #a5fff4;
}

.purchase-workbench-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.42fr);
    gap: 14px;
    align-items: stretch;
}

.purchase-builder,
.purchase-confirm {
    padding: 18px;
}

.purchase-confirm {
    position: sticky;
    top: calc(var(--topbar-height) + 16px);
}

.workbench-card-header {
    margin-bottom: 14px;
}

.step-badge {
    background: rgba(25, 199, 184, 0.16);
    border: 1px solid rgba(25, 199, 184, 0.34);
    color: #a5fff4;
}

.filter-tabs,
.search-filters {
    gap: 8px;
}

.toolbar-search,
.sort-select,
.form-input,
.form-select,
.form-textarea,
.import-paste-area,
.purchase-quantity-control,
.quick-quantity-row button {
    background: rgba(8, 10, 15, 0.42);
    border-color: rgba(164, 174, 193, 0.13);
}

.toolbar-search:focus-within,
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.import-paste-area:focus {
    border-color: rgba(25, 199, 184, 0.48);
    box-shadow: 0 0 0 3px rgba(25, 199, 184, 0.1);
}

.purchase-quantity-block,
.confirm-selected-product {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.008)),
        rgba(8, 10, 15, 0.42);
}

.market-ai-advisor {
    grid-template-columns: minmax(280px, 1fr) minmax(330px, 0.8fr) auto;
    padding: 15px 18px;
    margin-bottom: 14px;
}

.market-list-panel {
    margin-top: 0;
}

.market-grid {
    padding: 14px;
    gap: 10px;
}

.market-product-row {
    min-height: 84px;
    border-left: 3px solid transparent;
}

.market-product-row.is-selected {
    border-left-color: var(--accent-secondary);
    border-color: rgba(25, 199, 184, 0.38);
    background:
        linear-gradient(90deg, rgba(25, 199, 184, 0.12), rgba(129, 92, 255, 0.045)),
        #111722;
}

.account-price {
    color: #a5fff4;
    font-family: var(--font-mono);
}

.order-delivery-radar,
.import-radar {
    padding: 16px 18px;
    margin-bottom: 14px;
    border-left: 3px solid var(--accent-primary);
}

.order-delivery-radar-head,
.import-radar-head {
    margin-bottom: 13px;
}

.order-delivery-radar-grid,
.import-radar-grid {
    gap: 10px;
}

.order-delivery-advice,
.import-radar-advice {
    margin-top: 12px;
    background: rgba(129, 92, 255, 0.09);
}

.purchase-history-filters,
.purchase-history-actions {
    padding: 14px 16px 0;
}

.purchase-history-table-wrap {
    margin: 14px 16px 16px;
}

.import-layout {
    grid-template-columns: minmax(300px, 0.88fr) minmax(320px, 0.42fr);
    gap: 14px;
    margin-bottom: 14px;
}

.upload-zone,
.import-options,
.import-ai-card {
    padding: 18px;
}

.upload-zone {
    min-height: 252px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-style: solid !important;
    border-left: 3px solid var(--accent-secondary);
    text-align: left;
}

.upload-icon-wrap {
    margin: 0 0 16px;
    background: rgba(25, 199, 184, 0.1);
}

.upload-icon-wrap svg {
    color: #a5fff4;
}

.upload-formats {
    justify-content: flex-start;
}

.import-options {
    border-left: 3px solid rgba(129, 92, 255, 0.75);
}

.radio-group {
    display: grid;
    gap: 8px;
}

.radio-option,
.checkbox-label {
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid rgba(164, 174, 193, 0.12);
    border-radius: 8px;
    background: rgba(8, 10, 15, 0.34);
}

.import-ai-card {
    border-left-color: var(--accent-primary);
}

.import-history {
    margin-top: 14px;
}

.import-history > .section-title {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(8, 10, 15, 0.36);
}

.btn-primary {
    background: linear-gradient(135deg, #7b5cff, #17b7aa);
    border-color: rgba(157, 241, 231, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8d76ff, #20cfc0);
}

.btn-glass:hover,
.btn-ghost:hover {
    border-color: rgba(157, 241, 231, 0.28);
    background: rgba(25, 199, 184, 0.08);
}

@media (max-width: 1400px) {
    .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-status-card {
        border-width: 0 1px 1px 0;
    }
}

@media (max-width: 1200px) {
    .dashboard-trade-shell,
    .purchase-workbench-grid,
    .import-layout {
        grid-template-columns: 1fr;
    }

    .purchase-confirm {
        position: static;
    }

    .market-ai-advisor {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 16px;
    }

    .purchase-workbench-header::after {
        display: none;
    }

    .dashboard-status-strip,
    .import-radar-grid,
    .order-delivery-radar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-status-card {
        border-width: 0 0 1px;
    }

    .merchant-panel,
    .market-list-panel {
        padding: 0;
    }

    .purchase-history-table-wrap,
    .merchant-table-wrap {
        margin: 12px;
    }
}

@media (max-width: 480px) {
    .dashboard-status-strip,
    .import-radar-grid,
    .order-delivery-radar-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== NEXUSVAULT LIGHT WORKSPACE SKIN - 20260704-24 ==================== */
html[data-theme="light"] {
    font-size: 15px;

    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #ffffff;
    --bg-hover: #eef6f6;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;

    --border-color: #dbe6ee;
    --border-hover: #b9c9d6;

    --accent-primary: #008f83;
    --accent-secondary: #0f8f86;
    --accent-tertiary: #0f766e;
    --accent-gradient: linear-gradient(135deg, #008f83, #0f766e);
    --accent-glow: rgba(0, 143, 131, 0.14);

    --glass-bg: #ffffff;
    --glass-bg-hover: #f8fafc;
    --glass-border: #dbe6ee;
    --glass-blur: none;
    --glass-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);

    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;

    --radius-sm: 8px;
    --radius-md: 8px;
    --radius-lg: 8px;
    --radius-xl: 10px;
    --radius-2xl: 12px;

    --sidebar-width: 252px;
    --topbar-height: 64px;
}

html[data-theme="light"] body {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.72), rgba(248,250,252,0.92) 210px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(180deg, rgba(15, 23, 42, 0.026) 1px, transparent 1px) 0 0 / 44px 44px,
        #f8fafc;
    color: var(--text-primary);
}

html[data-theme="light"] body::before {
    display: none;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.28);
}

html[data-theme="light"] .sidebar {
    background: #ffffff;
    border-right: 1px solid #dbe6ee;
    box-shadow: 12px 0 32px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .sidebar-header {
    min-height: var(--topbar-height);
    padding: 13px 18px;
    border-bottom: 1px solid #e5edf3;
}

html[data-theme="light"] .logo-icon {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(0, 143, 131, 0.18);
    border-radius: 8px;
    background: #eefafa;
    box-shadow: 0 10px 22px rgba(0, 143, 131, 0.12);
}

html[data-theme="light"] .logo-text {
    color: #111827;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-size: 1rem;
    font-weight: 900;
}

html[data-theme="light"] .logo-subtitle {
    color: #64748b;
    font-size: 0.72rem;
}

html[data-theme="light"] .nav-section-title {
    padding: 14px 20px 7px;
    color: #7c8798;
    letter-spacing: 0.08em;
}

html[data-theme="light"] .nav-item {
    margin: 0 10px 4px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #475569;
}

html[data-theme="light"] .nav-item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
}

html[data-theme="light"] .nav-item.active {
    background: #e9f8f7;
    border-color: rgba(0, 143, 131, 0.2);
    color: #006d64;
    font-weight: 900;
}

html[data-theme="light"] .nav-item.active::before {
    left: -10px;
    width: 3px;
    height: 24px;
    background: #008f83;
    border-radius: 0 8px 8px 0;
}

html[data-theme="light"] .nav-badge,
html[data-theme="light"] .nav-count {
    background: #edfafa;
    border: 1px solid rgba(0, 143, 131, 0.18);
    color: #006d64;
    box-shadow: none;
}

html[data-theme="light"] .sidebar-footer {
    border-top: 1px solid #e5edf3;
}

html[data-theme="light"] .user-card {
    background: #f8fafc;
    border: 1px solid #dbe6ee;
    border-radius: 8px;
}

html[data-theme="light"] .user-avatar {
    background: #e9f8f7;
    color: #006d64;
}

html[data-theme="light"] .main-content {
    background: transparent;
}

html[data-theme="light"] .topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #dbe6ee;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

html[data-theme="light"] .breadcrumb-current {
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 900;
}

html[data-theme="light"] .topbar-ai-status {
    height: 38px;
    border: 1px solid rgba(0, 143, 131, 0.18);
    background: #edfafa;
    color: #006d64;
}

html[data-theme="light"] .topbar-ai-status kbd,
html[data-theme="light"] .search-shortcut {
    background: #ffffff;
    border-color: #dbe6ee;
    color: #64748b;
}

html[data-theme="light"] .search-box,
html[data-theme="light"] .toolbar-search {
    height: 38px;
    background: #f8fafc;
    border: 1px solid #dbe6ee;
    border-radius: 8px;
    color: #0f172a;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95);
}

html[data-theme="light"] .search-box:focus-within,
html[data-theme="light"] .toolbar-search:focus-within {
    border-color: rgba(0, 143, 131, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 143, 131, 0.1);
}

html[data-theme="light"] .search-box input,
html[data-theme="light"] .toolbar-search input {
    color: #0f172a;
}

html[data-theme="light"] .search-box input::placeholder,
html[data-theme="light"] .toolbar-search input::placeholder {
    color: #7c8798;
}

html[data-theme="light"] .topbar-btn,
html[data-theme="light"] .btn-glass,
html[data-theme="light"] .btn-ghost {
    background: #ffffff;
    border: 1px solid #dbe6ee;
    color: #475569;
    box-shadow: none;
}

html[data-theme="light"] .topbar-btn:hover,
html[data-theme="light"] .btn-glass:hover,
html[data-theme="light"] .btn-ghost:hover {
    background: #f1f5f9;
    border-color: #b9c9d6;
    color: #0f172a;
}

html[data-theme="light"] .topbar-balance {
    height: 38px;
    border: 1px solid rgba(0, 143, 131, 0.24);
    background: #edfafa;
    color: #006d64;
}

html[data-theme="light"] .topbar-balance-label {
    color: #0f766e;
}

html[data-theme="light"] .topbar-balance strong {
    color: #005f58;
    font-family: var(--font-mono);
    font-weight: 900;
}

html[data-theme="light"] .page-content {
    max-width: 1480px;
    padding: 26px;
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .action-card,
html[data-theme="light"] .account-card,
html[data-theme="light"] .modal,
html[data-theme="light"] .purchase-workbench-header,
html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-history-panel,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .upload-zone,
html[data-theme="light"] .import-options,
html[data-theme="light"] .import-ai-card,
html[data-theme="light"] .import-history,
html[data-theme="light"] .wallet-overview,
html[data-theme="light"] .wallet-radar-panel,
html[data-theme="light"] .wallet-transactions,
html[data-theme="light"] .quality-overview,
html[data-theme="light"] .quality-actions,
html[data-theme="light"] .refill-config-card,
html[data-theme="light"] .refill-logs-card,
html[data-theme="light"] .settings-nav,
html[data-theme="light"] .settings-main,
html[data-theme="light"] .settings-data-panel,
html[data-theme="light"] .settings-api-card,
html[data-theme="light"] .settings-log-panel {
    background: #ffffff;
    border: 1px solid #dbe6ee;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html[data-theme="light"] .glass-card:hover,
html[data-theme="light"] .account-card:hover,
html[data-theme="light"] .market-product-row:hover {
    border-color: #b9c9d6;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.075);
}

html[data-theme="light"] .section-title {
    color: #0f172a;
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: 0;
}

html[data-theme="light"] .panel-kicker {
    color: #0f766e;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

html[data-theme="light"] .redeem-desc,
html[data-theme="light"] .merchant-panel-header p,
html[data-theme="light"] .market-list-header p,
html[data-theme="light"] .workbench-card-header p,
html[data-theme="light"] .notice-body p,
html[data-theme="light"] .xiaozi-ai-copy p,
html[data-theme="light"] .market-ai-head p,
html[data-theme="light"] .import-ai-head p {
    color: #64748b;
}

html[data-theme="light"] .dashboard-trade-shell {
    grid-template-columns: minmax(420px, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
    margin-bottom: 18px;
}

html[data-theme="light"] .dashboard-brief-stack {
    gap: 18px;
}

html[data-theme="light"] .dashboard-notice {
    min-height: 132px;
    padding: 18px 20px;
    border-left: 3px solid #d97706;
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.08), rgba(255,255,255,0.96));
}

html[data-theme="light"] .notice-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #fff7ed;
    color: #d97706;
}

html[data-theme="light"] .notice-title-row strong,
html[data-theme="light"] .xiaozi-ai-copy h3,
html[data-theme="light"] .market-ai-head h4,
html[data-theme="light"] .import-ai-head h3,
html[data-theme="light"] .workbench-card-header h4,
html[data-theme="light"] .market-list-header h4 {
    color: #0f172a;
}

html[data-theme="light"] .notice-title-row span,
html[data-theme="light"] .stats-badge {
    min-height: 26px;
    border: 1px solid #dbe6ee;
    background: #f8fafc;
    color: #64748b;
}

html[data-theme="light"] .xiaozi-ai-panel,
html[data-theme="light"] .market-ai-advisor,
html[data-theme="light"] .import-ai-card {
    border-left: 3px solid #008f83;
    background: linear-gradient(115deg, rgba(0, 143, 131, 0.08), rgba(124, 58, 237, 0.035) 56%, #ffffff);
}

html[data-theme="light"] .dashboard-brief-stack .xiaozi-ai-panel {
    min-height: 150px;
}

html[data-theme="light"] .xiaozi-ai-avatar,
html[data-theme="light"] .market-ai-avatar,
html[data-theme="light"] .import-ai-head img {
    background: #ffffff;
    border: 1px solid rgba(0, 143, 131, 0.18);
    box-shadow: 0 10px 24px rgba(0, 143, 131, 0.12);
}

html[data-theme="light"] .xiaozi-ai-metric,
html[data-theme="light"] .market-ai-metric,
html[data-theme="light"] .order-delivery-metric,
html[data-theme="light"] .import-radar-metric,
html[data-theme="light"] .wallet-radar-item,
html[data-theme="light"] .settings-api-metric,
html[data-theme="light"] .confirm-metrics div,
html[data-theme="light"] .settings-kv-grid div {
    background: #f8fafc;
    border: 1px solid #dbe6ee;
    border-radius: 8px;
}

html[data-theme="light"] .xiaozi-ai-metric span,
html[data-theme="light"] .market-ai-metric span,
html[data-theme="light"] .order-delivery-metric span,
html[data-theme="light"] .import-radar-metric span,
html[data-theme="light"] .wallet-radar-item span,
html[data-theme="light"] .settings-api-metric span {
    color: #64748b;
}

html[data-theme="light"] .xiaozi-ai-metric strong,
html[data-theme="light"] .market-ai-metric strong,
html[data-theme="light"] .order-delivery-metric strong,
html[data-theme="light"] .import-radar-metric strong,
html[data-theme="light"] .wallet-radar-item strong,
html[data-theme="light"] .settings-api-metric strong,
html[data-theme="light"] .confirm-metrics strong {
    color: #0f172a;
    font-family: var(--font-mono);
}

html[data-theme="light"] .dashboard-price-board,
html[data-theme="light"] .merchant-panel,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-history-panel,
html[data-theme="light"] .import-history {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .dashboard-price-board-head,
html[data-theme="light"] .merchant-panel-header,
html[data-theme="light"] .market-list-header,
html[data-theme="light"] .import-history > .section-title {
    min-height: 62px;
    padding: 16px 18px;
    margin: 0;
    border-bottom: 1px solid #dbe6ee;
    background: #f8fafc;
}

html[data-theme="light"] .dashboard-price-board-head small {
    min-height: 28px;
    border: 1px solid rgba(0, 143, 131, 0.18);
    background: #edfafa;
    color: #0f766e;
}

html[data-theme="light"] .dashboard-status-strip {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 0;
    padding: 0;
}

html[data-theme="light"] .dashboard-status-card {
    min-height: 164px;
    padding: 15px;
    border: 0;
    border-right: 1px solid #dbe6ee;
    border-radius: 0;
    background: #ffffff;
}

html[data-theme="light"] .dashboard-status-card:last-child {
    border-right: 0;
}

html[data-theme="light"] .dashboard-status-card:hover {
    transform: none;
    background: #f8fafc;
}

html[data-theme="light"] .dashboard-status-card.is-selected,
html[data-theme="light"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"] .dashboard-status-card.is-warn.is-selected {
    background: #e9f8f7;
    border-color: rgba(0, 143, 131, 0.28);
    box-shadow: inset 0 3px 0 #008f83;
}

html[data-theme="light"] .dashboard-status-card::before {
    display: none;
}

html[data-theme="light"] .tier-token {
    border-color: rgba(0, 143, 131, 0.2);
    background: #edfafa;
    color: #006d64;
}

html[data-theme="light"] .tier-state.is-live,
html[data-theme="light"] .tier-state.is-warn,
html[data-theme="light"] .tier-state.is-empty {
    color: #64748b;
}

html[data-theme="light"] .dashboard-status-meta strong,
html[data-theme="light"] .dashboard-price-board .dashboard-status-meta strong {
    color: #0f172a;
    font-size: 1.12rem;
}

html[data-theme="light"] .dashboard-status-meta .stock-line,
html[data-theme="light"] .dashboard-status-bottom span {
    color: #64748b;
}

html[data-theme="light"] .dashboard-status-bottom strong {
    color: #0f172a;
}

html[data-theme="light"] .dashboard-stock-meter {
    background: #e2e8f0;
}

html[data-theme="light"] .dashboard-stock-meter i {
    background: linear-gradient(90deg, #008f83, #34d399);
}

html[data-theme="light"] .merchant-summary-row {
    padding: 12px 16px;
    border-bottom: 1px solid #dbe6ee;
    background: #ffffff;
}

html[data-theme="light"] .merchant-summary-chip,
html[data-theme="light"] .filter-tab,
html[data-theme="light"] .chip-filter,
html[data-theme="light"] .format-tag,
html[data-theme="light"] .status-badge,
html[data-theme="light"] .risk-pill,
html[data-theme="light"] .recommend-pill,
html[data-theme="light"] .decision-pill,
html[data-theme="light"] .type-pill,
html[data-theme="light"] .import-preview-pill,
html[data-theme="light"] .import-quota-status,
html[data-theme="light"] .quality-badge {
    min-height: 30px;
    border: 1px solid #dbe6ee;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
}

html[data-theme="light"] .merchant-summary-chip.is-active,
html[data-theme="light"] .filter-tab.active,
html[data-theme="light"] .chip-filter.active {
    border-color: rgba(0, 143, 131, 0.28);
    background: #e9f8f7;
    color: #006d64;
}

html[data-theme="light"] .merchant-summary-chip .money,
html[data-theme="light"] .account-price,
html[data-theme="light"] .wallet-balance,
html[data-theme="light"] .quality-stat-value {
    color: #006d64;
    font-family: var(--font-mono);
}

html[data-theme="light"] .merchant-table-wrap,
html[data-theme="light"] .purchase-history-table-wrap,
html[data-theme="light"] .orders-table-wrap,
html[data-theme="light"] .import-preview-table-wrap {
    border: 0;
    border-radius: 0;
    background: #ffffff;
}

html[data-theme="light"] .data-table {
    color: #334155;
}

html[data-theme="light"] .data-table th,
html[data-theme="light"] .merchant-table th,
html[data-theme="light"] .import-preview-table th {
    padding: 12px 14px;
    background: #f1f5f9;
    color: #64748b;
    border-bottom: 1px solid #dbe6ee;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html[data-theme="light"] .data-table td,
html[data-theme="light"] .import-preview-table td {
    padding: 12px 14px;
    color: #475569;
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
}

html[data-theme="light"] .data-table tbody tr:nth-child(even) td {
    background: #fbfdff;
}

html[data-theme="light"] .data-table tbody tr:hover td {
    background: #edfafa;
}

html[data-theme="light"] .merchant-name strong,
html[data-theme="light"] .merchant-product strong,
html[data-theme="light"] .import-preview-account strong,
html[data-theme="light"] .order-detail-item strong {
    color: #0f172a;
}

html[data-theme="light"] .merchant-name span,
html[data-theme="light"] .merchant-product span,
html[data-theme="light"] .merchant-subtext,
html[data-theme="light"] .import-preview-account span,
html[data-theme="light"] .order-detail-item span {
    color: #64748b;
}

html[data-theme="light"] .rank-pill,
html[data-theme="light"] .merchant-avatar {
    background: #edfafa;
    border-color: rgba(0, 143, 131, 0.2);
    color: #006d64;
}

html[data-theme="light"] .recommend-pill,
html[data-theme="light"] .risk-low,
html[data-theme="light"] .import-preview-pill.ok,
html[data-theme="light"] .import-quota-status.ok {
    border-color: rgba(5, 150, 105, 0.22);
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .risk-mid,
html[data-theme="light"] .import-preview-pill.warn,
html[data-theme="light"] .import-quota-status.warn {
    border-color: rgba(217, 119, 6, 0.24);
    background: #fff7ed;
    color: #b45309;
}

html[data-theme="light"] .import-preview-pill.fail,
html[data-theme="light"] .import-quota-status.fail {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fef2f2;
    color: #b91c1c;
}

html[data-theme="light"] .btn {
    min-height: 36px;
    border-radius: 8px;
    font-weight: 800;
}

html[data-theme="light"] .btn-primary {
    background: #008f83;
    border: 1px solid #0f8f86;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 143, 131, 0.16);
}

html[data-theme="light"] .btn-primary:hover {
    background: #007a70;
    border-color: #007a70;
    box-shadow: 0 12px 24px rgba(0, 143, 131, 0.2);
}

html[data-theme="light"] .btn:disabled {
    opacity: 0.55;
    box-shadow: none;
}

html[data-theme="light"] .purchase-workbench-header {
    min-height: 86px;
    padding: 18px 20px;
    margin-bottom: 16px;
    overflow: hidden;
    border-left: 3px solid #008f83;
    background: linear-gradient(90deg, rgba(0, 143, 131, 0.08), #ffffff 46%);
}

html[data-theme="light"] .purchase-workbench-header::after {
    background: linear-gradient(90deg, transparent, rgba(0, 143, 131, 0.34), transparent);
}

html[data-theme="light"] .purchase-workbench-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.42fr);
    gap: 16px;
}

html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .upload-zone,
html[data-theme="light"] .import-options,
html[data-theme="light"] .settings-main {
    padding: 20px;
}

html[data-theme="light"] .purchase-confirm {
    position: sticky;
    top: calc(var(--topbar-height) + 18px);
}

html[data-theme="light"] .step-badge {
    background: #edfafa;
    border: 1px solid rgba(0, 143, 131, 0.22);
    color: #006d64;
}

html[data-theme="light"] .purchase-quantity-block,
html[data-theme="light"] .confirm-selected-product,
html[data-theme="light"] .wallet-balance-note,
html[data-theme="light"] .wallet-modal-tip,
html[data-theme="light"] .purchase-hint,
html[data-theme="light"] .order-delivery-advice,
html[data-theme="light"] .import-radar-advice,
html[data-theme="light"] .settings-api-advice {
    background: #f8fafc;
    border: 1px solid #dbe6ee;
    border-radius: 8px;
    color: #475569;
}

html[data-theme="light"] .form-input,
html[data-theme="light"] .form-select,
html[data-theme="light"] .form-textarea,
html[data-theme="light"] .sort-select,
html[data-theme="light"] .import-paste-area,
html[data-theme="light"] .purchase-quantity-control,
html[data-theme="light"] .quick-quantity-row button,
html[data-theme="light"] .wallet-quick-amounts button,
html[data-theme="light"] .radio-option,
html[data-theme="light"] .checkbox-label {
    background: #ffffff;
    border: 1px solid #dbe6ee;
    color: #0f172a;
    border-radius: 8px;
}

html[data-theme="light"] .form-input:focus,
html[data-theme="light"] .form-select:focus,
html[data-theme="light"] .form-textarea:focus,
html[data-theme="light"] .import-paste-area:focus {
    border-color: rgba(0, 143, 131, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 143, 131, 0.1);
}

html[data-theme="light"] .purchase-quantity-control input {
    color: #0f172a;
}

html[data-theme="light"] .purchase-quantity-control button:hover,
html[data-theme="light"] .quick-quantity-row button:hover,
html[data-theme="light"] .wallet-quick-amounts button:hover,
html[data-theme="light"] .wallet-quick-amounts button.active {
    border-color: rgba(0, 143, 131, 0.28);
    background: #edfafa;
    color: #006d64;
}

html[data-theme="light"] .market-grid {
    padding: 14px;
    gap: 10px;
    background: #ffffff;
}

html[data-theme="light"] .market-product-row {
    min-height: 88px;
    background: #ffffff;
    border: 1px solid #dbe6ee;
    border-left: 3px solid transparent;
    border-radius: 8px;
    box-shadow: none;
}

html[data-theme="light"] .market-product-row.is-selected {
    border-color: rgba(0, 143, 131, 0.32);
    border-left-color: #008f83;
    background: #e9f8f7;
}

html[data-theme="light"] .market-product-main p,
html[data-theme="light"] .market-product-row .account-sla,
html[data-theme="light"] .market-list-header p {
    color: #64748b;
}

html[data-theme="light"] .upload-zone {
    border-left: 3px solid #008f83;
    text-align: left;
}

html[data-theme="light"] .upload-icon-wrap {
    background: #edfafa;
    color: #006d64;
}

html[data-theme="light"] .import-options {
    border-left: 3px solid #7c3aed;
}

html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .import-radar {
    border-left: 3px solid #008f83;
}

html[data-theme="light"] .wallet-overview {
    background: linear-gradient(135deg, #ffffff, #edfafa);
}

html[data-theme="light"] .wallet-label,
html[data-theme="light"] .quality-stat-label {
    color: #64748b;
}

html[data-theme="light"] .wallet-trend-area {
    background: #f8fafc;
    border-color: #dbe6ee;
}

html[data-theme="light"] .wallet-trend-line {
    background: linear-gradient(90deg, #008f83, #34d399);
}

html[data-theme="light"] .wallet-ai-advice,
html[data-theme="light"] .quality-ai-note {
    background: #edfafa;
    border-color: rgba(0, 143, 131, 0.2);
    color: #0f766e;
}

html[data-theme="light"] .settings-nav-item {
    border-radius: 8px;
    color: #475569;
}

html[data-theme="light"] .settings-nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

html[data-theme="light"] .settings-nav-item.active {
    background: #008f83;
    color: #ffffff;
}

html[data-theme="light"] .global-search-panel,
html[data-theme="light"] .notification-panel,
html[data-theme="light"] .xiaozi-assistant-panel {
    background: #ffffff;
    border: 1px solid #dbe6ee;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .xiaozi-assistant-fab {
    background: #008f83;
    border-color: rgba(255,255,255,0.7);
    box-shadow: 0 18px 34px rgba(0, 143, 131, 0.22);
}

html[data-theme="light"] .modal-backdrop {
    background: rgba(15, 23, 42, 0.36);
}

html[data-theme="light"] .modal-header,
html[data-theme="light"] .modal-footer {
    border-color: #dbe6ee;
}

html[data-theme="light"] .modal-title {
    color: #0f172a;
}

@media (max-width: 1200px) {
    html[data-theme="light"] .dashboard-trade-shell,
    html[data-theme="light"] .purchase-workbench-grid,
    html[data-theme="light"] .import-layout {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .purchase-confirm {
        position: static;
    }

    html[data-theme="light"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    html[data-theme="light"] {
        font-size: 14.5px;
    }

    html[data-theme="light"] .page-content {
        padding: 16px;
    }

    html[data-theme="light"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"] .dashboard-status-card {
        border-right: 0;
        border-bottom: 1px solid #dbe6ee;
    }

    html[data-theme="light"] .dashboard-status-card:nth-child(odd) {
        border-right: 1px solid #dbe6ee;
    }

    html[data-theme="light"] .merchant-panel,
    html[data-theme="light"] .market-list-panel {
        padding: 0;
    }
}

@media (max-width: 480px) {
    html[data-theme="light"] .dashboard-status-strip {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .dashboard-status-card:nth-child(odd) {
        border-right: 0;
    }
}

html[data-theme="light"] .sidebar .nav-item:not(.active) {
    background: transparent !important;
    border-color: transparent !important;
    color: #475569 !important;
}

html[data-theme="light"] .sidebar .nav-item:not(.active):hover {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .sidebar .nav-item.active {
    background: #e9f8f7 !important;
    border-color: rgba(0, 143, 131, 0.2) !important;
    color: #006d64 !important;
    font-weight: 900;
}

html[data-theme="light"] .sidebar .nav-item.active .nav-count,
html[data-theme="light"] .sidebar .nav-item.active .nav-badge {
    background: #ffffff;
    border-color: rgba(0, 143, 131, 0.24);
    color: #006d64;
}

html[data-theme="light"][data-active-page] .sidebar .nav-item {
    background: transparent !important;
    border-color: transparent !important;
    color: #475569 !important;
}

html[data-theme="light"][data-active-page="dashboard"] .sidebar .nav-item[data-page="dashboard"],
html[data-theme="light"][data-active-page="market"] .sidebar .nav-item[data-page="market"],
html[data-theme="light"][data-active-page="orders"] .sidebar .nav-item[data-page="orders"],
html[data-theme="light"][data-active-page="import"] .sidebar .nav-item[data-page="import"],
html[data-theme="light"][data-active-page="wallet"] .sidebar .nav-item[data-page="wallet"],
html[data-theme="light"][data-active-page="quality"] .sidebar .nav-item[data-page="quality"],
html[data-theme="light"][data-active-page="auto-refill"] .sidebar .nav-item[data-page="auto-refill"],
html[data-theme="light"][data-active-page="warranty"] .sidebar .nav-item[data-page="warranty"],
html[data-theme="light"][data-active-page="settings"] .sidebar .nav-item[data-page="settings"] {
    background: #e9f8f7 !important;
    border-color: rgba(0, 143, 131, 0.2) !important;
    color: #006d64 !important;
    font-weight: 900;
}

/* ==================== XIAOZI NEXUS DESK REFINEMENT - 20260704-32 ==================== */
html[data-theme="light"] .page-content {
    max-width: 1540px;
    padding: 22px 28px 34px;
}

html[data-theme="light"] .dashboard-trade-shell {
    align-items: stretch;
    grid-template-columns: minmax(390px, 0.82fr) minmax(560px, 1.18fr);
    gap: 16px;
}

html[data-theme="light"] .dashboard-notice,
html[data-theme="light"] .xiaozi-ai-panel,
html[data-theme="light"] .dashboard-price-board,
html[data-theme="light"] .merchant-panel {
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.052);
}

html[data-theme="light"] .dashboard-notice {
    border-left: 4px solid #f59e0b;
    background:
        linear-gradient(90deg, rgba(245, 158, 11, 0.09), rgba(255,255,255,0.94) 46%),
        #ffffff;
}

html[data-theme="light"] .xiaozi-ai-panel {
    border-left: 4px solid #7c3aed;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.105), rgba(0, 143, 131, 0.055) 58%, #ffffff),
        #ffffff;
}

html[data-theme="light"] .dashboard-price-board {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .dashboard-price-board-head {
    min-height: 74px;
    padding: 16px 18px;
    border-bottom: 1px solid #dbe6ee;
    background:
        linear-gradient(90deg, rgba(0, 143, 131, 0.085), rgba(124, 58, 237, 0.045)),
        #ffffff;
}

html[data-theme="light"] .dashboard-price-board-head h3 {
    font-size: 1.22rem;
}

html[data-theme="light"] .dashboard-price-board-head small {
    border: 1px solid rgba(0, 143, 131, 0.16);
    border-radius: 999px;
    background: #ffffff;
    color: #0f766e;
    padding: 6px 10px;
}

html[data-theme="light"] .dashboard-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

html[data-theme="light"] .dashboard-status-card {
    min-height: 154px;
    padding: 16px;
    border: 0;
    border-right: 1px solid #dbe6ee;
    border-radius: 0;
    background: #ffffff;
    color: #0f172a;
}

html[data-theme="light"] .dashboard-status-card:last-child {
    border-right: 0;
}

html[data-theme="light"] .dashboard-status-card:hover {
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(0, 143, 131, 0.16);
}

html[data-theme="light"] .dashboard-status-card.is-selected,
html[data-theme="light"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"] .dashboard-status-card.is-warn.is-selected {
    background:
        linear-gradient(135deg, rgba(0, 143, 131, 0.94), rgba(15, 118, 110, 0.98)),
        #0f766e;
    color: #ffffff;
}

html[data-theme="light"] .dashboard-status-card.is-selected .tier-token,
html[data-theme="light"] .dashboard-status-card.is-selected .dashboard-status-meta strong,
html[data-theme="light"] .dashboard-status-card.is-selected .dashboard-status-bottom strong,
html[data-theme="light"] .dashboard-status-card.is-selected .stock-line {
    color: #ffffff;
}

html[data-theme="light"] .dashboard-status-card.is-selected .tier-state,
html[data-theme="light"] .dashboard-status-card.is-selected .dashboard-status-bottom span {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.92);
}

html[data-theme="light"] .tier-token {
    border-radius: 6px;
    background: #eefafa;
    color: #006d64;
    font-weight: 900;
}

html[data-theme="light"] .dashboard-status-meta {
    gap: 6px;
}

html[data-theme="light"] .dashboard-status-meta strong {
    font-size: 1.34rem;
}

html[data-theme="light"] .dashboard-stock-meter {
    height: 6px;
    background: #e2e8f0;
}

html[data-theme="light"] .dashboard-stock-meter i {
    background: linear-gradient(90deg, #0f766e, #7c3aed);
}

html[data-theme="light"] .merchant-panel {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .merchant-panel-header {
    align-items: center;
    min-height: 78px;
    padding: 16px 18px;
    border-bottom: 1px solid #dbe6ee;
    background: #ffffff;
}

html[data-theme="light"] .merchant-summary-row {
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid #e5edf3;
    background: #f8fafc;
}

html[data-theme="light"] .merchant-summary-chip {
    min-height: 30px;
    border-radius: 999px;
    border: 1px solid #dbe6ee;
    background: #ffffff;
    color: #475569;
}

html[data-theme="light"] .merchant-summary-chip.is-active {
    border-color: rgba(0, 143, 131, 0.26);
    background: #e9f8f7;
    color: #006d64;
}

html[data-theme="light"] .merchant-table-wrap {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

html[data-theme="light"] .merchant-table {
    min-width: 1040px;
    border-collapse: separate;
    border-spacing: 0;
}

html[data-theme="light"] .merchant-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 42px;
    background: #f1f5f9;
    border-bottom: 1px solid #dbe6ee;
    color: #64748b;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

html[data-theme="light"] .merchant-table td {
    height: 68px;
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
}

html[data-theme="light"] .merchant-table tr:hover td {
    background: #f8fbfb;
}

html[data-theme="light"] .rank-pill,
html[data-theme="light"] .recommend-pill,
html[data-theme="light"] .risk-pill {
    border-radius: 999px;
}

html[data-theme="light"] .merchant-avatar {
    border-radius: 7px;
    background: #eefafa;
    color: #006d64;
}

html[data-theme="light"] .merchant-product strong {
    color: #0f172a;
}

html[data-theme="light"] .merchant-subtext,
html[data-theme="light"] .merchant-product span,
html[data-theme="light"] .merchant-name span {
    color: #64748b;
}

html[data-theme="light"] .btn:disabled,
html[data-theme="light"] button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

html[data-theme="light"] .purchase-workbench-header {
    min-height: 112px;
    border-left: 4px solid #0f766e;
    background:
        linear-gradient(104deg, rgba(0, 143, 131, 0.09), rgba(124, 58, 237, 0.04) 58%, #ffffff),
        #ffffff;
}

html[data-theme="light"] .market-product-row {
    grid-template-columns: 120px minmax(260px, 1fr) minmax(170px, 0.45fr) 170px;
    min-height: 92px;
    border-radius: 8px;
}

html[data-theme="light"] .market-product-row.is-selected {
    border-color: rgba(0, 143, 131, 0.42);
    box-shadow: 0 16px 34px rgba(0, 143, 131, 0.12);
}

@media (max-width: 1280px) {
    html[data-theme="light"] .dashboard-trade-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    html[data-theme="light"] .page-content {
        padding: 16px;
    }

    html[data-theme="light"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"] .dashboard-status-card:nth-child(2n) {
        border-right: 0;
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: 1fr;
    }
}

/* === Settings webhook AI diagnostic: 20260705-11 === */
.settings-webhook-diagnostic {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-elevated);
}

.settings-webhook-diagnostic-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
}

.settings-webhook-ai-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
}

.settings-webhook-diagnostic strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1.35;
}

.settings-webhook-diagnostic p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.settings-webhook-diagnostic small {
    display: block;
    margin-top: 5px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.settings-webhook-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.settings-webhook-metrics div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.settings-webhook-metrics span,
.settings-webhook-checks em {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 850;
}

.settings-webhook-metrics strong {
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-webhook-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.settings-webhook-checks span {
    display: grid;
    gap: 2px;
    min-width: 118px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 850;
}

.settings-webhook-diagnostic.is-ready,
.settings-webhook-checks .is-ready {
    border-color: rgba(49, 208, 170, 0.28);
}

.settings-webhook-diagnostic.is-review,
.settings-webhook-checks .is-review {
    border-color: rgba(139, 108, 255, 0.3);
}

.settings-webhook-diagnostic.is-warn,
.settings-webhook-checks .is-warn {
    border-color: rgba(242, 184, 75, 0.34);
}

.settings-webhook-diagnostic.is-invalid,
.settings-webhook-checks .is-invalid {
    border-color: rgba(255, 100, 124, 0.34);
}

html[data-theme="light"] .settings-webhook-diagnostic,
html[data-theme="light"] .settings-webhook-metrics div,
html[data-theme="light"] .settings-webhook-checks span {
    border-color: #dbe8eb;
    background: #f8fafc;
}

html[data-theme="light"] .settings-webhook-diagnostic.is-ready,
html[data-theme="light"] .settings-webhook-checks .is-ready {
    border-color: rgba(20, 184, 166, 0.32);
    background: rgba(240, 253, 250, 0.9);
}

html[data-theme="light"] .settings-webhook-diagnostic.is-review,
html[data-theme="light"] .settings-webhook-checks .is-review {
    border-color: rgba(124, 58, 237, 0.28);
    background: rgba(245, 243, 255, 0.9);
}

html[data-theme="light"] .settings-webhook-diagnostic.is-warn,
html[data-theme="light"] .settings-webhook-checks .is-warn {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(255, 247, 237, 0.9);
}

html[data-theme="light"] .settings-webhook-diagnostic.is-invalid,
html[data-theme="light"] .settings-webhook-checks .is-invalid {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(254, 242, 242, 0.92);
}

html[data-theme="light"] .settings-webhook-ai-icon {
    background: linear-gradient(135deg, #7c3aed, #14b8a6);
}

html[data-theme="light"] .settings-webhook-diagnostic strong,
html[data-theme="light"] .settings-webhook-metrics strong {
    color: #0f172a;
}

html[data-theme="light"] .settings-webhook-diagnostic p,
html[data-theme="light"] .settings-webhook-checks span {
    color: #475569;
}

@media (max-width: 900px) {
    .settings-webhook-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .settings-webhook-diagnostic-head,
    .settings-webhook-metrics {
        grid-template-columns: 1fr;
    }

    .settings-webhook-checks span {
        flex: 1 1 100%;
    }
}

/* ===== Authenticated user page boundary ===== */
.page.is-auth-locked > :not(.guest-page-gate) {
    display: none !important;
}

.guest-page-gate {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
    min-height: min(640px, calc(100vh - 128px));
    padding: clamp(32px, 6vw, 76px);
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.18);
    background:
        radial-gradient(circle at 14% 24%, rgba(168, 85, 247, 0.13), transparent 31%),
        radial-gradient(circle at 84% 74%, rgba(20, 184, 166, 0.11), transparent 32%),
        var(--bg-secondary);
}

.guest-page-gate::before {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.055) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(90deg, #000, transparent 88%);
    pointer-events: none;
    content: '';
}

.guest-page-gate-visual,
.guest-page-gate-copy {
    position: relative;
    z-index: 1;
}

.guest-page-gate-visual {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    max-width: 310px;
    margin: 0 auto;
    border: 1px solid rgba(139, 92, 246, 0.17);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.14), rgba(255, 255, 255, 0.02) 58%, transparent 59%);
}

.guest-page-gate-visual::before,
.guest-page-gate-visual::after {
    position: absolute;
    border: 1px solid rgba(139, 92, 246, 0.13);
    border-radius: 50%;
    content: '';
}

.guest-page-gate-visual::before {
    inset: 14%;
}

.guest-page-gate-visual::after {
    inset: 29%;
}

.guest-page-gate-visual img {
    position: relative;
    z-index: 2;
    width: 108px;
    height: 108px;
    padding: 8px;
    border: 1px solid rgba(139, 92, 246, 0.24);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 24px 54px rgba(109, 69, 196, 0.24);
}

.guest-page-gate-orbit {
    position: absolute;
    z-index: 3;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d45cae;
    box-shadow: 0 0 0 8px rgba(212, 92, 174, 0.09);
}

.guest-page-gate-orbit.orbit-a {
    top: 17%;
    right: 18%;
}

.guest-page-gate-orbit.orbit-b {
    bottom: 19%;
    left: 12%;
    width: 9px;
    height: 9px;
    background: #168d91;
    box-shadow: 0 0 0 7px rgba(22, 141, 145, 0.09);
}

.guest-page-gate-copy {
    max-width: 560px;
}

.guest-page-gate-copy h2 {
    margin: 12px 0 16px;
    font-size: clamp(2rem, 4.2vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.guest-page-gate-copy > p {
    max-width: 520px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.85;
}

.guest-page-gate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.guest-page-gate-actions .btn {
    min-height: 46px;
    padding-inline: 20px;
}

.guest-page-gate-copy small {
    display: block;
    margin-top: 20px;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    line-height: 1.65;
}

html[data-theme="dark"] .guest-page-gate {
    background:
        radial-gradient(circle at 14% 24%, rgba(168, 85, 247, 0.17), transparent 31%),
        radial-gradient(circle at 84% 74%, rgba(20, 184, 166, 0.12), transparent 32%),
        #151020;
}

html[data-theme="dark"] .guest-page-gate-visual img {
    background: rgba(33, 24, 52, 0.9);
}

@media (max-width: 820px) {
    .guest-page-gate {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 92px);
        padding: 34px 22px;
        text-align: center;
    }

    .guest-page-gate-visual {
        width: min(58vw, 230px);
    }

    .guest-page-gate-visual img {
        width: 84px;
        height: 84px;
        border-radius: 26px;
    }

    .guest-page-gate-copy {
        margin: 0 auto;
    }

    .guest-page-gate-copy > p {
        margin-inline: auto;
    }

    .guest-page-gate-actions {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .guest-page-gate {
        min-height: calc(100vh - 78px);
        gap: 20px;
        padding: 26px 18px;
        border-radius: 18px;
    }

    .guest-page-gate-copy h2 {
        font-size: 2rem;
    }

    .guest-page-gate-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .guest-page-gate-actions .btn {
        width: 100%;
    }
}

/* === Dashboard tier-linked trading desk: 20260705-59 === */
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board {
    border-color: #b9cbd2;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head {
    align-items: center;
    background:
        linear-gradient(180deg, #ffffff, #f1f7f8);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head small {
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 6px;
    background: #e9fbf7;
    color: #0f766e;
    font-weight: 900;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
    border-top: 1px solid #d6e3e7;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    position: relative;
    min-height: 140px;
    padding: 12px 12px 11px;
    outline: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    opacity: 0;
    background: linear-gradient(90deg, #7c3aed, #0f766e);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:hover::before,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected::before {
    opacity: 1;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-warn.is-selected {
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.12), rgba(15, 118, 110, 0.055) 54%, #ffffff);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.18);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected::after {
    content: "商家推荐已筛选";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    margin-top: 8px;
    padding: 3px 8px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 6px;
    background: #f3efff;
    color: #5b21b6;
    font-size: 0.72rem;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-top,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom {
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-token {
    min-width: 54px;
    justify-content: center;
    color: #0f172a;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-state {
    white-space: nowrap;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board .dashboard-status-meta strong {
    font-size: 1.08rem;
    line-height: 1.2;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta .stock-line {
    min-height: 34px;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    margin-top: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel.is-tier-flash {
    border-color: rgba(124, 58, 237, 0.42);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12), 0 14px 30px rgba(15, 23, 42, 0.08);
    animation: dashboardTierFlash 0.9s ease;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel.is-empty-tier .merchant-summary-chip.is-active {
    border-color: rgba(183, 121, 31, 0.25);
    background: #fff8e7;
    color: #92400e;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header .section-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header .section-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 6px;
    background: #f3efff;
    color: #5b21b6;
    font-size: 0.78rem;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header p {
    max-width: 760px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table td {
    vertical-align: middle;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table tbody tr:first-child td {
    border-top: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table tbody tr:hover td {
    background: #f8fbfc;
}

@keyframes dashboardTierFlash {
    0% {
        background: rgba(124, 58, 237, 0.08);
    }
    100% {
        background: rgba(255, 255, 255, 0.95);
    }
}

@media (max-width: 760px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        min-height: 126px;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head small {
        width: 100%;
    }
}

/* === Wallet AI risk control: 20260705-12 === */
.wallet-risk-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-left: 4px solid var(--accent-primary);
}

.wallet-risk-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
}

.wallet-risk-ai {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
}

.wallet-risk-head h3 {
    margin: 2px 0 4px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.32;
}

.wallet-risk-head p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.wallet-risk-lanes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.wallet-risk-lane {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.wallet-risk-lane span,
.wallet-risk-lane small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 850;
}

.wallet-risk-lane strong {
    display: block;
    margin: 3px 0 2px;
    overflow: hidden;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.98rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-risk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wallet-risk-panel.is-ready,
.wallet-risk-lane.is-ready {
    border-color: rgba(49, 208, 170, 0.3);
}

.wallet-risk-panel.is-review,
.wallet-risk-lane.is-review {
    border-color: rgba(139, 108, 255, 0.32);
}

.wallet-risk-panel.is-warn,
.wallet-risk-lane.is-warn {
    border-color: rgba(242, 184, 75, 0.36);
}

html[data-theme="light"] .wallet-risk-panel {
    border-left-color: #7c3aed;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.09), rgba(20, 184, 166, 0.055) 58%, rgba(255, 255, 255, 0.94)),
        #ffffff;
}

html[data-theme="light"] .wallet-risk-ai {
    background: linear-gradient(135deg, #7c3aed, #14b8a6);
}

html[data-theme="light"] .wallet-risk-head h3,
html[data-theme="light"] .wallet-risk-lane strong {
    color: #0f172a;
}

html[data-theme="light"] .wallet-risk-head p,
html[data-theme="light"] .wallet-risk-lane span,
html[data-theme="light"] .wallet-risk-lane small {
    color: #64748b;
}

html[data-theme="light"] .wallet-risk-lane {
    border-color: #dbe8eb;
    background: #f8fafc;
}

html[data-theme="light"] .wallet-risk-panel.is-ready,
html[data-theme="light"] .wallet-risk-lane.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
    background: rgba(240, 253, 250, 0.9);
}

html[data-theme="light"] .wallet-risk-panel.is-review,
html[data-theme="light"] .wallet-risk-lane.is-review {
    border-color: rgba(124, 58, 237, 0.28);
    background: rgba(245, 243, 255, 0.9);
}

html[data-theme="light"] .wallet-risk-panel.is-warn,
html[data-theme="light"] .wallet-risk-lane.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(255, 247, 237, 0.9);
}

@media (max-width: 1000px) {
    .wallet-risk-lanes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .wallet-risk-head,
    .wallet-risk-lanes {
        grid-template-columns: 1fr;
    }
}

/* === Quality AI workflow: 20260705-13 === */
.quality-flow-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
    padding: 13px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-elevated);
}

.quality-flow-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
}

.quality-flow-ai {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
}

.quality-flow-head strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.34;
}

.quality-flow-head p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.quality-flow-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.quality-flow-step {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.quality-flow-step span,
.quality-flow-step small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 850;
}

.quality-flow-step strong {
    display: block;
    margin: 3px 0 2px;
    overflow: hidden;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quality-flow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quality-flow-panel.is-ready,
.quality-flow-step.is-ready {
    border-color: rgba(49, 208, 170, 0.3);
}

.quality-flow-panel.is-review,
.quality-flow-step.is-review {
    border-color: rgba(139, 108, 255, 0.32);
}

.quality-flow-panel.is-warn,
.quality-flow-step.is-warn {
    border-color: rgba(242, 184, 75, 0.36);
}

html[data-theme="light"] .quality-flow-panel {
    border-color: #dbe8eb;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.08), rgba(20, 184, 166, 0.045) 58%, rgba(255, 255, 255, 0.94)),
        #ffffff;
}

html[data-theme="light"] .quality-flow-ai {
    background: linear-gradient(135deg, #7c3aed, #14b8a6);
}

html[data-theme="light"] .quality-flow-head strong,
html[data-theme="light"] .quality-flow-step strong {
    color: #0f172a;
}

html[data-theme="light"] .quality-flow-head p,
html[data-theme="light"] .quality-flow-step span,
html[data-theme="light"] .quality-flow-step small {
    color: #64748b;
}

html[data-theme="light"] .quality-flow-step {
    border-color: #dbe8eb;
    background: #f8fafc;
}

html[data-theme="light"] .quality-flow-panel.is-ready,
html[data-theme="light"] .quality-flow-step.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
    background: rgba(240, 253, 250, 0.9);
}

html[data-theme="light"] .quality-flow-panel.is-review,
html[data-theme="light"] .quality-flow-step.is-review {
    border-color: rgba(124, 58, 237, 0.28);
    background: rgba(245, 243, 255, 0.9);
}

html[data-theme="light"] .quality-flow-panel.is-warn,
html[data-theme="light"] .quality-flow-step.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(255, 247, 237, 0.9);
}

@media (max-width: 1000px) {
    .quality-flow-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .quality-flow-head,
    .quality-flow-steps {
        grid-template-columns: 1fr;
    }
}

/* === Refill AI dispatch: 20260705-15 === */
.refill-dispatch-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-left: 4px solid var(--accent-primary);
}

.refill-dispatch-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
}

.refill-dispatch-ai {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
}

.refill-dispatch-head h3 {
    margin: 2px 0 4px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.32;
}

.refill-dispatch-head p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.refill-dispatch-head small {
    display: block;
    margin-top: 5px;
    color: var(--text-tertiary);
    font-size: 0.76rem;
}

.refill-dispatch-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.refill-dispatch-metric {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.refill-dispatch-metric span,
.refill-dispatch-metric small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 850;
}

.refill-dispatch-metric strong {
    display: block;
    margin: 3px 0 2px;
    overflow: hidden;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.refill-dispatch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.refill-dispatch-panel.is-ready,
.refill-dispatch-metric.is-ready {
    border-color: rgba(49, 208, 170, 0.3);
}

.refill-dispatch-panel.is-review,
.refill-dispatch-metric.is-review {
    border-color: rgba(139, 108, 255, 0.32);
}

.refill-dispatch-panel.is-warn,
.refill-dispatch-metric.is-warn {
    border-color: rgba(242, 184, 75, 0.36);
}

html[data-theme="light"] .refill-dispatch-panel {
    border-left-color: #7c3aed;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.09), rgba(20, 184, 166, 0.055) 58%, rgba(255, 255, 255, 0.94)),
        #ffffff;
}

html[data-theme="light"] .refill-dispatch-ai {
    background: linear-gradient(135deg, #7c3aed, #14b8a6);
}

html[data-theme="light"] .refill-dispatch-head h3,
html[data-theme="light"] .refill-dispatch-metric strong {
    color: #0f172a;
}

html[data-theme="light"] .refill-dispatch-head p,
html[data-theme="light"] .refill-dispatch-head small,
html[data-theme="light"] .refill-dispatch-metric span,
html[data-theme="light"] .refill-dispatch-metric small {
    color: #64748b;
}

html[data-theme="light"] .refill-dispatch-metric {
    border-color: #dbe8eb;
    background: #f8fafc;
}

html[data-theme="light"] .refill-dispatch-panel.is-ready,
html[data-theme="light"] .refill-dispatch-metric.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
    background: rgba(240, 253, 250, 0.9);
}

html[data-theme="light"] .refill-dispatch-panel.is-review,
html[data-theme="light"] .refill-dispatch-metric.is-review {
    border-color: rgba(124, 58, 237, 0.28);
    background: rgba(245, 243, 255, 0.9);
}

html[data-theme="light"] .refill-dispatch-panel.is-warn,
html[data-theme="light"] .refill-dispatch-metric.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(255, 247, 237, 0.9);
}

@media (max-width: 1000px) {
    .refill-dispatch-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .refill-dispatch-head,
    .refill-dispatch-metrics {
        grid-template-columns: 1fr;
    }
}

/* === Refill task manifest: 20260705-27 === */
.refill-task-board {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.refill-task-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.refill-task-board-head strong {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 900;
}

.refill-task-board-head span {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 850;
}

.refill-task-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.refill-task-card {
    min-width: 0;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.refill-task-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.refill-task-priority {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 7px;
    background: rgba(242, 184, 75, 0.14);
    color: var(--warning);
    font-size: 0.66rem;
    font-weight: 900;
}

.refill-task-top strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.refill-task-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.refill-task-main b {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.refill-task-main span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.refill-task-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

.refill-task-stats span {
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 6px 5px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-tertiary);
}

.refill-task-stats em {
    overflow: hidden;
    color: var(--text-tertiary);
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.refill-task-stats b {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 900;
}

html[data-theme="light"] .refill-task-board {
    border-color: #dbe8eb;
    background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .refill-task-card,
html[data-theme="light"] .refill-task-stats span {
    border-color: #dbe8eb;
    background: #ffffff;
}

html[data-theme="light"] .refill-task-board-head strong,
html[data-theme="light"] .refill-task-top strong,
html[data-theme="light"] .refill-task-main b,
html[data-theme="light"] .refill-task-stats b {
    color: #0f172a;
}

html[data-theme="light"] .refill-task-board-head span,
html[data-theme="light"] .refill-task-main span,
html[data-theme="light"] .refill-task-stats em {
    color: #64748b;
}

html[data-theme="light"] .refill-task-priority {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

@media (max-width: 1180px) {
    .refill-task-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .refill-task-board-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .refill-task-list,
    .refill-task-stats {
        grid-template-columns: 1fr;
    }
}

/* === Dashboard AI mission board: 20260705-16 === */
.dashboard-mission-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 16px;
    border-left: 4px solid var(--accent-primary);
}

.dashboard-mission-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: flex-start;
}

.dashboard-mission-ai {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
}

.dashboard-mission-head h3 {
    margin: 2px 0 4px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.32;
}

.dashboard-mission-head p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.dashboard-mission-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-mission-card {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(58px, 1fr) auto;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.dashboard-mission-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dashboard-mission-card-head span {
    overflow: hidden;
    color: var(--text-primary);
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-mission-card-head strong {
    flex: 0 0 auto;
    min-width: 38px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-align: center;
}

.dashboard-mission-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.dashboard-mission-panel.is-danger,
.dashboard-mission-card.is-danger {
    border-color: rgba(255, 100, 124, 0.36);
}

.dashboard-mission-panel.is-warn,
.dashboard-mission-card.is-warn {
    border-color: rgba(242, 184, 75, 0.36);
}

.dashboard-mission-panel.is-review,
.dashboard-mission-card.is-info {
    border-color: rgba(72, 183, 255, 0.3);
}

.dashboard-mission-panel.is-ready,
.dashboard-mission-card.is-ok {
    border-color: rgba(49, 208, 170, 0.3);
}

html[data-theme="light"] .dashboard-mission-panel {
    border-left-color: #7c3aed;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.09), rgba(20, 184, 166, 0.055) 58%, rgba(255, 255, 255, 0.94)),
        #ffffff;
}

html[data-theme="light"] .dashboard-mission-ai {
    background: linear-gradient(135deg, #7c3aed, #14b8a6);
}

html[data-theme="light"] .dashboard-mission-head h3,
html[data-theme="light"] .dashboard-mission-card-head span {
    color: #0f172a;
}

html[data-theme="light"] .dashboard-mission-head p,
html[data-theme="light"] .dashboard-mission-card p {
    color: #64748b;
}

html[data-theme="light"] .dashboard-mission-card {
    border-color: #dbe8eb;
    background: #f8fafc;
}

html[data-theme="light"] .dashboard-mission-card-head strong {
    border: 1px solid #dbe8eb;
    background: #ffffff;
    color: #64748b;
}

html[data-theme="light"] .dashboard-mission-panel.is-danger,
html[data-theme="light"] .dashboard-mission-card.is-danger {
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(254, 242, 242, 0.94);
}

html[data-theme="light"] .dashboard-mission-panel.is-warn,
html[data-theme="light"] .dashboard-mission-card.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(255, 247, 237, 0.94);
}

html[data-theme="light"] .dashboard-mission-panel.is-review,
html[data-theme="light"] .dashboard-mission-card.is-info {
    border-color: rgba(14, 165, 233, 0.28);
    background: rgba(240, 249, 255, 0.94);
}

html[data-theme="light"] .dashboard-mission-panel.is-ready,
html[data-theme="light"] .dashboard-mission-card.is-ok {
    border-color: rgba(20, 184, 166, 0.32);
    background: rgba(240, 253, 250, 0.9);
}

@media (max-width: 1280px) {
    .dashboard-mission-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dashboard-mission-head,
    .dashboard-mission-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    html[data-theme="light"] .dashboard-status-strip {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .dashboard-status-card {
        border-right: 0;
        border-bottom: 1px solid #dbe6ee;
    }
}

/* ==================== XIAOZI NEXUSVAULT WORKSPACE SKIN - 20260704-38 ==================== */
html[data-theme="light"] {
    font-size: 15px;
    color-scheme: light;

    --bg-primary: #f6fbfa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f3f8f8;
    --bg-elevated: rgba(255, 255, 255, 0.9);
    --bg-hover: #f0fdfa;

    --text-primary: #030712;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;

    --border-color: #dbe8eb;
    --border-hover: #c9dddf;

    --accent-primary: #0d9488;
    --accent-secondary: #14b8a6;
    --accent-tertiary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #0d9488, #14b8a6);
    --accent-glow: rgba(20, 184, 166, 0.16);

    --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84));
    --glass-bg-hover: rgba(255, 255, 255, 0.98);
    --glass-border: #d6ebea;
    --glass-blur: blur(18px);
    --glass-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 34px rgba(15, 23, 42, 0.05);

    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;

    --radius-sm: 8px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 12px;
    --sidebar-width: 252px;
    --topbar-height: 62px;
}

html[data-theme="light"] body {
    background:
        radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.12), transparent 32%),
        linear-gradient(180deg, #f3faf8 0%, #f7fafc 52%, #f8fafc 100%);
    color: #0f172a;
}

html[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.9);
    border-right: 1px solid #d6ebea;
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.045);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

html[data-theme="light"] .sidebar-header {
    min-height: var(--topbar-height);
    padding: 12px 16px;
    border-bottom: 1px solid #dfecee;
}

html[data-theme="light"] .logo {
    gap: 12px;
}

html[data-theme="light"] .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid rgba(20, 184, 166, 0.24);
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.13);
}

html[data-theme="light"] .logo-text {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.15;
    background: none;
    -webkit-text-fill-color: currentColor;
}

html[data-theme="light"] .logo-subtitle {
    color: #64748b;
    font-size: 0.72rem;
}

html[data-theme="light"] .sidebar-nav {
    padding: 10px 0;
}

html[data-theme="light"] .nav-section-title {
    padding: 12px 18px 6px;
    color: #7c8798;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

html[data-theme="light"] .nav-item {
    min-height: 38px;
    margin: 0 10px 4px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    color: #475569;
    font-weight: 700;
}

html[data-theme="light"] .nav-item:hover {
    background: #f3faf8 !important;
    border-color: #d6ebea !important;
    color: #111827 !important;
}

html[data-theme="light"] .nav-item.active,
html[data-theme="light"][data-active-page="dashboard"] .sidebar .nav-item[data-page="dashboard"],
html[data-theme="light"][data-active-page="market"] .sidebar .nav-item[data-page="market"],
html[data-theme="light"][data-active-page="orders"] .sidebar .nav-item[data-page="orders"],
html[data-theme="light"][data-active-page="import"] .sidebar .nav-item[data-page="import"],
html[data-theme="light"][data-active-page="wallet"] .sidebar .nav-item[data-page="wallet"],
html[data-theme="light"][data-active-page="quality"] .sidebar .nav-item[data-page="quality"],
html[data-theme="light"][data-active-page="auto-refill"] .sidebar .nav-item[data-page="auto-refill"],
html[data-theme="light"][data-active-page="warranty"] .sidebar .nav-item[data-page="warranty"],
html[data-theme="light"][data-active-page="settings"] .sidebar .nav-item[data-page="settings"] {
    background: #e6fbf8 !important;
    border-color: #99f6e4 !important;
    color: #0f766e !important;
    box-shadow: inset 3px 0 0 #0d9488;
}

html[data-theme="light"] .nav-icon {
    width: 18px;
    height: 18px;
}

html[data-theme="light"] .nav-badge,
html[data-theme="light"] .nav-count,
html[data-theme="light"] .nav-badge-dot {
    background: #ffffff;
    border: 1px solid #ccfbf1;
    color: #0f766e;
}

html[data-theme="light"] .sidebar-footer {
    padding: 12px;
    border-top: 1px solid #dfecee;
}

html[data-theme="light"] .user-card {
    min-height: 58px;
    padding: 9px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #dbe8eb;
}

html[data-theme="light"] .user-avatar {
    background: #ccfbf1;
    color: #0f766e;
    font-weight: 900;
}

html[data-theme="light"] .main-content {
    background: transparent;
}

html[data-theme="light"] .topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid #d6ebea;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

html[data-theme="light"] .breadcrumb-current {
    color: #030712;
    font-size: 1.02rem;
    font-weight: 900;
}

html[data-theme="light"] .topbar-ai-status,
html[data-theme="light"] .topbar-balance {
    height: 38px;
    border-radius: 8px;
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
    box-shadow: none;
}

html[data-theme="light"] .topbar-balance strong {
    color: #0f766e;
    font-family: var(--font-mono);
    font-weight: 900;
}

html[data-theme="light"] .topbar-btn,
html[data-theme="light"] .btn-glass,
html[data-theme="light"] .btn-ghost {
    border: 1px solid #dbe8eb;
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .topbar-btn:hover,
html[data-theme="light"] .btn-glass:hover,
html[data-theme="light"] .btn-ghost:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
}

html[data-theme="light"] .search-box,
html[data-theme="light"] .toolbar-search,
html[data-theme="light"] .form-input,
html[data-theme="light"] .form-select,
html[data-theme="light"] .form-textarea,
html[data-theme="light"] .sort-select,
html[data-theme="light"] .import-paste-area {
    border: 1px solid #dbe8eb;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

html[data-theme="light"] .search-box:focus-within,
html[data-theme="light"] .toolbar-search:focus-within,
html[data-theme="light"] .form-input:focus,
html[data-theme="light"] .form-select:focus,
html[data-theme="light"] .form-textarea:focus,
html[data-theme="light"] .sort-select:focus,
html[data-theme="light"] .import-paste-area:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

html[data-theme="light"] .page-content {
    width: 100%;
    max-width: 1536px;
    padding: 18px 22px 28px;
}

html[data-theme="light"] .page {
    gap: 14px;
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .action-card,
html[data-theme="light"] .account-card,
html[data-theme="light"] .modal,
html[data-theme="light"] .purchase-workbench-header,
html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-history-panel,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .upload-zone,
html[data-theme="light"] .import-options,
html[data-theme="light"] .import-ai-card,
html[data-theme="light"] .import-history,
html[data-theme="light"] .wallet-overview,
html[data-theme="light"] .wallet-radar-panel,
html[data-theme="light"] .wallet-transactions,
html[data-theme="light"] .quality-overview,
html[data-theme="light"] .quality-actions,
html[data-theme="light"] .refill-config-card,
html[data-theme="light"] .refill-logs-card,
html[data-theme="light"] .settings-nav,
html[data-theme="light"] .settings-main,
html[data-theme="light"] .settings-data-panel,
html[data-theme="light"] .settings-api-card,
html[data-theme="light"] .settings-log-panel,
html[data-theme="light"] .global-search-panel,
html[data-theme="light"] .notification-panel,
html[data-theme="light"] .xiaozi-assistant-panel {
    background: var(--glass-bg);
    border: 1px solid #d6ebea;
    border-radius: 10px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

html[data-theme="light"] .glass-card:hover,
html[data-theme="light"] .account-card:hover,
html[data-theme="light"] .market-product-row:hover {
    border-color: #bde8e3;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 18px 44px rgba(15, 23, 42, 0.075);
}

html[data-theme="light"] .section-title,
html[data-theme="light"] .dashboard-price-board-head h3,
html[data-theme="light"] .market-list-header h4,
html[data-theme="light"] .workbench-card-header h4,
html[data-theme="light"] .order-delivery-radar-head h4,
html[data-theme="light"] .import-radar-head h4 {
    color: #030712;
    font-weight: 900;
}

html[data-theme="light"] .panel-kicker {
    color: #0d9488;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

html[data-theme="light"] .redeem-desc,
html[data-theme="light"] .merchant-panel-header p,
html[data-theme="light"] .market-list-header p,
html[data-theme="light"] .workbench-card-header p,
html[data-theme="light"] .notice-body p,
html[data-theme="light"] .xiaozi-ai-copy p,
html[data-theme="light"] .market-ai-head p,
html[data-theme="light"] .import-ai-head p {
    color: #64748b;
}

html[data-theme="light"] .dashboard-trade-shell {
    grid-template-columns: minmax(380px, 0.82fr) minmax(560px, 1.18fr);
    gap: 14px;
    margin-bottom: 14px;
}

html[data-theme="light"] .dashboard-brief-stack {
    gap: 14px;
}

html[data-theme="light"] .dashboard-notice,
html[data-theme="light"] .xiaozi-ai-panel {
    min-height: 136px;
    padding: 16px;
}

html[data-theme="light"] .dashboard-notice {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(110deg, rgba(245, 158, 11, 0.11), rgba(255, 255, 255, 0.86) 48%);
}

html[data-theme="light"] .notice-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff7ed;
    color: #d97706;
}

html[data-theme="light"] .xiaozi-ai-panel,
html[data-theme="light"] .market-ai-advisor,
html[data-theme="light"] .import-ai-card {
    border-left: 4px solid #7c3aed;
    background: linear-gradient(112deg, rgba(124, 58, 237, 0.10), rgba(20, 184, 166, 0.06) 58%, rgba(255, 255, 255, 0.9));
}

html[data-theme="light"] .xiaozi-ai-avatar,
html[data-theme="light"] .market-ai-avatar,
html[data-theme="light"] .import-ai-head img {
    background: #ffffff;
    border: 1px solid #ccfbf1;
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.12);
}

html[data-theme="light"] .xiaozi-ai-metrics,
html[data-theme="light"] .market-ai-metrics,
html[data-theme="light"] .order-delivery-radar-grid,
html[data-theme="light"] .import-radar-grid,
html[data-theme="light"] .wallet-radar-grid {
    gap: 8px;
}

html[data-theme="light"] .xiaozi-ai-metric,
html[data-theme="light"] .market-ai-metric,
html[data-theme="light"] .order-delivery-metric,
html[data-theme="light"] .import-radar-metric,
html[data-theme="light"] .wallet-radar-item,
html[data-theme="light"] .settings-api-metric,
html[data-theme="light"] .confirm-metrics div,
html[data-theme="light"] .settings-kv-grid div {
    background: #f8fafc;
    border: 1px solid #e1ecee;
    border-radius: 8px;
    box-shadow: none;
}

html[data-theme="light"] .xiaozi-ai-metric strong,
html[data-theme="light"] .market-ai-metric strong,
html[data-theme="light"] .order-delivery-metric strong,
html[data-theme="light"] .import-radar-metric strong,
html[data-theme="light"] .wallet-radar-item strong,
html[data-theme="light"] .settings-api-metric strong,
html[data-theme="light"] .confirm-metrics strong {
    color: #030712;
    font-family: var(--font-mono);
    font-weight: 900;
}

html[data-theme="light"] .dashboard-price-board,
html[data-theme="light"] .merchant-panel,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-history-panel,
html[data-theme="light"] .import-history {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .dashboard-price-board-head,
html[data-theme="light"] .merchant-panel-header,
html[data-theme="light"] .market-list-header,
html[data-theme="light"] .import-history > .section-title {
    min-height: 64px;
    padding: 14px 16px;
    margin: 0;
    border-bottom: 1px solid #dbe8eb;
    background: rgba(248, 250, 252, 0.92);
}

html[data-theme="light"] .dashboard-price-board-head {
    min-height: 70px;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.12), rgba(124, 58, 237, 0.055)), rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .dashboard-price-board-head small,
html[data-theme="light"] .stats-badge,
html[data-theme="light"] .delivery-target-pill,
html[data-theme="light"] .import-radar-state {
    min-height: 28px;
    border: 1px solid #ccfbf1;
    border-radius: 999px;
    background: #ffffff;
    color: #0f766e;
    font-weight: 800;
}

html[data-theme="light"] .dashboard-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

html[data-theme="light"] .dashboard-status-card {
    min-height: 148px;
    padding: 14px;
    border: 0;
    border-right: 1px solid #dbe8eb;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
}

html[data-theme="light"] .dashboard-status-card:last-child {
    border-right: 0;
}

html[data-theme="light"] .dashboard-status-card:hover {
    background: #f8fffd;
    box-shadow: inset 0 0 0 1px #99f6e4;
}

html[data-theme="light"] .dashboard-status-card.is-selected,
html[data-theme="light"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"] .dashboard-status-card.is-warn.is-selected {
    background: linear-gradient(135deg, #0d9488, #0f766e);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

html[data-theme="light"] .dashboard-status-card.is-selected .tier-token,
html[data-theme="light"] .dashboard-status-card.is-selected .dashboard-status-meta strong,
html[data-theme="light"] .dashboard-status-card.is-selected .dashboard-status-bottom strong,
html[data-theme="light"] .dashboard-status-card.is-selected .stock-line {
    color: #ffffff;
}

html[data-theme="light"] .dashboard-status-card.is-selected .tier-state,
html[data-theme="light"] .dashboard-status-card.is-selected .dashboard-status-bottom span {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .tier-token {
    border: 1px solid #ccfbf1;
    border-radius: 7px;
    background: #ecfdf5;
    color: #0f766e;
    font-weight: 900;
}

html[data-theme="light"] .dashboard-status-meta strong {
    color: #030712;
    font-size: 1.24rem;
}

html[data-theme="light"] .dashboard-stock-meter {
    height: 6px;
    background: #e2e8f0;
}

html[data-theme="light"] .dashboard-stock-meter i {
    background: linear-gradient(90deg, #14b8a6, #7c3aed);
}

html[data-theme="light"] .merchant-summary-row,
html[data-theme="light"] .purchase-history-filters,
html[data-theme="light"] .purchase-history-actions {
    padding: 10px 16px;
    border-bottom: 1px solid #e5eff1;
    background: rgba(248, 250, 252, 0.92);
}

html[data-theme="light"] .merchant-summary-chip,
html[data-theme="light"] .filter-tab,
html[data-theme="light"] .chip-filter,
html[data-theme="light"] .format-tag,
html[data-theme="light"] .status-badge,
html[data-theme="light"] .risk-pill,
html[data-theme="light"] .recommend-pill,
html[data-theme="light"] .decision-pill,
html[data-theme="light"] .type-pill,
html[data-theme="light"] .import-preview-pill,
html[data-theme="light"] .import-quota-status,
html[data-theme="light"] .quality-badge {
    min-height: 30px;
    border: 1px solid #dbe8eb;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    box-shadow: none;
}

html[data-theme="light"] .merchant-summary-chip.is-active,
html[data-theme="light"] .filter-tab.active,
html[data-theme="light"] .chip-filter.active {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .merchant-summary-chip .money,
html[data-theme="light"] .account-price,
html[data-theme="light"] .wallet-balance,
html[data-theme="light"] .quality-stat-value {
    color: #0f766e;
    font-family: var(--font-mono);
}

html[data-theme="light"] .merchant-table-wrap,
html[data-theme="light"] .purchase-history-table-wrap,
html[data-theme="light"] .orders-table-wrap,
html[data-theme="light"] .import-preview-table-wrap {
    border: 0;
    border-radius: 0;
    background: #ffffff;
}

html[data-theme="light"] .data-table,
html[data-theme="light"] .merchant-table,
html[data-theme="light"] .purchase-history-table,
html[data-theme="light"] .import-preview-table {
    border-collapse: separate;
    border-spacing: 0;
    color: #334155;
}

html[data-theme="light"] .data-table th,
html[data-theme="light"] .merchant-table th,
html[data-theme="light"] .purchase-history-table th,
html[data-theme="light"] .import-preview-table th {
    height: 42px;
    padding: 9px 12px;
    background: #f8fafc;
    color: #64748b;
    border-bottom: 1px solid #dbe8eb;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html[data-theme="light"] .data-table td,
html[data-theme="light"] .merchant-table td,
html[data-theme="light"] .purchase-history-table td,
html[data-theme="light"] .import-preview-table td {
    padding: 10px 12px;
    color: #475569;
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
}

html[data-theme="light"] .data-table tbody tr:nth-child(even) td,
html[data-theme="light"] .merchant-table tbody tr:nth-child(even) td,
html[data-theme="light"] .purchase-history-table tbody tr:nth-child(even) td {
    background: #fbfefd;
}

html[data-theme="light"] .data-table tbody tr:hover td,
html[data-theme="light"] .merchant-table tbody tr:hover td,
html[data-theme="light"] .purchase-history-table tbody tr:hover td {
    background: #f0fdfa;
}

html[data-theme="light"] .merchant-name strong,
html[data-theme="light"] .merchant-product strong,
html[data-theme="light"] .import-preview-account strong,
html[data-theme="light"] .order-detail-item strong {
    color: #030712;
}

html[data-theme="light"] .rank-pill,
html[data-theme="light"] .merchant-avatar {
    background: #ecfdf5;
    border: 1px solid #ccfbf1;
    color: #0f766e;
}

html[data-theme="light"] .recommend-pill,
html[data-theme="light"] .risk-low,
html[data-theme="light"] .import-preview-pill.ok,
html[data-theme="light"] .import-quota-status.ok {
    border-color: rgba(5, 150, 105, 0.24);
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .risk-mid,
html[data-theme="light"] .import-preview-pill.warn,
html[data-theme="light"] .import-quota-status.warn {
    border-color: rgba(217, 119, 6, 0.28);
    background: #fff7ed;
    color: #b45309;
}

html[data-theme="light"] .import-preview-pill.fail,
html[data-theme="light"] .import-quota-status.fail {
    border-color: rgba(220, 38, 38, 0.24);
    background: #fef2f2;
    color: #b91c1c;
}

html[data-theme="light"] .btn {
    min-height: 36px;
    border-radius: 8px;
    font-weight: 800;
}

html[data-theme="light"] .btn-primary {
    background: #0d9488;
    border: 1px solid #0f766e;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 22px rgba(13, 148, 136, 0.18);
}

html[data-theme="light"] .btn-primary:hover {
    background: #0f766e;
    border-color: #0f766e;
    box-shadow: 0 12px 26px rgba(13, 148, 136, 0.22);
}

html[data-theme="light"] .purchase-workbench-header {
    min-height: 92px;
    padding: 16px 18px;
    margin-bottom: 14px;
    border-left: 4px solid #0d9488;
    background: linear-gradient(104deg, rgba(20, 184, 166, 0.12), rgba(124, 58, 237, 0.055) 58%, rgba(255, 255, 255, 0.9));
}

html[data-theme="light"] .purchase-workbench-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.38fr);
    gap: 14px;
}

html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .upload-zone,
html[data-theme="light"] .import-options,
html[data-theme="light"] .settings-main {
    padding: 16px;
}

html[data-theme="light"] .purchase-confirm {
    position: sticky;
    top: calc(var(--topbar-height) + 16px);
}

html[data-theme="light"] .step-badge {
    background: #ecfdf5;
    border: 1px solid #99f6e4;
    color: #0f766e;
}

html[data-theme="light"] .purchase-quantity-block,
html[data-theme="light"] .confirm-selected-product,
html[data-theme="light"] .wallet-balance-note,
html[data-theme="light"] .wallet-modal-tip,
html[data-theme="light"] .purchase-hint,
html[data-theme="light"] .order-delivery-advice,
html[data-theme="light"] .import-radar-advice,
html[data-theme="light"] .settings-api-advice {
    background: #f8fafc;
    border: 1px solid #dbe8eb;
    border-radius: 8px;
    color: #475569;
}

html[data-theme="light"] .purchase-quantity-control,
html[data-theme="light"] .quick-quantity-row button,
html[data-theme="light"] .wallet-quick-amounts button,
html[data-theme="light"] .radio-option,
html[data-theme="light"] .checkbox-label {
    background: #ffffff;
    border: 1px solid #dbe8eb;
    color: #111827;
    border-radius: 8px;
}

html[data-theme="light"] .purchase-quantity-control button:hover,
html[data-theme="light"] .quick-quantity-row button:hover,
html[data-theme="light"] .wallet-quick-amounts button:hover,
html[data-theme="light"] .wallet-quick-amounts button.active {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .market-grid {
    padding: 12px;
    gap: 10px;
    background: #ffffff;
}

html[data-theme="light"] .market-product-row {
    min-height: 86px;
    grid-template-columns: 110px minmax(240px, 1fr) minmax(160px, 0.42fr) 160px;
    border-radius: 8px;
    border: 1px solid #dbe8eb;
    border-left: 3px solid transparent;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"] .market-product-row.is-selected {
    border-color: #99f6e4;
    border-left-color: #0d9488;
    background: #ecfdf5;
    box-shadow: 0 12px 28px rgba(13, 148, 136, 0.12);
}

html[data-theme="light"] .market-product-main p,
html[data-theme="light"] .market-product-row .account-sla {
    color: #64748b;
}

html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .wallet-radar-panel {
    padding: 16px;
    border-left: 4px solid #0d9488;
}

html[data-theme="light"] .upload-zone {
    border-left: 4px solid #0d9488;
    text-align: left;
}

html[data-theme="light"] .upload-icon-wrap {
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .import-options {
    border-left: 4px solid #7c3aed;
}

html[data-theme="light"] .wallet-overview {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 253, 245, 0.94));
}

html[data-theme="light"] .wallet-trend-area {
    background: #f8fafc;
    border-color: #dbe8eb;
}

html[data-theme="light"] .wallet-trend-line {
    background: linear-gradient(90deg, #0d9488, #14b8a6);
}

html[data-theme="light"] .wallet-ai-advice,
html[data-theme="light"] .quality-ai-note {
    background: #ecfdf5;
    border-color: #99f6e4;
    color: #0f766e;
}

html[data-theme="light"] .wallet-review-panel {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .wallet-review-head {
    padding: 16px 18px;
    border-bottom: 1px solid #dbe8eb;
    background: rgba(248, 250, 252, 0.92);
}

html[data-theme="light"] .wallet-review-count {
    border: 1px solid #ccfbf1;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .wallet-review-id code {
    color: #030712;
}

html[data-theme="light"] .quality-triage-panel {
    border-color: #dbe8eb;
    background: #ffffff;
}

html[data-theme="light"] .quality-triage-head {
    border-bottom-color: #dbe8eb;
    background: rgba(248, 250, 252, 0.92);
}

html[data-theme="light"] .quality-triage-head h4,
html[data-theme="light"] .quality-risk-account code {
    color: #030712;
}

html[data-theme="light"] .quality-triage-state {
    border-color: rgba(124, 58, 237, 0.22);
    background: rgba(124, 58, 237, 0.08);
    color: #6d28d9;
}

html[data-theme="light"] .quality-triage-state.is-ready {
    border-color: rgba(5, 150, 105, 0.24);
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .quality-triage-state.is-warn {
    border-color: rgba(217, 119, 6, 0.28);
    background: #fff7ed;
    color: #b45309;
}

html[data-theme="light"] .quality-triage-card {
    border-color: #dbe8eb;
    background: #f8fafc;
}

html[data-theme="light"] .quality-risk-table-wrap {
    border-top-color: #dbe8eb;
}

html[data-theme="light"] .settings-nav-item {
    border-radius: 8px;
    color: #475569;
}

html[data-theme="light"] .settings-nav-item:hover {
    background: #f0fdfa;
    color: #0f766e;
}

html[data-theme="light"] .settings-nav-item.active {
    background: #0d9488;
    color: #ffffff;
}

html[data-theme="light"] .xiaozi-assistant-fab {
    background: #0d9488;
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 34px rgba(13, 148, 136, 0.22);
}

html[data-theme="light"] .assistant-risk {
    border-radius: 8px;
}

html[data-theme="light"] .modal-backdrop {
    background: rgba(15, 23, 42, 0.34);
}

@media (max-width: 1280px) {
    html[data-theme="light"] .dashboard-trade-shell,
    html[data-theme="light"] .purchase-workbench-grid,
    html[data-theme="light"] .import-layout {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .purchase-confirm {
        position: static;
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    html[data-theme="light"] .page-content {
        padding: 14px;
    }

    html[data-theme="light"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"] .dashboard-status-card:nth-child(2n) {
        border-right: 0;
    }
}

@media (max-width: 520px) {
    html[data-theme="light"] .dashboard-status-strip {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .dashboard-status-card {
        border-right: 0;
        border-bottom: 1px solid #dbe8eb;
    }

    html[data-theme="light"] .topbar-balance {
        max-width: 132px;
    }
}

/* === Xiaozi workspace polish: 20260705-04 === */
html[data-theme="light"] body {
    background:
        linear-gradient(180deg, #f3faf8 0%, #f7fafc 52%, #f8fafc 100%);
}

html[data-theme="light"] body::before {
    display: block;
    background:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.72;
}

html[data-theme="light"] body::after {
    content: '';
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #06b6d4, #10b981);
    pointer-events: none;
    z-index: 120;
}

html[data-theme="light"] .page-content {
    max-width: 1680px;
    padding: 22px 24px 30px;
}

html[data-theme="light"][data-active-page="dashboard"] .page-content {
    max-width: 1720px;
}

html[data-theme="light"] .dashboard-flow-strip {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 76px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 42px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .dashboard-flow-brand {
    display: grid;
    gap: 4px;
    min-width: 0;
}

html[data-theme="light"] .dashboard-flow-brand strong {
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.25;
}

html[data-theme="light"] .dashboard-flow-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

html[data-theme="light"] .dashboard-flow-link {
    display: flex;
    min-width: 0;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid #dbe8eb;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

html[data-theme="light"] .dashboard-flow-link:hover {
    transform: translateY(-1px);
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .dashboard-flow-link span,
html[data-theme="light"] .dashboard-flow-link strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="light"] .dashboard-flow-link span {
    font-size: 0.82rem;
    font-weight: 800;
}

html[data-theme="light"] .dashboard-flow-link strong {
    color: #0f172a;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 900;
}

html[data-theme="light"] .dashboard-trade-shell {
    grid-template-columns: minmax(360px, 0.74fr) minmax(640px, 1.26fr);
    gap: 14px;
    margin-bottom: 14px;
}

html[data-theme="light"] .dashboard-notice,
html[data-theme="light"] .dashboard-brief-stack .xiaozi-ai-panel,
html[data-theme="light"] .dashboard-price-board,
html[data-theme="light"] .merchant-panel {
    border-color: rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 42px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .dashboard-notice {
    min-height: 118px;
    border-left: 0;
    background:
        linear-gradient(90deg, rgba(245, 158, 11, 0.13), rgba(255, 255, 255, 0.78) 42%),
        rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .dashboard-brief-stack .xiaozi-ai-panel {
    min-height: 156px;
    border-left: 0;
    background:
        linear-gradient(110deg, rgba(124, 58, 237, 0.1), rgba(20, 184, 166, 0.08) 58%, rgba(255, 255, 255, 0.82)),
        rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .dashboard-price-board {
    padding: 0;
}

html[data-theme="light"] .dashboard-price-board-head {
    min-height: 66px;
    padding: 14px 16px;
    border-bottom: 1px solid #dbe8eb;
    background:
        linear-gradient(90deg, rgba(20, 184, 166, 0.13), rgba(6, 182, 212, 0.07), rgba(124, 58, 237, 0.055)),
        rgba(255, 255, 255, 0.86);
}

html[data-theme="light"] .dashboard-price-board-head h3 {
    font-size: 1.16rem;
    font-weight: 900;
    line-height: 1.2;
}

html[data-theme="light"] .dashboard-price-board-head small {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 12px;
    border: 1px solid #ccfbf1;
    border-radius: 999px;
    background: #ffffff;
    color: #0f766e;
    font-weight: 900;
}

html[data-theme="light"] .dashboard-status-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 0;
}

html[data-theme="light"] .dashboard-status-card {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(58px, 1fr) auto auto auto;
    gap: 10px;
    min-height: 162px;
    padding: 14px;
    border: 0;
    border-right: 1px solid #dbe8eb;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
}

html[data-theme="light"] .dashboard-status-card:last-child {
    border-right: 0;
}

html[data-theme="light"] .dashboard-status-card:hover {
    transform: none;
    background: #f8fffd;
    box-shadow: inset 0 0 0 1px #99f6e4;
}

html[data-theme="light"] .dashboard-status-card.is-selected,
html[data-theme="light"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"] .dashboard-status-card.is-warn.is-selected {
    background: linear-gradient(135deg, #0d9488, #0f766e);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] .dashboard-status-top,
html[data-theme="light"] .dashboard-status-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

html[data-theme="light"] .tier-token {
    min-width: 48px;
    justify-content: center;
    border-radius: 8px;
}

html[data-theme="light"] .dashboard-status-meta strong,
html[data-theme="light"] .dashboard-price-board .dashboard-status-meta strong {
    font-size: 1.25rem;
    line-height: 1.18;
}

html[data-theme="light"] .dashboard-status-meta small {
    max-width: 100%;
    white-space: normal;
}

html[data-theme="light"] .tier-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid #dbe8eb;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f766e;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 900;
}

html[data-theme="light"] .dashboard-status-card.is-selected .tier-action {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

html[data-theme="light"] .dashboard-stock-meter {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
}

html[data-theme="light"] .merchant-panel {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .merchant-panel-header {
    min-height: 70px;
    padding: 14px 16px;
    border-bottom: 1px solid #dbe8eb;
    background: rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .merchant-panel-header .section-title {
    font-size: 1.12rem;
    line-height: 1.2;
}

html[data-theme="light"] .merchant-panel-header p {
    margin-top: 5px;
    line-height: 1.5;
}

html[data-theme="light"] .merchant-summary-row {
    padding: 10px 16px;
    border-bottom: 1px solid #e5eff1;
    background: rgba(248, 250, 252, 0.9);
}

html[data-theme="light"] .merchant-summary-chip {
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

html[data-theme="light"] .merchant-table-wrap {
    max-height: calc(100vh - 390px);
    min-height: 300px;
    overflow: auto;
}

html[data-theme="light"] .merchant-table {
    min-width: 1060px;
}

html[data-theme="light"] .merchant-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 40px;
    padding: 8px 12px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
}

html[data-theme="light"] .merchant-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

html[data-theme="light"] .merchant-name,
html[data-theme="light"] .merchant-product {
    min-width: 0;
}

html[data-theme="light"] .merchant-product strong,
html[data-theme="light"] .merchant-product span,
html[data-theme="light"] .merchant-subtext {
    overflow-wrap: anywhere;
}

html[data-theme="light"] .rank-pill,
html[data-theme="light"] .merchant-avatar {
    border-radius: 8px;
}

html[data-theme="light"] .merchant-actions .btn {
    min-width: 82px;
}

@media (max-width: 1280px) {
    html[data-theme="light"] .dashboard-flow-strip,
    html[data-theme="light"] .dashboard-trade-shell {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .merchant-table-wrap {
        max-height: none;
    }
}

@media (max-width: 900px) {
    html[data-theme="light"] .dashboard-flow-links,
    html[data-theme="light"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"] .dashboard-status-card:nth-child(2n) {
        border-right: 0;
    }
}

@media (max-width: 560px) {
    html[data-theme="light"] .dashboard-flow-strip {
        padding: 12px;
    }

    html[data-theme="light"] .dashboard-flow-links,
    html[data-theme="light"] .dashboard-status-strip {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .dashboard-status-card {
        border-right: 0;
        border-bottom: 1px solid #dbe8eb;
    }

    html[data-theme="light"] .dashboard-status-card:last-child {
        border-bottom: 0;
    }
}

/* === Warranty AI triage polish: 20260705-05 === */
.warranty-ai-panel {
    display: grid;
    gap: 16px;
    padding: 18px;
    margin-bottom: 16px;
}

.warranty-ai-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.warranty-ai-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.warranty-ai-title img {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 14px;
    object-fit: cover;
}

.warranty-ai-title h3 {
    margin: 2px 0 0;
    color: var(--text-primary);
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.25;
}

.warranty-ai-title p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.warranty-triage-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.warranty-triage-state.is-ready {
    border-color: rgba(20, 184, 166, 0.34);
    color: #0f766e;
    background: rgba(240, 253, 250, 0.9);
}

.warranty-triage-state.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
    color: #b45309;
    background: rgba(255, 247, 237, 0.9);
}

.warranty-triage-state.is-ok,
.warranty-triage-state.is-done {
    border-color: rgba(5, 150, 105, 0.26);
    color: #047857;
    background: rgba(236, 253, 245, 0.9);
}

.warranty-triage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.warranty-triage-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.warranty-triage-card span,
.warranty-triage-card small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 800;
}

.warranty-triage-card strong {
    display: block;
    margin: 4px 0 2px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.42rem;
    font-weight: 900;
    line-height: 1.15;
}

.warranty-triage-card.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
}

.warranty-triage-card.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
}

.warranty-triage-card.is-done,
.warranty-triage-card.is-ok {
    border-color: rgba(5, 150, 105, 0.24);
}

.warranty-triage-advice {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    line-height: 1.6;
}

.warranty-order-ref,
.warranty-ticket-main,
.warranty-replacement-cell {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.warranty-order-ref strong,
.warranty-ticket-main strong,
.warranty-replacement-cell strong {
    color: var(--text-primary);
    font-weight: 900;
}

.warranty-order-ref span,
.warranty-ticket-main span,
.warranty-replacement-cell small {
    color: var(--text-tertiary);
    font-size: 0.78rem;
    line-height: 1.45;
}

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

html[data-theme="light"] .warranty-ai-panel,
html[data-theme="light"] .warranty-stats,
html[data-theme="light"] .warranty-table-wrap {
    border-color: rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 42px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .warranty-ai-panel {
    background:
        linear-gradient(110deg, rgba(124, 58, 237, 0.1), rgba(20, 184, 166, 0.08) 60%, rgba(255, 255, 255, 0.84)),
        rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .warranty-ai-title img {
    border: 1px solid #ccfbf1;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.12);
}

html[data-theme="light"] .warranty-triage-card,
html[data-theme="light"] .warranty-triage-advice {
    border-color: #dbe8eb;
    background: rgba(248, 250, 252, 0.88);
}

html[data-theme="light"] .warranty-table-wrap {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .warranty-toolbar {
    padding: 14px 16px;
    border-bottom: 1px solid #dbe8eb;
    background: rgba(248, 250, 252, 0.9);
}

html[data-theme="light"] #page-warranty .data-table {
    min-width: 1080px;
}

html[data-theme="light"] #page-warranty .data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 40px;
    letter-spacing: 0;
    text-transform: none;
}

html[data-theme="light"] #page-warranty .data-table td {
    vertical-align: top;
}

html[data-theme="light"] .warranty-replacement-cell .warranty-triage-state {
    justify-self: start;
}

@media (max-width: 1000px) {
    .warranty-ai-head {
        flex-direction: column;
    }

    .warranty-triage-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .warranty-ai-title {
        align-items: flex-start;
    }

    .warranty-ai-title img {
        width: 44px;
        height: 44px;
    }

    .warranty-triage-grid {
        grid-template-columns: 1fr;
    }
}

/* === Order AI delivery polish: 20260705-08 === */
.order-triage-lanes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.order-triage-lane {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.order-triage-lane span,
.order-triage-lane small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 800;
}

.order-triage-lane strong {
    display: block;
    margin: 3px 0 2px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.15;
}

.order-triage-lane.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
}

.order-triage-lane.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
}

.order-triage-lane.is-done {
    border-color: rgba(5, 150, 105, 0.24);
}

.order-warranty-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

.order-warranty-ready {
    border-color: rgba(20, 184, 166, 0.34);
    color: #0f766e;
    background: rgba(240, 253, 250, 0.9);
}

.order-warranty-warn {
    border-color: rgba(245, 158, 11, 0.34);
    color: #b45309;
    background: rgba(255, 247, 237, 0.9);
}

.order-warranty-done {
    border-color: rgba(5, 150, 105, 0.26);
    color: #047857;
    background: rgba(236, 253, 245, 0.9);
}

.order-warranty-none {
    border-color: var(--border-color);
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
}

.order-warranty-detail {
    display: block;
    margin-top: 4px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
}

.order-ai-brief {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 15px;
    margin: 14px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.order-ai-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #14b8a6);
    font-size: 0.78rem;
    font-weight: 900;
}

.order-ai-copy {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.order-ai-copy strong {
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.3;
}

.order-ai-copy p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.58;
}

.order-ai-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-ai-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-secondary);
}

.order-ai-metrics em {
    color: var(--text-tertiary);
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 800;
}

.order-ai-metrics b {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 900;
}

.order-ai-brief.is-ready {
    border-color: rgba(20, 184, 166, 0.28);
}

.order-ai-brief.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
}

.order-ai-brief.is-done {
    border-color: rgba(5, 150, 105, 0.24);
}

html[data-theme="light"] .order-triage-lane,
html[data-theme="light"] .order-ai-brief,
html[data-theme="light"] .order-ai-metrics span {
    border-color: #dbe8eb;
    background: rgba(248, 250, 252, 0.88);
}

html[data-theme="light"] .order-delivery-radar {
    border-color: rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    background:
        linear-gradient(110deg, rgba(20, 184, 166, 0.1), rgba(255, 255, 255, 0.78) 48%),
        rgba(255, 255, 255, 0.78);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 42px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .purchase-history-table th:nth-child(7),
html[data-theme="light"] .purchase-history-table td:nth-child(7),
html[data-theme="light"] .purchase-history-table th:nth-child(8),
html[data-theme="light"] .purchase-history-table td:nth-child(8) {
    min-width: 92px;
}

@media (max-width: 900px) {
    .order-triage-lanes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .order-triage-lanes {
        grid-template-columns: 1fr;
    }

    .order-ai-brief {
        flex-direction: column;
    }
}

/* === Import AI triage polish: 20260705-09 === */
.import-preview-insights {
    display: grid;
    gap: 10px;
}

.import-preview-decision {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.import-preview-decision-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #14b8a6);
    font-size: 0.76rem;
    font-weight: 900;
}

.import-preview-decision strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.35;
}

.import-preview-decision p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.import-preview-decision.is-ready {
    border-color: rgba(20, 184, 166, 0.3);
}

.import-preview-decision.is-review {
    border-color: rgba(124, 58, 237, 0.28);
}

.import-preview-decision.is-warn {
    border-color: rgba(245, 158, 11, 0.36);
}

.import-preview-lanes {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.import-preview-lane {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.import-preview-lane span,
.import-preview-lane small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
}

.import-preview-lane strong {
    display: block;
    margin: 3px 0 2px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.import-preview-lane.is-ready {
    border-color: rgba(20, 184, 166, 0.3);
}

.import-preview-lane.is-review {
    border-color: rgba(124, 58, 237, 0.28);
}

.import-preview-lane.is-warn {
    border-color: rgba(245, 158, 11, 0.36);
}

html[data-theme="light"] .import-preview-decision,
html[data-theme="light"] .import-preview-lane {
    border-color: #dbe8eb;
    background: rgba(248, 250, 252, 0.9);
}

html[data-theme="light"] .import-preview-decision.is-ready,
html[data-theme="light"] .import-preview-lane.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
    background: rgba(240, 253, 250, 0.84);
}

html[data-theme="light"] .import-preview-decision.is-review,
html[data-theme="light"] .import-preview-lane.is-review {
    border-color: rgba(124, 58, 237, 0.26);
    background: rgba(245, 243, 255, 0.82);
}

html[data-theme="light"] .import-preview-decision.is-warn,
html[data-theme="light"] .import-preview-lane.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(255, 247, 237, 0.84);
}

.import-format-radar {
    display: grid;
    gap: 10px;
}

.import-format-radar-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.import-format-radar-head strong,
.import-format-card strong,
.import-field-card strong {
    color: var(--text-primary);
    font-weight: 900;
}

.import-format-radar-head strong {
    display: block;
    margin-top: 2px;
    font-size: 0.95rem;
    line-height: 1.35;
}

.import-format-radar-head p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.import-format-radar-head em {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.12);
    color: var(--accent-tertiary);
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 900;
    white-space: nowrap;
}

.import-format-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.import-format-card,
.import-field-card {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.import-format-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
}

.import-format-card strong,
.import-format-card span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-format-card strong {
    font-size: 0.82rem;
}

.import-format-card span {
    margin-top: 2px;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-weight: 800;
}

.import-format-card em {
    max-width: 96px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.13);
    color: var(--text-secondary);
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-format-card.is-ready {
    border-color: rgba(20, 184, 166, 0.3);
}

.import-format-card.is-review {
    border-color: rgba(124, 58, 237, 0.28);
}

.import-field-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.import-field-card {
    display: grid;
    gap: 5px;
    padding: 9px;
}

.import-field-card span {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.68rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-field-card strong {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.2;
}

.import-field-card i {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.import-field-card i b {
    display: block;
    height: 100%;
    min-width: 6px;
    border-radius: inherit;
    background: var(--accent-gradient);
}

.import-field-card.is-warn {
    border-color: rgba(245, 158, 11, 0.36);
}

.import-field-card.is-idle i b {
    background: rgba(148, 163, 184, 0.45);
}

html[data-theme="light"] .import-format-radar-head,
html[data-theme="light"] .import-format-card,
html[data-theme="light"] .import-field-card {
    border-color: #dbe8eb;
    background: rgba(248, 250, 252, 0.9);
}

html[data-theme="light"] .import-format-card.is-ready,
html[data-theme="light"] .import-field-card.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
    background: rgba(240, 253, 250, 0.84);
}

html[data-theme="light"] .import-format-card.is-review {
    border-color: rgba(124, 58, 237, 0.26);
    background: rgba(245, 243, 255, 0.82);
}

html[data-theme="light"] .import-field-card.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(255, 247, 237, 0.84);
}

@media (max-width: 1000px) {
    .import-preview-lanes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .import-format-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .import-field-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .import-preview-decision {
        flex-direction: column;
    }

    .import-preview-lanes,
    .import-format-grid,
    .import-field-grid {
        grid-template-columns: 1fr;
    }

    .import-format-radar-head,
    .import-format-card {
        grid-template-columns: 1fr;
    }

    .import-format-radar-head em,
    .import-format-card em {
        justify-self: start;
    }
}

/* === Trading desk UI unification: 20260705-10 === */
html[data-theme="light"] body {
    background:
        linear-gradient(90deg, rgba(15, 118, 110, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(180deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(180deg, #f7fbfa 0%, #eef7f6 42%, #f8fafc 100%);
    color: #0f172a;
}

html[data-theme="light"] .main-content {
    background: transparent;
}

html[data-theme="light"] .page-content {
    width: 100%;
    max-width: 1680px;
    padding: 20px 24px 34px;
}

html[data-theme="light"] .page {
    gap: 14px;
}

html[data-theme="light"] .sidebar {
    border-right: 1px solid #d5e7e9;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 250, 248, 0.96)),
        #ffffff;
    box-shadow: 10px 0 36px rgba(15, 23, 42, 0.055);
}

html[data-theme="light"] .sidebar-header {
    border-bottom: 1px solid #dbe8eb;
    background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .logo-icon {
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(13, 148, 136, 0.1);
}

html[data-theme="light"] .logo-text {
    color: #0f172a;
    font-weight: 900;
}

html[data-theme="light"] .logo-subtitle,
html[data-theme="light"] .nav-section-title {
    color: #64748b;
}

html[data-theme="light"][data-active-page] .sidebar .nav-item,
html[data-theme="light"] .sidebar .nav-item:not(.active) {
    min-height: 40px;
    border: 1px solid transparent !important;
    border-radius: 8px;
    background: transparent !important;
    color: #475569 !important;
}

html[data-theme="light"][data-active-page] .sidebar .nav-item:hover,
html[data-theme="light"] .sidebar .nav-item:not(.active):hover {
    border-color: #dbe8eb !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

html[data-theme="light"][data-active-page="dashboard"] .sidebar .nav-item[data-page="dashboard"],
html[data-theme="light"][data-active-page="market"] .sidebar .nav-item[data-page="market"],
html[data-theme="light"][data-active-page="orders"] .sidebar .nav-item[data-page="orders"],
html[data-theme="light"][data-active-page="import"] .sidebar .nav-item[data-page="import"],
html[data-theme="light"][data-active-page="wallet"] .sidebar .nav-item[data-page="wallet"],
html[data-theme="light"][data-active-page="quality"] .sidebar .nav-item[data-page="quality"],
html[data-theme="light"][data-active-page="auto-refill"] .sidebar .nav-item[data-page="auto-refill"],
html[data-theme="light"][data-active-page="warranty"] .sidebar .nav-item[data-page="warranty"],
html[data-theme="light"][data-active-page="settings"] .sidebar .nav-item[data-page="settings"] {
    border-color: #99f6e4 !important;
    background: linear-gradient(90deg, #e6fffb, #f8fafc) !important;
    color: #0f766e !important;
    box-shadow: inset 3px 0 0 #0d9488;
    font-weight: 900;
}

html[data-theme="light"] .topbar {
    height: 62px;
    border-bottom: 1px solid #d5e7e9;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .breadcrumb-current {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
}

html[data-theme="light"] .topbar-ai-status,
html[data-theme="light"] .topbar-balance {
    height: 40px;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    background: #ecfdf5;
    color: #0f766e;
    box-shadow: none;
}

html[data-theme="light"] .topbar-balance strong {
    color: #0f766e;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 900;
}

html[data-theme="light"] .search-box,
html[data-theme="light"] .toolbar-search,
html[data-theme="light"] .form-input,
html[data-theme="light"] .form-select,
html[data-theme="light"] .form-textarea,
html[data-theme="light"] .sort-select,
html[data-theme="light"] .import-paste-area {
    border: 1px solid #d5e7e9;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

html[data-theme="light"] .search-box:focus-within,
html[data-theme="light"] .toolbar-search:focus-within,
html[data-theme="light"] .form-input:focus,
html[data-theme="light"] .form-select:focus,
html[data-theme="light"] .form-textarea:focus,
html[data-theme="light"] .sort-select:focus,
html[data-theme="light"] .import-paste-area:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .purchase-workbench-header,
html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-history-panel,
html[data-theme="light"] .merchant-panel,
html[data-theme="light"] .dashboard-flow-strip,
html[data-theme="light"] .dashboard-notice,
html[data-theme="light"] .xiaozi-ai-panel,
html[data-theme="light"] .dashboard-price-board,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .upload-zone,
html[data-theme="light"] .import-options,
html[data-theme="light"] .import-ai-card,
html[data-theme="light"] .import-history,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .wallet-overview,
html[data-theme="light"] .wallet-radar-panel,
html[data-theme="light"] .wallet-transactions,
html[data-theme="light"] .quality-overview,
html[data-theme="light"] .quality-actions,
html[data-theme="light"] .quality-triage-panel,
html[data-theme="light"] .warranty-ai-panel {
    border: 1px solid #d5e7e9;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 44px rgba(15, 23, 42, 0.065);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

html[data-theme="light"] .glass-card:hover,
html[data-theme="light"] .account-card:hover,
html[data-theme="light"] .market-product-row:hover {
    border-color: #99f6e4;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 20px 48px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .btn {
    min-height: 36px;
    border-radius: 8px;
    font-weight: 850;
}

html[data-theme="light"] .btn-primary {
    border: 1px solid #0f766e;
    background: linear-gradient(180deg, #14b8a6, #0f766e);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(13, 148, 136, 0.18);
}

html[data-theme="light"] .btn-primary:hover {
    border-color: #115e59;
    background: linear-gradient(180deg, #0d9488, #115e59);
    box-shadow: 0 12px 26px rgba(13, 148, 136, 0.24);
}

html[data-theme="light"] .btn-glass,
html[data-theme="light"] .btn-ghost,
html[data-theme="light"] .topbar-btn {
    border: 1px solid #d5e7e9;
    background: #ffffff;
    color: #475569;
    box-shadow: none;
}

html[data-theme="light"] .btn-glass:hover,
html[data-theme="light"] .btn-ghost:hover,
html[data-theme="light"] .topbar-btn:hover {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .section-title,
html[data-theme="light"] .dashboard-price-board-head h3,
html[data-theme="light"] .market-list-header h4,
html[data-theme="light"] .workbench-card-header h4,
html[data-theme="light"] .import-radar-head h4,
html[data-theme="light"] .order-delivery-radar-head h4 {
    color: #0f172a;
    font-weight: 900;
    letter-spacing: 0;
}

html[data-theme="light"] .panel-kicker {
    color: #0d9488;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
}

html[data-theme="light"] .redeem-desc,
html[data-theme="light"] .merchant-panel-header p,
html[data-theme="light"] .market-list-header p,
html[data-theme="light"] .workbench-card-header p,
html[data-theme="light"] .notice-body p,
html[data-theme="light"] .xiaozi-ai-copy p,
html[data-theme="light"] .market-ai-head p,
html[data-theme="light"] .import-ai-head p {
    color: #64748b;
}

html[data-theme="light"][data-active-page="dashboard"] .page-content {
    max-width: 1720px;
}

html[data-theme="light"] .dashboard-flow-strip {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 72px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background:
        linear-gradient(90deg, rgba(20, 184, 166, 0.12), rgba(124, 58, 237, 0.055)),
        rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .dashboard-flow-brand {
    display: grid;
    gap: 4px;
}

html[data-theme="light"] .dashboard-flow-brand strong {
    color: #0f172a;
    font-size: 1.06rem;
    font-weight: 900;
    line-height: 1.28;
}

html[data-theme="light"] .dashboard-flow-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

html[data-theme="light"] .dashboard-flow-link {
    min-width: 0;
    min-height: 46px;
    padding: 8px 12px;
    border: 1px solid #d5e7e9;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
}

html[data-theme="light"] .dashboard-flow-link:hover {
    transform: translateY(-1px);
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .dashboard-flow-link strong {
    color: #0f172a;
    font-family: var(--font-mono);
    font-weight: 900;
}

html[data-theme="light"] .dashboard-trade-shell {
    grid-template-columns: minmax(380px, 0.78fr) minmax(680px, 1.22fr);
    gap: 14px;
    align-items: stretch;
    margin-bottom: 14px;
}

html[data-theme="light"] .dashboard-brief-stack {
    gap: 14px;
}

html[data-theme="light"] .dashboard-notice,
html[data-theme="light"] .xiaozi-ai-panel {
    min-height: 132px;
    padding: 16px;
}

html[data-theme="light"] .dashboard-notice {
    border-left: 4px solid #f59e0b;
    background:
        linear-gradient(90deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.92) 46%),
        #ffffff;
}

html[data-theme="light"] .xiaozi-ai-panel,
html[data-theme="light"] .market-ai-advisor,
html[data-theme="light"] .import-ai-card {
    border-left: 4px solid #7c3aed;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.095), rgba(20, 184, 166, 0.055) 58%, rgba(255, 255, 255, 0.94)),
        #ffffff;
}

html[data-theme="light"] .xiaozi-ai-avatar,
html[data-theme="light"] .market-ai-avatar,
html[data-theme="light"] .import-ai-head img {
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(13, 148, 136, 0.12);
}

html[data-theme="light"] .xiaozi-ai-metric,
html[data-theme="light"] .market-ai-metric,
html[data-theme="light"] .order-delivery-metric,
html[data-theme="light"] .import-radar-metric,
html[data-theme="light"] .wallet-radar-item,
html[data-theme="light"] .confirm-metrics div,
html[data-theme="light"] .quality-triage-card,
html[data-theme="light"] .warranty-triage-card {
    border: 1px solid #dbe8eb;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: none;
}

html[data-theme="light"] .xiaozi-ai-metric strong,
html[data-theme="light"] .market-ai-metric strong,
html[data-theme="light"] .order-delivery-metric strong,
html[data-theme="light"] .import-radar-metric strong,
html[data-theme="light"] .wallet-radar-item strong,
html[data-theme="light"] .confirm-metrics strong {
    color: #0f172a;
    font-family: var(--font-mono);
    font-weight: 900;
}

html[data-theme="light"] .dashboard-price-board,
html[data-theme="light"] .merchant-panel,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-history-panel,
html[data-theme="light"] .import-history {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .dashboard-price-board-head,
html[data-theme="light"] .merchant-panel-header,
html[data-theme="light"] .market-list-header,
html[data-theme="light"] .import-history > .section-title {
    min-height: 64px;
    padding: 13px 16px;
    margin: 0;
    border-bottom: 1px solid #d5e7e9;
    background: rgba(248, 250, 252, 0.94);
}

html[data-theme="light"] .dashboard-price-board-head {
    min-height: 68px;
    background:
        linear-gradient(90deg, rgba(20, 184, 166, 0.12), rgba(124, 58, 237, 0.055)),
        rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .dashboard-price-board-head small,
html[data-theme="light"] .stats-badge,
html[data-theme="light"] .delivery-target-pill,
html[data-theme="light"] .import-radar-state {
    min-height: 28px;
    border: 1px solid #ccfbf1;
    border-radius: 999px;
    background: #ffffff;
    color: #0f766e;
    font-weight: 850;
}

html[data-theme="light"] .dashboard-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

html[data-theme="light"] .dashboard-status-card {
    display: grid;
    grid-template-rows: auto minmax(58px, 1fr) auto auto auto;
    gap: 9px;
    min-height: 154px;
    padding: 14px;
    border: 0;
    border-right: 1px solid #d5e7e9;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    box-shadow: none;
}

html[data-theme="light"] .dashboard-status-card:last-child {
    border-right: 0;
}

html[data-theme="light"] .dashboard-status-card:hover {
    transform: none;
    background: #f8fffd;
    box-shadow: inset 0 0 0 1px #99f6e4;
}

html[data-theme="light"] .dashboard-status-card.is-selected,
html[data-theme="light"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"] .dashboard-status-card.is-warn.is-selected {
    background: linear-gradient(135deg, #0f766e, #0d9488);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

html[data-theme="light"] .dashboard-status-card.is-selected .tier-token,
html[data-theme="light"] .dashboard-status-card.is-selected .dashboard-status-meta strong,
html[data-theme="light"] .dashboard-status-card.is-selected .dashboard-status-bottom strong,
html[data-theme="light"] .dashboard-status-card.is-selected .stock-line {
    color: #ffffff;
}

html[data-theme="light"] .dashboard-status-card.is-selected .tier-state,
html[data-theme="light"] .dashboard-status-card.is-selected .dashboard-status-bottom span {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .tier-token,
html[data-theme="light"] .step-badge,
html[data-theme="light"] .rank-pill,
html[data-theme="light"] .merchant-avatar {
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    background: #ecfdf5;
    color: #0f766e;
    font-weight: 900;
}

html[data-theme="light"] .dashboard-status-meta strong {
    color: #0f172a;
    font-size: 1.22rem;
}

html[data-theme="light"] .dashboard-stock-meter {
    height: 6px;
    background: #e2e8f0;
}

html[data-theme="light"] .dashboard-stock-meter i {
    background: linear-gradient(90deg, #14b8a6, #7c3aed);
}

html[data-theme="light"] .merchant-summary-row,
html[data-theme="light"] .purchase-history-filters,
html[data-theme="light"] .purchase-history-actions {
    padding: 10px 16px;
    border-bottom: 1px solid #e5eff1;
    background: rgba(248, 250, 252, 0.94);
}

html[data-theme="light"] .merchant-summary-chip,
html[data-theme="light"] .filter-tab,
html[data-theme="light"] .chip-filter,
html[data-theme="light"] .format-tag,
html[data-theme="light"] .status-badge,
html[data-theme="light"] .risk-pill,
html[data-theme="light"] .recommend-pill,
html[data-theme="light"] .decision-pill,
html[data-theme="light"] .type-pill,
html[data-theme="light"] .import-preview-pill,
html[data-theme="light"] .import-quota-status,
html[data-theme="light"] .quality-badge {
    min-height: 30px;
    border: 1px solid #d5e7e9;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    box-shadow: none;
}

html[data-theme="light"] .merchant-summary-chip.is-active,
html[data-theme="light"] .filter-tab.active,
html[data-theme="light"] .chip-filter.active {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .recommend-pill,
html[data-theme="light"] .risk-low,
html[data-theme="light"] .import-preview-pill.ok,
html[data-theme="light"] .import-quota-status.ok {
    border-color: rgba(5, 150, 105, 0.24);
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .risk-mid,
html[data-theme="light"] .import-preview-pill.warn,
html[data-theme="light"] .import-quota-status.warn {
    border-color: rgba(217, 119, 6, 0.28);
    background: #fff7ed;
    color: #b45309;
}

html[data-theme="light"] .import-preview-pill.fail,
html[data-theme="light"] .import-quota-status.fail {
    border-color: rgba(220, 38, 38, 0.24);
    background: #fef2f2;
    color: #b91c1c;
}

html[data-theme="light"] .merchant-summary-chip .money,
html[data-theme="light"] .account-price,
html[data-theme="light"] .wallet-balance,
html[data-theme="light"] .quality-stat-value {
    color: #0f766e;
    font-family: var(--font-mono);
}

html[data-theme="light"] .merchant-table-wrap,
html[data-theme="light"] .purchase-history-table-wrap,
html[data-theme="light"] .orders-table-wrap,
html[data-theme="light"] .import-preview-table-wrap {
    border: 0;
    border-radius: 0;
    background: #ffffff;
}

html[data-theme="light"] .data-table,
html[data-theme="light"] .merchant-table,
html[data-theme="light"] .purchase-history-table,
html[data-theme="light"] .import-preview-table {
    border-collapse: separate;
    border-spacing: 0;
    color: #334155;
}

html[data-theme="light"] .data-table th,
html[data-theme="light"] .merchant-table th,
html[data-theme="light"] .purchase-history-table th,
html[data-theme="light"] .import-preview-table th {
    height: 42px;
    padding: 9px 12px;
    border-bottom: 1px solid #d5e7e9;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
}

html[data-theme="light"] .data-table td,
html[data-theme="light"] .merchant-table td,
html[data-theme="light"] .purchase-history-table td,
html[data-theme="light"] .import-preview-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
    color: #475569;
}

html[data-theme="light"] .data-table tbody tr:nth-child(even) td,
html[data-theme="light"] .merchant-table tbody tr:nth-child(even) td,
html[data-theme="light"] .purchase-history-table tbody tr:nth-child(even) td {
    background: #fbfefd;
}

html[data-theme="light"] .data-table tbody tr:hover td,
html[data-theme="light"] .merchant-table tbody tr:hover td,
html[data-theme="light"] .purchase-history-table tbody tr:hover td {
    background: #f0fdfa;
}

html[data-theme="light"] .merchant-name strong,
html[data-theme="light"] .merchant-product strong,
html[data-theme="light"] .import-preview-account strong,
html[data-theme="light"] .order-detail-item strong {
    color: #0f172a;
}

html[data-theme="light"] .purchase-workbench-header {
    min-height: 88px;
    padding: 16px 18px;
    margin-bottom: 14px;
    border-left: 4px solid #0d9488;
    background:
        linear-gradient(104deg, rgba(20, 184, 166, 0.12), rgba(124, 58, 237, 0.055) 58%, rgba(255, 255, 255, 0.92)),
        #ffffff;
}

html[data-theme="light"] .purchase-workbench-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.38fr);
    gap: 14px;
}

html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .upload-zone,
html[data-theme="light"] .import-options,
html[data-theme="light"] .import-ai-card {
    padding: 16px;
}

html[data-theme="light"] .purchase-confirm {
    position: sticky;
    top: calc(var(--topbar-height) + 16px);
}

html[data-theme="light"] .purchase-quantity-block,
html[data-theme="light"] .confirm-selected-product,
html[data-theme="light"] .wallet-balance-note,
html[data-theme="light"] .wallet-modal-tip,
html[data-theme="light"] .purchase-hint,
html[data-theme="light"] .order-delivery-advice,
html[data-theme="light"] .import-radar-advice,
html[data-theme="light"] .settings-api-advice {
    border: 1px solid #dbe8eb;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
}

html[data-theme="light"] .purchase-quantity-control,
html[data-theme="light"] .quick-quantity-row button,
html[data-theme="light"] .wallet-quick-amounts button,
html[data-theme="light"] .radio-option,
html[data-theme="light"] .checkbox-label {
    border: 1px solid #dbe8eb;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
}

html[data-theme="light"] .purchase-quantity-control button:hover,
html[data-theme="light"] .quick-quantity-row button:hover,
html[data-theme="light"] .wallet-quick-amounts button:hover,
html[data-theme="light"] .wallet-quick-amounts button.active {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .market-ai-advisor {
    display: grid;
    grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
}

html[data-theme="light"] .market-ai-actions {
    justify-content: flex-end;
}

html[data-theme="light"] .market-grid {
    padding: 12px;
    gap: 10px;
    background: #ffffff;
}

html[data-theme="light"] .market-product-row {
    display: grid;
    grid-template-columns: 112px minmax(260px, 1fr) minmax(160px, 0.42fr) 168px;
    align-items: center;
    min-height: 86px;
    border: 1px solid #d5e7e9;
    border-left: 3px solid transparent;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"] .market-product-row.is-selected {
    border-color: #99f6e4;
    border-left-color: #0d9488;
    background: #ecfdf5;
    box-shadow: 0 12px 26px rgba(13, 148, 136, 0.12);
}

html[data-theme="light"] .market-product-row .account-card-header {
    display: grid;
    gap: 6px;
}

html[data-theme="light"] .market-product-main h4 {
    color: #0f172a;
}

html[data-theme="light"] .market-product-main p,
html[data-theme="light"] .market-product-row .account-sla {
    color: #64748b;
}

html[data-theme="light"] .market-product-row .account-footer {
    justify-content: flex-end;
}

html[data-theme="light"] .import-radar,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .wallet-radar-panel {
    padding: 16px;
    border-left: 4px solid #0d9488;
}

html[data-theme="light"] .import-layout {
    grid-template-columns: minmax(320px, 0.78fr) minmax(460px, 1.22fr);
    gap: 14px;
}

html[data-theme="light"] .upload-zone {
    min-height: 100%;
    border-left: 4px solid #0d9488;
    text-align: left;
}

html[data-theme="light"] .upload-icon-wrap {
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .import-options {
    border-left: 4px solid #7c3aed;
}

html[data-theme="light"] .import-ai-card {
    grid-column: 1 / -1;
}

html[data-theme="light"] .import-paste-area {
    min-height: 160px;
    font-family: var(--font-mono);
    line-height: 1.58;
}

html[data-theme="light"] .import-ai-summary,
html[data-theme="light"] .import-preview-decision,
html[data-theme="light"] .import-preview-lane {
    border: 1px solid #dbe8eb;
    border-radius: 8px;
    background: #f8fafc;
}

html[data-theme="light"] .import-preview-decision.is-ready,
html[data-theme="light"] .import-preview-lane.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
    background: rgba(240, 253, 250, 0.9);
}

html[data-theme="light"] .import-preview-decision.is-review,
html[data-theme="light"] .import-preview-lane.is-review {
    border-color: rgba(124, 58, 237, 0.28);
    background: rgba(245, 243, 255, 0.9);
}

html[data-theme="light"] .import-preview-decision.is-warn,
html[data-theme="light"] .import-preview-lane.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(255, 247, 237, 0.9);
}

html[data-theme="light"] .wallet-overview {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 253, 245, 0.92)),
        #ffffff;
}

html[data-theme="light"] .wallet-ai-advice,
html[data-theme="light"] .quality-ai-note,
html[data-theme="light"] .warranty-triage-advice {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

@media (max-width: 1280px) {
    html[data-theme="light"] .dashboard-trade-shell,
    html[data-theme="light"] .purchase-workbench-grid,
    html[data-theme="light"] .import-layout {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .purchase-confirm {
        position: static;
    }

    html[data-theme="light"] .market-ai-advisor {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .market-ai-actions {
        justify-content: flex-start;
    }

    html[data-theme="light"] .import-ai-card {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    html[data-theme="light"] .page-content {
        padding: 16px;
    }

    html[data-theme="light"] .dashboard-flow-strip,
    html[data-theme="light"] .dashboard-flow-links,
    html[data-theme="light"] .dashboard-status-strip,
    html[data-theme="light"] .import-preview-lanes {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .dashboard-status-card,
    html[data-theme="light"] .dashboard-status-card:last-child {
        border-right: 0;
        border-bottom: 1px solid #d5e7e9;
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    html[data-theme="light"] .market-product-row .account-card-header,
    html[data-theme="light"] .market-product-row .account-footer {
        display: flex;
        justify-content: space-between;
    }
}

/* === Dashboard dense trading desk: 20260705-17 === */
html[data-theme="light"][data-active-page="dashboard"] .page-content {
    max-width: 1760px;
    padding-top: 18px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip {
    display: grid;
    grid-template-columns: minmax(220px, 0.74fr) minmax(0, 1.26fr);
    gap: 10px;
    min-height: 58px;
    margin-bottom: 12px;
    padding: 10px 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-brand {
    gap: 2px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-brand strong {
    font-size: 0.98rem;
    line-height: 1.24;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link {
    min-height: 40px;
    padding: 7px 10px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link span {
    font-size: 0.7rem;
    line-height: 1.2;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link strong {
    font-size: 0.86rem;
    line-height: 1.2;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
    display: grid;
    grid-template-columns: minmax(220px, 0.66fr) minmax(0, 1.34fr);
    gap: 12px;
    align-items: stretch;
    margin-bottom: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack {
    gap: 10px;
    min-width: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-panel {
    min-height: 0;
    padding: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-icon {
    width: 34px;
    height: 34px;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-title-row {
    align-items: center;
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-title-row strong {
    font-size: 0.9rem;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-title-row span,
html[data-theme="light"][data-active-page="dashboard"] .notice-body p {
    font-size: 0.76rem;
    line-height: 1.42;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-body p + p {
    margin-top: 4px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-panel {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-avatar {
    width: 40px;
    height: 40px;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-copy h3 {
    margin: 2px 0 4px;
    font-size: 0.98rem;
    line-height: 1.24;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-copy p {
    font-size: 0.78rem;
    line-height: 1.42;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-metrics {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric {
    min-height: 42px;
    padding: 7px 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric span {
    font-size: 0.66rem;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric strong {
    font-size: 0.82rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head {
    min-height: 50px;
    padding: 11px 14px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head h3 {
    font-size: 0.98rem;
    line-height: 1.22;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head small {
    font-size: 0.72rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    min-height: 120px;
    padding: 10px 11px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta {
    gap: 4px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board .dashboard-status-meta strong {
    font-size: 0.92rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta small,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom span,
html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    font-size: 0.68rem;
    line-height: 1.25;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom {
    gap: 6px;
    margin-top: 6px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-stock-meter {
    margin-top: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-ai {
    width: 36px;
    height: 36px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head h3 {
    margin: 1px 0 3px;
    font-size: 0.96rem;
    line-height: 1.24;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head p {
    font-size: 0.76rem;
    line-height: 1.4;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card {
    grid-template-rows: auto minmax(40px, 1fr) auto;
    gap: 7px;
    min-height: 126px;
    padding: 10px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card-head span {
    font-size: 0.84rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card-head strong {
    min-width: 34px;
    padding: 2px 7px;
    font-size: 0.66rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.76rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header {
    min-height: 54px;
    padding: 12px 14px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-row {
    padding: 8px 12px;
    gap: 7px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip {
    min-height: 26px;
    padding: 4px 9px;
    font-size: 0.74rem;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table th,
html[data-theme="light"][data-active-page="dashboard"] .merchant-table td {
    padding: 9px 11px;
}

@media (max-width: 1280px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
        grid-template-columns: minmax(220px, 0.64fr) minmax(0, 1.36fr);
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list {
        grid-template-columns: 1fr;
    }
}

/* === Dashboard quote board compaction: 20260705-18 === */
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    grid-template-rows: auto auto auto auto 4px;
    align-items: flex-start;
    gap: 5px;
    min-height: 126px;
    padding: 8px 10px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-top,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom {
    width: 100%;
    gap: 6px;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-token {
    min-height: 22px;
    padding: 2px 7px;
    font-size: 0.72rem;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-state {
    min-width: 0;
    overflow: hidden;
    font-size: 0.66rem;
    text-overflow: ellipsis;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board .dashboard-status-meta strong {
    font-size: 0.9rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta .stock-line {
    margin-top: 2px;
    overflow: hidden;
    font-size: 0.66rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 2px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom span {
    overflow: hidden;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom strong {
    font-size: 0.82rem;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.64rem;
    line-height: 1.15;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-stock-meter {
    width: 100%;
    height: 4px;
    margin-top: 2px;
}

/* === Dashboard narrow trading grid correction: 20260705-19 === */
html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: flex-start;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head > div {
    min-width: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head small {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 1280px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
        grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    }
}

@media (max-width: 620px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
        grid-template-columns: 1fr;
    }
}

/* === Dashboard AI metrics rail: 20260705-20 === */
html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric {
    min-height: 46px;
    padding: 6px 5px;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric span,
html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric span {
    font-size: 0.58rem;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric strong {
    font-size: 0.72rem;
}

@media (max-width: 620px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* === Xiaozi AI command center: 20260705-21 === */
.xiaozi-assistant-panel {
    max-height: calc(100vh - 118px);
    overflow-y: auto;
}

html[data-theme="light"] .xiaozi-assistant-fab {
    min-height: 46px;
    padding: 6px 13px 6px 6px;
    border: 1px solid #ccfbf1;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #0d9488);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .xiaozi-assistant-fab img {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .xiaozi-assistant-panel {
    width: min(430px, calc(100vw - 32px));
    padding: 14px;
    border: 1px solid #d5e7e9;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94)),
        #ffffff;
    color: #0f172a;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .assistant-head {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d5e7e9;
}

html[data-theme="light"] .assistant-head img {
    width: 38px;
    height: 38px;
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    background: #ffffff;
}

html[data-theme="light"] .assistant-head strong {
    color: #0f172a;
    font-size: 0.96rem;
}

html[data-theme="light"] .assistant-head span {
    color: #64748b;
}

html[data-theme="light"] .assistant-close {
    border: 1px solid #dbe8eb;
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
}

html[data-theme="light"] .assistant-message {
    margin-bottom: 10px;
    color: #475569;
    font-size: 0.82rem;
    line-height: 1.55;
}

.assistant-ops {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.assistant-signal,
.assistant-next-step,
.assistant-guardrail {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.assistant-signal {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 9px;
    padding: 10px 11px;
}

.assistant-signal span {
    grid-row: span 2;
    align-self: start;
    min-width: 52px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(72, 183, 255, 0.12);
    color: var(--info);
    font-size: 0.68rem;
    font-weight: 900;
    text-align: center;
}

.assistant-signal strong,
.assistant-next-step strong {
    min-width: 0;
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.28;
}

.assistant-signal p,
.assistant-next-step p {
    min-width: 0;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.45;
}

.assistant-signal-danger span { background: rgba(255, 100, 124, 0.12); color: var(--danger); }
.assistant-signal-warn span { background: rgba(242, 184, 75, 0.14); color: var(--warning); }
.assistant-signal-info span { background: rgba(72, 183, 255, 0.12); color: var(--info); }
.assistant-signal-ok span { background: rgba(49, 208, 170, 0.12); color: var(--success); }

.assistant-next-step {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
}

.assistant-next-step span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.68rem;
    font-weight: 900;
    margin-bottom: 2px;
}

.assistant-next-step .btn {
    white-space: nowrap;
}

.assistant-playbook {
    display: grid;
    gap: 7px;
    padding: 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.assistant-playbook-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.assistant-playbook-head span {
    color: var(--text-tertiary);
    font-size: 0.68rem;
    font-weight: 900;
}

.assistant-playbook-head strong {
    min-width: 0;
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 900;
    text-align: right;
}

.assistant-playbook-steps {
    display: grid;
    gap: 6px;
}

.assistant-playbook-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 7px;
    align-items: center;
    min-width: 0;
    padding: 7px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-secondary);
}

.assistant-playbook-step i {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(72, 183, 255, 0.12);
    color: var(--info);
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 950;
}

.assistant-playbook-step div {
    min-width: 0;
}

.assistant-playbook-step span {
    display: block;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-playbook-step p {
    margin: 1px 0 0;
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-playbook-step em,
.assistant-playbook-step button {
    border-radius: 999px;
    font-style: normal;
    font-size: 0.66rem;
    font-weight: 900;
    white-space: nowrap;
}

.assistant-playbook-step em {
    padding: 3px 7px;
    background: rgba(148, 163, 184, 0.13);
    color: var(--text-secondary);
}

.assistant-playbook-step button {
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.assistant-playbook-step button:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.assistant-playbook-step.is-done i,
.assistant-playbook-step.is-done em {
    background: rgba(49, 208, 170, 0.14);
    color: var(--success);
}

.assistant-playbook-step.is-active i,
.assistant-playbook-step.is-active em {
    background: rgba(72, 183, 255, 0.13);
    color: var(--info);
}

.assistant-playbook-step.is-blocked i,
.assistant-playbook-step.is-blocked em {
    background: rgba(242, 184, 75, 0.16);
    color: var(--warning);
}

.assistant-guardrail {
    padding: 8px 10px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.45;
}

.assistant-command-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.assistant-command-hints button {
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 850;
}

.assistant-command-hints button:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

html[data-theme="light"] .assistant-signal,
html[data-theme="light"] .assistant-next-step,
html[data-theme="light"] .assistant-playbook,
html[data-theme="light"] .assistant-guardrail,
html[data-theme="light"] .assistant-insight,
html[data-theme="light"] .assistant-risk,
html[data-theme="light"] .assistant-command-hints button {
    border-color: #dbe8eb;
    background: #f8fafc;
}

html[data-theme="light"] .assistant-signal strong,
html[data-theme="light"] .assistant-next-step strong,
html[data-theme="light"] .assistant-playbook-head strong,
html[data-theme="light"] .assistant-playbook-step span,
html[data-theme="light"] .assistant-insight strong,
html[data-theme="light"] .assistant-risk span {
    color: #0f172a;
}

html[data-theme="light"] .assistant-signal p,
html[data-theme="light"] .assistant-next-step p,
html[data-theme="light"] .assistant-playbook-head span,
html[data-theme="light"] .assistant-playbook-step p,
html[data-theme="light"] .assistant-playbook-step button,
html[data-theme="light"] .assistant-guardrail,
html[data-theme="light"] .assistant-risk p,
html[data-theme="light"] .assistant-command-hints button {
    color: #64748b;
}

html[data-theme="light"] .assistant-playbook-step {
    border-color: #dbe8eb;
    background: #ffffff;
}

html[data-theme="light"] .assistant-playbook-step button {
    border-color: #dbe8eb;
    background: #f8fafc;
}

html[data-theme="light"] .assistant-playbook-step button:hover {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .assistant-signal-danger {
    border-color: rgba(220, 38, 38, 0.28);
    background: #fef2f2;
}

html[data-theme="light"] .assistant-signal-warn {
    border-color: rgba(245, 158, 11, 0.32);
    background: #fff7ed;
}

html[data-theme="light"] .assistant-signal-info {
    border-color: rgba(14, 165, 233, 0.24);
    background: #f0f9ff;
}

html[data-theme="light"] .assistant-signal-ok {
    border-color: rgba(20, 184, 166, 0.28);
    background: #f0fdfa;
}

html[data-theme="light"] .assistant-command-hints button:hover {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

@media (max-width: 520px) {
    .xiaozi-assistant {
        right: 14px;
        bottom: 14px;
    }

    .assistant-next-step {
        grid-template-columns: 1fr;
    }

    .assistant-next-step .btn {
        width: 100%;
    }

    .assistant-playbook-step {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .assistant-playbook-step button {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

/* === Market purchase AI preflight: 20260705-22 === */
.market-preflight-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.market-preflight-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
}

.market-preflight-head > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
}

.market-preflight-head strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1.28;
}

.market-preflight-head p,
.market-preflight-rule {
    margin: 3px 0 0;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.45;
}

.market-preflight-lanes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
    gap: 7px;
}

.market-preflight-lane {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.market-preflight-lane span,
.market-preflight-lane small {
    display: block;
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.66rem;
    font-weight: 850;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-preflight-lane strong {
    display: block;
    margin: 3px 0;
    overflow: hidden;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-preflight-panel.is-ready,
.market-preflight-lane.is-ready {
    border-color: rgba(49, 208, 170, 0.3);
}

.market-preflight-panel.is-warn,
.market-preflight-lane.is-warn {
    border-color: rgba(242, 184, 75, 0.36);
}

.market-preflight-panel.is-danger,
.market-preflight-lane.is-danger {
    border-color: rgba(255, 100, 124, 0.34);
}

html[data-theme="light"] .market-preflight-panel {
    border-color: #dbe8eb;
    border-left-color: #7c3aed;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.08), rgba(20, 184, 166, 0.05) 58%, rgba(255, 255, 255, 0.94)),
        #ffffff;
}

html[data-theme="light"] .market-preflight-head > span {
    background: linear-gradient(135deg, #7c3aed, #14b8a6);
}

html[data-theme="light"] .market-preflight-head strong,
html[data-theme="light"] .market-preflight-lane strong {
    color: #0f172a;
}

html[data-theme="light"] .market-preflight-head p,
html[data-theme="light"] .market-preflight-rule,
html[data-theme="light"] .market-preflight-lane span,
html[data-theme="light"] .market-preflight-lane small {
    color: #64748b;
}

html[data-theme="light"] .market-preflight-lane {
    border-color: #dbe8eb;
    background: #f8fafc;
}

html[data-theme="light"] .market-preflight-panel.is-ready,
html[data-theme="light"] .market-preflight-lane.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
    background: rgba(240, 253, 250, 0.9);
}

html[data-theme="light"] .market-preflight-panel.is-warn,
html[data-theme="light"] .market-preflight-lane.is-warn {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(255, 247, 237, 0.92);
}

html[data-theme="light"] .market-preflight-panel.is-danger,
html[data-theme="light"] .market-preflight-lane.is-danger {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(254, 242, 242, 0.92);
}

.modal-preflight-panel {
    margin-top: 12px;
}

.modal-preflight-panel .market-preflight-lanes {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.modal-preflight-panel .market-preflight-lane {
    padding: 7px 8px;
}

@media (max-width: 1180px) {
    .market-preflight-lanes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .market-preflight-lanes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .market-preflight-head,
    .market-preflight-lanes {
        grid-template-columns: 1fr;
    }
}

/* === Import preflight actions: 20260705-23 === */
.import-preview-decision > div:not(.import-preview-decision-icon):not(.import-preview-decision-actions) {
    min-width: 0;
    flex: 1 1 auto;
}

.import-preview-decision-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
    max-width: 190px;
}

.import-preview-decision-actions .btn {
    min-height: 30px;
    padding: 5px 9px;
    white-space: nowrap;
}

.import-preview-decision-actions .btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

@media (max-width: 820px) {
    .import-preview-decision {
        flex-wrap: wrap;
    }

    .import-preview-decision-actions {
        flex-basis: 100%;
        max-width: none;
        justify-content: flex-start;
        padding-left: 50px;
    }
}

@media (max-width: 560px) {
    .import-preview-decision-actions {
        width: 100%;
        padding-left: 0;
    }

    .import-preview-decision-actions .btn {
        flex: 1 1 auto;
    }
}

/* === Xiaozi trading desk skin: 20260705-24 === */
html[data-theme="light"] {
    --xz-surface: rgba(255, 255, 255, 0.9);
    --xz-surface-strong: #ffffff;
    --xz-line: #d8e7ea;
    --xz-line-strong: #bdd9de;
    --xz-ink: #0f172a;
    --xz-muted: #64748b;
    --xz-soft: #f6fafb;
    --xz-purple: #7c3aed;
    --xz-teal: #0d9488;
    --xz-cyan: #0891b2;
    --xz-green: #059669;
    --xz-warn: #b45309;
}

html[data-theme="light"] body {
    background:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px) 0 0 / 72px 72px,
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px) 0 0 / 72px 72px,
        linear-gradient(180deg, #f3faf8 0%, #f8fafc 56%, #f6f7fb 100%);
}

html[data-theme="light"] body::after {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    z-index: 140;
    height: 3px;
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-cyan), var(--xz-green));
    pointer-events: none;
}

html[data-theme="light"] .sidebar {
    border-right-color: var(--xz-line);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.9), 12px 0 34px rgba(15, 23, 42, 0.045);
}

html[data-theme="light"] .sidebar-header {
    padding: 18px 16px 16px;
    background: linear-gradient(180deg, #ffffff, rgba(246, 250, 251, 0.82));
}

html[data-theme="light"] .logo {
    gap: 11px;
}

html[data-theme="light"] .logo-icon {
    width: 40px;
    height: 40px;
    border-color: rgba(124, 58, 237, 0.18);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.12);
}

html[data-theme="light"] .logo-text {
    font-size: 1rem;
    line-height: 1.18;
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal));
    -webkit-background-clip: text;
    background-clip: text;
}

html[data-theme="light"] .nav-section {
    margin-bottom: 18px;
}

html[data-theme="light"] .nav-section-title {
    padding: 0 10px;
    color: #7b8794;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.03em;
}

html[data-theme="light"][data-active-page] .sidebar .nav-item,
html[data-theme="light"] .sidebar .nav-item:not(.active) {
    min-height: 38px;
    margin: 4px 0;
    padding: 9px 10px;
    border-radius: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .sidebar .nav-item[data-page="dashboard"],
html[data-theme="light"][data-active-page="market"] .sidebar .nav-item[data-page="market"],
html[data-theme="light"][data-active-page="orders"] .sidebar .nav-item[data-page="orders"],
html[data-theme="light"][data-active-page="import"] .sidebar .nav-item[data-page="import"],
html[data-theme="light"][data-active-page="wallet"] .sidebar .nav-item[data-page="wallet"],
html[data-theme="light"][data-active-page="quality"] .sidebar .nav-item[data-page="quality"],
html[data-theme="light"][data-active-page="auto-refill"] .sidebar .nav-item[data-page="auto-refill"],
html[data-theme="light"][data-active-page="warranty"] .sidebar .nav-item[data-page="warranty"],
html[data-theme="light"][data-active-page="settings"] .sidebar .nav-item[data-page="settings"] {
    border-color: rgba(124, 58, 237, 0.22) !important;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.09), rgba(20, 184, 166, 0.08), #ffffff) !important;
    color: #5b21b6 !important;
    box-shadow: inset 3px 0 0 var(--xz-purple), 0 8px 18px rgba(15, 23, 42, 0.045);
}

html[data-theme="light"] .nav-badge,
html[data-theme="light"] .nav-badge-dot {
    background: linear-gradient(135deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"] .topbar {
    height: 58px;
    padding: 0 22px;
    border-bottom-color: var(--xz-line);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

html[data-theme="light"] .breadcrumb-current {
    font-size: 0.98rem;
}

html[data-theme="light"] .topbar-ai-status {
    height: 36px;
    border-color: rgba(124, 58, 237, 0.18);
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.08), rgba(20, 184, 166, 0.08));
    color: #5b21b6;
}

html[data-theme="light"] .topbar-ai-status kbd,
html[data-theme="light"] .search-shortcut {
    border-color: var(--xz-line);
    background: #f8fafc;
    color: #718096;
}

html[data-theme="light"] .search-box {
    height: 38px;
    padding: 8px 12px;
    border-color: var(--xz-line);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.96);
}

html[data-theme="light"] .search-box:focus-within {
    border-color: rgba(124, 58, 237, 0.36);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

html[data-theme="light"] .topbar-btn,
html[data-theme="light"] .topbar-balance,
html[data-theme="light"] #authTopLoginBtn {
    border-color: var(--xz-line);
    background: #ffffff;
}

html[data-theme="light"] .topbar-balance {
    min-width: 146px;
    height: 38px;
    align-items: flex-end;
    padding: 6px 12px;
}

html[data-theme="light"] .topbar-balance-label {
    color: #7b8794;
    font-size: 0.66rem;
}

html[data-theme="light"] .topbar-balance strong {
    color: var(--xz-ink);
    font-size: 0.9rem;
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .merchant-panel,
html[data-theme="light"] .dashboard-flow-strip,
html[data-theme="light"] .dashboard-notice,
html[data-theme="light"] .xiaozi-ai-panel,
html[data-theme="light"] .dashboard-price-board,
html[data-theme="light"] .dashboard-mission-panel {
    border-color: var(--xz-line);
    background: var(--xz-surface);
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03), 0 18px 40px rgba(15, 23, 42, 0.055);
}

html[data-theme="light"][data-active-page="dashboard"] .page-content {
    max-width: 1500px;
    padding-top: 16px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip {
    position: relative;
    overflow: hidden;
    grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.18fr);
    min-height: 70px;
    margin-bottom: 12px;
    padding: 13px 14px;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.11), rgba(8, 145, 178, 0.08) 45%, rgba(255, 255, 255, 0.92)),
        var(--xz-surface-strong);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-brand .panel-kicker {
    color: var(--xz-purple);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-brand strong {
    color: var(--xz-ink);
    font-size: 1.04rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link {
    min-height: 44px;
    border-color: rgba(216, 231, 234, 0.92);
    background: rgba(255, 255, 255, 0.86);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link:hover {
    border-color: rgba(124, 58, 237, 0.24);
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link span {
    color: #7b8794;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link strong {
    color: var(--xz-ink);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
    grid-template-columns: minmax(318px, 0.74fr) minmax(0, 1.26fr);
    gap: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-panel {
    padding: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice {
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-icon,
html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-avatar,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-ai {
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.13), rgba(13, 148, 136, 0.12));
    color: var(--xz-purple);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-panel {
    border-color: rgba(124, 58, 237, 0.18);
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(20, 184, 166, 0.055)),
        #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-copy h3 {
    color: var(--xz-ink);
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric {
    border: 1px solid rgba(216, 231, 234, 0.95);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric span {
    color: #7b8794;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric strong {
    color: #334155;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board {
    overflow: hidden;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head {
    min-height: 52px;
    border-bottom: 1px solid var(--xz-line);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head .panel-kicker {
    color: var(--xz-teal);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
    gap: 0;
    padding: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    min-height: 132px;
    padding: 11px 12px;
    border-width: 0 1px 0 0;
    border-color: var(--xz-line);
    border-radius: 0;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:last-child {
    border-right-width: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:hover {
    background: #f9fbfc;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-warn.is-selected {
    border-color: rgba(124, 58, 237, 0.3);
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.1), rgba(20, 184, 166, 0.055)),
        #ffffff;
    box-shadow: inset 0 3px 0 var(--xz-purple);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-token {
    border: 1px solid var(--xz-line);
    border-radius: 7px;
    background: #f8fafc;
    color: var(--xz-ink);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-token {
    border-color: rgba(124, 58, 237, 0.3);
    background: #f5f3ff;
    color: #5b21b6;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-state.is-live {
    color: var(--xz-green);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-state.is-warn {
    color: var(--xz-warn);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-state.is-empty {
    color: #7c8798;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board .dashboard-status-meta strong {
    color: var(--xz-ink);
    font-family: var(--font-mono);
    font-size: 0.96rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta small,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom span,
html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    color: var(--xz-muted);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom strong {
    color: var(--xz-ink);
    font-family: var(--font-mono);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    width: 100%;
    justify-content: center;
    border: 1px solid var(--xz-line);
    border-radius: 7px;
    background: #f8fafc;
    font-style: normal;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-action {
    border-color: rgba(124, 58, 237, 0.28);
    background: #f5f3ff;
    color: #5b21b6;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-stock-meter {
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-stock-meter i {
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.28), rgba(13, 148, 136, 0.22), transparent);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card {
    border: 1px solid var(--xz-line);
    border-radius: 8px;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card-head strong {
    border-radius: 7px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel {
    padding: 0;
    overflow: hidden;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header {
    border-bottom: 1px solid var(--xz-line);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header .section-title {
    margin-bottom: 4px;
    color: var(--xz-ink);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-row {
    padding: 9px 14px;
    border-bottom: 1px solid var(--xz-line);
    background: #fbfdfe;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip {
    min-height: 28px;
    border-color: var(--xz-line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--xz-muted);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip.is-active {
    border-color: rgba(124, 58, 237, 0.26);
    background: #f5f3ff;
    color: #5b21b6;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip .money {
    color: var(--xz-cyan);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table-wrap {
    border: 0;
    border-radius: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .data-table th {
    height: 38px;
    border-bottom: 1px solid var(--xz-line);
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
}

html[data-theme="light"][data-active-page="dashboard"] .data-table td {
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .data-table tbody tr:hover td {
    background: #f8fbfc;
}

html[data-theme="light"][data-active-page="dashboard"] .rank-pill,
html[data-theme="light"][data-active-page="dashboard"] .risk-pill,
html[data-theme="light"][data-active-page="dashboard"] .recommend-pill {
    border-radius: 7px;
}

html[data-theme="light"][data-active-page="dashboard"] .rank-pill {
    border: 1px solid var(--xz-line);
    background: #f8fafc;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-avatar {
    border: 1px solid rgba(13, 148, 136, 0.18);
    border-radius: 8px;
    background: #f0fdfa;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-product strong,
html[data-theme="light"][data-active-page="dashboard"] .merchant-name strong {
    color: var(--xz-ink);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-subtext,
html[data-theme="light"][data-active-page="dashboard"] .merchant-product span,
html[data-theme="light"][data-active-page="dashboard"] .merchant-name span {
    color: #7b8794;
}

@media (min-width: 1281px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    html[data-theme="light"] .topbar {
        gap: 12px;
        padding: 0 14px;
    }

    html[data-theme="light"] .topbar-center {
        max-width: 360px;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    html[data-theme="light"] .topbar-center {
        display: none;
    }

    html[data-theme="light"] .topbar-ai-status kbd,
    html[data-theme="light"] .topbar-ai-status span {
        display: none;
    }

    html[data-theme="light"] .topbar-balance {
        min-width: 118px;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip {
        min-height: 0;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-top: 1px solid var(--xz-line);
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        border-width: 0 1px 1px 0;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:nth-child(2n) {
        border-right-width: 0;
    }
}

@media (max-width: 520px) {
    html[data-theme="light"] .topbar-right {
        gap: 7px;
    }

    html[data-theme="light"] #authTopLoginBtn,
    html[data-theme="light"] .notification-btn {
        display: none;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-links,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        border-right-width: 0;
    }
}

/* === Order delivery command panel: 20260705-26 === */
.order-export-radar {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.order-export-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.order-export-head strong {
    display: block;
    margin-top: 2px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.35;
}

.order-export-head p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.order-export-head em {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.12);
    color: var(--accent-tertiary);
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 900;
    white-space: nowrap;
}

.order-export-format-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.order-export-format-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.order-export-format-card strong,
.order-export-format-card span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-export-format-card strong {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 900;
}

.order-export-format-card span {
    margin-top: 2px;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-weight: 800;
}

.order-export-format-card em {
    min-width: 34px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.13);
    color: var(--text-secondary);
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.order-export-format-card button {
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 900;
    white-space: nowrap;
}

.order-export-format-card button:hover:not(:disabled) {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.order-export-format-card button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.order-export-format-card.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
}

.order-export-format-card.is-review,
.order-export-format-card.is-warn {
    border-color: rgba(245, 158, 11, 0.36);
}

.order-export-format-card.is-blocked {
    border-color: rgba(239, 68, 68, 0.3);
}

.order-export-field-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.order-export-field-card {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.order-export-field-card span {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.68rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-export-field-card strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.2;
}

.order-export-field-card i {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.order-export-field-card i b {
    display: block;
    height: 100%;
    min-width: 6px;
    border-radius: inherit;
    background: var(--accent-gradient);
}

.order-export-field-card.is-review i b {
    background: linear-gradient(135deg, #f59e0b, #7c3aed);
}

.order-export-field-card.is-blocked {
    border-color: rgba(239, 68, 68, 0.3);
}

.order-export-field-card.is-blocked i b {
    background: #ef4444;
}

html[data-theme="light"] .order-export-head,
html[data-theme="light"] .order-export-format-card,
html[data-theme="light"] .order-export-field-card {
    border-color: #dbe8eb;
    background: rgba(248, 250, 252, 0.9);
}

html[data-theme="light"] .order-export-head strong,
html[data-theme="light"] .order-export-format-card strong,
html[data-theme="light"] .order-export-field-card strong {
    color: #0f172a;
}

html[data-theme="light"] .order-export-head p,
html[data-theme="light"] .order-export-format-card span,
html[data-theme="light"] .order-export-format-card em,
html[data-theme="light"] .order-export-format-card button,
html[data-theme="light"] .order-export-field-card span {
    color: #64748b;
}

html[data-theme="light"] .order-export-format-card button {
    border-color: #dbe8eb;
    background: #ffffff;
}

html[data-theme="light"] .order-export-format-card button:hover:not(:disabled) {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #0f766e;
}

html[data-theme="light"] .order-export-format-card.is-ready,
html[data-theme="light"] .order-export-field-card.is-ready {
    border-color: rgba(20, 184, 166, 0.32);
    background: rgba(240, 253, 250, 0.84);
}

html[data-theme="light"] .order-export-format-card.is-review,
html[data-theme="light"] .order-export-format-card.is-warn,
html[data-theme="light"] .order-export-field-card.is-review {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(255, 247, 237, 0.84);
}

html[data-theme="light"] .order-export-format-card.is-blocked,
html[data-theme="light"] .order-export-field-card.is-blocked {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(254, 242, 242, 0.84);
}

.order-delivery-decision {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.order-decision-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 900;
}

.order-decision-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.order-decision-copy strong {
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.3;
}

.order-decision-copy p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.order-decision-metrics,
.order-decision-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.order-decision-metrics span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-secondary);
}

.order-decision-metrics em {
    color: var(--text-tertiary);
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 850;
    white-space: nowrap;
}

.order-decision-metrics b {
    max-width: 150px;
    overflow: hidden;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-decision-actions {
    justify-content: flex-end;
    max-width: 280px;
}

.order-decision-actions .btn {
    min-height: 31px;
    padding: 5px 9px;
    white-space: nowrap;
}

.order-delivery-decision.is-ready {
    border-color: rgba(20, 184, 166, 0.34);
}

.order-delivery-decision.is-warn {
    border-color: rgba(245, 158, 11, 0.36);
}

.order-delivery-decision.is-done {
    border-color: rgba(5, 150, 105, 0.28);
}

.order-delivery-decision.is-muted {
    opacity: 0.92;
}

html[data-theme="light"] .order-delivery-decision {
    border-color: #dbe8eb;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.075), rgba(20, 184, 166, 0.055) 52%, rgba(255, 255, 255, 0.94)),
        #ffffff;
}

html[data-theme="light"] .order-delivery-decision.is-ready {
    border-color: rgba(20, 184, 166, 0.34);
    background:
        linear-gradient(112deg, rgba(20, 184, 166, 0.1), rgba(255, 255, 255, 0.94)),
        #ffffff;
}

html[data-theme="light"] .order-delivery-decision.is-warn {
    border-color: rgba(245, 158, 11, 0.36);
    background:
        linear-gradient(112deg, rgba(245, 158, 11, 0.11), rgba(255, 255, 255, 0.94)),
        #ffffff;
}

html[data-theme="light"] .order-delivery-decision.is-done {
    border-color: rgba(5, 150, 105, 0.28);
}

html[data-theme="light"] .order-decision-icon {
    background: linear-gradient(135deg, #7c3aed, #0d9488);
}

html[data-theme="light"] .order-decision-copy strong,
html[data-theme="light"] .order-decision-metrics b {
    color: #0f172a;
}

html[data-theme="light"] .order-decision-copy p,
html[data-theme="light"] .order-decision-metrics em {
    color: #64748b;
}

html[data-theme="light"] .order-decision-metrics span {
    border-color: #dbe8eb;
    background: rgba(255, 255, 255, 0.76);
}

@media (max-width: 980px) {
    .order-export-format-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-export-field-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .order-delivery-decision {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: flex-start;
    }

    .order-decision-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        max-width: none;
        padding-left: 52px;
    }
}

@media (max-width: 560px) {
    .order-export-head,
    .order-export-format-card {
        grid-template-columns: 1fr;
    }

    .order-export-head em,
    .order-export-format-card em,
    .order-export-format-card button {
        justify-self: start;
    }

    .order-export-format-grid,
    .order-export-field-grid {
        grid-template-columns: 1fr;
    }

    .order-delivery-decision {
        grid-template-columns: 1fr;
    }

    .order-decision-icon {
        width: 36px;
        height: 36px;
    }

    .order-decision-actions {
        padding-left: 0;
    }

    .order-decision-actions .btn {
        flex: 1 1 auto;
    }
}

/* === Xiaozi trading desk reference alignment: 20260705-29 === */
html[data-theme="light"] {
    --xz-page: #f3f7f8;
    --xz-panel: #ffffff;
    --xz-panel-soft: #f8fbfc;
    --xz-panel-muted: #eef6f7;
    --xz-border: #d7e5e7;
    --xz-border-strong: #b9d3d8;
    --xz-text: #0f172a;
    --xz-text-soft: #334155;
    --xz-muted: #64748b;
    --xz-faint: #7c8798;
    --xz-purple: #7c3aed;
    --xz-purple-soft: #f4f0ff;
    --xz-teal: #0f766e;
    --xz-teal-soft: #e7fbf8;
    --xz-blue: #2563eb;
    --xz-amber: #b7791f;
    --xz-red: #dc2626;
    --xz-green: #059669;
    --xz-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
    --xz-shadow-soft: 0 1px 1px rgba(15, 23, 42, 0.035);
    --sidebar-width: 238px;
    --topbar-height: 58px;
    --radius-sm: 6px;
    --radius-md: 7px;
    --radius-lg: 8px;
    --radius-xl: 8px;
    --radius-2xl: 8px;
}

html[data-theme="light"] body {
    background:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(180deg, #eef7f7 0%, #f7fafc 42%, #f4f7fb 100%);
    color: var(--xz-text);
    font-size: 14px;
}

html[data-theme="light"] body::before {
    display: none;
}

html[data-theme="light"] body::after {
    height: 2px;
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal), var(--xz-blue));
}

html[data-theme="light"] .main-content {
    min-height: 100vh;
    background: transparent;
}

html[data-theme="light"] .page-content {
    width: 100%;
    max-width: 1540px;
    padding: 16px 18px 28px;
}

html[data-theme="light"] .page {
    gap: 14px;
}

html[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-right: 1px solid var(--xz-border);
    box-shadow: 10px 0 26px rgba(15, 23, 42, 0.045);
}

html[data-theme="light"] .sidebar-header {
    min-height: var(--topbar-height);
    padding: 13px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f7fbfc);
}

html[data-theme="light"] .logo {
    gap: 10px;
}

html[data-theme="light"] .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(124, 58, 237, 0.2);
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.12);
}

html[data-theme="light"] .logo-text {
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: 0;
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal));
    -webkit-background-clip: text;
    background-clip: text;
}

html[data-theme="light"] .logo-subtitle {
    color: var(--xz-muted);
    font-size: 0.68rem;
}

html[data-theme="light"] .sidebar-nav {
    padding: 12px 10px;
}

html[data-theme="light"] .nav-section {
    margin-bottom: 14px;
}

html[data-theme="light"] .nav-section-title {
    padding: 0 8px 6px;
    color: #718096;
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

html[data-theme="light"][data-active-page] .sidebar .nav-item,
html[data-theme="light"] .sidebar .nav-item:not(.active) {
    min-height: 36px;
    margin: 3px 0;
    padding: 8px 9px;
    border: 1px solid transparent !important;
    border-radius: 7px;
    background: transparent !important;
    color: #475569 !important;
    font-weight: 800;
}

html[data-theme="light"][data-active-page] .sidebar .nav-item:hover,
html[data-theme="light"] .sidebar .nav-item:not(.active):hover {
    border-color: var(--xz-border) !important;
    background: #f8fbfc !important;
    color: var(--xz-text) !important;
}

html[data-theme="light"][data-active-page="dashboard"] .sidebar .nav-item[data-page="dashboard"],
html[data-theme="light"][data-active-page="market"] .sidebar .nav-item[data-page="market"],
html[data-theme="light"][data-active-page="orders"] .sidebar .nav-item[data-page="orders"],
html[data-theme="light"][data-active-page="import"] .sidebar .nav-item[data-page="import"],
html[data-theme="light"][data-active-page="wallet"] .sidebar .nav-item[data-page="wallet"],
html[data-theme="light"][data-active-page="quality"] .sidebar .nav-item[data-page="quality"],
html[data-theme="light"][data-active-page="auto-refill"] .sidebar .nav-item[data-page="auto-refill"],
html[data-theme="light"][data-active-page="warranty"] .sidebar .nav-item[data-page="warranty"],
html[data-theme="light"][data-active-page="settings"] .sidebar .nav-item[data-page="settings"] {
    border-color: rgba(124, 58, 237, 0.22) !important;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.1), rgba(15, 118, 110, 0.06), #ffffff) !important;
    color: #5b21b6 !important;
    box-shadow: inset 3px 0 0 var(--xz-purple), 0 8px 16px rgba(15, 23, 42, 0.045);
}

html[data-theme="light"] .nav-icon {
    width: 16px;
    height: 16px;
}

html[data-theme="light"] .nav-count,
html[data-theme="light"] .nav-badge,
html[data-theme="light"] .nav-badge-dot {
    border: 1px solid rgba(124, 58, 237, 0.18);
    background: var(--xz-purple-soft);
    color: #6d28d9;
}

html[data-theme="light"] .sidebar-footer {
    padding: 10px;
    border-top: 1px solid var(--xz-border);
    background: #fbfdfe;
}

html[data-theme="light"] .user-card {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: #ffffff;
}

html[data-theme="light"] .topbar {
    height: var(--topbar-height);
    padding: 0 18px;
    border-bottom: 1px solid var(--xz-border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--xz-shadow-soft), 0 10px 26px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .breadcrumb-current {
    color: var(--xz-text);
    font-size: 0.95rem;
    font-weight: 900;
}

html[data-theme="light"] .topbar-ai-status,
html[data-theme="light"] .topbar-balance,
html[data-theme="light"] .topbar-btn,
html[data-theme="light"] #authTopLoginBtn {
    height: 36px;
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #ffffff;
    color: var(--xz-text-soft);
    box-shadow: none;
}

html[data-theme="light"] .topbar-ai-status {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.08), rgba(15, 118, 110, 0.07));
    color: #5b21b6;
}

html[data-theme="light"] .topbar-ai-status img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

html[data-theme="light"] .topbar-ai-status kbd,
html[data-theme="light"] .search-shortcut {
    border-color: var(--xz-border);
    background: #f8fafc;
    color: var(--xz-muted);
}

html[data-theme="light"] .search-box {
    height: 38px;
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #f8fbfc;
}

html[data-theme="light"] .search-box:focus-within {
    border-color: rgba(124, 58, 237, 0.38);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

html[data-theme="light"] .topbar-balance {
    min-width: 152px;
    align-items: flex-end;
    padding: 6px 12px;
    background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

html[data-theme="light"] .topbar-balance-label {
    color: var(--xz-muted);
    font-size: 0.66rem;
    font-weight: 900;
}

html[data-theme="light"] .topbar-balance strong {
    color: var(--xz-text);
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

html[data-theme="light"] .btn {
    min-height: 34px;
    border-radius: 7px;
    font-weight: 850;
    letter-spacing: 0;
}

html[data-theme="light"] .btn-sm {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

html[data-theme="light"] .btn-primary {
    border: 1px solid rgba(124, 58, 237, 0.18);
    background: linear-gradient(135deg, #7c3aed, #0f766e);
    color: #ffffff;
    box-shadow: 0 9px 18px rgba(124, 58, 237, 0.16);
}

html[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.2);
}

html[data-theme="light"] .btn-glass {
    border: 1px solid var(--xz-border);
    background: #ffffff;
    color: var(--xz-text-soft);
    box-shadow: none;
}

html[data-theme="light"] .btn-glass:hover {
    border-color: var(--xz-border-strong);
    background: var(--xz-panel-soft);
    color: var(--xz-text);
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .purchase-history-panel,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .upload-zone,
html[data-theme="light"] .import-options,
html[data-theme="light"] .import-ai-card,
html[data-theme="light"] .import-history,
html[data-theme="light"] .quality-overview,
html[data-theme="light"] .quality-actions,
html[data-theme="light"] .refill-dispatch-panel,
html[data-theme="light"] .refill-config-card,
html[data-theme="light"] .refill-logs-card,
html[data-theme="light"] .warranty-ai-panel,
html[data-theme="light"] .warranty-stats,
html[data-theme="light"] .warranty-table-wrap,
html[data-theme="light"] .wallet-balance-area,
html[data-theme="light"] .wallet-radar-panel,
html[data-theme="light"] .wallet-risk-panel,
html[data-theme="light"] .redeem-console,
html[data-theme="light"] .wallet-review-panel,
html[data-theme="light"] .wallet-transactions,
html[data-theme="light"] .settings-nav,
html[data-theme="light"] .settings-main {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--xz-shadow-soft), var(--xz-shadow);
}

html[data-theme="light"] .glass-card:hover,
html[data-theme="light"] .market-product-row:hover {
    border-color: var(--xz-border-strong);
    transform: none;
}

html[data-theme="light"] .panel-kicker {
    margin-bottom: 5px;
    color: var(--xz-teal);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.04em;
}

html[data-theme="light"] .section-title,
html[data-theme="light"] .market-list-header h4,
html[data-theme="light"] .workbench-card-header h4,
html[data-theme="light"] .import-radar-head h4,
html[data-theme="light"] .wallet-risk-head h3,
html[data-theme="light"] .quality-triage-head h4,
html[data-theme="light"] .warranty-ai-title h3 {
    color: var(--xz-text);
    font-size: 1.02rem;
    font-weight: 950;
    line-height: 1.25;
}

html[data-theme="light"] .redeem-desc,
html[data-theme="light"] .market-list-header p,
html[data-theme="light"] .workbench-card-header p,
html[data-theme="light"] .import-radar-advice,
html[data-theme="light"] .wallet-ai-advice,
html[data-theme="light"] .wallet-risk-head p,
html[data-theme="light"] .warranty-ai-title p {
    color: var(--xz-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

html[data-theme="light"] .data-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
}

html[data-theme="light"] .data-table th {
    height: 38px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--xz-border);
    background: #f3f8f9;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.02em;
}

html[data-theme="light"] .data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e7eef1;
    background: #ffffff;
    color: var(--xz-text-soft);
}

html[data-theme="light"] .data-table tbody tr:hover td {
    background: #f8fbfc;
}

html[data-theme="light"] .money,
html[data-theme="light"] .account-price,
html[data-theme="light"] .wallet-balance,
html[data-theme="light"] .wallet-radar-item strong,
html[data-theme="light"] .order-delivery-metric strong,
html[data-theme="light"] .confirm-metrics strong {
    font-family: var(--font-mono);
    letter-spacing: 0;
}

html[data-theme="light"] .purchase-workbench-header {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.095), rgba(15, 118, 110, 0.065) 46%, rgba(255, 255, 255, 0.96)),
        #ffffff;
}

html[data-theme="light"] .purchase-workbench-header::before,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"][data-active-page="dashboard"] .page-content {
    max-width: 1540px;
    padding-top: 14px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip {
    min-height: 66px;
    margin-bottom: 12px;
    padding: 12px 14px;
    grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.14fr);
    border-color: var(--xz-border);
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.09), rgba(15, 118, 110, 0.06) 48%, rgba(255, 255, 255, 0.96)),
        #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-brand strong {
    color: var(--xz-text);
    font-size: 1.02rem;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-links {
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.82);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
    grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
    gap: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-panel,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board {
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-panel {
    padding: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-title-row strong,
html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-copy h3 {
    color: var(--xz-text);
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-body p,
html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-copy p {
    color: var(--xz-muted);
    font-size: 0.84rem;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-icon,
html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-avatar,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-ai {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(15, 118, 110, 0.1));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-metrics {
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric,
html[data-theme="light"] .market-ai-metric,
html[data-theme="light"] .wallet-radar-item,
html[data-theme="light"] .order-delivery-metric,
html[data-theme="light"] .import-radar-metric,
html[data-theme="light"] .quality-snapshot-card,
html[data-theme="light"] .warranty-stat-item {
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: var(--xz-panel-soft);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board {
    overflow: hidden;
    padding: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head {
    min-height: 50px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    min-height: 122px;
    padding: 10px 11px;
    border: 0;
    border-right: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:last-child {
    border-right: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:hover {
    background: #f9fcfc;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-warn.is-selected {
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.1), rgba(15, 118, 110, 0.055)),
        #ffffff;
    box-shadow: inset 0 3px 0 var(--xz-purple);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-token {
    border: 1px solid var(--xz-border);
    border-radius: 6px;
    background: #f8fafc;
    color: var(--xz-text);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta strong {
    color: var(--xz-text);
    font-size: 0.98rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta small,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom span,
html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    color: var(--xz-muted);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    width: 100%;
    min-height: 27px;
    justify-content: center;
    border: 1px solid var(--xz-border);
    border-radius: 6px;
    background: #f8fafc;
    font-style: normal;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-action {
    border-color: rgba(124, 58, 237, 0.26);
    background: var(--xz-purple-soft);
    color: #5b21b6;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-stock-meter {
    height: 5px;
    background: #e2e8f0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-stock-meter i {
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
    padding: 12px;
    margin-bottom: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card {
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel {
    overflow: hidden;
    padding: 0;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header {
    padding: 13px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-row {
    padding: 8px 12px;
    border-bottom: 1px solid var(--xz-border);
    background: #fbfdfe;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip {
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--xz-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--xz-muted);
    font-size: 0.78rem;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip.is-active {
    border-color: rgba(124, 58, 237, 0.25);
    background: var(--xz-purple-soft);
    color: #5b21b6;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip .money {
    color: var(--xz-blue);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table-wrap {
    border: 0;
    border-radius: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-avatar {
    border-radius: 7px;
    background: var(--xz-teal-soft);
    color: var(--xz-teal);
}

html[data-theme="light"] .purchase-workbench-grid {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.43fr);
    gap: 12px;
    margin-bottom: 12px;
}

html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-history-panel,
html[data-theme="light"] .order-delivery-radar {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .workbench-card-header,
html[data-theme="light"] .market-list-header,
html[data-theme="light"] .order-delivery-radar-head,
html[data-theme="light"] .import-radar-head,
html[data-theme="light"] .wallet-review-head {
    margin: 0;
    padding: 13px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"] .purchase-builder > .filter-tabs,
html[data-theme="light"] .purchase-builder > .purchase-quantity-block,
html[data-theme="light"] .purchase-builder > .toolbar-search,
html[data-theme="light"] .purchase-builder > .search-filters,
html[data-theme="light"] .purchase-builder > .purchase-sort-row {
    margin: 0 14px 12px;
}

html[data-theme="light"] .purchase-builder > .filter-tabs {
    margin-top: 13px;
}

html[data-theme="light"] .filter-tabs {
    gap: 6px;
}

html[data-theme="light"] .filter-tab,
html[data-theme="light"] .chip-filter,
html[data-theme="light"] .quick-quantity-row button,
html[data-theme="light"] .sort-select,
html[data-theme="light"] .form-input,
html[data-theme="light"] .form-select,
html[data-theme="light"] .toolbar-search,
html[data-theme="light"] .purchase-quantity-control,
html[data-theme="light"] .purchase-quantity-block,
html[data-theme="light"] .confirm-selected-product,
html[data-theme="light"] .confirm-metrics div {
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #ffffff;
    color: var(--xz-text-soft);
    box-shadow: none;
}

html[data-theme="light"] .filter-tab {
    min-height: 31px;
    padding: 6px 12px;
    font-size: 0.8rem;
}

html[data-theme="light"] .filter-tab.active {
    border-color: rgba(124, 58, 237, 0.24);
    background: var(--xz-purple-soft);
    color: #5b21b6;
    box-shadow: none;
}

html[data-theme="light"] .purchase-quantity-block {
    padding: 12px;
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .purchase-quantity-control button {
    border-color: var(--xz-border);
    background: #ffffff;
    color: var(--xz-text-soft);
}

html[data-theme="light"] .purchase-quantity-control input,
html[data-theme="light"] .toolbar-search input,
html[data-theme="light"] .form-input,
html[data-theme="light"] .form-select {
    color: var(--xz-text);
}

html[data-theme="light"] .toolbar-search {
    padding: 9px 12px;
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .search-filters {
    gap: 7px;
}

html[data-theme="light"] .chip-filter {
    min-height: 29px;
    padding: 5px 10px;
    font-size: 0.76rem;
}

html[data-theme="light"] .chip-filter.active,
html[data-theme="light"] .chip-filter:hover {
    border-color: rgba(15, 118, 110, 0.25);
    background: var(--xz-teal-soft);
    color: var(--xz-teal);
}

html[data-theme="light"] .purchase-sort-row {
    padding-top: 0;
}

html[data-theme="light"] .purchase-confirm .confirm-selected-product,
html[data-theme="light"] .purchase-confirm .confirm-metrics,
html[data-theme="light"] .purchase-confirm .purchase-hint,
html[data-theme="light"] .purchase-confirm .market-preflight-panel,
html[data-theme="light"] .purchase-confirm .btn-lg {
    margin-left: 14px;
    margin-right: 14px;
}

html[data-theme="light"] .confirm-selected-product {
    min-height: 96px;
    padding: 13px;
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .confirm-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

html[data-theme="light"] .confirm-metrics div {
    padding: 10px;
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .purchase-confirm .btn-lg {
    width: calc(100% - 28px);
    margin-bottom: 14px;
}

html[data-theme="light"] .market-preflight-panel {
    border-color: var(--xz-border);
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .market-ai-advisor {
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 0.9fr) auto;
    gap: 12px;
    padding: 13px 14px;
    margin-bottom: 12px;
    border-color: rgba(15, 118, 110, 0.22);
    background:
        linear-gradient(112deg, rgba(15, 118, 110, 0.075), rgba(124, 58, 237, 0.06), rgba(255, 255, 255, 0.96)),
        #ffffff;
}

html[data-theme="light"] .market-ai-avatar,
html[data-theme="light"] .import-ai-head img,
html[data-theme="light"] .warranty-ai-title img,
html[data-theme="light"] .assistant-head img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

html[data-theme="light"] .market-ai-head h4,
html[data-theme="light"] .import-ai-head h3 {
    color: var(--xz-text);
    font-size: 0.98rem;
    font-weight: 950;
}

html[data-theme="light"] .market-ai-head p,
html[data-theme="light"] .import-ai-head p {
    color: var(--xz-muted);
    font-size: 0.82rem;
}

html[data-theme="light"] .market-ai-metrics {
    grid-template-columns: repeat(4, minmax(72px, 1fr));
    gap: 7px;
}

html[data-theme="light"] .market-ai-metric {
    padding: 8px 9px;
}

html[data-theme="light"] .market-list-panel .market-list-header {
    border-bottom: 1px solid var(--xz-border);
}

html[data-theme="light"] .market-grid.market-purchase-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

html[data-theme="light"] .market-product-row {
    grid-template-columns: minmax(96px, auto) minmax(260px, 1fr) minmax(190px, auto) minmax(148px, auto);
    min-height: 72px;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"] .market-product-row:last-child {
    border-bottom: 0;
}

html[data-theme="light"] .market-product-row.is-selected {
    border-bottom-color: rgba(124, 58, 237, 0.28);
    background:
        linear-gradient(90deg, rgba(124, 58, 237, 0.09), rgba(15, 118, 110, 0.045), #ffffff);
    box-shadow: inset 3px 0 0 var(--xz-purple);
}

html[data-theme="light"] .market-product-row .account-card-header {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

html[data-theme="light"] .account-type-badge,
html[data-theme="light"] .account-quality,
html[data-theme="light"] .status-badge,
html[data-theme="light"] .rank-pill,
html[data-theme="light"] .risk-pill,
html[data-theme="light"] .recommend-pill,
html[data-theme="light"] .tx-type,
html[data-theme="light"] .import-preview-pill,
html[data-theme="light"] .import-quota-status {
    min-height: 24px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 900;
}

html[data-theme="light"] .account-type-badge {
    border: 1px solid rgba(124, 58, 237, 0.22);
    background: var(--xz-purple-soft);
    color: #5b21b6;
}

html[data-theme="light"] .account-quality {
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: var(--xz-teal-soft);
    color: var(--xz-teal);
}

html[data-theme="light"] .market-product-main h4,
html[data-theme="light"] .account-model {
    color: var(--xz-text);
    font-size: 0.95rem;
    font-weight: 950;
}

html[data-theme="light"] .market-product-main p,
html[data-theme="light"] .market-product-row .account-sla {
    color: var(--xz-muted);
    font-size: 0.8rem;
}

html[data-theme="light"] .account-price {
    color: var(--xz-text);
    font-size: 1.02rem;
    font-weight: 950;
}

html[data-theme="light"] .purchase-history-filters,
html[data-theme="light"] .purchase-history-actions {
    padding: 10px 14px;
    border-color: var(--xz-border);
    background: #fbfdfe;
}

html[data-theme="light"] .purchase-history-table-wrap,
html[data-theme="light"] .wallet-review-table-wrap,
html[data-theme="light"] .orders-table-wrap,
html[data-theme="light"] .quality-risk-table-wrap,
html[data-theme="light"] .import-preview-table-wrap {
    border-radius: 0;
    background: #ffffff;
}

html[data-theme="light"] .order-delivery-radar-grid,
html[data-theme="light"] .order-triage-lanes,
html[data-theme="light"] .order-export-radar,
html[data-theme="light"] .import-radar-grid,
html[data-theme="light"] .wallet-radar-grid {
    padding: 12px 14px 0;
}

html[data-theme="light"] .order-delivery-advice,
html[data-theme="light"] .wallet-ai-advice,
html[data-theme="light"] .import-radar-advice {
    margin: 12px 14px 14px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 7px;
    background: var(--xz-purple-soft);
    color: #5b21b6;
}

html[data-theme="light"] .order-delivery-decision {
    margin: 12px 14px 0;
}

html[data-theme="light"] .import-radar {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .import-layout {
    grid-template-columns: minmax(300px, 0.78fr) minmax(280px, 0.45fr);
    gap: 12px;
    margin-bottom: 12px;
}

html[data-theme="light"] .upload-zone {
    padding: 32px 24px;
    border-style: dashed;
    background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

html[data-theme="light"] .upload-icon-wrap {
    border-radius: 8px;
    background: var(--xz-purple-soft);
    color: var(--xz-purple);
}

html[data-theme="light"] .upload-formats,
html[data-theme="light"] .import-ai-actions {
    gap: 8px;
}

html[data-theme="light"] .format-tag {
    border: 1px solid var(--xz-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--xz-muted);
}

html[data-theme="light"] .import-options {
    padding: 16px;
}

html[data-theme="light"] .radio-option,
html[data-theme="light"] .checkbox-label {
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .import-ai-card {
    grid-column: 1 / -1;
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .import-ai-head,
html[data-theme="light"] .import-preview-head {
    padding: 13px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"] .import-paste-area {
    width: calc(100% - 28px);
    margin: 14px;
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #fbfdfe;
    color: var(--xz-text);
}

html[data-theme="light"] .import-ai-summary,
html[data-theme="light"] .import-preview-insights,
html[data-theme="light"] .import-format-radar,
html[data-theme="light"] .import-preview-panel,
html[data-theme="light"] .import-ai-actions {
    margin-left: 14px;
    margin-right: 14px;
}

html[data-theme="light"] .import-ai-actions {
    margin-bottom: 14px;
}

html[data-theme="light"] .import-history {
    overflow: hidden;
    padding: 0;
}

html[data-theme="light"] .import-history > .section-title,
html[data-theme="light"] .wallet-transactions > .section-title {
    margin: 0;
    padding: 13px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"] .wallet-overview {
    grid-template-columns: minmax(300px, 0.78fr) minmax(360px, 1.22fr);
    gap: 12px;
    margin-bottom: 12px;
}

html[data-theme="light"] .wallet-balance-area,
html[data-theme="light"] .wallet-radar-panel,
html[data-theme="light"] .wallet-transactions {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .wallet-balance-area {
    justify-content: flex-start;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.085), rgba(15, 118, 110, 0.06)),
        #ffffff;
}

html[data-theme="light"] .wallet-label {
    color: var(--xz-muted);
    font-size: 0.78rem;
    font-weight: 950;
}

html[data-theme="light"] .wallet-balance {
    color: var(--xz-text);
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0;
}

html[data-theme="light"] .wallet-actions {
    margin-top: 16px;
    flex-wrap: wrap;
}

html[data-theme="light"] .wallet-chart-head {
    margin: 0;
    padding: 13px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"] .mini-chart {
    min-height: 108px;
    padding: 8px 14px 0;
}

html[data-theme="light"] .wallet-trend-note {
    padding: 0 14px;
}

html[data-theme="light"] .wallet-risk-panel,
html[data-theme="light"] .redeem-console,
html[data-theme="light"] .wallet-review-panel {
    margin-bottom: 12px;
}

html[data-theme="light"] .redeem-console {
    padding: 14px;
}

html[data-theme="light"] .redeem-form {
    gap: 8px;
}

html[data-theme="light"] .wallet-review-count {
    border: 1px solid rgba(124, 58, 237, 0.22);
    background: var(--xz-purple-soft);
    color: #5b21b6;
}

html[data-theme="light"] .quality-overview,
html[data-theme="light"] .quality-actions,
html[data-theme="light"] .refill-dispatch-panel,
html[data-theme="light"] .refill-config-card,
html[data-theme="light"] .refill-logs-card,
html[data-theme="light"] .warranty-ai-panel,
html[data-theme="light"] .warranty-table-wrap {
    overflow: hidden;
}

html[data-theme="light"] .quality-actions,
html[data-theme="light"] .refill-config-card,
html[data-theme="light"] .refill-logs-card,
html[data-theme="light"] .warranty-ai-panel,
html[data-theme="light"] .warranty-table-wrap {
    padding: 14px;
}

html[data-theme="light"] .quality-controls,
html[data-theme="light"] .refill-toolbar,
html[data-theme="light"] .warranty-toolbar {
    gap: 8px;
}

html[data-theme="light"] .config-item,
html[data-theme="light"] .timeline-item,
html[data-theme="light"] .quality-triage-panel,
html[data-theme="light"] .quality-flow-panel,
html[data-theme="light"] .warranty-triage-grid > *,
html[data-theme="light"] .refill-task-card,
html[data-theme="light"] .wallet-risk-lane,
html[data-theme="light"] .import-preview-decision,
html[data-theme="light"] .import-preview-lane,
html[data-theme="light"] .import-format-radar-head,
html[data-theme="light"] .import-format-card,
html[data-theme="light"] .import-field-card {
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .xiaozi-assistant-panel {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .xiaozi-assistant-fab {
    border-radius: 10px;
    background: linear-gradient(135deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"] .assistant-head {
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"] .assistant-message,
html[data-theme="light"] .assistant-signal,
html[data-theme="light"] .assistant-next-step,
html[data-theme="light"] .assistant-playbook,
html[data-theme="light"] .assistant-playbook-step,
html[data-theme="light"] .assistant-guardrail,
html[data-theme="light"] .assistant-insight,
html[data-theme="light"] .assistant-risk,
html[data-theme="light"] .assistant-command-hints button {
    border-color: var(--xz-border);
    background: var(--xz-panel-soft);
}

/* === Dashboard tier-linked trading desk after skin layers: 20260705-59 === */
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-token,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-bottom strong {
    color: #0f172a !important;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .stock-line,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-bottom span,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-state {
    color: #64748b !important;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board {
    border-color: #b9cbd2;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head {
    align-items: center;
    background: linear-gradient(180deg, #ffffff, #f1f7f8);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head small {
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 6px;
    background: #e9fbf7;
    color: #0f766e;
    font-weight: 900;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    position: relative;
    min-height: 140px;
    padding: 12px 12px 11px;
    outline: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    opacity: 0;
    background: linear-gradient(90deg, #7c3aed, #0f766e);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:hover::before,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected::before {
    opacity: 1;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-warn.is-selected {
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.12), rgba(15, 118, 110, 0.055) 54%, #ffffff);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.18);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected::after {
    content: "商家推荐已筛选";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    margin-top: 8px;
    padding: 3px 8px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 6px;
    background: #f3efff;
    color: #5b21b6;
    font-size: 0.72rem;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board .dashboard-status-meta strong {
    font-size: 1.08rem;
    line-height: 1.2;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta .stock-line {
    min-height: 34px;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-token {
    min-width: 54px;
    justify-content: center;
    color: #0f172a;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    margin-top: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel.is-tier-flash {
    border-color: rgba(124, 58, 237, 0.42);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12), 0 14px 30px rgba(15, 23, 42, 0.08);
    animation: dashboardTierFlash 0.9s ease;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel.is-empty-tier .merchant-summary-chip.is-active {
    border-color: rgba(183, 121, 31, 0.25);
    background: #fff8e7;
    color: #92400e;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header .section-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header .section-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 6px;
    background: #f3efff;
    color: #5b21b6;
    font-size: 0.78rem;
    font-weight: 950;
}

html[data-theme="light"] .settings-panel-head {
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--xz-border);
}

html[data-theme="light"] .settings-panel-head p {
    color: var(--xz-muted);
}

@media (max-width: 1180px) {
    html[data-theme="light"] .market-ai-advisor {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .market-ai-actions {
        justify-content: flex-start;
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: minmax(90px, auto) minmax(220px, 1fr) minmax(160px, auto);
    }

    html[data-theme="light"] .market-product-row .account-footer {
        grid-column: 2 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 980px) {
    html[data-theme="light"] .page-content {
        padding: 14px;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell,
    html[data-theme="light"] .purchase-workbench-grid,
    html[data-theme="light"] .import-layout,
    html[data-theme="light"] .wallet-overview {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        border-bottom: 1px solid var(--xz-border);
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:nth-child(2n) {
        border-right: 0;
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    html[data-theme="light"] .market-product-row .account-footer {
        grid-column: auto;
        justify-content: space-between;
    }
}

@media (max-width: 760px) {
    html[data-theme="light"] .topbar {
        padding: 0 12px;
    }

    html[data-theme="light"] .topbar-center,
    html[data-theme="light"] .topbar-ai-status kbd,
    html[data-theme="light"] .topbar-ai-status span {
        display: none;
    }

    html[data-theme="light"] .topbar-balance {
        min-width: 116px;
        padding-inline: 9px;
    }

    html[data-theme="light"] .purchase-workbench-header,
    html[data-theme="light"] .merchant-panel-header,
    html[data-theme="light"] .workbench-card-header,
    html[data-theme="light"] .market-list-header,
    html[data-theme="light"] .order-delivery-radar-head,
    html[data-theme="light"] .wallet-review-head,
    html[data-theme="light"] .redeem-entry {
        flex-direction: column;
        align-items: flex-start;
    }

    html[data-theme="light"] .merchant-header-actions,
    html[data-theme="light"] .purchase-history-actions,
    html[data-theme="light"] .quality-controls,
    html[data-theme="light"] .wallet-actions,
    html[data-theme="light"] .redeem-form {
        width: 100%;
        justify-content: flex-start;
    }

    html[data-theme="light"] .redeem-form .form-input {
        min-width: min(260px, 100%);
    }
}

@media (max-width: 560px) {
    html[data-theme="light"] .page-content {
        padding: 10px;
    }

    html[data-theme="light"] .topbar-right {
        gap: 6px;
    }

    html[data-theme="light"] #authTopLoginBtn,
    html[data-theme="light"] .notification-btn {
        display: none;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-links,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip,
    html[data-theme="light"] .confirm-metrics,
    html[data-theme="light"] .market-ai-metrics,
    html[data-theme="light"] .wallet-radar-grid,
    html[data-theme="light"] .import-radar-grid,
    html[data-theme="light"] .order-delivery-radar-grid {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        border-right: 0;
    }

    html[data-theme="light"] .quick-quantity-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    html[data-theme="light"] .purchase-history-actions .btn,
    html[data-theme="light"] .market-ai-actions .btn,
    html[data-theme="light"] .import-ai-actions .btn {
        flex: 1 1 auto;
    }
}

/* === Xiaozi trading workspace alignment: 20260705-72 === */
html[data-theme="light"] {
    --xz-page: #f3faf8;
    --xz-panel: #ffffff;
    --xz-panel-soft: #f8fbfc;
    --xz-panel-muted: #eef6f7;
    --xz-border: #dbe7ea;
    --xz-border-strong: #b9ccd2;
    --xz-text: #0f172a;
    --xz-text-soft: #334155;
    --xz-muted: #64748b;
    --xz-faint: #7c8798;
    --xz-primary: #0d9488;
    --xz-primary-deep: #0f766e;
    --xz-primary-soft: #e7f8f6;
    --xz-purple: #7c3aed;
    --xz-purple-deep: #5b21b6;
    --xz-purple-soft: #f3efff;
    --xz-cyan: #0891b2;
    --xz-green: #059669;
    --xz-amber: #b7791f;
    --xz-red: #dc2626;
    --xz-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    --xz-shadow-raise: 0 12px 30px rgba(15, 23, 42, 0.075);
    --sidebar-width: 248px;
    --topbar-height: 62px;
}

html[data-theme="light"] body {
    background:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 72px 72px,
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 72px 72px,
        linear-gradient(180deg, #f3faf8 0%, #f7fafc 52%, #f8fafc 100%);
    color: var(--xz-text);
}

html[data-theme="light"] body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    height: 3px;
    pointer-events: none;
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-cyan), var(--xz-green));
}

html[data-theme="light"] .main-content {
    background: transparent;
}

html[data-theme="light"] .page-content {
    width: min(100%, 1580px);
    margin: 0 auto;
    padding: 18px 22px 28px;
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .topbar {
    background: rgba(255, 255, 255, 0.94);
    border-color: var(--xz-border);
    box-shadow: var(--xz-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

html[data-theme="light"] .sidebar-header {
    min-height: 76px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid var(--xz-border);
}

html[data-theme="light"] .logo {
    gap: 11px;
}

html[data-theme="light"] .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border-color: rgba(124, 58, 237, 0.18);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(13, 148, 136, 0.1));
    box-shadow: none;
}

html[data-theme="light"] .logo-text {
    font-size: 1.02rem;
    font-weight: 900;
    color: var(--xz-text);
    background: none;
    -webkit-text-fill-color: currentColor;
}

html[data-theme="light"] .logo-subtitle,
html[data-theme="light"] .nav-section-title {
    color: var(--xz-muted);
}

html[data-theme="light"] .nav-section-title {
    padding: 0 10px;
    margin-bottom: 7px;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

html[data-theme="light"] .sidebar-nav {
    padding: 12px 10px;
}

html[data-theme="light"] .sidebar .nav-item {
    min-height: 38px;
    margin: 2px 0;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--xz-text-soft);
    font-weight: 720;
}

html[data-theme="light"] .sidebar .nav-item:hover {
    border-color: var(--xz-border);
    background: var(--xz-panel-soft);
    color: var(--xz-text);
}

html[data-theme="light"][data-active-page="dashboard"] .sidebar .nav-item[data-page="dashboard"],
html[data-theme="light"][data-active-page="market"] .sidebar .nav-item[data-page="market"],
html[data-theme="light"][data-active-page="orders"] .sidebar .nav-item[data-page="orders"],
html[data-theme="light"][data-active-page="import"] .sidebar .nav-item[data-page="import"],
html[data-theme="light"][data-active-page="wallet"] .sidebar .nav-item[data-page="wallet"],
html[data-theme="light"][data-active-page="quality"] .sidebar .nav-item[data-page="quality"],
html[data-theme="light"][data-active-page="auto-refill"] .sidebar .nav-item[data-page="auto-refill"],
html[data-theme="light"][data-active-page="warranty"] .sidebar .nav-item[data-page="warranty"],
html[data-theme="light"][data-active-page="settings"] .sidebar .nav-item[data-page="settings"] {
    border-color: rgba(13, 148, 136, 0.2);
    background: var(--xz-primary-soft);
    color: var(--xz-primary-deep);
    box-shadow: inset 3px 0 0 var(--xz-primary);
}

html[data-theme="light"] .topbar {
    min-height: var(--topbar-height);
    padding: 0 18px;
}

html[data-theme="light"] .breadcrumb-current {
    font-size: 1rem;
    font-weight: 900;
    color: var(--xz-text);
}

html[data-theme="light"] .topbar-ai-status,
html[data-theme="light"] .topbar-balance,
html[data-theme="light"] .topbar-btn,
html[data-theme="light"] #authTopLoginBtn,
html[data-theme="light"] .search-box {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--xz-text-soft);
    box-shadow: var(--xz-shadow);
}

html[data-theme="light"] .topbar-ai-status {
    background: linear-gradient(180deg, #ffffff, var(--xz-panel-soft));
    color: var(--xz-purple-deep);
}

html[data-theme="light"] .topbar-ai-status img {
    border-radius: 7px;
}

html[data-theme="light"] .topbar-balance {
    min-width: 154px;
    min-height: 40px;
    padding: 6px 12px;
}

html[data-theme="light"] .topbar-balance-label {
    color: var(--xz-muted);
    font-weight: 850;
}

html[data-theme="light"] .topbar-balance strong {
    color: var(--xz-text);
    font-weight: 950;
}

html[data-theme="light"] .btn-primary {
    border: 1px solid var(--xz-primary);
    border-radius: 8px;
    background: var(--xz-primary);
    color: #ffffff;
    box-shadow: var(--xz-shadow);
}

html[data-theme="light"] .btn-primary:hover {
    border-color: var(--xz-primary-deep);
    background: var(--xz-primary-deep);
}

html[data-theme="light"] .btn-glass,
html[data-theme="light"] .btn-secondary {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--xz-text-soft);
    box-shadow: var(--xz-shadow);
}

html[data-theme="light"] .btn-glass:hover,
html[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .topbar-btn:hover {
    border-color: var(--xz-border-strong);
    background: var(--xz-panel-soft);
    color: var(--xz-text);
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .upload-zone,
html[data-theme="light"] .import-options,
html[data-theme="light"] .import-ai-card,
html[data-theme="light"] .import-history,
html[data-theme="light"] .wallet-balance-area,
html[data-theme="light"] .wallet-radar-panel,
html[data-theme="light"] .redeem-console,
html[data-theme="light"] .wallet-review-panel,
html[data-theme="light"] .wallet-transactions,
html[data-theme="light"] .quality-overview,
html[data-theme="light"] .quality-actions,
html[data-theme="light"] .refill-dispatch-panel,
html[data-theme="light"] .refill-config-card,
html[data-theme="light"] .refill-logs-card,
html[data-theme="light"] .warranty-ai-panel,
html[data-theme="light"] .warranty-stats,
html[data-theme="light"] .warranty-table-wrap,
html[data-theme="light"] .settings-nav,
html[data-theme="light"] .settings-main {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--xz-shadow);
}

html[data-theme="light"] .panel-kicker {
    color: var(--xz-primary);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.05em;
}

html[data-theme="light"][data-active-page="dashboard"] .page-content {
    padding-top: 14px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip {
    position: relative;
    display: grid;
    grid-template-columns: minmax(270px, 0.82fr) minmax(0, 1.18fr);
    gap: 12px;
    min-height: 74px;
    margin-bottom: 12px;
    padding: 14px 16px;
    overflow: hidden;
    background:
        linear-gradient(112deg, rgba(13, 148, 136, 0.08), rgba(124, 58, 237, 0.055), rgba(255, 255, 255, 0.98)),
        #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip::before,
html[data-theme="light"] .purchase-workbench-header::before {
    width: 4px;
    background: linear-gradient(180deg, var(--xz-primary), var(--xz-purple));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-brand strong {
    color: var(--xz-text);
    font-size: 1.08rem;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link {
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid rgba(13, 148, 136, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--xz-shadow);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link span {
    color: var(--xz-muted);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link strong {
    color: var(--xz-text);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
    display: grid;
    grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
    gap: 0;
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head {
    align-items: center;
    min-height: 72px;
    margin: 0;
    padding: 14px 16px;
    border-right: 1px solid var(--xz-border);
    border-bottom: 0;
    background: linear-gradient(180deg, #ffffff, var(--xz-panel-soft));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-ai,
html[data-theme="light"][data-active-page="dashboard"] .notice-icon,
html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-avatar {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(13, 148, 136, 0.1));
    color: var(--xz-purple-deep);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-actions {
    margin-left: auto;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    border-left: 0;
    border-bottom: 1px solid var(--xz-border);
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-card {
    min-height: 72px;
    padding: 11px 12px;
    border: 0;
    border-left: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-card:hover {
    background: var(--xz-panel-soft);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--xz-border);
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card {
    min-height: 104px;
    padding: 12px;
    border: 0;
    border-right: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card:last-child {
    border-right: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog {
    grid-column: 1 / -1;
    margin: 0;
    border-top: 1px solid var(--xz-border);
    border-radius: 0;
    background: var(--xz-panel-soft);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog-list {
    max-height: 156px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
    gap: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-panel {
    padding: 13px;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board,
html[data-theme="light"][data-active-page="dashboard"] .merchant-panel,
html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .import-ai-card,
html[data-theme="light"] .import-history,
html[data-theme="light"] .wallet-transactions {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head,
html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header,
html[data-theme="light"] .workbench-card-header,
html[data-theme="light"] .market-list-header,
html[data-theme="light"] .order-delivery-radar-head,
html[data-theme="light"] .import-radar-head,
html[data-theme="light"] .import-ai-head,
html[data-theme="light"] .import-preview-head,
html[data-theme="light"] .wallet-review-head,
html[data-theme="light"] .wallet-chart-head {
    min-height: 52px;
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, var(--xz-panel-soft));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    min-height: 122px;
    padding: 10px 12px 11px;
    border: 0;
    border-right: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:last-child {
    border-right: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:hover {
    background: var(--xz-panel-soft);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-warn.is-selected {
    background:
        linear-gradient(180deg, rgba(13, 148, 136, 0.09), rgba(124, 58, 237, 0.055)),
        #ffffff;
    box-shadow: inset 0 3px 0 var(--xz-primary);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-token,
html[data-theme="light"] .account-type-badge,
html[data-theme="light"] .account-quality,
html[data-theme="light"] .status-badge,
html[data-theme="light"] .rank-pill,
html[data-theme="light"] .risk-pill,
html[data-theme="light"] .recommend-pill,
html[data-theme="light"] .tx-type,
html[data-theme="light"] .import-preview-pill,
html[data-theme="light"] .import-quota-status {
    min-height: 24px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 900;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-token {
    border: 1px solid var(--xz-border);
    background: #ffffff;
    color: var(--xz-text);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-state.is-live,
html[data-theme="light"] .account-quality,
html[data-theme="light"] .recommend-pill {
    border: 1px solid rgba(13, 148, 136, 0.18);
    background: var(--xz-primary-soft);
    color: var(--xz-primary-deep);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    width: 100%;
    min-height: 27px;
    justify-content: center;
    border: 1px solid var(--xz-border);
    border-radius: 6px;
    background: var(--xz-panel-soft);
    color: var(--xz-muted);
    font-style: normal;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-action {
    border-color: rgba(13, 148, 136, 0.26);
    background: var(--xz-primary-soft);
    color: var(--xz-primary-deep);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-stock-meter {
    height: 5px;
    background: #e2e8f0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-stock-meter i {
    background: linear-gradient(90deg, var(--xz-primary), var(--xz-purple));
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-row {
    padding: 8px 12px;
    border-bottom: 1px solid var(--xz-border);
    background: var(--xz-panel-soft);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip {
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--xz-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--xz-muted);
    font-size: 0.78rem;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip.is-active {
    border-color: rgba(13, 148, 136, 0.24);
    background: var(--xz-primary-soft);
    color: var(--xz-primary-deep);
}

html[data-theme="light"] .data-table,
html[data-theme="light"][data-active-page="dashboard"] .merchant-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
}

html[data-theme="light"] .data-table th,
html[data-theme="light"][data-active-page="dashboard"] .merchant-table th {
    height: 38px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--xz-border);
    background: #f3f8f9;
    color: var(--xz-muted);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.02em;
}

html[data-theme="light"] .data-table td,
html[data-theme="light"][data-active-page="dashboard"] .merchant-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e8eff1;
    background: #ffffff;
    color: var(--xz-text-soft);
}

html[data-theme="light"] .data-table tbody tr:nth-child(even) td,
html[data-theme="light"][data-active-page="dashboard"] .merchant-table tbody tr:nth-child(even) td {
    background: #fbfdfe;
}

html[data-theme="light"] .data-table tbody tr:hover td,
html[data-theme="light"][data-active-page="dashboard"] .merchant-table tbody tr:hover td {
    background: #f4f9fa;
}

html[data-theme="light"] .merchant-name strong,
html[data-theme="light"] .merchant-product strong,
html[data-theme="light"] .market-product-main h4,
html[data-theme="light"] .account-model,
html[data-theme="light"] .section-title {
    color: var(--xz-text);
    font-weight: 950;
}

html[data-theme="light"] .merchant-subtext,
html[data-theme="light"] .merchant-product span,
html[data-theme="light"] .market-product-main p,
html[data-theme="light"] .market-product-row .account-sla {
    color: var(--xz-muted);
}

html[data-theme="light"] .merchant-avatar {
    border-radius: 7px;
    background: var(--xz-primary-soft);
    color: var(--xz-primary-deep);
}

html[data-theme="light"] .purchase-workbench-header,
html[data-theme="light"] .market-ai-advisor {
    position: relative;
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background:
        linear-gradient(112deg, rgba(13, 148, 136, 0.075), rgba(124, 58, 237, 0.055), rgba(255, 255, 255, 0.98)),
        #ffffff;
    box-shadow: var(--xz-shadow);
}

html[data-theme="light"] .market-grid.market-purchase-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

html[data-theme="light"] .market-product-row {
    grid-template-columns: minmax(92px, auto) minmax(260px, 1fr) minmax(190px, auto) minmax(148px, auto);
    min-height: 72px;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"] .market-product-row.is-selected {
    background:
        linear-gradient(90deg, rgba(13, 148, 136, 0.08), rgba(124, 58, 237, 0.04), #ffffff);
    box-shadow: inset 3px 0 0 var(--xz-primary);
}

html[data-theme="light"] .filter-tab.active,
html[data-theme="light"] .chip-filter.active,
html[data-theme="light"] .chip-filter:hover {
    border-color: rgba(13, 148, 136, 0.25);
    background: var(--xz-primary-soft);
    color: var(--xz-primary-deep);
    box-shadow: none;
}

html[data-theme="light"] .form-input,
html[data-theme="light"] .form-select,
html[data-theme="light"] .toolbar-search,
html[data-theme="light"] .sort-select,
html[data-theme="light"] .purchase-quantity-block,
html[data-theme="light"] .purchase-quantity-control,
html[data-theme="light"] .confirm-selected-product,
html[data-theme="light"] .confirm-metrics div,
html[data-theme="light"] .filter-tab,
html[data-theme="light"] .chip-filter,
html[data-theme="light"] .quick-quantity-row button {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--xz-text-soft);
    box-shadow: none;
}

html[data-theme="light"] .account-price,
html[data-theme="light"] .money,
html[data-theme="light"] .wallet-balance,
html[data-theme="light"] .topbar-balance strong {
    font-family: var(--font-mono);
    letter-spacing: 0;
}

@media (max-width: 1180px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip {
        grid-column: 1;
        grid-row: auto;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head {
        border-right: 0;
        border-bottom: 1px solid var(--xz-border);
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    html[data-theme="light"] .page-content {
        padding: 14px;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-links {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card:nth-child(2n),
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:nth-child(2n) {
        border-right: 0;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        border-bottom: 1px solid var(--xz-border);
    }
}

@media (max-width: 560px) {
    html[data-theme="light"] .page-content {
        padding: 10px;
    }

    html[data-theme="light"] .main-content,
    html[data-theme="light"] .page-content,
    html[data-theme="light"] .page,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice,
    html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-panel,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board,
    html[data-theme="light"][data-active-page="dashboard"] .merchant-panel {
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        width: 100%;
        min-width: 0;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head > div:not(.dashboard-mission-ai):not(.dashboard-mission-actions) {
        min-width: 0;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-actions,
    html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
        gap: 8px;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-actions .btn,
    html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-actions .btn {
        min-width: 0;
        padding-inline: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-actions .btn:first-child,
    html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-actions .btn:first-child {
        grid-column: 1 / -1;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-card,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        border-right: 0;
    }
}

/* === Xiaozi UI true final override: 20260705-64 === */
/* Cascade guard for later legacy skin layers. */
html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel.dashboard-mission-panel {
    display: grid !important;
    grid-template-columns: minmax(270px, 0.42fr) minmax(0, 0.58fr) !important;
    gap: 10px !important;
    align-items: start !important;
    padding: 10px !important;
    margin-bottom: 12px !important;
    overflow: visible !important;
    border-color: rgba(124, 58, 237, 0.18) !important;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.085), rgba(15, 118, 110, 0.045) 52%, rgba(255, 255, 255, 0.96)),
        #ffffff !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-mission-head {
    grid-column: 1 !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 10px !important;
    min-width: 0 !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-mission-head .dashboard-mission-actions {
    grid-column: 1 / -1 !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-radar-strip {
    grid-column: 2 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-mission-list,
html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-ai-runlog {
    grid-column: 1 / -1 !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-mission-list {
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-radar-card {
    min-height: 58px !important;
    padding: 8px !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-mission-card {
    grid-template-rows: auto minmax(34px, 1fr) auto !important;
    min-height: 92px !important;
    padding: 10px !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-ai-runlog {
    padding: 9px !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-ai-runlog-list {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards.dashboard-status-strip {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0 !important;
    overflow: hidden !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card {
    grid-template-rows: auto minmax(42px, 1fr) auto auto auto !important;
    min-height: 132px !important;
    padding: 11px !important;
    border-right: 1px solid var(--xz-border) !important;
    background: #ffffff !important;
    color: var(--xz-text) !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card:last-child {
    border-right: 0 !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-selected,
html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-live.is-selected,
html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-warn.is-selected {
    border-color: rgba(124, 58, 237, 0.24) !important;
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.115), rgba(15, 118, 110, 0.052) 58%, #ffffff),
        #ffffff !important;
    color: var(--xz-text) !important;
    box-shadow: inset 0 3px 0 var(--xz-purple), inset 0 0 0 1px rgba(124, 58, 237, 0.16) !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-selected::after {
    display: none !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-selected .tier-token,
html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-selected .tier-state,
html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-selected .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-selected .dashboard-status-meta small,
html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-selected .dashboard-status-bottom span,
html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-selected .dashboard-status-bottom strong,
html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-selected .stock-line {
    color: var(--xz-text) !important;
}

html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card.is-selected .tier-action {
    border-color: rgba(124, 58, 237, 0.24) !important;
    background: var(--xz-purple-soft) !important;
    color: var(--xz-purple-deep) !important;
}

html[data-theme="light"] #marketGrid.market-purchase-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
}

html[data-theme="light"] #marketGrid .market-product-row {
    display: grid !important;
    grid-template-columns: minmax(100px, auto) minmax(240px, 1fr) minmax(170px, 0.52fr) minmax(138px, auto) !important;
    gap: 10px !important;
    align-items: center !important;
    min-height: 74px !important;
    padding: 10px 12px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--xz-border) !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

html[data-theme="light"] #marketGrid .market-product-row:last-child {
    border-bottom: 0 !important;
}

html[data-theme="light"] #marketGrid .market-product-row.is-selected {
    border-bottom-color: rgba(124, 58, 237, 0.26) !important;
    background:
        linear-gradient(90deg, rgba(124, 58, 237, 0.09), rgba(15, 118, 110, 0.042), #ffffff) !important;
    box-shadow: inset 3px 0 0 var(--xz-purple) !important;
}

html[data-theme="light"] #marketGrid .market-product-row .account-sla {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

html[data-theme="light"] #marketGrid .market-product-row .account-sla span {
    min-height: 24px !important;
    padding: 4px 8px !important;
    white-space: normal !important;
}

html[data-theme="light"] #marketGrid .market-product-row .account-footer {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 9px !important;
    padding-top: 0 !important;
}

@media (max-width: 1180px) {
    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel.dashboard-mission-panel {
        grid-template-columns: 1fr !important;
        max-height: 520px !important;
        overflow-y: auto !important;
    }

    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-mission-head,
    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-ai-runlog {
        grid-column: 1 !important;
    }

    html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards.dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card:nth-child(2n) {
        border-right: 0 !important;
    }
}

@media (max-width: 760px) {
    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel.dashboard-mission-panel {
        max-height: none !important;
        overflow: visible !important;
    }

    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-ai-runlog-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    html[data-theme="light"] #marketGrid .market-product-row {
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-areas:
            "badges footer"
            "main main"
            "sla sla" !important;
        align-items: start !important;
        min-height: 0 !important;
        padding: 11px 12px !important;
    }

    html[data-theme="light"] #marketGrid .market-product-row .account-card-header {
        grid-area: badges !important;
        justify-content: flex-start !important;
    }

    html[data-theme="light"] #marketGrid .market-product-row .market-product-main {
        grid-area: main !important;
    }

    html[data-theme="light"] #marketGrid .market-product-row .account-sla {
        grid-area: sla !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }

    html[data-theme="light"] #marketGrid .market-product-row .account-footer {
        grid-area: footer !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }
}

@media (max-width: 520px) {
    html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards.dashboard-status-strip,
    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] #dashboardMissionPanel .dashboard-ai-runlog-list {
        grid-template-columns: 1fr !important;
    }

    html[data-theme="light"][data-active-page="dashboard"] #dashboardStatusCards .dashboard-status-card {
        border-right: 0 !important;
    }

    html[data-theme="light"] #marketGrid .market-product-row {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "badges"
            "main"
            "sla"
            "footer" !important;
    }

    html[data-theme="light"] #marketGrid .market-product-row .account-footer {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
}

html[data-theme="light"] .page-content {
    max-width: 1560px;
    padding: clamp(12px, 1.4vw, 20px) clamp(14px, 1.6vw, 24px) 30px;
}

html[data-theme="light"] .page {
    gap: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
    display: grid;
    grid-template-columns: minmax(270px, 0.42fr) minmax(0, 0.58fr);
    gap: 10px;
    align-items: start;
    padding: 10px;
    margin-bottom: 12px;
    overflow: visible;
    border-color: rgba(124, 58, 237, 0.18);
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.085), rgba(15, 118, 110, 0.045) 52%, rgba(255, 255, 255, 0.96)),
        #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head {
    grid-column: 1;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head .dashboard-mission-actions {
    grid-column: 1 / -1;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog {
    grid-column: 1 / -1;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-card {
    min-height: 58px;
    padding: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card {
    grid-template-rows: auto minmax(34px, 1fr) auto;
    min-height: 92px;
    padding: 10px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog {
    padding: 9px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    grid-template-rows: auto minmax(42px, 1fr) auto auto auto;
    min-height: 132px;
    padding: 11px;
    border-right: 1px solid var(--xz-border);
    background: #ffffff;
    color: var(--xz-text) !important;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:last-child {
    border-right: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-warn.is-selected {
    border-color: rgba(124, 58, 237, 0.24);
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.115), rgba(15, 118, 110, 0.052) 58%, #ffffff),
        #ffffff;
    color: var(--xz-text) !important;
    box-shadow: inset 0 3px 0 var(--xz-purple), inset 0 0 0 1px rgba(124, 58, 237, 0.16);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected::after {
    display: none;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-token,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-state,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-meta small,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-bottom span,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-bottom strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .stock-line {
    color: var(--xz-text) !important;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-action {
    border-color: rgba(124, 58, 237, 0.24);
    background: var(--xz-purple-soft);
    color: var(--xz-purple-deep) !important;
}

html[data-theme="light"] .market-grid.market-purchase-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

html[data-theme="light"] .market-product-row {
    display: grid;
    grid-template-columns: minmax(100px, auto) minmax(240px, 1fr) minmax(170px, 0.52fr) minmax(138px, auto);
    gap: 10px;
    align-items: center;
    min-height: 74px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"] .market-product-row:last-child {
    border-bottom: 0;
}

html[data-theme="light"] .market-product-row.is-selected {
    border-bottom-color: rgba(124, 58, 237, 0.26);
    background:
        linear-gradient(90deg, rgba(124, 58, 237, 0.09), rgba(15, 118, 110, 0.042), #ffffff);
    box-shadow: inset 3px 0 0 var(--xz-purple);
}

html[data-theme="light"] .market-product-row .account-sla {
    gap: 6px;
    align-items: flex-start;
}

html[data-theme="light"] .market-product-row .account-footer {
    justify-content: flex-end;
    gap: 9px;
}

html[data-theme="light"] .market-product-row .account-model {
    color: var(--xz-text);
    font-size: 0.94rem;
    line-height: 1.28;
}

html[data-theme="light"] .market-product-row .market-product-main p,
html[data-theme="light"] .market-product-row .account-sla span {
    color: var(--xz-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

@media (max-width: 1180px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
        grid-template-columns: 1fr;
        max-height: 520px;
        overflow-y: auto;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog {
        grid-column: 1;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:nth-child(2n) {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "badges footer"
            "main main"
            "sla sla";
        align-items: start;
        min-height: 0;
        padding: 11px 12px;
    }

    html[data-theme="light"] .market-product-row .account-card-header {
        grid-area: badges;
        justify-content: flex-start;
    }

    html[data-theme="light"] .market-product-row .market-product-main {
        grid-area: main;
    }

    html[data-theme="light"] .market-product-row .account-sla {
        grid-area: sla;
        flex-direction: row;
        flex-wrap: wrap;
    }

    html[data-theme="light"] .market-product-row .account-footer {
        grid-area: footer;
        flex-direction: column;
        align-items: flex-end;
    }
}

@media (max-width: 520px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog-list {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        border-right: 0;
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "badges"
            "main"
            "sla"
            "footer";
    }

    html[data-theme="light"] .market-product-row .account-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* === Xiaozi reference trading desk final alignment: 20260705-64 === */
html[data-theme="light"] {
    --xz-page: #f3f7f9;
    --xz-panel: #ffffff;
    --xz-panel-soft: #f8fbfc;
    --xz-border: #d6e3e7;
    --xz-border-strong: #aec4cc;
    --xz-text: #0f172a;
    --xz-text-soft: #334155;
    --xz-muted: #64748b;
    --xz-purple: #7c3aed;
    --xz-purple-deep: #5b21b6;
    --xz-purple-soft: #f3efff;
    --xz-teal: #0f766e;
    --xz-teal-soft: #e7faf7;
    --xz-blue: #1d4ed8;
    --xz-shadow: 0 10px 26px rgba(15, 23, 42, 0.055);
    --xz-shadow-soft: 0 1px 1px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] body {
    background:
        linear-gradient(rgba(15, 23, 42, 0.032) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(15, 23, 42, 0.032) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(180deg, #eff8f8 0%, #f7fafc 46%, #f2f6f8 100%);
}

html[data-theme="light"] .page-content {
    max-width: 1560px;
    padding: clamp(12px, 1.4vw, 20px) clamp(14px, 1.6vw, 24px) 30px;
}

html[data-theme="light"] .page {
    gap: 12px;
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .purchase-workbench-header,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .upload-zone,
html[data-theme="light"] .import-options,
html[data-theme="light"] .import-ai-card,
html[data-theme="light"] .import-history,
html[data-theme="light"] .wallet-balance-area,
html[data-theme="light"] .wallet-radar-panel,
html[data-theme="light"] .wallet-risk-panel,
html[data-theme="light"] .redeem-console,
html[data-theme="light"] .wallet-review-panel,
html[data-theme="light"] .wallet-transactions,
html[data-theme="light"] .settings-nav,
html[data-theme="light"] .settings-main {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--xz-shadow-soft), var(--xz-shadow);
}

html[data-theme="light"] .dashboard-flow-strip,
html[data-theme="light"] .purchase-workbench-header,
html[data-theme="light"] .market-ai-advisor,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .wallet-risk-panel {
    position: relative;
    overflow: hidden;
}

html[data-theme="light"] .dashboard-flow-strip::before,
html[data-theme="light"] .purchase-workbench-header::before,
html[data-theme="light"] .market-ai-advisor::before,
html[data-theme="light"] .import-radar::before,
html[data-theme="light"] .order-delivery-radar::before,
html[data-theme="light"] .wallet-risk-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"] .dashboard-price-board-head,
html[data-theme="light"] .merchant-panel-header,
html[data-theme="light"] .market-list-header,
html[data-theme="light"] .workbench-card-header,
html[data-theme="light"] .order-delivery-radar-head,
html[data-theme="light"] .import-radar-head,
html[data-theme="light"] .wallet-chart-head,
html[data-theme="light"] .wallet-review-head,
html[data-theme="light"] .settings-panel-head {
    min-height: 50px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"] .section-title,
html[data-theme="light"] .market-list-header h4,
html[data-theme="light"] .workbench-card-header h4 {
    color: var(--xz-text);
    font-size: 1.02rem;
    font-weight: 950;
    letter-spacing: 0;
}

html[data-theme="light"] .panel-kicker {
    color: var(--xz-teal);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.04em;
}

html[data-theme="light"] .dashboard-flow-strip {
    min-height: 76px;
    padding: 12px 14px;
    grid-template-columns: minmax(240px, 0.76fr) minmax(0, 1.24fr);
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.095), rgba(15, 118, 110, 0.065) 48%, rgba(255, 255, 255, 0.96)),
        #ffffff;
}

html[data-theme="light"] .dashboard-flow-links {
    gap: 8px;
}

html[data-theme="light"] .dashboard-flow-link {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.84);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
    display: grid;
    grid-template-columns: minmax(270px, 0.42fr) minmax(0, 0.58fr);
    gap: 10px;
    align-items: start;
    padding: 10px;
    margin-bottom: 12px;
    border-color: rgba(124, 58, 237, 0.18);
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.085), rgba(15, 118, 110, 0.045) 52%, rgba(255, 255, 255, 0.96)),
        #ffffff;
    box-shadow: var(--xz-shadow-soft), var(--xz-shadow);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head {
    grid-column: 1;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head .dashboard-mission-actions {
    grid-column: 1 / -1;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog {
    grid-column: 1 / -1;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-card {
    min-height: 58px;
    padding: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card {
    grid-template-rows: auto minmax(34px, 1fr) auto;
    min-height: 92px;
    padding: 10px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog {
    padding: 9px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    grid-template-rows: auto minmax(42px, 1fr) auto auto auto;
    min-height: 132px;
    padding: 11px;
    border-right: 1px solid var(--xz-border);
    background: #ffffff;
    color: var(--xz-text) !important;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:last-child {
    border-right: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-warn.is-selected {
    border-color: rgba(124, 58, 237, 0.24);
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.115), rgba(15, 118, 110, 0.052) 58%, #ffffff),
        #ffffff;
    color: var(--xz-text) !important;
    box-shadow: inset 0 3px 0 var(--xz-purple), inset 0 0 0 1px rgba(124, 58, 237, 0.16);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected::after {
    display: none;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-token,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-state,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-meta small,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-bottom span,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .dashboard-status-bottom strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .stock-line {
    color: var(--xz-text) !important;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-action {
    border-color: rgba(124, 58, 237, 0.24);
    background: var(--xz-purple-soft);
    color: var(--xz-purple-deep) !important;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    min-height: 26px;
    margin-top: 5px;
    padding: 4px 8px;
    border: 1px solid var(--xz-border);
    border-radius: 6px;
    background: var(--xz-panel-soft);
    color: var(--xz-muted);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 950;
}

html[data-theme="light"] .market-grid.market-purchase-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

html[data-theme="light"] .market-product-row {
    display: grid;
    grid-template-columns: minmax(100px, auto) minmax(240px, 1fr) minmax(170px, 0.52fr) minmax(138px, auto);
    gap: 10px;
    align-items: center;
    min-height: 74px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"] .market-product-row:last-child {
    border-bottom: 0;
}

html[data-theme="light"] .market-product-row.is-selected {
    border-bottom-color: rgba(124, 58, 237, 0.26);
    background:
        linear-gradient(90deg, rgba(124, 58, 237, 0.09), rgba(15, 118, 110, 0.042), #ffffff);
    box-shadow: inset 3px 0 0 var(--xz-purple);
}

html[data-theme="light"] .market-product-row .account-card-header,
html[data-theme="light"] .market-product-row .account-sla,
html[data-theme="light"] .market-product-row .account-footer {
    min-width: 0;
}

html[data-theme="light"] .market-product-row .account-sla {
    gap: 6px;
    align-items: flex-start;
}

html[data-theme="light"] .market-product-row .account-footer {
    justify-content: flex-end;
    gap: 9px;
}

html[data-theme="light"] .market-product-row .account-model {
    color: var(--xz-text);
    font-size: 0.94rem;
    line-height: 1.28;
}

html[data-theme="light"] .market-product-row .market-product-main p,
html[data-theme="light"] .market-product-row .account-sla span {
    color: var(--xz-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

html[data-theme="light"] .market-product-row .account-price {
    color: var(--xz-text);
    font-size: 1rem;
    font-weight: 950;
    white-space: nowrap;
}

html[data-theme="light"] .data-table th,
html[data-theme="light"] .merchant-table th {
    height: 36px;
    padding: 9px 12px;
    background: #f3f8f9;
}

html[data-theme="light"] .data-table td,
html[data-theme="light"] .merchant-table td {
    padding: 10px 12px;
}

@media (max-width: 1180px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
        grid-template-columns: 1fr;
        max-height: 520px;
        overflow: auto;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog {
        grid-column: 1;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:nth-child(2n) {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    html[data-theme="light"] .dashboard-flow-strip {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .dashboard-flow-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "badges footer"
            "main main"
            "sla sla";
        align-items: start;
        min-height: 0;
        padding: 11px 12px;
    }

    html[data-theme="light"] .market-product-row .account-card-header {
        grid-area: badges;
        justify-content: flex-start;
    }

    html[data-theme="light"] .market-product-row .market-product-main {
        grid-area: main;
    }

    html[data-theme="light"] .market-product-row .account-sla {
        grid-area: sla;
        flex-direction: row;
        flex-wrap: wrap;
    }

    html[data-theme="light"] .market-product-row .account-footer {
        grid-area: footer;
        flex-direction: column;
        align-items: flex-end;
    }
}

@media (max-width: 520px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-ai-runlog-list,
    html[data-theme="light"] .dashboard-flow-links {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        border-right: 0;
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "badges"
            "main"
            "sla"
            "footer";
    }

    html[data-theme="light"] .market-product-row .account-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* === Settings AI log responsive audit: 20260705-61 === */
html[data-theme="light"][data-active-page="settings"] .settings-layout,
html[data-theme="light"][data-active-page="settings"] .settings-layout > *,
html[data-theme="light"][data-active-page="settings"] .settings-main,
html[data-theme="light"][data-active-page="settings"] .settings-panel,
html[data-theme="light"][data-active-page="settings"] .settings-log-panel {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

html[data-theme="light"][data-active-page="settings"] .settings-log-panel {
    width: 100% !important;
    overflow-x: auto !important;
}

@media (max-width: 980px) {
    html[data-theme="light"][data-active-page="settings"] .settings-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html[data-theme="light"][data-active-page="settings"] .settings-nav,
    html[data-theme="light"][data-active-page="settings"] .settings-main {
        width: 100% !important;
    }

    html[data-theme="light"][data-active-page="settings"] .settings-nav {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }

    html[data-theme="light"][data-active-page="settings"] .settings-panel-head {
        flex-wrap: wrap !important;
    }
}

@media (max-width: 560px) {
    html[data-theme="light"][data-active-page="settings"] .settings-main {
        padding: 14px !important;
    }

    html[data-theme="light"][data-active-page="settings"] .settings-panel-head .btn {
        width: 100% !important;
        justify-content: center;
    }
}

/* === Dashboard tier-linked trading desk final override: 20260705-59 === */
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board {
    border-color: #b9cbd2;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head {
    align-items: center;
    background: linear-gradient(180deg, #ffffff, #f1f7f8);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head small {
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 6px;
    background: #e9fbf7;
    color: #0f766e;
    font-weight: 900;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
    border-top: 1px solid #d6e3e7;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    position: relative;
    min-height: 140px;
    padding: 12px 12px 11px;
    outline: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    opacity: 0;
    background: linear-gradient(90deg, #7c3aed, #0f766e);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:hover::before,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected::before {
    opacity: 1;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-warn.is-selected {
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.12), rgba(15, 118, 110, 0.055) 54%, #ffffff);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.18);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected::after {
    content: "商家推荐已筛选";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    margin-top: 8px;
    padding: 3px 8px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 6px;
    background: #f3efff;
    color: #5b21b6;
    font-size: 0.72rem;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-token {
    min-width: 54px;
    justify-content: center;
    color: #0f172a;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-state {
    white-space: nowrap;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board .dashboard-status-meta strong {
    font-size: 1.08rem;
    line-height: 1.2;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta .stock-line {
    min-height: 34px;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    margin-top: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel.is-tier-flash {
    border-color: rgba(124, 58, 237, 0.42);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12), 0 14px 30px rgba(15, 23, 42, 0.08);
    animation: dashboardTierFlash 0.9s ease;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel.is-empty-tier .merchant-summary-chip.is-active {
    border-color: rgba(183, 121, 31, 0.25);
    background: #fff8e7;
    color: #92400e;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header .section-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header .section-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 6px;
    background: #f3efff;
    color: #5b21b6;
    font-size: 0.78rem;
    font-weight: 950;
}

@media (max-width: 760px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        min-height: 126px;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head small {
        width: 100%;
    }
}

/* === Xiaozi assistant global radar: 20260705-51 === */
.assistant-radar {
    display: grid;
    gap: 8px;
    padding: 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.assistant-radar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.assistant-radar-head span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.68rem;
    font-weight: 900;
}

.assistant-radar-head strong {
    display: block;
    margin-top: 2px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 950;
    line-height: 1.3;
}

.assistant-radar-head button {
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 900;
    white-space: nowrap;
}

.assistant-radar-head button:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.assistant-radar-rows {
    display: grid;
    gap: 6px;
}

.assistant-radar-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-secondary);
    color: inherit;
    text-align: left;
}

.assistant-radar-row:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.assistant-radar-state {
    min-width: 46px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(72, 183, 255, 0.12);
    color: var(--info);
    font-size: 0.66rem;
    font-weight: 950;
    text-align: center;
    white-space: nowrap;
}

.assistant-radar-row div {
    min-width: 0;
}

.assistant-radar-row strong {
    display: block;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-radar-row p {
    margin: 2px 0 5px;
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.68rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-radar-row i {
    display: block;
    width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

.assistant-radar-row i b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent-gradient);
}

.assistant-radar-row em {
    padding: 3px 7px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.assistant-radar-row.is-danger .assistant-radar-state,
.assistant-radar-danger .assistant-radar-head button {
    background: rgba(255, 100, 124, 0.12);
    color: var(--danger);
}

.assistant-radar-row.is-warn .assistant-radar-state,
.assistant-radar-warn .assistant-radar-head button {
    background: rgba(242, 184, 75, 0.14);
    color: var(--warning);
}

.assistant-radar-row.is-info .assistant-radar-state,
.assistant-radar-info .assistant-radar-head button {
    background: rgba(72, 183, 255, 0.12);
    color: var(--info);
}

.assistant-radar-row.is-ok .assistant-radar-state,
.assistant-radar-ok .assistant-radar-head button {
    background: rgba(49, 208, 170, 0.12);
    color: var(--success);
}

html[data-theme="light"] .assistant-radar,
html[data-theme="light"] .assistant-radar-row {
    border-color: var(--xz-border);
    background: #f8fafc;
}

html[data-theme="light"] .assistant-radar-row {
    background: #ffffff;
}

html[data-theme="light"] .assistant-radar-row:hover {
    border-color: var(--xz-border-strong);
    background: #f8fbfc;
}

html[data-theme="light"] .assistant-radar-head span,
html[data-theme="light"] .assistant-radar-row p {
    color: var(--xz-muted);
}

html[data-theme="light"] .assistant-radar-head strong,
html[data-theme="light"] .assistant-radar-row strong {
    color: var(--xz-text);
}

html[data-theme="light"] .assistant-radar-head button,
html[data-theme="light"] .assistant-radar-row em {
    border-color: var(--xz-border);
    background: #ffffff;
    color: var(--xz-text-soft);
}

html[data-theme="light"] .assistant-radar-row i {
    background: #e2e8f0;
}

html[data-theme="light"] .assistant-radar-row i b {
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"] .assistant-radar-row.is-danger .assistant-radar-state,
html[data-theme="light"] .assistant-radar-danger .assistant-radar-head button {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fef2f2;
    color: var(--xz-red);
}

html[data-theme="light"] .assistant-radar-row.is-warn .assistant-radar-state,
html[data-theme="light"] .assistant-radar-warn .assistant-radar-head button {
    border-color: rgba(245, 158, 11, 0.24);
    background: #fff7ed;
    color: var(--xz-amber);
}

html[data-theme="light"] .assistant-radar-row.is-info .assistant-radar-state,
html[data-theme="light"] .assistant-radar-info .assistant-radar-head button {
    border-color: rgba(14, 165, 233, 0.2);
    background: #eff6ff;
    color: var(--xz-blue);
}

html[data-theme="light"] .assistant-radar-row.is-ok .assistant-radar-state,
html[data-theme="light"] .assistant-radar-ok .assistant-radar-head button {
    border-color: rgba(15, 118, 110, 0.22);
    background: var(--xz-teal-soft);
    color: var(--xz-teal);
}

@media (max-width: 520px) {
    .assistant-radar-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .assistant-radar-head button {
        width: 100%;
    }

    .assistant-radar-row {
        grid-template-columns: 1fr;
    }

    .assistant-radar-state,
    .assistant-radar-row em {
        justify-self: start;
    }
}

/* === Wallet AI audit actions: 20260705-30 === */
html[data-theme="light"] .wallet-risk-actions {
    padding-top: 2px;
}

html[data-theme="light"] .wallet-risk-actions .btn {
    min-width: 86px;
    justify-content: center;
}

@media (max-width: 560px) {
    html[data-theme="light"] .wallet-risk-actions .btn {
        flex: 1 1 calc(50% - 8px);
    }
}

/* === Global search AI actions: 20260705-32 === */
html[data-theme="light"] .search-result .search-result-action {
    white-space: nowrap;
}

html[data-theme="light"] .search-result:has(.search-result-action) .search-result-icon {
    border-radius: 7px;
}

html[data-theme="light"] .search-result .search-result-action {
    border: 1px solid var(--xz-border);
    border-radius: 999px;
    padding: 3px 8px;
    background: #ffffff;
}

/* === Mobile Xiaozi search command center: 20260705-33 === */
.mobile-search-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-search-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    html.mobile-search-open .mobile-search-toggle {
        background: var(--glass-bg-hover);
        color: var(--accent-primary);
    }

    html.mobile-search-open .topbar-center,
    html.mobile-search-open[data-theme="light"] .topbar-center {
        position: fixed;
        top: calc(var(--topbar-height) + 8px);
        left: 10px;
        right: 10px;
        z-index: 130;
        display: flex !important;
        max-width: none;
        margin: 0;
    }

    html.mobile-search-open .topbar-center .search-box {
        width: 100%;
        padding: 10px 12px;
        border-radius: 8px;
        background: rgba(17, 17, 24, 0.97);
        box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
    }

    html.mobile-search-open[data-theme="light"] .topbar-center .search-box {
        border-color: rgba(124, 92, 252, 0.22);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
    }

    html.mobile-search-open .global-search-panel {
        left: 0;
        right: 0;
        min-width: 0;
        max-height: min(70vh, 520px);
        overflow-y: auto;
    }

    html.mobile-search-open .search-shortcut {
        display: none;
    }
}

/* 极窄屏给面包屑标题让位：全局搜索属于旧交易业务，消费者页面不依赖 */
@media (max-width: 480px) {
    .mobile-search-toggle {
        display: none;
    }

    .topbar {
        gap: 12px;
        padding: 0 14px;
    }
}

@media (max-width: 560px) {
    html.mobile-search-open .topbar-center {
        top: calc(var(--topbar-height) + 6px);
        left: 8px;
        right: 8px;
    }

    html.mobile-search-open .global-search-panel {
        max-height: min(68vh, 460px);
    }
}

/* === Xiaozi compact trading desk polish: 20260705-39 === */
html[data-theme="light"] {
    --xz-page: #eef4f5;
    --xz-panel: #ffffff;
    --xz-panel-soft: #f7fafb;
    --xz-panel-muted: #edf5f6;
    --xz-border: #d5e2e5;
    --xz-border-strong: #aebfc6;
    --xz-text: #111827;
    --xz-text-soft: #334155;
    --xz-muted: #64748b;
    --xz-faint: #7c8798;
    --xz-purple: #6d28d9;
    --xz-purple-soft: #f1ebff;
    --xz-teal: #0f766e;
    --xz-teal-soft: #e7f8f6;
    --xz-blue: #1d4ed8;
    --xz-row-hover: #f4f9fa;
    --xz-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    --xz-shadow-soft: 0 1px 0 rgba(15, 23, 42, 0.04);
    --topbar-height: 56px;
}

html[data-theme="light"] body {
    background:
        linear-gradient(rgba(15, 23, 42, 0.028) 1px, transparent 1px) 0 0 / 30px 30px,
        linear-gradient(90deg, rgba(15, 23, 42, 0.028) 1px, transparent 1px) 0 0 / 30px 30px,
        var(--xz-page);
}

html[data-theme="light"] .topbar,
html[data-theme="light"] .sidebar,
html[data-theme="light"] .glass-card,
html[data-theme="light"] .merchant-panel,
html[data-theme="light"] .dashboard-flow-strip,
html[data-theme="light"] .dashboard-notice,
html[data-theme="light"] .xiaozi-ai-panel,
html[data-theme="light"] .dashboard-price-board,
html[data-theme="light"] .dashboard-mission-panel {
    box-shadow: var(--xz-shadow);
}

html[data-theme="light"] .page-content {
    max-width: 1600px;
    padding: 12px 14px 24px;
}

html[data-theme="light"][data-active-page="dashboard"] .page {
    gap: 10px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip {
    min-height: 58px;
    margin-bottom: 10px;
    padding: 10px 12px;
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
    border-color: var(--xz-border);
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip::before {
    width: 3px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-brand strong {
    font-size: 0.98rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link {
    min-height: 38px;
    padding: 7px 10px;
    background: var(--xz-panel-soft);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link:hover {
    border-color: rgba(109, 40, 217, 0.24);
    background: var(--xz-purple-soft);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
    grid-template-columns: minmax(360px, 0.76fr) minmax(0, 1.24fr);
    gap: 10px;
    align-items: stretch;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack {
    gap: 10px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-panel {
    padding: 11px;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-body p,
html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-copy p {
    line-height: 1.45;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100%;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head {
    min-height: 46px;
    padding: 9px 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head h3 {
    font-size: 0.98rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
    height: 100%;
    min-height: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    min-height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    align-content: stretch;
    gap: 9px;
    padding: 11px 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-top,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom {
    min-width: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-token {
    min-height: 24px;
    padding: 3px 7px;
    font-size: 0.78rem;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-state {
    font-size: 0.72rem;
    white-space: normal;
    text-align: right;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta {
    align-self: center;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta span {
    color: var(--xz-muted);
    font-size: 0.75rem;
    font-weight: 900;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta strong,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board .dashboard-status-meta strong {
    margin-top: 5px;
    color: var(--xz-text);
    font-size: 1.06rem;
    line-height: 1.25;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta small {
    margin-top: 5px;
    line-height: 1.35;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--xz-border);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom span,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom strong {
    overflow: hidden;
    text-overflow: ellipsis;
}

html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    min-height: 26px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-head {
    padding: 11px 12px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, var(--xz-panel-soft));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card {
    min-height: 112px;
    border: 0;
    border-right: 1px solid var(--xz-border);
    border-radius: 0;
    box-shadow: none;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card:last-child {
    border-right: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel {
    border-color: var(--xz-border);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header {
    padding: 11px 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-row {
    gap: 6px;
    padding: 7px 10px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip {
    min-height: 26px;
    padding: 4px 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table {
    min-width: 1080px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table th,
html[data-theme="light"][data-active-page="dashboard"] .merchant-table td {
    padding: 10px 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--xz-border-strong);
    background: #f2f7f8;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table td {
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table tr:nth-child(even) td {
    background: #fbfdfe;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table tr:hover td {
    background: var(--xz-row-hover);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-name,
html[data-theme="light"][data-active-page="dashboard"] .merchant-product {
    min-width: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-name strong,
html[data-theme="light"][data-active-page="dashboard"] .merchant-product strong {
    overflow-wrap: anywhere;
}

html[data-theme="light"][data-active-page="dashboard"] .rank-pill,
html[data-theme="light"][data-active-page="dashboard"] .recommend-pill,
html[data-theme="light"][data-active-page="dashboard"] .risk-pill {
    border-radius: 6px;
}

@media (max-width: 1180px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board {
        min-height: auto;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        min-height: 150px;
    }
}

@media (max-width: 760px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card {
        border-right: 0;
        border-bottom: 1px solid var(--xz-border);
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card:last-child {
        border-bottom: 0;
    }
}

/* === Visible Xiaozi AI command entries: 20260705-40 === */
.xiaozi-ai-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.xiaozi-ai-actions .btn,
.dashboard-mission-actions .btn {
    justify-content: center;
    white-space: nowrap;
}

.dashboard-mission-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-actions {
    padding-top: 1px;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-actions .btn {
    min-width: 86px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-actions {
    min-width: 190px;
}

@media (max-width: 760px) {
    .dashboard-mission-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .xiaozi-ai-actions .btn,
    .dashboard-mission-actions .btn {
        flex: 1 1 auto;
    }
}

/* === Seller inventory export bridge: 20260705-41 === */
.inventory-export-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    flex-wrap: wrap;
}

.inventory-export-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.inventory-export-copy strong {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 900;
}

.inventory-export-copy span {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.inventory-export-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.inventory-export-actions .btn {
    justify-content: center;
    white-space: nowrap;
}

.inventory-export-radar {
    flex: 1 1 100%;
    display: grid;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.inventory-export-radar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 900;
}

.inventory-export-radar-head strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.inventory-export-format-grid,
.inventory-export-field-grid {
    display: grid;
    gap: 8px;
}

.inventory-export-format-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-export-field-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-export-format-card,
.inventory-export-field-card {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.inventory-export-format-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
}

.inventory-export-format-card strong,
.inventory-export-field-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 900;
}

.inventory-export-format-card span,
.inventory-export-field-card span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.35;
}

.inventory-export-format-card em {
    flex-shrink: 0;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
}

.inventory-export-format-card.is-ready,
.inventory-export-field-card.is-ready {
    border-color: rgba(16, 185, 129, 0.24);
}

.inventory-export-format-card.is-review,
.inventory-export-field-card.is-review {
    border-color: rgba(245, 158, 11, 0.32);
}

.inventory-export-format-card.is-blocked,
.inventory-export-field-card.is-blocked {
    border-color: rgba(148, 163, 184, 0.22);
    opacity: 0.78;
}

.inventory-export-field-card {
    padding: 9px 10px;
}

.inventory-export-field-card i {
    display: block;
    height: 5px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
}

.inventory-export-field-card i b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

html[data-theme="light"] .inventory-export-panel {
    border-color: var(--xz-border);
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .inventory-export-radar {
    border-top-color: var(--xz-border);
}

html[data-theme="light"] .inventory-export-copy strong {
    color: var(--xz-text);
}

html[data-theme="light"] .inventory-export-copy span {
    color: var(--xz-muted);
}

html[data-theme="light"] .inventory-export-actions .btn:disabled {
    border-color: var(--xz-border);
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

html[data-theme="light"] .inventory-export-format-card,
html[data-theme="light"] .inventory-export-field-card {
    border-color: var(--xz-border);
    background: #ffffff;
}

html[data-theme="light"] .inventory-export-format-card strong,
html[data-theme="light"] .inventory-export-field-card strong,
html[data-theme="light"] .inventory-export-radar-head strong {
    color: var(--xz-text);
}

html[data-theme="light"] .inventory-export-format-card span,
html[data-theme="light"] .inventory-export-field-card span,
html[data-theme="light"] .inventory-export-radar-head,
html[data-theme="light"] .inventory-export-format-card em {
    color: var(--xz-muted);
}

html[data-theme="light"] .inventory-export-format-card.is-ready,
html[data-theme="light"] .inventory-export-field-card.is-ready {
    border-color: rgba(5, 150, 105, 0.24);
    background: #f7fffc;
}

html[data-theme="light"] .inventory-export-format-card.is-review,
html[data-theme="light"] .inventory-export-field-card.is-review {
    border-color: rgba(180, 83, 9, 0.26);
    background: #fffbeb;
}

@media (max-width: 760px) {
    .inventory-export-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .inventory-export-actions {
        justify-content: flex-start;
    }

    .inventory-export-actions .btn {
        flex: 1 1 calc(50% - 8px);
    }

    .inventory-export-format-grid,
    .inventory-export-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 460px) {
    .inventory-export-format-grid,
    .inventory-export-field-grid {
        grid-template-columns: 1fr;
    }
}

/* === Xiaozi reference polish: 20260705-44 === */
html[data-theme="light"] {
    --xz-page: #f4f7f8;
    --xz-panel: #ffffff;
    --xz-panel-soft: #f8fbfc;
    --xz-panel-muted: #eef5f6;
    --xz-border: #d9e4e7;
    --xz-border-strong: #b7c9cf;
    --xz-purple: #7c3aed;
    --xz-purple-soft: #f2ecff;
    --xz-teal: #0f766e;
    --xz-teal-soft: #e7f8f6;
    --xz-text: #111827;
    --xz-text-soft: #334155;
    --xz-muted: #64748b;
    --xz-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] body {
    background:
        linear-gradient(rgba(15, 23, 42, 0.032) 1px, transparent 1px) 0 0 / 36px 36px,
        linear-gradient(90deg, rgba(15, 23, 42, 0.032) 1px, transparent 1px) 0 0 / 36px 36px,
        radial-gradient(circle at 18% 16%, rgba(124, 58, 237, 0.055), transparent 26%),
        var(--xz-page);
}

html[data-theme="light"] body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 220;
    height: 4px;
    pointer-events: none;
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .topbar {
    background: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] .sidebar {
    border-right-color: var(--xz-border);
}

html[data-theme="light"] .topbar {
    border-bottom-color: var(--xz-border);
}

html[data-theme="light"] .logo-text {
    background: linear-gradient(135deg, var(--xz-purple), var(--xz-teal));
    -webkit-background-clip: text;
    background-clip: text;
}

html[data-theme="light"] .nav-item.active {
    border-color: rgba(124, 58, 237, 0.2);
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.1), rgba(15, 118, 110, 0.06));
    color: #5b21b6;
}

html[data-theme="light"] .page-content {
    padding-top: 14px;
}

html[data-theme="light"] .purchase-workbench-header {
    min-height: 66px;
    border-color: var(--xz-border);
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.1), rgba(15, 118, 110, 0.07) 48%, rgba(255, 255, 255, 0.98)),
        #ffffff;
    box-shadow: var(--xz-shadow);
}

html[data-theme="light"] .purchase-workbench-header::before {
    width: 4px;
}

html[data-theme="light"] .purchase-trading-desk {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 360px);
    gap: 12px;
    align-items: start;
    margin-bottom: 0;
}

html[data-theme="light"] .purchase-main-column {
    min-width: 0;
    display: grid;
    gap: 12px;
}

html[data-theme="light"] .purchase-trading-desk .purchase-builder,
html[data-theme="light"] .purchase-trading-desk .market-list-panel,
html[data-theme="light"] .purchase-trading-desk .purchase-confirm,
html[data-theme="light"] .purchase-trading-desk .market-ai-advisor {
    border-color: var(--xz-border);
    background: #ffffff;
    box-shadow: var(--xz-shadow);
}

html[data-theme="light"] .purchase-trading-desk .purchase-builder {
    display: grid;
    grid-template-columns: minmax(238px, 0.42fr) minmax(0, 1fr);
    grid-template-areas:
        "head filters"
        "qty search"
        "qty chips"
        "qty sort";
    gap: 0;
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .purchase-trading-desk .purchase-builder > .workbench-card-header {
    grid-area: head;
    min-height: 64px;
    border-right: 1px solid var(--xz-border);
}

html[data-theme="light"] .purchase-trading-desk .purchase-builder > .filter-tabs {
    grid-area: filters;
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border-bottom: 1px solid var(--xz-border);
}

html[data-theme="light"] .purchase-trading-desk .filter-tab {
    justify-content: center;
    min-height: 64px;
    border: 0;
    border-left: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    color: var(--xz-text-soft);
}

html[data-theme="light"] .purchase-trading-desk .filter-tab:first-child {
    border-left: 0;
}

html[data-theme="light"] .purchase-trading-desk .filter-tab.active {
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.11), rgba(15, 118, 110, 0.045)),
        #ffffff;
    box-shadow: inset 0 -3px 0 var(--xz-purple);
    color: #5b21b6;
}

html[data-theme="light"] .purchase-trading-desk .purchase-quantity-block {
    grid-area: qty;
    align-content: start;
    min-height: 156px;
    margin: 0;
    padding: 12px;
    border: 0;
    border-top: 1px solid var(--xz-border);
    border-right: 1px solid var(--xz-border);
    border-radius: 0;
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .purchase-trading-desk .toolbar-search {
    grid-area: search;
    margin: 12px 12px 0;
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .purchase-trading-desk .search-filters {
    grid-area: chips;
    margin: 9px 12px 0;
}

html[data-theme="light"] .purchase-trading-desk .purchase-sort-row {
    grid-area: sort;
    min-height: 42px;
    margin: 8px 12px 12px;
    padding: 0;
}

html[data-theme="light"] .purchase-trading-desk .quick-quantity-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

html[data-theme="light"] .purchase-trading-desk .quick-quantity-row button,
html[data-theme="light"] .purchase-trading-desk .purchase-quantity-control,
html[data-theme="light"] .purchase-trading-desk .toolbar-search,
html[data-theme="light"] .purchase-trading-desk .chip-filter,
html[data-theme="light"] .purchase-trading-desk .sort-select {
    border-color: var(--xz-border);
    border-radius: 6px;
}

html[data-theme="light"] .purchase-trading-desk .market-list-panel {
    overflow: hidden;
}

html[data-theme="light"] .purchase-trading-desk .market-list-header {
    min-height: 52px;
    padding: 11px 12px;
}

html[data-theme="light"] .market-grid.market-purchase-list {
    min-height: 280px;
}

html[data-theme="light"] .market-product-row {
    grid-template-columns: minmax(74px, 0.16fr) minmax(176px, 1fr) minmax(120px, 0.32fr) minmax(112px, auto);
    gap: 10px;
    min-height: 68px;
    padding: 10px 12px;
}

html[data-theme="light"] .market-product-row .account-card-header,
html[data-theme="light"] .market-product-row .account-sla,
html[data-theme="light"] .market-product-row .account-footer {
    min-width: 0;
}

html[data-theme="light"] .market-product-row .account-sla {
    display: grid;
    gap: 4px;
}

html[data-theme="light"] .market-product-row .account-footer {
    justify-content: end;
}

html[data-theme="light"] .market-product-row .btn {
    min-width: 74px;
}

html[data-theme="light"] .market-product-row.is-selected {
    background:
        linear-gradient(90deg, rgba(124, 58, 237, 0.105), rgba(15, 118, 110, 0.055), #ffffff);
}

html[data-theme="light"] .purchase-trading-desk .empty-state {
    min-height: 220px;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
}

html[data-theme="light"] .purchase-trading-desk .purchase-confirm {
    position: sticky;
    top: calc(var(--topbar-height) + 12px);
    max-height: calc(100vh - var(--topbar-height) - 24px);
    overflow: auto;
}

html[data-theme="light"] .purchase-trading-desk .purchase-confirm .workbench-card-header {
    position: sticky;
    top: 0;
    z-index: 1;
}

html[data-theme="light"] .purchase-trading-desk .confirm-selected-product {
    min-height: 86px;
}

html[data-theme="light"] .purchase-trading-desk .confirm-metrics {
    grid-template-columns: 1fr;
}

html[data-theme="light"] .purchase-trading-desk .confirm-metrics div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

html[data-theme="light"] .purchase-trading-desk .market-preflight-lanes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-theme="light"] .purchase-trading-desk .market-ai-advisor {
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 0.95fr) auto;
    margin: 0;
    padding: 12px;
    overflow: hidden;
}

html[data-theme="light"] .purchase-trading-desk .market-ai-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

html[data-theme="light"] .purchase-trading-desk .market-ai-actions {
    align-self: center;
}

@media (max-width: 1180px) {
    html[data-theme="light"] .purchase-trading-desk {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
    }

    html[data-theme="light"] .purchase-trading-desk .purchase-builder {
        grid-template-columns: 1fr;
        grid-template-areas:
            "head"
            "filters"
            "qty"
            "search"
            "chips"
            "sort";
    }

    html[data-theme="light"] .purchase-trading-desk .purchase-builder > .workbench-card-header,
    html[data-theme="light"] .purchase-trading-desk .purchase-quantity-block {
        border-right: 0;
    }

    html[data-theme="light"] .purchase-trading-desk .purchase-builder > .filter-tabs {
        border-top: 1px solid var(--xz-border);
    }

    html[data-theme="light"] .purchase-trading-desk .filter-tab {
        min-height: 42px;
    }

    html[data-theme="light"] .purchase-trading-desk .purchase-quantity-block {
        min-height: 0;
    }

    html[data-theme="light"] .purchase-trading-desk .quick-quantity-row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    html[data-theme="light"] .purchase-trading-desk .market-ai-advisor {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    html[data-theme="light"] .purchase-trading-desk {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .purchase-trading-desk .purchase-confirm {
        position: static;
        max-height: none;
    }

    html[data-theme="light"] .purchase-trading-desk .confirm-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    html[data-theme="light"] .purchase-trading-desk .confirm-metrics div {
        display: block;
    }

    html[data-theme="light"] .purchase-trading-desk .market-preflight-lanes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: minmax(78px, auto) minmax(210px, 1fr) minmax(136px, auto);
    }

    html[data-theme="light"] .market-product-row .account-footer {
        grid-column: 2 / -1;
        justify-content: space-between;
        padding-top: 8px;
        border-top: 1px solid var(--xz-border);
    }
}

@media (max-width: 640px) {
    html[data-theme="light"] .purchase-workbench-header {
        min-height: 58px;
    }

    html[data-theme="light"] .purchase-trading-desk .purchase-builder > .filter-tabs {
        grid-template-columns: repeat(5, minmax(68px, 1fr));
        overflow-x: auto;
    }

    html[data-theme="light"] .purchase-trading-desk .confirm-metrics,
    html[data-theme="light"] .purchase-trading-desk .market-preflight-lanes,
    html[data-theme="light"] .purchase-trading-desk .market-ai-metrics {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .purchase-trading-desk .quick-quantity-row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .market-product-row .account-card-header,
    html[data-theme="light"] .market-product-row .account-footer {
        grid-column: auto;
        justify-content: space-between;
    }
}

/* === Wallet withdraw preflight: 20260705-47 === */
.wallet-withdraw-preflight {
    display: grid;
    gap: 10px;
    margin: -4px 0 14px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
}

.wallet-withdraw-preflight-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
}

.wallet-withdraw-preflight-head > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 950;
}

.wallet-withdraw-preflight-head strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 950;
    line-height: 1.3;
}

.wallet-withdraw-preflight-head p {
    margin-top: 3px;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.wallet-withdraw-preflight-lanes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.wallet-withdraw-preflight-lane {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.wallet-withdraw-preflight-lane span,
.wallet-withdraw-preflight-lane small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-weight: 850;
    line-height: 1.35;
}

.wallet-withdraw-preflight-lane strong {
    display: block;
    margin: 3px 0 2px;
    overflow: hidden;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-withdraw-preflight.is-ready,
.wallet-withdraw-preflight-lane.is-ready {
    border-color: rgba(49, 208, 170, 0.32);
}

.wallet-withdraw-preflight.is-warn,
.wallet-withdraw-preflight-lane.is-warn {
    border-color: rgba(242, 184, 75, 0.38);
}

.wallet-withdraw-preflight.is-danger,
.wallet-withdraw-preflight-lane.is-danger {
    border-color: rgba(255, 100, 124, 0.42);
}

.wallet-withdraw-preflight-lane.is-muted {
    opacity: 0.82;
}

html[data-theme="light"] .wallet-withdraw-preflight {
    border-color: var(--xz-border);
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .wallet-withdraw-preflight-head > span {
    background: linear-gradient(135deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"] .wallet-withdraw-preflight-head strong,
html[data-theme="light"] .wallet-withdraw-preflight-lane strong {
    color: var(--xz-text);
}

html[data-theme="light"] .wallet-withdraw-preflight-head p,
html[data-theme="light"] .wallet-withdraw-preflight-lane span,
html[data-theme="light"] .wallet-withdraw-preflight-lane small {
    color: var(--xz-muted);
}

html[data-theme="light"] .wallet-withdraw-preflight-lane {
    border-color: var(--xz-border);
    background: #ffffff;
}

html[data-theme="light"] .wallet-withdraw-preflight.is-ready,
html[data-theme="light"] .wallet-withdraw-preflight-lane.is-ready {
    border-color: rgba(15, 118, 110, 0.28);
    background: rgba(231, 248, 246, 0.82);
}

html[data-theme="light"] .wallet-withdraw-preflight.is-warn,
html[data-theme="light"] .wallet-withdraw-preflight-lane.is-warn {
    border-color: rgba(217, 119, 6, 0.28);
    background: #fffbeb;
}

html[data-theme="light"] .wallet-withdraw-preflight.is-danger,
html[data-theme="light"] .wallet-withdraw-preflight-lane.is-danger {
    border-color: rgba(220, 38, 38, 0.24);
    background: #fff1f2;
}

@media (max-width: 520px) {
    .wallet-withdraw-preflight-lanes {
        grid-template-columns: 1fr;
    }
}

/* === Import publish loop: 20260705-48 === */
.import-publish-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
    padding: 14px;
    border-left: 4px solid var(--accent-primary);
}

.import-publish-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: flex-start;
}

.import-publish-ai {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 950;
}

.import-publish-head h4 {
    margin: 2px 0 4px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.3;
}

.import-publish-head p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.import-publish-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.import-publish-metric,
.import-publish-entry,
.import-publish-empty {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.import-publish-metric span,
.import-publish-entry span,
.import-publish-entry small {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 850;
}

.import-publish-metric strong,
.import-publish-entry strong {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--text-primary);
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-publish-metric strong {
    font-family: var(--font-mono);
    font-size: 1rem;
}

.import-publish-entry small {
    margin-top: 3px;
}

.import-publish-entries {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.import-publish-empty {
    grid-column: 1 / -1;
    color: var(--text-tertiary);
    font-size: 0.82rem;
    font-weight: 800;
}

.import-publish-panel.is-ready,
.import-publish-panel.is-ready .import-publish-metric,
.import-publish-panel.is-ready .import-publish-entry {
    border-color: rgba(49, 208, 170, 0.32);
}

.import-publish-panel.is-warn,
.import-publish-panel.is-review {
    border-left-color: var(--warning);
}

.import-publish-panel.is-danger {
    border-left-color: var(--danger);
}

.import-preview-pill.publish {
    border-color: rgba(72, 183, 255, 0.28);
    background: rgba(72, 183, 255, 0.12);
    color: var(--info);
}

html[data-theme="light"] .import-publish-panel {
    border-color: var(--xz-border);
    border-left-color: var(--xz-purple);
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.08), rgba(15, 118, 110, 0.055) 58%, rgba(255, 255, 255, 0.96)),
        #ffffff;
}

html[data-theme="light"] .import-publish-ai {
    background: linear-gradient(135deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"] .import-publish-head h4,
html[data-theme="light"] .import-publish-metric strong,
html[data-theme="light"] .import-publish-entry strong {
    color: var(--xz-text);
}

html[data-theme="light"] .import-publish-head p,
html[data-theme="light"] .import-publish-metric span,
html[data-theme="light"] .import-publish-entry span,
html[data-theme="light"] .import-publish-entry small,
html[data-theme="light"] .import-publish-empty {
    color: var(--xz-muted);
}

html[data-theme="light"] .import-publish-metric,
html[data-theme="light"] .import-publish-entry,
html[data-theme="light"] .import-publish-empty {
    border-color: var(--xz-border);
    background: #ffffff;
}

html[data-theme="light"] .import-publish-panel.is-ready,
html[data-theme="light"] .import-publish-panel.is-ready .import-publish-metric,
html[data-theme="light"] .import-publish-panel.is-ready .import-publish-entry {
    border-color: rgba(15, 118, 110, 0.28);
    background: rgba(231, 248, 246, 0.76);
}

html[data-theme="light"] .import-publish-panel.is-warn,
html[data-theme="light"] .import-publish-panel.is-review {
    border-left-color: #d97706;
}

html[data-theme="light"] .import-publish-panel.is-danger {
    border-left-color: #dc2626;
}

html[data-theme="light"] .import-preview-pill.publish {
    border-color: rgba(29, 78, 216, 0.22);
    background: #eff6ff;
    color: var(--xz-blue);
}

@media (max-width: 900px) {
    .import-publish-head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .import-publish-head .btn {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .import-publish-metrics,
    .import-publish-entries {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .import-publish-head,
    .import-publish-metrics,
    .import-publish-entries {
        grid-template-columns: 1fr;
    }
}

/* === Dashboard Xiaozi AI control center: 20260705-52 === */
.dashboard-radar-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.dashboard-radar-card {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    padding: 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: inherit;
    text-align: left;
}

.dashboard-radar-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.dashboard-radar-card > span {
    min-width: 50px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(72, 183, 255, 0.12);
    color: var(--info);
    font-size: 0.68rem;
    font-weight: 950;
    text-align: center;
    white-space: nowrap;
}

.dashboard-radar-card div {
    min-width: 0;
}

.dashboard-radar-card strong {
    display: block;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-radar-card p {
    margin: 2px 0 6px;
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-radar-card i {
    display: block;
    width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

.dashboard-radar-card i b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent-gradient);
}

.dashboard-radar-card em {
    padding: 4px 7px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.dashboard-radar-card.is-danger > span {
    background: rgba(255, 100, 124, 0.12);
    color: var(--danger);
}

.dashboard-radar-card.is-warn > span {
    background: rgba(242, 184, 75, 0.14);
    color: var(--warning);
}

.dashboard-radar-card.is-info > span {
    background: rgba(72, 183, 255, 0.12);
    color: var(--info);
}

.dashboard-radar-card.is-ok > span {
    background: rgba(49, 208, 170, 0.12);
    color: var(--success);
}

html[data-theme="light"] .dashboard-radar-card {
    border-color: var(--xz-border);
    background: #ffffff;
}

html[data-theme="light"] .dashboard-radar-card:hover {
    border-color: var(--xz-border-strong);
    background: #f8fbfc;
}

html[data-theme="light"] .dashboard-radar-card strong {
    color: var(--xz-text);
}

html[data-theme="light"] .dashboard-radar-card p {
    color: var(--xz-muted);
}

html[data-theme="light"] .dashboard-radar-card em {
    border-color: var(--xz-border);
    background: #f8fafc;
    color: var(--xz-text-soft);
}

html[data-theme="light"] .dashboard-radar-card i {
    background: #e2e8f0;
}

html[data-theme="light"] .dashboard-radar-card i b {
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"] .dashboard-radar-card.is-danger > span {
    border-color: rgba(220, 38, 38, 0.22);
    background: #fef2f2;
    color: var(--xz-red);
}

html[data-theme="light"] .dashboard-radar-card.is-warn > span {
    border-color: rgba(245, 158, 11, 0.24);
    background: #fff7ed;
    color: var(--xz-amber);
}

html[data-theme="light"] .dashboard-radar-card.is-info > span {
    border-color: rgba(14, 165, 233, 0.2);
    background: #eff6ff;
    color: var(--xz-blue);
}

html[data-theme="light"] .dashboard-radar-card.is-ok > span {
    border-color: rgba(15, 118, 110, 0.22);
    background: var(--xz-teal-soft);
    color: var(--xz-teal);
}

@media (max-width: 1180px) {
    .dashboard-radar-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .dashboard-radar-strip,
    .dashboard-radar-card {
        grid-template-columns: 1fr;
    }

    .dashboard-radar-card > span,
    .dashboard-radar-card em {
        justify-self: start;
    }
}

@media (max-width: 760px) {
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list {
        overflow: visible;
        padding-right: 0;
        scrollbar-width: auto;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-radar-strip {
        max-height: none;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-list {
        max-height: none;
    }
}

/* === Dashboard Xiaozi AI run log: 20260705-56 === */
.dashboard-ai-runlog {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.dashboard-ai-runlog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-ai-runlog-head div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.dashboard-ai-runlog-head span {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 950;
}

.dashboard-ai-runlog-head strong {
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 950;
}

.dashboard-ai-runlog-head button {
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
}

.dashboard-ai-runlog-head button:not(:disabled):hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.dashboard-ai-runlog-head button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.dashboard-ai-runlog-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 8px;
}

.dashboard-ai-runlog-item {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-secondary);
    color: inherit;
    text-align: left;
}

.dashboard-ai-runlog-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.dashboard-ai-runlog-item > span {
    min-width: 42px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(72, 183, 255, 0.12);
    color: var(--info);
    font-size: 0.66rem;
    font-weight: 950;
    text-align: center;
    white-space: nowrap;
}

.dashboard-ai-runlog-item.is-ok > span { background: rgba(49, 208, 170, 0.12); color: var(--success); }
.dashboard-ai-runlog-item.is-warn > span { background: rgba(242, 184, 75, 0.14); color: var(--warning); }
.dashboard-ai-runlog-item.is-danger > span { background: rgba(255, 100, 124, 0.12); color: var(--danger); }

.dashboard-ai-runlog-item div {
    min-width: 0;
}

.dashboard-ai-runlog-item strong,
.dashboard-ai-runlog-item p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-ai-runlog-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 950;
}

.dashboard-ai-runlog-item p {
    margin: 2px 0 0;
    color: var(--text-tertiary);
    font-size: 0.7rem;
}

.dashboard-ai-runlog-item time {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    white-space: nowrap;
}

.dashboard-ai-runlog-empty {
    grid-column: 1 / -1;
    padding: 9px;
    border: 1px dashed var(--border-color);
    border-radius: 7px;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 850;
    text-align: center;
}

html[data-theme="light"] .dashboard-ai-runlog,
html[data-theme="light"] .dashboard-ai-runlog-item {
    border-color: var(--xz-border);
    background: #f8fafc;
}

html[data-theme="light"] .dashboard-ai-runlog-item {
    background: #ffffff;
}

html[data-theme="light"] .dashboard-ai-runlog-item:hover {
    border-color: var(--xz-border-strong);
    background: #f8fbfc;
}

html[data-theme="light"] .dashboard-ai-runlog-head span,
html[data-theme="light"] .dashboard-ai-runlog-item p,
html[data-theme="light"] .dashboard-ai-runlog-item time,
html[data-theme="light"] .dashboard-ai-runlog-empty {
    color: var(--xz-muted);
}

html[data-theme="light"] .dashboard-ai-runlog-head strong,
html[data-theme="light"] .dashboard-ai-runlog-item strong {
    color: var(--xz-text);
}

html[data-theme="light"] .dashboard-ai-runlog-head button {
    border-color: var(--xz-border);
    background: #ffffff;
    color: var(--xz-text-soft);
}

html[data-theme="light"] .dashboard-ai-runlog-head button:not(:disabled):hover {
    border-color: var(--xz-border-strong);
    background: #f8fbfc;
    color: var(--xz-text);
}

html[data-theme="light"] .dashboard-ai-runlog-item.is-ok > span {
    background: var(--xz-teal-soft);
    color: var(--xz-teal);
}

html[data-theme="light"] .dashboard-ai-runlog-item.is-warn > span {
    background: #fff7ed;
    color: var(--xz-amber);
}

html[data-theme="light"] .dashboard-ai-runlog-item.is-danger > span {
    background: #fef2f2;
    color: var(--xz-red);
}

html[data-theme="light"] .dashboard-ai-runlog-empty {
    border-color: var(--xz-border);
}

@media (max-width: 760px) {
    .dashboard-ai-runlog-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .dashboard-ai-runlog-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .dashboard-ai-runlog-item time {
        grid-column: 2;
    }
}

/* === Xiaozi reference trading desk skin: 20260705-49 === */
html[data-theme="light"] {
    --xz-page: #f2f6f8;
    --xz-panel: #ffffff;
    --xz-panel-soft: #f7fbfc;
    --xz-panel-muted: #edf5f7;
    --xz-border: #d6e3e7;
    --xz-border-strong: #abc3cb;
    --xz-text: #0f172a;
    --xz-text-soft: #334155;
    --xz-muted: #66768a;
    --xz-faint: #7c8798;
    --xz-purple: #7c3aed;
    --xz-purple-deep: #5b21b6;
    --xz-purple-soft: #f3efff;
    --xz-teal: #0f766e;
    --xz-teal-soft: #e7faf7;
    --xz-blue: #1d4ed8;
    --xz-green: #059669;
    --xz-amber: #b7791f;
    --xz-red: #dc2626;
    --xz-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
    --xz-shadow-soft: 0 1px 1px rgba(15, 23, 42, 0.04);
    --sidebar-width: 238px;
    --topbar-height: 58px;
    --radius-sm: 6px;
    --radius-md: 7px;
    --radius-lg: 8px;
    --radius-xl: 8px;
    --radius-2xl: 8px;
}

html[data-theme="light"] body {
    background:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(180deg, #eff8f8 0%, #f7fafc 42%, #f3f6fa 100%);
    color: var(--xz-text);
}

html[data-theme="light"] body::before {
    display: none;
}

html[data-theme="light"] body::after {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 220;
    height: 3px;
    pointer-events: none;
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal), var(--xz-blue));
}

html[data-theme="light"] .main-content {
    background: transparent;
}

html[data-theme="light"] .page-content {
    width: 100%;
    max-width: 1520px;
    padding: 16px 18px 28px;
}

html[data-theme="light"] .page {
    gap: 14px;
}

html[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.96);
    border-right: 1px solid var(--xz-border);
    box-shadow: 10px 0 24px rgba(15, 23, 42, 0.045);
}

html[data-theme="light"] .sidebar-header {
    min-height: var(--topbar-height);
    padding: 12px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f7fbfc);
}

html[data-theme="light"] .logo-icon {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.12);
}

html[data-theme="light"] .logo-text {
    font-size: 0.95rem;
    line-height: 1.18;
    letter-spacing: 0;
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal));
    -webkit-background-clip: text;
    background-clip: text;
}

html[data-theme="light"] .logo-subtitle {
    color: var(--xz-muted);
    font-size: 0.68rem;
}

html[data-theme="light"] .sidebar-nav {
    padding: 12px 10px;
}

html[data-theme="light"] .nav-section {
    margin-bottom: 14px;
}

html[data-theme="light"] .nav-section-title {
    padding: 0 8px 6px;
    color: #718096;
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

html[data-theme="light"] .sidebar .nav-item {
    min-height: 36px;
    margin: 3px 0;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #475569;
    font-weight: 800;
}

html[data-theme="light"] .sidebar .nav-item:hover {
    border-color: var(--xz-border) !important;
    background: #f8fbfc !important;
    color: var(--xz-text) !important;
}

html[data-theme="light"] .nav-icon {
    width: 16px;
    height: 16px;
}

html[data-theme="light"] .nav-count,
html[data-theme="light"] .nav-badge,
html[data-theme="light"] .nav-badge-dot {
    border: 1px solid rgba(124, 58, 237, 0.18);
    background: var(--xz-purple-soft);
    color: #6d28d9;
}

html[data-theme="light"] .sidebar-footer {
    padding: 10px;
    border-top: 1px solid var(--xz-border);
    background: #fbfdfe;
}

html[data-theme="light"] .user-card {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: #ffffff;
}

html[data-theme="light"] .topbar {
    height: var(--topbar-height);
    padding: 0 18px;
    border-bottom: 1px solid var(--xz-border);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--xz-shadow-soft), 0 10px 26px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .breadcrumb-current {
    color: var(--xz-text);
    font-size: 0.95rem;
    font-weight: 900;
}

html[data-theme="light"] .topbar-btn,
html[data-theme="light"] .topbar-ai-status,
html[data-theme="light"] .topbar-balance,
html[data-theme="light"] #authTopLoginBtn {
    height: 36px;
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #ffffff;
    color: var(--xz-text-soft);
    box-shadow: none;
}

html[data-theme="light"] .topbar-ai-status {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.08), rgba(15, 118, 110, 0.07));
    color: var(--xz-purple-deep);
}

html[data-theme="light"] .topbar-ai-status img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

html[data-theme="light"] .topbar-balance {
    min-width: 152px;
    align-items: flex-end;
    padding: 6px 12px;
    background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

html[data-theme="light"] .topbar-balance-label {
    color: var(--xz-muted);
    font-size: 0.66rem;
    font-weight: 900;
}

html[data-theme="light"] .topbar-balance strong {
    color: var(--xz-text);
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

html[data-theme="light"] .search-box {
    height: 38px;
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #f8fbfc;
}

html[data-theme="light"] .search-box:focus-within {
    border-color: rgba(124, 58, 237, 0.38);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

html[data-theme="light"] .topbar-ai-status kbd,
html[data-theme="light"] .search-shortcut {
    border-color: var(--xz-border);
    background: #f8fafc;
    color: var(--xz-muted);
}

html[data-theme="light"] .btn {
    min-height: 34px;
    border-radius: 7px;
    font-weight: 850;
    letter-spacing: 0;
}

html[data-theme="light"] .btn-sm {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

html[data-theme="light"] .btn-primary {
    border: 1px solid rgba(124, 58, 237, 0.18);
    background: linear-gradient(135deg, #7c3aed, #0f766e);
    color: #ffffff;
    box-shadow: 0 9px 18px rgba(124, 58, 237, 0.16);
}

html[data-theme="light"] .btn-glass {
    border: 1px solid var(--xz-border);
    background: #ffffff;
    color: var(--xz-text-soft);
    box-shadow: none;
}

html[data-theme="light"] .btn-glass:hover {
    border-color: var(--xz-border-strong);
    background: var(--xz-panel-soft);
    color: var(--xz-text);
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .purchase-history-panel,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .upload-zone,
html[data-theme="light"] .import-options,
html[data-theme="light"] .import-ai-card,
html[data-theme="light"] .import-history,
html[data-theme="light"] .quality-overview,
html[data-theme="light"] .quality-actions,
html[data-theme="light"] .refill-dispatch-panel,
html[data-theme="light"] .refill-config-card,
html[data-theme="light"] .refill-logs-card,
html[data-theme="light"] .warranty-ai-panel,
html[data-theme="light"] .warranty-stats,
html[data-theme="light"] .warranty-table-wrap,
html[data-theme="light"] .wallet-balance-area,
html[data-theme="light"] .wallet-radar-panel,
html[data-theme="light"] .wallet-risk-panel,
html[data-theme="light"] .redeem-console,
html[data-theme="light"] .wallet-review-panel,
html[data-theme="light"] .wallet-transactions,
html[data-theme="light"] .settings-nav,
html[data-theme="light"] .settings-main {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--xz-shadow-soft), var(--xz-shadow);
}

html[data-theme="light"] .glass-card:hover,
html[data-theme="light"] .market-product-row:hover,
html[data-theme="light"] .account-card:hover {
    border-color: var(--xz-border-strong);
    transform: none;
}

html[data-theme="light"] .panel-kicker {
    margin-bottom: 5px;
    color: var(--xz-teal);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.04em;
}

html[data-theme="light"] .section-title,
html[data-theme="light"] .market-list-header h4,
html[data-theme="light"] .workbench-card-header h4,
html[data-theme="light"] .import-radar-head h4,
html[data-theme="light"] .wallet-risk-head h3,
html[data-theme="light"] .quality-triage-head h4,
html[data-theme="light"] .warranty-ai-title h3 {
    color: var(--xz-text);
    font-size: 1.02rem;
    font-weight: 950;
    line-height: 1.25;
}

html[data-theme="light"] .redeem-desc,
html[data-theme="light"] .market-list-header p,
html[data-theme="light"] .workbench-card-header p,
html[data-theme="light"] .import-radar-advice,
html[data-theme="light"] .wallet-ai-advice,
html[data-theme="light"] .wallet-risk-head p,
html[data-theme="light"] .warranty-ai-title p {
    color: var(--xz-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

html[data-theme="light"] .data-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
}

html[data-theme="light"] .data-table th {
    height: 38px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--xz-border);
    background: #f3f8f9;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.02em;
}

html[data-theme="light"] .data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e7eef1;
    background: #ffffff;
    color: var(--xz-text-soft);
}

html[data-theme="light"] .data-table tbody tr:hover td {
    background: #f8fbfc;
}

html[data-theme="light"] .money,
html[data-theme="light"] .account-price,
html[data-theme="light"] .wallet-balance,
html[data-theme="light"] .wallet-radar-item strong,
html[data-theme="light"] .order-delivery-metric strong,
html[data-theme="light"] .confirm-metrics strong {
    font-family: var(--font-mono);
    letter-spacing: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .page-content {
    padding-top: 14px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip {
    position: relative;
    min-height: 66px;
    margin-bottom: 12px;
    padding: 12px 14px;
    grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.14fr);
    overflow: hidden;
    border-color: var(--xz-border);
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.09), rgba(15, 118, 110, 0.06) 48%, rgba(255, 255, 255, 0.96)),
        #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip::before,
html[data-theme="light"] .purchase-workbench-header::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-brand strong {
    color: var(--xz-text);
    font-size: 1.02rem;
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-links {
    gap: 8px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-link {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.82);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell {
    grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
    gap: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-panel,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board {
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-notice,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-brief-stack .xiaozi-ai-panel {
    padding: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-icon,
html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-avatar,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-ai {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(15, 118, 110, 0.1));
}

html[data-theme="light"][data-active-page="dashboard"] .notice-title-row strong,
html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-copy h3 {
    color: var(--xz-text);
    font-weight: 950;
}

html[data-theme="light"][data-active-page="dashboard"] .notice-body p,
html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-copy p {
    color: var(--xz-muted);
    font-size: 0.84rem;
}

html[data-theme="light"][data-active-page="dashboard"] .xiaozi-ai-metric,
html[data-theme="light"] .market-ai-metric,
html[data-theme="light"] .wallet-radar-item,
html[data-theme="light"] .order-delivery-metric,
html[data-theme="light"] .import-radar-metric,
html[data-theme="light"] .quality-snapshot-card,
html[data-theme="light"] .warranty-stat-item {
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: var(--xz-panel-soft);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board,
html[data-theme="light"][data-active-page="dashboard"] .merchant-panel {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-price-board-head,
html[data-theme="light"][data-active-page="dashboard"] .merchant-panel-header,
html[data-theme="light"] .workbench-card-header,
html[data-theme="light"] .market-list-header,
html[data-theme="light"] .order-delivery-radar-head,
html[data-theme="light"] .import-radar-head,
html[data-theme="light"] .wallet-review-head,
html[data-theme="light"] .import-ai-head,
html[data-theme="light"] .import-preview-head,
html[data-theme="light"] .wallet-chart-head {
    min-height: 50px;
    margin: 0;
    padding: 11px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
    min-height: 128px;
    padding: 10px 11px;
    border: 0;
    border-right: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:last-child {
    border-right: 0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:hover {
    background: #f9fcfc;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-live.is-selected,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-warn.is-selected {
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.1), rgba(15, 118, 110, 0.055)),
        #ffffff;
    box-shadow: inset 0 3px 0 var(--xz-purple);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-token {
    border: 1px solid var(--xz-border);
    border-radius: 6px;
    background: #f8fafc;
    color: var(--xz-text);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta strong {
    color: var(--xz-text);
    font-size: 0.98rem;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-meta small,
html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-bottom span,
html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    color: var(--xz-muted);
}

html[data-theme="light"][data-active-page="dashboard"] .tier-action {
    width: 100%;
    min-height: 27px;
    justify-content: center;
    border: 1px solid var(--xz-border);
    border-radius: 6px;
    background: #f8fafc;
    font-style: normal;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card.is-selected .tier-action {
    border-color: rgba(124, 58, 237, 0.26);
    background: var(--xz-purple-soft);
    color: var(--xz-purple-deep);
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-stock-meter {
    height: 5px;
    background: #e2e8f0;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-stock-meter i {
    background: linear-gradient(90deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-panel {
    padding: 12px;
    margin-bottom: 12px;
}

html[data-theme="light"][data-active-page="dashboard"] .dashboard-mission-card {
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-row {
    padding: 8px 12px;
    border-bottom: 1px solid var(--xz-border);
    background: #fbfdfe;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip {
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--xz-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--xz-muted);
    font-size: 0.78rem;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-summary-chip.is-active {
    border-color: rgba(124, 58, 237, 0.25);
    background: var(--xz-purple-soft);
    color: var(--xz-purple-deep);
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-table-wrap,
html[data-theme="light"] .purchase-history-table-wrap,
html[data-theme="light"] .wallet-review-table-wrap,
html[data-theme="light"] .orders-table-wrap,
html[data-theme="light"] .quality-risk-table-wrap,
html[data-theme="light"] .import-preview-table-wrap {
    border-radius: 0;
    background: #ffffff;
}

html[data-theme="light"][data-active-page="dashboard"] .merchant-avatar {
    border-radius: 7px;
    background: var(--xz-teal-soft);
    color: var(--xz-teal);
}

html[data-theme="light"] .purchase-workbench-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 14px 16px;
    margin-bottom: 12px;
    overflow: hidden;
    background:
        linear-gradient(112deg, rgba(124, 58, 237, 0.095), rgba(15, 118, 110, 0.065) 46%, rgba(255, 255, 255, 0.96)),
        #ffffff;
}

html[data-theme="light"] .purchase-workbench-grid {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.43fr);
    gap: 12px;
    margin-bottom: 12px;
}

html[data-theme="light"] .purchase-builder,
html[data-theme="light"] .purchase-confirm,
html[data-theme="light"] .market-list-panel,
html[data-theme="light"] .purchase-history-panel,
html[data-theme="light"] .order-delivery-radar,
html[data-theme="light"] .import-radar,
html[data-theme="light"] .import-ai-card,
html[data-theme="light"] .import-history,
html[data-theme="light"] .wallet-balance-area,
html[data-theme="light"] .wallet-radar-panel,
html[data-theme="light"] .wallet-transactions {
    padding: 0;
    overflow: hidden;
}

html[data-theme="light"] .purchase-builder > .filter-tabs,
html[data-theme="light"] .purchase-builder > .purchase-quantity-block,
html[data-theme="light"] .purchase-builder > .toolbar-search,
html[data-theme="light"] .purchase-builder > .search-filters,
html[data-theme="light"] .purchase-builder > .purchase-sort-row {
    margin: 0 14px 12px;
}

html[data-theme="light"] .purchase-builder > .filter-tabs {
    margin-top: 13px;
}

html[data-theme="light"] .filter-tabs,
html[data-theme="light"] .search-filters {
    gap: 7px;
}

html[data-theme="light"] .filter-tab,
html[data-theme="light"] .chip-filter,
html[data-theme="light"] .quick-quantity-row button,
html[data-theme="light"] .sort-select,
html[data-theme="light"] .form-input,
html[data-theme="light"] .form-select,
html[data-theme="light"] .toolbar-search,
html[data-theme="light"] .purchase-quantity-control,
html[data-theme="light"] .purchase-quantity-block,
html[data-theme="light"] .confirm-selected-product,
html[data-theme="light"] .confirm-metrics div {
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #ffffff;
    color: var(--xz-text-soft);
    box-shadow: none;
}

html[data-theme="light"] .filter-tab {
    min-height: 31px;
    padding: 6px 12px;
    font-size: 0.8rem;
}

html[data-theme="light"] .filter-tab.active {
    border-color: rgba(124, 58, 237, 0.24);
    background: var(--xz-purple-soft);
    color: var(--xz-purple-deep);
    box-shadow: none;
}

html[data-theme="light"] .chip-filter.active,
html[data-theme="light"] .chip-filter:hover {
    border-color: rgba(15, 118, 110, 0.25);
    background: var(--xz-teal-soft);
    color: var(--xz-teal);
}

html[data-theme="light"] .purchase-quantity-block,
html[data-theme="light"] .toolbar-search,
html[data-theme="light"] .confirm-selected-product,
html[data-theme="light"] .confirm-metrics div {
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .purchase-confirm .confirm-selected-product,
html[data-theme="light"] .purchase-confirm .confirm-metrics,
html[data-theme="light"] .purchase-confirm .purchase-hint,
html[data-theme="light"] .purchase-confirm .market-preflight-panel,
html[data-theme="light"] .purchase-confirm .btn-lg {
    margin-left: 14px;
    margin-right: 14px;
}

html[data-theme="light"] .confirm-selected-product {
    min-height: 96px;
    padding: 13px;
}

html[data-theme="light"] .confirm-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

html[data-theme="light"] .purchase-confirm .btn-lg {
    width: calc(100% - 28px);
    margin-bottom: 14px;
}

html[data-theme="light"] .market-ai-advisor {
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 0.9fr) auto;
    gap: 12px;
    padding: 13px 14px;
    margin-bottom: 12px;
    border-color: rgba(15, 118, 110, 0.22);
    background:
        linear-gradient(112deg, rgba(15, 118, 110, 0.075), rgba(124, 58, 237, 0.06), rgba(255, 255, 255, 0.96)),
        #ffffff;
}

html[data-theme="light"] .market-ai-avatar,
html[data-theme="light"] .import-ai-head img,
html[data-theme="light"] .warranty-ai-title img,
html[data-theme="light"] .assistant-head img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

html[data-theme="light"] .market-ai-metrics {
    grid-template-columns: repeat(4, minmax(72px, 1fr));
    gap: 7px;
}

html[data-theme="light"] .market-grid.market-purchase-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

html[data-theme="light"] .market-product-row {
    grid-template-columns: minmax(96px, auto) minmax(260px, 1fr) minmax(190px, auto) minmax(148px, auto);
    min-height: 72px;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid var(--xz-border);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"] .market-product-row:last-child {
    border-bottom: 0;
}

html[data-theme="light"] .market-product-row.is-selected {
    border-bottom-color: rgba(124, 58, 237, 0.28);
    background:
        linear-gradient(90deg, rgba(124, 58, 237, 0.09), rgba(15, 118, 110, 0.045), #ffffff);
    box-shadow: inset 3px 0 0 var(--xz-purple);
}

html[data-theme="light"] .account-type-badge,
html[data-theme="light"] .account-quality,
html[data-theme="light"] .status-badge,
html[data-theme="light"] .rank-pill,
html[data-theme="light"] .risk-pill,
html[data-theme="light"] .recommend-pill,
html[data-theme="light"] .tx-type,
html[data-theme="light"] .import-preview-pill,
html[data-theme="light"] .import-quota-status {
    min-height: 24px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 900;
}

html[data-theme="light"] .account-type-badge {
    border: 1px solid rgba(124, 58, 237, 0.22);
    background: var(--xz-purple-soft);
    color: var(--xz-purple-deep);
}

html[data-theme="light"] .account-quality {
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: var(--xz-teal-soft);
    color: var(--xz-teal);
}

html[data-theme="light"] .market-product-main h4,
html[data-theme="light"] .account-model {
    color: var(--xz-text);
    font-size: 0.95rem;
    font-weight: 950;
}

html[data-theme="light"] .market-product-main p,
html[data-theme="light"] .market-product-row .account-sla {
    color: var(--xz-muted);
    font-size: 0.8rem;
}

html[data-theme="light"] .account-price {
    color: var(--xz-text);
    font-size: 1.02rem;
    font-weight: 950;
}

html[data-theme="light"] .purchase-history-filters,
html[data-theme="light"] .purchase-history-actions {
    padding: 10px 14px;
    border-color: var(--xz-border);
    background: #fbfdfe;
}

html[data-theme="light"] .order-delivery-radar-grid,
html[data-theme="light"] .order-triage-lanes,
html[data-theme="light"] .order-export-radar,
html[data-theme="light"] .import-radar-grid,
html[data-theme="light"] .wallet-radar-grid {
    padding: 12px 14px 0;
}

html[data-theme="light"] .order-delivery-advice,
html[data-theme="light"] .wallet-ai-advice,
html[data-theme="light"] .import-radar-advice {
    margin: 12px 14px 14px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 7px;
    background: var(--xz-purple-soft);
    color: var(--xz-purple-deep);
}

html[data-theme="light"] .order-delivery-decision {
    margin: 12px 14px 0;
}

html[data-theme="light"] .import-layout {
    grid-template-columns: minmax(300px, 0.78fr) minmax(280px, 0.45fr);
    gap: 12px;
    margin-bottom: 12px;
}

html[data-theme="light"] .upload-zone {
    padding: 32px 24px;
    border-style: dashed;
    background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

html[data-theme="light"] .upload-icon-wrap {
    border-radius: 8px;
    background: var(--xz-purple-soft);
    color: var(--xz-purple);
}

html[data-theme="light"] .format-tag,
html[data-theme="light"] .radio-option,
html[data-theme="light"] .checkbox-label {
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #ffffff;
    color: var(--xz-muted);
}

html[data-theme="light"] .import-paste-area {
    width: calc(100% - 28px);
    margin: 14px;
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: #fbfdfe;
    color: var(--xz-text);
}

html[data-theme="light"] .import-ai-summary,
html[data-theme="light"] .import-preview-insights,
html[data-theme="light"] .import-format-radar,
html[data-theme="light"] .import-preview-panel,
html[data-theme="light"] .import-ai-actions {
    margin-left: 14px;
    margin-right: 14px;
}

html[data-theme="light"] .import-ai-actions {
    margin-bottom: 14px;
}

html[data-theme="light"] .import-history > .section-title,
html[data-theme="light"] .wallet-transactions > .section-title {
    margin: 0;
    padding: 13px 14px;
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"] .wallet-overview {
    grid-template-columns: minmax(300px, 0.78fr) minmax(360px, 1.22fr);
    gap: 12px;
    margin-bottom: 12px;
}

html[data-theme="light"] .wallet-balance-area {
    justify-content: flex-start;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.085), rgba(15, 118, 110, 0.06)),
        #ffffff;
}

html[data-theme="light"] .wallet-label {
    color: var(--xz-muted);
    font-size: 0.78rem;
    font-weight: 950;
}

html[data-theme="light"] .wallet-balance {
    color: var(--xz-text);
    font-size: clamp(2rem, 4vw, 3rem);
}

html[data-theme="light"] .wallet-actions {
    margin-top: 16px;
    flex-wrap: wrap;
}

html[data-theme="light"] .mini-chart {
    min-height: 108px;
    padding: 8px 14px 0;
}

html[data-theme="light"] .wallet-trend-note {
    padding: 0 14px;
}

html[data-theme="light"] .wallet-risk-panel,
html[data-theme="light"] .redeem-console,
html[data-theme="light"] .wallet-review-panel,
html[data-theme="light"] .quality-overview,
html[data-theme="light"] .quality-actions,
html[data-theme="light"] .refill-config-card,
html[data-theme="light"] .refill-logs-card,
html[data-theme="light"] .warranty-ai-panel,
html[data-theme="light"] .warranty-table-wrap {
    padding: 14px;
}

html[data-theme="light"] .config-item,
html[data-theme="light"] .timeline-item,
html[data-theme="light"] .quality-triage-panel,
html[data-theme="light"] .quality-flow-panel,
html[data-theme="light"] .warranty-triage-grid > *,
html[data-theme="light"] .refill-task-card,
html[data-theme="light"] .wallet-risk-lane,
html[data-theme="light"] .import-preview-decision,
html[data-theme="light"] .import-preview-lane,
html[data-theme="light"] .import-format-radar-head,
html[data-theme="light"] .import-format-card,
html[data-theme="light"] .import-field-card {
    border: 1px solid var(--xz-border);
    border-radius: 7px;
    background: var(--xz-panel-soft);
}

html[data-theme="light"] .xiaozi-assistant-panel {
    border: 1px solid var(--xz-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .xiaozi-assistant-fab {
    border-radius: 10px;
    background: linear-gradient(135deg, var(--xz-purple), var(--xz-teal));
}

html[data-theme="light"] .assistant-head {
    border-bottom: 1px solid var(--xz-border);
    background: linear-gradient(180deg, #ffffff, #f6fafb);
}

html[data-theme="light"] .assistant-message,
html[data-theme="light"] .assistant-signal,
html[data-theme="light"] .assistant-next-step,
html[data-theme="light"] .assistant-playbook,
html[data-theme="light"] .assistant-playbook-step,
html[data-theme="light"] .assistant-guardrail,
html[data-theme="light"] .assistant-insight,
html[data-theme="light"] .assistant-risk,
html[data-theme="light"] .assistant-command-hints button {
    border-color: var(--xz-border);
    background: var(--xz-panel-soft);
}

@media (max-width: 1180px) {
    html[data-theme="light"] .market-ai-advisor {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .market-ai-actions {
        justify-content: flex-start;
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: minmax(90px, auto) minmax(220px, 1fr) minmax(160px, auto);
    }

    html[data-theme="light"] .market-product-row .account-footer {
        grid-column: 2 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 980px) {
    html[data-theme="light"] .page-content {
        padding: 14px;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-strip,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-trade-shell,
    html[data-theme="light"] .purchase-workbench-grid,
    html[data-theme="light"] .import-layout,
    html[data-theme="light"] .wallet-overview {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        border-bottom: 1px solid var(--xz-border);
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card:nth-child(2n) {
        border-right: 0;
    }

    html[data-theme="light"] .market-product-row {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    html[data-theme="light"] .market-product-row .account-footer {
        grid-column: auto;
        justify-content: space-between;
    }
}

@media (max-width: 760px) {
    html[data-theme="light"] .topbar {
        padding: 0 12px;
    }

    html[data-theme="light"] .topbar-center,
    html[data-theme="light"] .topbar-ai-status kbd,
    html[data-theme="light"] .topbar-ai-status span {
        display: none;
    }

    html[data-theme="light"] .topbar-balance {
        min-width: 116px;
        padding-inline: 9px;
    }

    html[data-theme="light"] .purchase-workbench-header,
    html[data-theme="light"] .merchant-panel-header,
    html[data-theme="light"] .workbench-card-header,
    html[data-theme="light"] .market-list-header,
    html[data-theme="light"] .order-delivery-radar-head,
    html[data-theme="light"] .wallet-review-head,
    html[data-theme="light"] .redeem-entry {
        flex-direction: column;
        align-items: flex-start;
    }

    html[data-theme="light"] .merchant-header-actions,
    html[data-theme="light"] .purchase-history-actions,
    html[data-theme="light"] .quality-controls,
    html[data-theme="light"] .wallet-actions,
    html[data-theme="light"] .redeem-form {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    html[data-theme="light"] .page-content {
        padding: 10px;
    }

    html[data-theme="light"] .topbar-right {
        gap: 6px;
    }

    html[data-theme="light"] #authTopLoginBtn,
    html[data-theme="light"] .notification-btn {
        display: none;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-flow-links,
    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-strip,
    html[data-theme="light"] .confirm-metrics,
    html[data-theme="light"] .market-ai-metrics,
    html[data-theme="light"] .wallet-radar-grid,
    html[data-theme="light"] .import-radar-grid,
    html[data-theme="light"] .order-delivery-radar-grid {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"][data-active-page="dashboard"] .dashboard-status-card {
        border-right: 0;
    }

    html[data-theme="light"] .quick-quantity-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    html[data-theme="light"] .purchase-history-actions .btn,
    html[data-theme="light"] .market-ai-actions .btn,
    html[data-theme="light"] .import-ai-actions .btn {
        flex: 1 1 auto;
    }
}

/* ===== Accessibility and input reliability (final cascade) ===== */
:where(a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color) !important;
    outline-offset: var(--focus-ring-offset, 3px) !important;
    box-shadow: var(--focus-ring-shadow) !important;
}

@media (pointer: coarse), (max-width: 760px) {
    .btn,
    .topbar-btn,
    .topbar-balance,
    .menu-toggle,
    .user-menu-btn,
    .settings-nav-item,
    .nav-item {
        min-height: 44px !important;
    }

    .topbar-btn,
    .menu-toggle,
    .user-menu-btn {
        min-width: 44px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}

@media (min-width: 561px) {
    html[data-user-role="user"][data-active-page="dashboard"] .dashboard-flow-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-user-role="admin"][data-active-page="dashboard"] .dashboard-flow-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ===== Dark dashboard flow parity ===== */
html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-strip {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
    align-items: center;
    gap: 14px;
    overflow: hidden;
    padding: 14px 16px;
    border-color: rgba(139, 108, 255, 0.24);
    background:
        linear-gradient(135deg, rgba(139, 108, 255, 0.13), rgba(25, 199, 184, 0.06)),
        var(--bg-secondary);
}

html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-strip::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--accent-gradient);
}

html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-brand {
    display: grid;
    gap: 4px;
    min-width: 0;
}

html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-brand .panel-kicker {
    color: var(--accent-secondary);
}

html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-brand strong {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.28;
}

html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-links {
    display: grid;
    gap: 8px;
    min-width: 0;
}

html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-link {
    display: flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 9px;
    background: rgba(9, 12, 19, 0.76);
    color: var(--text-secondary);
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-link:hover {
    transform: translateY(-1px);
    border-color: rgba(25, 199, 184, 0.48);
    background: rgba(25, 199, 184, 0.09);
    color: var(--text-primary);
}

html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-link span,
html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-link strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-link span {
    font-size: 0.78rem;
    font-weight: 800;
}

html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-link strong {
    color: var(--accent-tertiary);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 900;
}

@media (max-width: 900px) {
    html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    html[data-theme="dark"][data-active-page="dashboard"] .dashboard-flow-links {
        grid-template-columns: 1fr;
    }
}

/* ===== Xiaozi standalone authentication ===== */
.xiaozi-auth-modal {
    width: min(540px, calc(100vw - 32px));
    max-width: 540px;
    padding: 24px;
    border-color: rgba(139, 108, 255, 0.24);
    background: var(--bg-secondary);
}

.xiaozi-auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 36px;
}

.xiaozi-auth-brand img {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(139, 108, 255, 0.22), 0 10px 24px rgba(0, 0, 0, 0.16);
}

.xiaozi-auth-brand .modal-title {
    margin-top: 2px;
    font-size: 1.25rem;
}

.xiaozi-auth-brand p {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.xiaozi-auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 22px 0 18px;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.xiaozi-auth-tabs button {
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.xiaozi-auth-tabs button[aria-selected="true"] {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px rgba(139, 108, 255, 0.26);
}

.xiaozi-auth-panel[hidden] {
    display: none;
}

.xiaozi-auth-panel form {
    display: grid;
    gap: 14px;
}

.xiaozi-auth-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.xiaozi-auth-panel .form-group {
    margin: 0;
}

.xiaozi-auth-submit {
    width: 100%;
    min-height: 44px;
    margin-top: 2px;
}

.xiaozi-auth-role-hint,
.xiaozi-auth-feedback {
    min-height: 20px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.xiaozi-auth-feedback {
    margin-top: 12px;
}

.xiaozi-auth-feedback.is-error {
    color: var(--danger);
}

.xiaozi-auth-feedback.is-success {
    color: var(--success);
}

html[data-theme="light"] .xiaozi-auth-modal {
    border-color: #dbe8eb;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .xiaozi-auth-tabs {
    border-color: #dbe8eb;
    background: #f3f8f8;
}

html[data-theme="light"] .xiaozi-auth-tabs button[aria-selected="true"] {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.2), 0 4px 12px rgba(15, 23, 42, 0.06);
}

@media (max-width: 560px) {
    .xiaozi-auth-modal {
        width: calc(100vw - 20px);
        padding: 20px 16px;
    }

    .xiaozi-auth-field-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Unified inventory and delivery pools ===== */
.inventory-console-hero,
.pool-console-overview {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.15fr);
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
    padding: 22px;
    border-left: 3px solid var(--accent-primary);
}

.inventory-console-hero h2,
.pool-console-overview h2 {
    margin: 5px 0 7px;
    color: var(--text-primary);
    font-size: 1.25rem;
    letter-spacing: 0;
}

.inventory-console-hero p,
.pool-console-overview p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.65;
}

.inventory-console-stats,
.pool-console-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pool-console-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-console-stats > div,
.pool-console-summary > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-tertiary);
}

.inventory-console-stats span,
.pool-console-summary span {
    display: block;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-console-stats strong,
.pool-console-summary strong {
    display: block;
    margin-top: 4px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.18rem;
}

.inventory-console-panel {
    padding: 0;
    overflow: hidden;
}

.inventory-console-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.inventory-console-filters,
.inventory-console-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.inventory-console-search {
    width: min(310px, 28vw);
}

.inventory-console-filters .form-select {
    width: auto;
    min-width: 116px;
}

.inventory-console-actions > span {
    margin-right: 3px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    white-space: nowrap;
}

.inventory-console-table-wrap {
    overflow-x: auto;
}

.inventory-console-table {
    min-width: 980px;
}

.inventory-console-table th:first-child,
.inventory-console-table td:first-child {
    width: 42px;
    text-align: center;
}

.inventory-console-account,
.inventory-console-source,
.inventory-console-table td:nth-child(4) {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.inventory-console-account strong,
.inventory-console-source strong {
    max-width: 230px;
    overflow: hidden;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-console-account code,
.inventory-console-source small,
.inventory-console-table td:nth-child(4) small {
    color: var(--text-tertiary);
    font-size: 0.72rem;
}

.inventory-purpose-select {
    display: block;
    width: 88px;
    min-height: 28px;
    margin-top: 5px;
    padding: 3px 6px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.72rem;
}

.inventory-health {
    display: grid;
    gap: 5px;
    width: 90px;
}

.inventory-health > span,
.pool-waterline > span {
    display: block;
    height: 5px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--bg-tertiary);
}

.inventory-health i,
.pool-waterline i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--success);
}

.inventory-state,
.application-state {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.inventory-state.is-ready,
.application-state.is-ready,
.pool-waterline .is-ready { color: var(--success); }
.inventory-state.is-warn,
.application-state.is-warn,
.pool-waterline .is-warn { color: var(--warning); }
.inventory-state.is-danger,
.application-state.is-danger,
.pool-waterline .is-danger { color: var(--danger); }
.inventory-state.is-muted { opacity: 0.62; }

.inventory-console-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.pool-console-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 16px;
}

.pool-console-section {
    min-width: 0;
    padding: 18px;
}

.pool-console-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pool-console-heading h3 {
    margin: 3px 0 0;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.pool-console-heading > span {
    color: var(--text-tertiary);
    font-size: 0.78rem;
}

.application-form,
.pool-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.application-form input[type="url"],
.application-form input[type="password"] {
    grid-column: 1 / -1;
}

.application-form .btn {
    grid-column: 1 / -1;
}

.pool-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pool-form > label {
    display: grid;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.74rem;
}

.pool-form .btn {
    grid-column: 1 / -1;
}

.application-list,
.pool-list {
    display: grid;
    gap: 8px;
}

.application-item,
.pool-item {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.application-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 11px;
}

.application-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 7px;
    background: rgba(124, 58, 237, 0.12);
    color: var(--accent-primary);
    font-size: 0.76rem;
    font-weight: 900;
}

.application-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.application-copy strong,
.application-copy span,
.application-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.application-copy span,
.application-copy small {
    color: var(--text-tertiary);
    font-size: 0.72rem;
}

.application-actions {
    display: flex;
    grid-column: 2 / -1;
    justify-content: flex-end;
    gap: 6px;
}

.pool-item {
    padding: 12px;
}

.pool-item.is-disabled {
    opacity: 0.64;
}

.pool-item-head,
.pool-item-meta,
.pool-waterline > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pool-item-head > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.pool-item-head span,
.pool-item-meta,
.pool-waterline span,
.pool-waterline em {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-style: normal;
}

.pool-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    white-space: nowrap;
}

.pool-waterline {
    display: grid;
    gap: 7px;
    margin: 13px 0 10px;
}

.pool-waterline strong {
    margin-right: 3px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.12rem;
}

.pool-waterline > span {
    height: 7px;
}

.pool-waterline i.is-warn { background: var(--warning); }
.pool-waterline i.is-danger { background: var(--danger); }

.pool-item-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.pool-item-meta button {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--danger);
    font: inherit;
    font-size: 0.72rem;
    cursor: pointer;
}

html[data-theme="light"] .application-item,
html[data-theme="light"] .pool-item,
html[data-theme="light"] .inventory-console-stats > div,
html[data-theme="light"] .pool-console-summary > div {
    background: #f6f9fa;
}

@media (max-width: 1100px) {
    .inventory-console-hero,
    .pool-console-overview,
    .pool-console-layout {
        grid-template-columns: 1fr;
    }

    .inventory-console-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .inventory-console-search {
        width: 100%;
    }
}

@media (max-width: 680px) {
    .page-content {
        padding-bottom: 76px;
    }

    .xiaozi-assistant {
        right: 10px;
        bottom: 10px;
    }

    .xiaozi-assistant-fab,
    html[data-theme="light"] .xiaozi-assistant-fab {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 4px;
        border-radius: 8px;
    }

    .xiaozi-assistant-fab img,
    html[data-theme="light"] .xiaozi-assistant-fab img {
        width: 34px;
        height: 34px;
    }

    .xiaozi-assistant-fab span {
        display: none;
    }

    .xiaozi-assistant-panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 72px);
    }

    .inventory-console-hero,
    .pool-console-overview,
    .pool-console-section {
        padding: 15px;
    }

    .inventory-console-stats,
    .pool-console-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-console-filters,
    .inventory-console-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-console-search,
    .inventory-console-actions > span {
        grid-column: 1 / -1;
    }

    .inventory-console-filters .form-select {
        width: 100%;
        min-width: 0;
    }

    .application-form,
    .pool-form {
        grid-template-columns: 1fr;
    }

    .application-form > *,
    .pool-form > *,
    .application-form input[type="url"],
    .application-form input[type="password"],
    .application-form .btn,
    .pool-form .btn {
        grid-column: 1;
    }
}

/* ==================== 同步状态常驻横幅 ==================== */
/* 顶栏是 sticky 定位，横幅固定在底部才不会挡住导航 */
.sync-status-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.16);
    background: linear-gradient(105deg, #d97706, #f2b84b);
    color: #16121f;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.16);
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
}

.sync-status-banner[data-kind="auth"] {
    background: linear-gradient(105deg, #dc2626, #f4716f);
    color: #fff;
}

.sync-status-banner[data-kind="conflict"] {
    background: linear-gradient(105deg, #7c3aed, #a855f7);
    color: #fff;
}

.sync-status-banner strong {
    font-weight: 800;
}

.sync-status-banner .btn {
    flex: none;
    border-color: transparent;
    background: #16121f;
    color: #fff;
}

.sync-status-banner[data-kind="auth"] .btn,
.sync-status-banner[data-kind="conflict"] .btn {
    background: #fff;
    color: #16121f;
}

@media (max-width: 620px) {
    .sync-status-banner {
        flex-direction: column;
        gap: 8px;
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}
/* 小紫酱的魔法屋：唯一的深紫主题 */
html[data-theme="dark"] {
    color-scheme: dark;
    --bg-primary: #100b1c;
    --bg-secondary: #191125;
    --bg-tertiary: #21172f;
    --bg-elevated: #2b1d3b;
    --bg-hover: #302042;
    --text-primary: #f2eaf9;
    --text-secondary: #c0aecf;
    --text-tertiary: #a18cae;
    --border-color: rgba(188, 151, 226, .15);
    --border-hover: rgba(207, 164, 245, .32);
    --accent-primary: #ab74ed;
    --accent-secondary: #c79af5;
    --accent-tertiary: #d7b785;
    --accent-gradient: linear-gradient(135deg, #9e63d9, #7743b4);
    --accent-glow: rgba(168, 98, 242, .18);
    --glass-bg: #191125;
    --glass-bg-hover: #261936;
    --glass-shadow: 0 16px 40px rgba(5, 2, 12, .2);
    --primary-light: #cb9fff;
    --sidebar-width: 264px;
    --topbar-height: 76px;
    --font-sans: "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
    --room-serif: "Noto Serif SC", "SimSun", serif;
    --room-numerals: "Cormorant Garamond", "Noto Serif SC", serif;
    --room-gold: #d7b785;
    --focus-ring-width: 2px;
    --focus-ring-color: #c6a5d4;
    --focus-ring-shadow: 0 0 0 5px #b28bca12;
    --room-nav-offset: var(--sidebar-width);
    --room-page-padding: 24px;
}
html[data-theme="dark"] body {
    background: radial-gradient(ellipse at 62% 26%, #251337 0, #140d21 43%, #0c0913 90%);
    color: var(--text-primary);
}
html[data-theme="dark"] body::before { display: none; }
html[data-theme="dark"] .main-content { position: relative; z-index: 1; background: transparent; }
html[data-theme="dark"] .page-content { padding: var(--room-page-padding) clamp(24px, 3vw, 48px); background: transparent; }
html[data-theme="dark"] .sidebar {
    background: radial-gradient(ellipse at 50% 0, #54356c36, transparent 48%), linear-gradient(170deg, #1b1229, #100c1b 70%, #171020);
    border-right: 1px solid #bb9ad02b;
    box-shadow: 15px 0 60px #04010a29, inset -1px 0 0 #b99acd08;
}
html[data-theme="dark"] .sidebar-header { position: relative; flex-shrink: 0; padding: 34px 22px 28px; border-bottom: 0; }
html[data-theme="dark"] .sidebar-header::after { position: absolute; content: ''; bottom: 0; left: 26px; right: 26px; height: 1px; background: linear-gradient(90deg, transparent, #c2a47b59, transparent); }
html[data-theme="dark"] .logo { flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.brand-sigil { position: relative; display: grid; place-items: center; width: 104px; height: 104px; }
.brand-sigil::before { position: absolute; content: ''; inset: 0; border: 1px solid #c8a77a66; border-radius: 50%; box-shadow: 0 0 36px #9a5bcd17, inset 0 0 24px #9a5bcd13; }
.brand-sigil::after { position: absolute; content: ''; inset: 9px; border: 1px solid #b18dcd4a; border-radius: 28px; transform: rotate(45deg); pointer-events: none; }
.brand-sigil-star { position: absolute; top: -10px; left: 50%; z-index: 1; padding: 0 6px; transform: translateX(-50%); color: #dfc493; font: 19px Georgia, serif; text-shadow: 0 0 8px #24162f; }
html[data-theme="dark"] .logo-icon { width: 74px; height: 74px; background: #362345; border: 1px solid #dabdf180; border-radius: 22px; box-shadow: 0 8px 28px #07020f88, 0 0 24px #a777f033, inset 0 1px 0 #f1ddff59; }
html[data-theme="dark"] .logo-copy { min-width: 0; justify-items: center; gap: 8px; }
.logo-owner { color: #c7adc9; font-family: var(--room-serif); font-size: 14px; font-weight: 400; line-height: 1.4; letter-spacing: .2em; }
html[data-theme="dark"] .logo-text { color: #f4e9f8; font-family: var(--room-serif); font-size: 30px; font-weight: 500; line-height: 1.3; letter-spacing: .2em; text-indent: .2em; text-shadow: 0 2px 20px #d6abef26; }
html[data-theme="dark"] .logo-text::first-letter { color: inherit; }
html[data-theme="dark"] .logo-subtitle { margin-top: 4px; color: #a28bac; font-size: 11px; font-weight: 400; letter-spacing: .1em; }
html[data-theme="dark"] .sidebar-nav { display: flex; flex-direction: column; gap: 22px; min-height: 0; padding: 23px 18px 18px; }
html[data-theme="dark"] .nav-section { margin-bottom: 0; }
html[data-theme="dark"] .nav-section-title { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 15px; color: #b29aab; font-size: 11px; font-weight: 400; letter-spacing: .18em; }
html[data-theme="dark"] .nav-section-title > span { color: #c5a477; font-size: 10px; }
html[data-theme="dark"] .nav-item { min-height: 76px; gap: 14px; padding: 16px; color: #b9a7cb; margin-bottom: 10px; border: 1px solid transparent; border-radius: 12px; font-size: 16px; font-weight: 500; line-height: 1.3; }
html[data-theme="dark"] .nav-icon { width: 24px; height: 24px; stroke-width: 1.5; opacity: .9; }
.nav-link-copy { display: grid; min-width: 0; gap: 7px; }
.nav-link-copy > span { letter-spacing: .05em; }
.nav-link-copy small { color: #9e87af; font-size: 11px; font-weight: 400; line-height: 1.5; letter-spacing: .03em; white-space: nowrap; }
.nav-link-star { margin-left: auto; color: #bea07b; font: 19px Georgia, serif; opacity: 0; transition: opacity .2s; }
html[data-theme="dark"] .nav-item:hover { background: #a37aca0b; color: #f0e2fa; border-color: #b290c42b; }
html[data-theme="dark"] .nav-item.active { color: #f3e3ff; background: radial-gradient(ellipse at 0 50%, #b67ae21c, transparent 75%), linear-gradient(110deg, #422952a6, #291b3b9c); border-color: #aa82bb66; box-shadow: inset 0 1px 0 #ead1ff14, 0 6px 20px #05010d26; }
html[data-theme="dark"] .nav-item.active::before { top: 20px; bottom: 20px; width: 2px; border-radius: 2px; background: #ddbf94; box-shadow: 0 0 12px #c6a2e88c; }
.nav-item.active .nav-link-star, .nav-item:hover .nav-link-star { opacity: 1; }
.nav-item.active .nav-link-copy small { color: #c1a6d0; }
.sidebar-lore { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: auto; padding: 4px 0; color: #b499c359; }
.sidebar-constellation { display: block; flex-shrink: 0; width: 46px; height: 46px; }
.sidebar-lore p { margin: 0; color: #ad97b7; font-family: var(--room-serif); font-size: 12px; letter-spacing: .12em; line-height: 1.8; }
.sidebar-lore p span { color: #9983a7; font-family: var(--font-sans); font-size: 10px; letter-spacing: 0; }
html[data-theme="dark"] .sidebar-footer { flex-shrink: 0; padding: 18px 16px; border-color: #b69bc31c; background: #08051026; }
html[data-theme="dark"] .user-card { min-height: 64px; gap: 11px; padding: 11px; background: linear-gradient(125deg, #39254480, #21172e66); border: 1px solid #ac86b429; border-radius: 12px; }
html[data-theme="dark"] .user-avatar { width: 38px; height: 38px; border: 1px solid #c9a2dd4d; background: radial-gradient(circle at 30% 20%, #77538e, #362443 75%); color: #e9d5f7; font-size: 15px; }
html[data-theme="dark"] .user-name { color: #e8d9f2; font-size: 14px; }
html[data-theme="dark"] .user-role { margin-top: 5px; color: #a78eb8; }
html[data-theme="dark"] .auth-login-btn { min-height: 36px; padding: 8px 12px; font-size: 12px; }
html[data-theme="dark"] .topbar {
    justify-content: space-between;
    flex-shrink: 0;
    gap: 16px;
    padding-inline: clamp(20px, 3vw, 48px);
    background: linear-gradient(90deg, #140e20d9, #160f22b8);
    border-bottom: 1px solid #b79ac71f;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 30px #08030f14;
}
html[data-theme="dark"] .topbar-left { min-width: 0; gap: 10px; }
html[data-theme="dark"] .topbar-right { min-width: 0; margin-left: auto; gap: 10px; }
html[data-theme="dark"] .breadcrumb { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
html[data-theme="dark"] .topbar-balance { flex-shrink: 0; height: 42px; }
html[data-theme="dark"] #authTopLoginBtn { min-height: 42px; padding: 9px 18px; font-size: 13px; }
html[data-theme="dark"] .breadcrumb-current { color: #d6c1e5; font-family: var(--room-serif); font-size: 16px; font-weight: 400; letter-spacing: .12em; }
html[data-theme="dark"] .topbar-balance { background: #271b3699; border-color: #b298c138; color: #ddc4ef; }
html[data-theme="dark"] .topbar-balance strong { color: #e6cdf9; }
html[data-theme="dark"] .topbar-balance-label { color: #b7a0c5; }
html[data-theme="dark"] .topbar-btn { color: #c9addb; background: #24162f; border: 1px solid var(--border-color); }
html[data-theme="dark"] .glass-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .xiaozi-auth-modal { background: linear-gradient(150deg, #2a1a38, #170f22); border-color: #614070; color: var(--text-primary); box-shadow: 0 30px 100px #05020d99, inset 0 1px 0 #c8a8e51a; }
html[data-theme="dark"] .modal-overlay { background: #07040eb8; backdrop-filter: blur(12px); }
html[data-theme="dark"] .modal-title,
html[data-theme="dark"] .form-group label { color: #ead9f7; }
html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-select { color: #f1e5fc; background: #140d20; border: 1px solid #5c3b72; }
html[data-theme="dark"] .form-input:focus { border-color: #b181e0; box-shadow: 0 0 0 3px #a568e025; }
#xiaoziAuthModal { padding: 24px; overflow-y: auto; }
html[data-theme="dark"] .xiaozi-auth-modal {
    position: relative; width: min(100%, 560px); max-width: 560px; max-height: calc(100dvh - 48px);
    display: flex; flex-direction: column; overflow: hidden; padding: 0; border-color: #b59b9d5e; border-radius: 16px;
    background: radial-gradient(ellipse at 20% 0, #8d5c9140, transparent 60%), linear-gradient(150deg, #2a1a38, #170f22);
    box-shadow: 0 28px 100px #050209b3, inset 0 1px 0 #f3d4a92b, inset 0 0 0 5px #d3ad7e03;
}
.room-dialog-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #72527f #21152d; scroll-padding-block: 18px; }
.xiaozi-auth-scroll { padding: 8px 36px 30px; }
html[data-theme="dark"] .xiaozi-auth-brand { align-items: flex-start; gap: 18px; padding-right: 24px; }
html[data-theme="dark"] .xiaozi-auth-brand img { width: 64px; height: 64px; border-radius: 19px; outline: 1px solid #d7b78540; outline-offset: 5px; box-shadow: 0 8px 24px #08041077, 0 0 30px #b483ce12; }
html[data-theme="dark"] .xiaozi-auth-brand .modal-title { margin: 7px 0 9px; font-family: var(--room-serif); font-size: 25px; font-weight: 400; line-height: 1.4; letter-spacing: .04em; }
html[data-theme="dark"] .xiaozi-auth-brand p { margin-top: 0; font-size: 13px; font-weight: 400; line-height: 1.8; }
html[data-theme="dark"] .xiaozi-auth-tabs { margin: 27px 0 24px; background: #150d2080; border-color: #9d79b24d; border-radius: 10px; }
html[data-theme="dark"] .xiaozi-auth-tabs button { position: relative; min-height: 44px; color: #c0a6d1; font-size: 14px; font-weight: 500; transition: color .2s, background .2s, box-shadow .2s; }
html[data-theme="dark"] .xiaozi-auth-tabs button:hover { color: #efdbf5; background: #a777bb0c; }
html[data-theme="dark"] .xiaozi-auth-tabs button[aria-selected="true"] { background: linear-gradient(130deg, #684a7ab3, #422d5299); color: #f1dfff; box-shadow: inset 0 0 0 1px #c3a0cd55, inset 0 1px 0 #f4d7ff10, 0 3px 10px #08041044; }
html[data-theme="dark"] .xiaozi-auth-panel .form-group label { margin-bottom: 9px; color: #d1bddc; font-size: 13px; font-weight: 400; }
html[data-theme="dark"] .xiaozi-auth-panel .form-input { min-height: 48px; border-radius: 9px; font-size: 14px; }
html[data-theme="dark"] :is(.xiaozi-auth-panel,.traveler-form-fields) .form-input { --focus-ring-width: 1px; --focus-ring-color: #d4b382; --focus-ring-offset: 0px; --focus-ring-shadow: 0 0 0 4px #b891cc1c; }
html[data-theme="dark"] .xiaozi-auth-panel .form-input:focus { border-color: #c3a47f; }
html[data-theme="dark"] .xiaozi-auth-panel form { gap: 18px; }
html[data-theme="dark"] .xiaozi-auth-submit { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; margin-top: 6px; font-size: 14px; letter-spacing: .1em; }
.xiaozi-auth-submit[aria-busy="true"]::before { content: ''; width: 13px; height: 13px; border: 1px solid #e6cfeb44; border-top-color: #e6c992; border-radius: 50%; animation: mystery-button-wait .8s linear infinite; }
@keyframes mystery-button-wait { to { transform: rotate(360deg); } }
.password-field { position: relative; min-width: 0; }
html[data-theme="dark"] .password-field .form-input { padding-right: 50px; }
.password-field:focus-within .form-input { border-color: #c3a079; }
.password-visibility { --focus-ring-offset: -3px; --focus-ring-shadow: none; position: absolute; top: 50%; right: 4px; display: grid; width: 40px; height: 40px; padding: 9px; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #b19abd; cursor: pointer; transform: translateY(-50%); transition: color .2s, background .2s, border-color .2s; }
.password-visibility svg { width: 20px; height: 20px; }
.password-visibility:hover,.password-visibility[aria-pressed="true"] { background: #ba8bc512; color: #e0c291; }
.password-visibility:focus-visible { outline: 2px solid #c6a5d4; outline-offset: -3px; }
.password-visibility-slash { display: none; }
.password-visibility[aria-pressed="true"] .password-visibility-slash { display: block; }
.password-field:has(input:disabled) .password-visibility { opacity: .5; cursor: wait; }
html[data-theme="dark"] .xiaozi-auth-feedback.is-error { padding: 10px 12px; border: 1px solid #b56c8533; border-radius: 7px; background: #a85d7a0d; color: #eeb1c0; font-size: 12px; line-height: 1.7; }
html[data-theme="dark"] .xiaozi-auth-brand p,
html[data-theme="dark"] .xiaozi-auth-role-hint { color: #c5b0d4; }
html[data-theme="dark"] .auth-password-hint { min-height: 16px; margin: 6px 1px 0; color: #a991b8; font-size: 10px; line-height: 1.6; font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .xiaozi-auth-field-grid .form-group:has(#xiaoziRegisterPassword[aria-invalid="true"]) #xiaoziRegisterPasswordCount,
html[data-theme="dark"] #xiaoziRegisterPasswordMatch[data-match="mismatch"] { color: #e7aeb7; }
html[data-theme="dark"] #xiaoziRegisterPasswordMatch[data-match="match"] { color: #c5bd95; }
html[data-theme="dark"] .guest-page-gate { background: linear-gradient(140deg, #2a1937, #180e24); border: 1px solid #5c3b72; }
html[data-theme="dark"] .guest-page-gate h2 { color: #ecdef7; }
html[data-theme="dark"] .guest-page-gate p,
html[data-theme="dark"] .guest-page-gate small { color: #c0a8d0; }
html[data-theme="dark"] .app-boot-status { background: #271934; color: #f2e1ff; border: 1px solid #735083; box-shadow: 0 18px 50px #04010ca6; }
html[data-theme="dark"] .app-toast { background: linear-gradient(115deg,#36233bee,#21162eee); color: #ecdfef; border: 1px solid #b3916c70; box-shadow: 0 12px 35px #04010c66,inset 0 1px 0 #f4d6ad12; }

.legacy-market-experience,
.legacy-order-experience,
.page:not(#page-market):not(#page-orders),
.nav-item:not([data-page="market"]):not([data-page="orders"]),
.sidebar-nav > .nav-section[data-admin-only],
.nav-count,
.nav-badge-dot,
.topbar-center,
.topbar-ai-status,
.mobile-search-toggle,
.notification-btn,
#xiaoziAssistant,
#xiaoziAssistantToggle { display: none !important; }

/* 空间的轮廓留在阴影里，视觉焦点落在卡牌与眼睛上。 */
.magic-room { position: fixed; inset: 0 0 0 var(--room-nav-offset); z-index: 0; overflow: hidden; pointer-events: none; --gaze-x: 0px; --gaze-y: 0px; }
.magic-room::before {
    position: absolute; inset: 0; content: '';
    background: radial-gradient(ellipse at 50% 35%, #9756cc24, transparent 60%), radial-gradient(ellipse at 50% 100%, #63329313, transparent 50%), linear-gradient(90deg, #07030d35, transparent 15%, transparent 85%, #07030d35);
}
.magic-room::after {
    position: absolute; inset: 0; content: ''; opacity: .16;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.13' filter='url(%23n)'/%3E%3C/svg%3E");
}
.room-arch { position: absolute; width: min(810px, 86%); height: 1060px; left: 50%; top: 100px; transform: translateX(-50%); border: 1px solid #c0a1c524; border-radius: 50% 50% 0 0; box-shadow: 0 0 0 12px #9a62c005, 0 0 0 13px #b393c210, inset 0 0 100px #8747b50a, 0 0 90px #7f43a609; }
.room-arch::before { position: absolute; content: '✧'; top: -17px; left: 50%; padding: 0 13px; transform: translateX(-50%); color: #c4a5798c; font: 25px Georgia, serif; text-shadow: 0 0 8px #24162f; }
.room-shelf { position: absolute; display: flex; align-items: flex-end; gap: 13px; width: 138px; height: 70px; border-bottom: 7px solid #392441; opacity: .8; }
.shelf-left { top: 215px; left: 20px; transform: rotate(-4deg); }.shelf-right { top: 150px; right: 18px; }
.room-shelf i { position: relative; width: 24px; height: 35px; border: 1px solid #89638e44; border-radius: 5px 5px 8px 8px; background: linear-gradient(0deg, #8f50c644 45%, #392441 46%); }
.room-shelf i::before { position: absolute; content: ''; width: 9px; height: 10px; top: -11px; left: 6px; border: 1px solid #80628666; background: #302038; }
.room-shelf i:nth-child(2) { width: 37px; height: 46px; border-radius: 45% 45% 20% 20%; background: linear-gradient(0deg, #96732f55 45%, #392441 46%); }
.room-shelf i:nth-child(2)::before { left: 13px; }.room-shelf i:nth-child(3) { height: 27px; background: linear-gradient(0deg, #86628c55 50%, #392441 51%); }
.room-creature { position: absolute; width: 76px; height: 94px; border-radius: 46% 46% 35% 35%; background: linear-gradient(150deg, #24172e, #09070f); box-shadow: inset 1px 2px 0 #976caa25, 0 10px 45px #06030bb8; opacity: .78; }
.creature-cat { top: 108px; right: 26px; transform: rotate(12deg); }
.creature-cat::before,
.creature-cat::after { position: absolute; top: -13px; content: ''; width: 25px; height: 35px; background: #291a33; border-top: 1px solid #825b934d; clip-path: polygon(0 0,100% 66%,12% 100%); }
.creature-cat::before { left: 3px; }.creature-cat::after { right: 2px; transform: scaleX(-1); }
.creature-peeker { width: 60px; height: 83px; top: 47%; left: 8px; transform: rotate(-14deg); border-radius: 48% 46% 10% 10%; }
.creature-owl { width: 84px; height: 100px; right: -25px; top: 60%; border-radius: 40% 40% 45% 45%; transform: rotate(-18deg); }
.creature-owl::after { position: absolute; left: 35px; top: 44px; content: ''; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 9px solid #b788525c; }
.creature-blob { width: 96px; height: 80px; left: calc(50% + 80px); bottom: -30px; border-radius: 47% 53% 0 0; transform: rotate(5deg); }
.creature-eyes { position: absolute; top: 28px; left: 14px; display: flex; gap: 9px; animation: magic-blink 8s infinite; transform-origin: center; }
.creature-eyes i { position: relative; width: 18px; height: 12px; border-radius: 60%; background: #e6c0ff; box-shadow: 0 0 8px #d99aff99, 0 0 23px #9950c86b; }
.creature-eyes i::after { position: absolute; width: 5px; height: 9px; top: 2px; left: 6px; content: ''; border-radius: 60%; background: #1b1024; transform: translate(var(--gaze-x),var(--gaze-y)); transition: transform .15s ease-out; }
.creature-peeker .creature-eyes { left: 10px; gap: 7px; animation-delay: 1.7s; }.creature-peeker .creature-eyes i { width: 13px; height: 10px; background: #d7b785; box-shadow: 0 0 8px #ce955c7a; }.creature-peeker .creature-eyes i::after { left: 4px; width: 4px; height: 7px; }
.creature-owl .creature-eyes { top: 29px; gap: 10px; animation-delay: 3.6s; }.creature-owl .creature-eyes i { width: 21px; height: 19px; }.creature-owl .creature-eyes i::after { width: 7px; height: 11px; top: 4px; left: 7px; }
.creature-blob .creature-eyes { left: 24px; top: 20px; animation-delay: 5.1s; }
.room-motes i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #e5bdf7; box-shadow: 0 0 10px #ce86ed; animation: magic-mote 9s ease-in-out infinite; }
.room-motes i:nth-child(1) { left: 28%; top: 24%; }.room-motes i:nth-child(2) { left: 60%; top: 15%; animation-delay: -3s; }.room-motes i:nth-child(3) { right: 7%; top: 47%; animation-delay: -6s; }.room-motes i:nth-child(4) { left: 34%; top: 80%; animation-delay: -4s; }.room-motes i:nth-child(5) { left: 72%; top: 77%; animation-delay: -8s; }.room-motes i:nth-child(6) { left: 45%; top: 50%; animation-delay: -2s; }

/* 细铜边、烟紫玻璃、羊皮纸色文字。 */
.mystery-shop-shell,
.mystery-orders-shell { --room-gold: #d7b785; --room-muted: #b69cc8; max-width: 1060px; margin: 0 auto; padding: 0 0 24px; }
.mystery-shop-header,
.mystery-orders-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 12px 0 30px; }
.mystery-shop-header h1,
.mystery-orders-header h1 { position: relative; margin: 16px 0; color: #f1e8f6; font-family: var(--room-serif); font-size: clamp(36px, 3.8vw, 52px); font-weight: 500; line-height: 1.25; letter-spacing: .09em; }
.mystery-shop-header h1 span { color: #d8b4f1; }.mystery-shop-header h1 em { display: inline-block; margin-left: 12px; color: var(--room-gold); font-size: 34px; font-style: normal; vertical-align: top; }
.mystery-shop-header p,
.mystery-orders-header p { max-width: 560px; margin: 0; color: #baa7c7; font-size: 13px; line-height: 1.85; }
.mystery-eyebrow { display: block; color: var(--room-gold); font-size: 9px; font-weight: 500; letter-spacing: .2em; }
.mystery-eyebrow i { display: inline-block; width: 5px; height: 5px; margin: 0 7px 2px 0; border-radius: 50%; background: #ba89e3; box-shadow: 0 0 10px #b478ed; }
.mystery-date-card { position: relative; min-width: 178px; margin-bottom: 5px; padding: 15px 19px 15px 24px; border: 1px solid #a3876b3b; border-radius: 8px; background: linear-gradient(135deg, #3c264070, #1a1026a3); color: #c1accd; text-align: right; box-shadow: inset 0 1px 0 #e9c9fb0c, 0 8px 24px #08041033; }
.mystery-date-card::before { position: absolute; top: 18px; left: 12px; content: ''; width: 4px; height: 4px; border-radius: 50%; background: #d4b27b; box-shadow: 0 0 9px #d4b27b66; }
.mystery-date-card span { display: block; font-size: 11px; }.mystery-date-card strong { display: block; margin-top: 7px; color: #d8bbaa; font-family: var(--font-mono); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.mystery-shop-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .95fr); gap: 24px; }
.mystery-card-zone,
.mystery-wheel-panel { position: relative; min-height: 510px; padding: 27px; border: 1px solid #91739433; border-radius: 10px; background: linear-gradient(150deg, #43234c30, #1d112c8f); box-shadow: inset 0 1px 0 #f1d8ff09, 0 20px 70px #08041038; }
.mystery-card-zone { display: flex; flex-direction: column; align-items: center; scroll-margin-top: calc(var(--topbar-height) + 20px); background: radial-gradient(ellipse at 50% 42%, #8b429328, transparent 65%), linear-gradient(150deg,#43234c30,#1d112c8f); }
.mystery-card-zone::after { position: absolute; content: ''; width: 55%; height: 18px; border-radius: 50%; background: #08030f; filter: blur(18px); bottom: 98px; z-index: -1; }
.mystery-stage-label { display: flex; justify-content: space-between; width: 100%; margin-bottom: 22px; color: var(--room-gold); font-size: 10px; letter-spacing: .1em; }.mystery-stage-label span:last-child { color: #b69cc8; letter-spacing: 0; }
.mystery-product-card { position: relative; flex-shrink: 0; width: min(100%, 276px); aspect-ratio: .69; padding: 0; overflow: hidden; border: 1px solid #b4896d99; border-radius: 8px; background: #21142e; color: inherit; cursor: pointer; perspective: 1200px; box-shadow: 0 22px 45px #070310a3, 0 0 34px #b36bdd1a; transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.mystery-product-card:hover { transform: translateY(-5px); box-shadow: 0 28px 55px #070310bc, 0 0 40px #a76ce033; }
.mystery-product-card:focus-visible { outline: 2px solid #e4b9ff; outline-offset: 6px; }
.mystery-card-back,
.mystery-card-front { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 7px; backface-visibility: hidden; transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.mystery-card-back {
    background: radial-gradient(ellipse at 50% 42%, #763b8755, transparent 62%), repeating-linear-gradient(45deg, #d0a1d404 0 1px, transparent 1px 9px), linear-gradient(145deg, #3e234c, #1c1129 55%, #37203d);
    color: var(--room-gold); transform: rotateY(0deg);
}
.mystery-card-back::before { position: absolute; content: ''; inset: 10px; border: 1px solid #a77f6977; border-radius: 3px; }
.mystery-card-back::after { position: absolute; content: ''; inset: 18px; border: 1px solid #bd936438; border-radius: 80px 80px 3px 3px; }
.mystery-card-rune { position: absolute; width: 150px; height: 150px; top: calc(50% - 13px); border: 1px solid #ba93625c; transform: translateY(-50%) rotate(45deg); }.rune-two { width: 175px; height: 175px; border-radius: 50%; transform: translateY(-50%); }
.mystery-card-mark { z-index: 1; width: 110px; height: 110px; margin-bottom: 26px; color: #dbb383; filter: drop-shadow(0 0 11px #c08fff66); }
.mystery-card-mark svg { width: 100%; height: 100%; stroke-width: 1.15; }
.mystery-card-copy { z-index: 1; position: absolute; bottom: 38px; width: 100%; color: #d7bda4; font-family: var(--room-numerals); font-size: 13px; font-weight: 500; letter-spacing: .22em; text-align: center; }.mystery-card-copy small { display: block; margin-top: 10px; font-family: var(--font-sans); color: #c0a8c7; font-size: 9px; letter-spacing: .1em; }
.mystery-card-spark { position: absolute; color: #d7b785; font-size: 14px; }.spark-a { top: 25px; left: 30px; }.spark-b { right: 29px; bottom: 20px; }
.mystery-card-front { align-items: flex-start; justify-content: flex-start; padding: 28px 25px; background: radial-gradient(ellipse at 85% 20%, #9560ae29, transparent 55%), repeating-linear-gradient(115deg, #e1c9f502 0 1px, transparent 1px 5px), linear-gradient(145deg, #38243f, #1b1229 75%); color: #f2e8fa; text-align: left; opacity: 0; transform: rotateY(180deg); box-shadow: inset 2px 2px 14px #f4dcb30a, inset -4px -5px 18px #08041066; }
.mystery-card-front::before { position: absolute; inset: 10px; content: ''; border: 1px solid #b08b6455; border-radius: 3px; pointer-events: none; }
.mystery-product-card.is-revealed .mystery-card-back { opacity: 0; transform: rotateY(-180deg); }.mystery-product-card.is-revealed .mystery-card-front { opacity: 1; transform: rotateY(0deg); }
.mystery-product-card.is-covered .mystery-card-front { visibility: hidden; }
.mystery-product-type { color: var(--room-gold); font-size: 10px; letter-spacing: .16em; }
.mystery-product-type::before { content: '✧'; margin-right: 8px; color: #e2c291; }
.mystery-card-front strong { margin-top: 21px; font-family: var(--room-serif); font-size: 22px; line-height: 1.5; font-weight: 500; }
.mystery-card-front #mysteryCardDescription { margin-top: 12px; color: #c4afd1; font-size: 12px; line-height: 1.8; }
.mystery-product-art { display: grid; flex: 1 1 auto; align-self: stretch; min-height: 48px; place-items: center; margin: 6px -7px; color: #c7a97d; }
.mystery-product-art svg { width: min(100%, 200px); height: 92px; max-height: 100%; overflow: visible; stroke: currentColor; stroke-width: 1; filter: drop-shadow(0 6px 9px #05020b88); }
.product-art-orbit { stroke: #c8ad7f4d; }.product-art-guide { stroke: #b697b236; }
.product-art-face { fill: #64417755; stroke: #d9b781b3; }.product-art-light { fill: #dfc09238; stroke: #efd4a6; }
.product-art-course { display: none; }
.mystery-product-card[data-product-kind="course"] .product-art-course { display: block; }
.mystery-product-card[data-product-kind="course"] .product-art-software { display: none; }
.mystery-card-valuation { align-self: stretch; padding-top: 10px; border-top: 1px solid #b3936a33; }
.mystery-card-price-caption { display: block; margin-bottom: 5px; color: #ad96bb; font-size: 9px; line-height: 1.6; letter-spacing: .06em; }
.mystery-product-price { display: block; color: #e4cba5; font-family: var(--room-numerals); font-size: 32px; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; line-height: 1.1; }
.mystery-product-card.has-fortune .mystery-card-valuation { border-top-color: #caa67070; }
.mystery-product-card.has-fortune .mystery-card-price-caption { color: #d3b889; }
.mystery-product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mystery-product-tags span { padding: 3px 7px; border: 1px solid #a885b23b; border-radius: 3px; background: #c9a8df06; color: #c9b3d5; font-size: 9px; }
html[data-theme="dark"] .btn-primary { background: linear-gradient(115deg,#89639a,#543663); border: 1px solid #c3a2c48c; border-radius: 8px; box-shadow: inset 0 1px 0 #eed9ff3b, inset 0 -1px 0 #22102f66, 0 5px 20px #0d031c5e; color: #f7eafa; font-weight: 500; transition: background .2s, border-color .2s, box-shadow .2s, transform .2s; }
html[data-theme="dark"] .btn-primary:hover:not(:disabled) { background: linear-gradient(115deg,#9462b2,#72458e); border-color: #d8aedf; box-shadow: inset 0 1px 0 #e5c5ff33, 0 0 22px #bc7ce42e; }
html[data-theme="dark"] .btn-glass { border: 1px solid #a386b44d; border-radius: 8px; background: linear-gradient(145deg,#3a254749,#22132e99); color: #d6bfe5; box-shadow: inset 0 1px 0 #e5c5ff0c; font-weight: 400; transition: background .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s; }
html[data-theme="dark"] :is(.mystery-shop-shell,.mystery-orders-shell,.mystery-detail-modal) .btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 2px 8px #08031055; }
html[data-theme="dark"] .btn-glass:hover:not(:disabled) { background: #493051; border-color: #c6a0c9; color: #f0dcff; }
html[data-theme="dark"] button:disabled { cursor: not-allowed; opacity: .55; }
.mystery-reveal-btn { margin-top: 26px; min-width: 192px; height: 44px; font-size: 13px; letter-spacing: .12em; }.mystery-card-note { max-width: 360px; margin: 16px 0 0; color: #ac96ba; font-size: 11px; line-height: 1.8; text-align: center; }
.mystery-panel-heading { display: flex; justify-content: space-between; gap: 8px; }.mystery-panel-heading h2 { margin: 10px 0 0; color: #ebdbf4; font-family: var(--room-serif); font-size: 22px; font-weight: 500; letter-spacing: .05em; }.mystery-free-badge { align-self: flex-start; flex-shrink: 0; padding: 4px 8px; border: 1px solid #a5826552; border-radius: 4px; color: #d7b785; font-size: 9px; transition: color .3s,border-color .3s,background .3s; }
.mystery-wheel-wrap { position: relative; display: grid; place-items: center; margin: 36px auto 26px; width: min(100%, 248px); aspect-ratio: 1; }
.mystery-wheel-wrap::before { position: absolute; inset: -12px; content: ''; border: 1px solid #ba906d42; border-radius: 50%; box-shadow: 0 0 0 5px #b586610a; }
.mystery-wheel {
    position: relative; width: 100%; height: 100%; border: 6px solid #8b6b54; border-radius: 50%;
    background: conic-gradient(from 0deg, #583568 0deg, #3c254a 59deg, #9b7e9f 60deg, #30203d 61deg, #4a315c 119deg, #9b7e9f 120deg, #56305f 121deg, #392047 179deg, #9b7e9f 180deg, #302037 181deg, #51345c 239deg, #9b7e9f 240deg, #604353 241deg, #3a253e 299deg, #9b7e9f 300deg, #302037 301deg, #51345c 359deg, #9b7e9f 360deg);
    box-shadow: 0 12px 40px #08031099, inset 0 0 0 2px #ecd3a55c, inset 0 0 30px #06010e73, 0 0 35px #ae6fda19;
    transition: none;
}
.mystery-wheel.is-spinning { transition: transform 1.8s cubic-bezier(.16,.8,.18,1); }
.mystery-wheel::after { position: absolute; inset: 9px; border: 1px dashed #c39a7173; border-radius: 50%; content: ''; }
.mystery-wheel-core { position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; width: 64px; height: 64px; place-items: center; border: 2px solid #c09b70; border-radius: 50%; background: radial-gradient(circle,#634472,#2e1c3c); color: #e5c59b; font-size: 31px; transform: translate(-50%,-50%); box-shadow: 0 0 0 6px #8a6a4e33,0 0 20px #0c041e77; }
.wheel-label { position: absolute; z-index: 1; top: 50%; left: 50%; color: #eddfef; font-family: var(--room-serif); font-size: 15px; white-space: nowrap; transition: opacity .35s, color .35s; transform: translate(-50%,-50%) rotate(var(--wheel-angle)) translateY(-79px) rotate(calc(-1 * var(--wheel-angle))); }
.mystery-wheel-panel.has-result .wheel-label:not(.is-winning) { opacity: .52; }
.mystery-wheel-panel.has-result .wheel-label { transform: translate(-50%,-50%) rotate(var(--wheel-angle)) translateY(-79px) rotate(calc(-1 * (var(--wheel-angle) + var(--wheel-rotation)))); }
.wheel-label.is-winning { color: #ffe7b4; text-shadow: 0 0 12px #f1c37680; }
.wheel-label.is-winning::before { content: ''; position: absolute; z-index: -1; inset: -6px -9px; border: 1px solid #e7bd7999; border-radius: 4px; background: #301b2ee6; box-shadow: inset 0 1px 0 #f7d59e26,0 0 18px #d9ab4c33; }
.wheel-free { --wheel-angle: 30deg; color: #e0bf8b; }.wheel-nine { --wheel-angle: 90deg; }.wheel-eight { --wheel-angle: 150deg; }.wheel-five { --wheel-angle: 210deg; color: #e0bf8b; }.wheel-gift { --wheel-angle: 270deg; width: 2.4em; font-size: 12px; line-height: 1.3; letter-spacing: .06em; text-align: center; color: #e0bf8b; white-space: normal; }.wheel-original { --wheel-angle: 330deg; }
.mystery-wheel-pointer { position: absolute; top: -12px; z-index: 3; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 24px solid #deb98a; filter: drop-shadow(0 3px 5px #130720); }
.mystery-discount-result { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 36px; border-radius: 5px; color: #e2c5f3; font-family: var(--room-serif); font-size: 18px; font-weight: 500; text-align: center; }
.mystery-discount-result:focus-visible { outline: 1px solid #d7b78570; outline-offset: 4px; }
.mystery-discount-result::before,.mystery-discount-result::after { content: ''; width: 24px; height: 1px; background: linear-gradient(90deg, transparent, #c5a16d66); }
.mystery-discount-result::after { transform: rotate(180deg); }
.mystery-wheel-panel.has-result .mystery-discount-result { color: #efcf96; text-shadow: 0 0 22px #d6a36133; }
.mystery-wheel-panel[data-fortune="gift"] .mystery-discount-result { color: #e4c0f8; text-shadow: 0 0 22px #be86f366; }
.mystery-wheel-panel[data-fortune="free"] .mystery-discount-result { color: #ffe1a5; text-shadow: 0 0 24px #e9b55b70; }
.mystery-wheel-panel.has-result .mystery-wheel-core::after { content: ''; position: absolute; inset: -10px; border: 1px solid #ebce9180; border-radius: 50%; pointer-events: none; animation: mystery-fortune-ripple 1s ease-out both; }
@keyframes mystery-fortune-ripple { from { opacity: .8; transform: scale(.7); } to { opacity: 0; transform: scale(2.4); } }
.mystery-wheel-status { min-height: 40px; margin: 9px 0 20px; color: #c0aacb; font-size: 11px; line-height: 1.85; text-align: center; }
.mystery-spin-btn { width: 100%; min-height: 44px; font-size: 12px; letter-spacing: .1em; }
.mystery-wheel-panel.is-drawing .mystery-free-badge { border-color: #c7a2db77; background: #a175bc12; color: #e7c9f8; }
.mystery-wheel-panel.has-result .mystery-free-badge { border-color: #c5a16d70; background: #c5a16d0a; color: #e3c89b; }
.mystery-wheel-panel.is-drawing .mystery-spin-btn { cursor: progress; opacity: .85; }
.mystery-wheel-panel.is-drawing .mystery-spin-btn::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border: 1px solid #e2cba447; border-top-color: #f2dcb5; border-radius: 50%; vertical-align: -1px; animation: crystal-nebula 1s linear infinite; }
.mystery-action-bar,
.mystery-purchase-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 18px 22px; border: 1px solid #91739433; border-radius: 8px; background: linear-gradient(105deg, #4228464d, #1d112c8f); box-shadow: inset 0 1px 0 #f1d8ff08; }
.mystery-invite-copy { display: flex; align-items: center; gap: 12px; min-width: 0; }.mystery-invite-icon { display: grid; flex-shrink: 0; width: 32px; height: 38px; place-items: center; border: 1px solid #b58a6159; border-radius: 20px 20px 3px 3px; background: #47324438; color: var(--room-gold); font-size: 19px; }.mystery-invite-copy strong,.mystery-invite-copy span { display: block; }.mystery-invite-copy strong { color: #e0cfe8; font-size: 12px; font-weight: 400; }.mystery-invite-copy span { margin-top: 5px; color: #b69cc8; font-size: 11px; line-height: 1.8; }.mystery-invite-actions { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 8px; }.mystery-invite-actions button { min-height: 42px; font-size: 11px; }
.mystery-purchase-bar { position: relative; overflow: hidden; scroll-margin-top: calc(var(--topbar-height) + 20px); background: radial-gradient(ellipse at 0 50%,#91639220,transparent 60%), linear-gradient(110deg,#302037e6,#1b1128ed); border-color: #ab84655c; box-shadow: inset 0 1px 0 #e5c5ff0c,0 12px 32px #07030d33; }
.mystery-purchase-bar::before { content: ''; position: absolute; top: 16px; bottom: 16px; left: 0; width: 2px; background: linear-gradient(transparent,#d8b47e,transparent); }
.mystery-purchase-copy { flex: 1; min-width: 0; }
.mystery-purchase-bar strong { display: block; margin-top: 7px; color: #ecdfef; font-family: var(--room-serif); font-size: 19px; font-weight: 500; line-height: 1.7; overflow-wrap: anywhere; }
.mystery-purchase-seal { position: relative; display: grid; flex: 0 0 58px; width: 58px; height: 66px; place-items: center; border: 1px solid #b1936c80; border-radius: 29px 29px 8px 8px; color: #dfbf8b; background: radial-gradient(ellipse at 30% 10%,#cfa8d72b,transparent 70%),linear-gradient(140deg,#54364f,#281a31); box-shadow: inset 0 0 0 4px #301f35,inset 0 0 0 5px #b1936c40,0 7px 13px #0b041b66; }
.mystery-purchase-seal::before,.mystery-purchase-seal::after { content: '✧'; position: absolute; top: 6px; font-size: 9px; color: #d5b78099; }
.mystery-purchase-seal::before { left: 9px; }.mystery-purchase-seal::after { right: 9px; }
.mystery-purchase-seal > span { font-family: var(--room-serif); font-size: 25px; }
.mystery-purchase-terms { display: flex; flex-wrap: wrap; gap: 4px 13px; margin-top: 6px; color: #bba5c7; font-size: 11px; line-height: 1.8; }
.mystery-purchase-terms del { color: #a18aaa; text-decoration-color: #cbb89f80; }
.mystery-purchase-terms del + span { color: #dfbf8b; }
.mystery-purchase-bar.is-collected { border-color: #b89b6c8c; background: radial-gradient(ellipse at 0 50%,#b4955926,transparent 65%),linear-gradient(110deg,#352539ed,#1b1128ed); }
.mystery-purchase-bar.is-collected .mystery-purchase-seal { animation: mystery-seal-arrival .65s cubic-bezier(.16,.8,.18,1) both; border-color: #ddbd8baa; }
.mystery-purchase-bar.is-collected .mystery-purchase-seal > span { font-size: 0; }
.mystery-purchase-bar.is-collected .mystery-purchase-seal > span::after { content: '藏'; font-size: 25px; }
@keyframes mystery-seal-arrival { from { opacity: 0; transform: scale(1.3) rotate(-12deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.mystery-buy-btn { flex-shrink: 0; min-width: 170px; min-height: 44px; font-size: 13px; }
.mystery-shop-footer { display: flex; justify-content: space-between; gap: 16px; padding: 17px 0 0; color: #af95bd; font-size: 10px; }.mystery-shop-footer a { color: #d0adc6; text-decoration: none; }.mystery-shop-footer a:hover { color: #efd6f2; }
.mystery-orders-header { align-items: center; }
.mystery-orders-header h1 { font-size: 38px; }
.mystery-order-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin: 12px 0 25px; }
.mystery-order-stats > div { position: relative; padding: 23px 25px; overflow: hidden; border: 1px solid #b996b038; border-radius: 12px; background: radial-gradient(ellipse at 0 0,#82559226,transparent 72%),linear-gradient(145deg,#302039bf,#171020d6); box-shadow: inset 0 1px 0 #ead1ff0c,0 8px 28px #08041022; }
.mystery-order-stats > div::after { content: '✧'; position: absolute; top: 18px; right: 21px; color: #b89a6f88; font-size: 20px; }
.mystery-order-stats span,.mystery-order-stats strong,.mystery-order-stats small { display: block; }
.mystery-order-stats span { color: #bea8ca; font-size: 12px; }
.mystery-order-stats strong { margin-top: 15px; color: #ecd4ae; font-family: var(--room-numerals); font-size: 34px; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; line-height: 1.1; }
.mystery-order-stats [data-metric="recent"] strong { font-size: 29px; letter-spacing: .025em; }
.mystery-order-stats small { margin-top: 10px; color: #aa92b9; font-size: 10px; line-height: 1.6; }
.mystery-order-list { display: grid; gap: 28px; }
.mystery-order-day { min-width: 0; }
.mystery-order-day-heading { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.mystery-order-day-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; color: #d8c0a1; font-family: var(--room-serif); font-size: 13px; font-weight: 400; letter-spacing: .08em; }
.mystery-order-day-heading h2::before { content: '✧'; color: #b89a6f; font-size: 16px; }
.mystery-order-day-heading::after { content: ''; flex: 1; order: 1; height: 1px; background: linear-gradient(90deg,#ba93623b,#9173940d); }
.mystery-order-day-heading > span { order: 2; color: #aa92b9; font-size: 10px; white-space: nowrap; }
.mystery-order-day-items { display: grid; gap: 12px; }
.mystery-order-item { position: relative; display: flex; align-items: center; gap: 18px; padding: 23px; overflow: hidden; border: 1px solid #ac88b038; border-radius: 12px; background: linear-gradient(115deg,#35223ed9,#1d1429ed); box-shadow: inset 0 1px 0 #ead1ff0a,0 8px 26px #08041022; }
.mystery-order-icon { position: relative; display: grid; flex: 0 0 48px; width: 48px; height: 60px; place-items: center; border: 1px solid #b58a616b; border-radius: 24px 24px 5px 5px; background: radial-gradient(ellipse at 30% 0,#b589c32b,transparent 70%),linear-gradient(150deg,#50335b,#2c1c39); color: #e6c392; font-family: var(--room-serif); font-size: 17px; box-shadow: inset 0 0 0 4px #302039,inset 0 0 0 5px #b58a6126,0 5px 12px #09041055; }
.mystery-order-icon::after { position: absolute; bottom: 8px; content: ''; width: 13px; height: 1px; background: #bd9a6a66; }
.mystery-order-item[data-product-kind="course"] .mystery-order-icon { background: radial-gradient(ellipse at 30% 0,#b3905526,transparent 70%),linear-gradient(150deg,#50404c,#2f2234); }
.mystery-order-item[data-product-kind="gift"] .mystery-order-icon { border-color: #ba97cc80; color: #e2c7f0; }
.mystery-order-main { min-width: 0; flex: 1; }
.mystery-order-main strong,.mystery-order-main span,.mystery-order-price,.mystery-order-price span { display: block; }
.mystery-order-main strong { color: #e9d9f1; font-size: 15px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
.mystery-order-main span { margin-top: 7px; color: #b69cc8; font-size: 11px; line-height: 1.7; }
.mystery-order-meta { display: flex; align-items: baseline; gap: 12px; margin-top: 7px; color: #b69cc8; font-size: 10px; line-height: 1.7; }
.mystery-order-meta time { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.mystery-order-main .mystery-order-number { min-width: 0; margin: 0; overflow: hidden; color: #96819f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mystery-order-relation { display: inline-flex; align-items: center; gap: 9px; min-height: 32px; max-width: 100%; margin-top: 8px; padding: 4px 10px; border: 1px solid #b698c638; border-radius: 5px; background: #aa7db40a; color: #cfb3df; font: inherit; font-size: 10px; line-height: 1.8; text-align: left; cursor: pointer; transition: color .2s,border-color .2s,background .2s; }
.mystery-order-relation span { flex-shrink: 0; margin: 0; color: #d7b785; font-size: 13px; line-height: 1; }
.mystery-order-relation:hover { border-color: #c5a16d80; background: #c5a16d0d; color: #ebd8ed; }
.mystery-order-price { flex-shrink: 0; min-width: 74px; color: #e1c29a; font-family: var(--room-numerals); font-size: 28px; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; line-height: 1.2; text-align: right; }
.mystery-order-price span { width: fit-content; margin: 8px 0 0 auto; padding: 3px 7px; border: 1px solid #a9967130; border-radius: 4px; background: #b9ab8408; color: #c3bca3; font-family: var(--font-sans); font-size: 9px; }
.mystery-order-empty { display: grid; justify-items: center; gap: 14px; padding: 70px 20px; border: 1px solid #87629452; border-radius: 12px; background: radial-gradient(ellipse at 50% 35%,#6e34722b,transparent 65%),linear-gradient(145deg,#30203966,#171020a6); box-shadow: inset 0 1px 0 #ead1ff08; color: #baa3cb; text-align: center; }
.mystery-order-empty::before { content: '✧'; display: grid; width: 68px; height: 82px; margin-bottom: 7px; place-items: center; border: 1px solid #b08a6266; border-radius: 35px 35px 5px 5px; background: linear-gradient(145deg,#5d3b6855,#21152f); box-shadow: inset 0 0 0 5px #24172f,inset 0 0 0 6px #b08a622b,0 12px 22px #08041055; color: #d4b482; font-size: 38px; line-height: 1; }
.mystery-order-empty strong { color: #e3cdef; font-family: var(--room-serif); font-size: 22px; font-weight: 400; }
.mystery-order-empty span { max-width: 300px; font-size: 12px; line-height: 1.8; }
.mystery-order-empty .btn { margin-top: 10px; min-height: 40px; }
@keyframes magic-blink { 0%, 43%, 47%, 100% { transform: scaleY(1); } 45% { transform: scaleY(.08); } }
@keyframes magic-mote { 0%,100% { opacity: .15; transform: translateY(0); } 50% { opacity: .7; transform: translateY(-18px); } }
@media (min-width: 1500px) { .mystery-shop-shell,.mystery-orders-shell { max-width: 1120px; }.creature-cat { right: 7%; }.creature-owl { right: 3%; } }
@media (max-width: 1100px) { .mystery-shop-grid { gap: 16px; grid-template-columns: minmax(0,1.2fr) minmax(270px,1fr); }.mystery-card-zone,.mystery-wheel-panel { padding: 23px 20px; }.mystery-invite-copy { max-width: 50%; }.mystery-invite-actions { justify-content: flex-end; }.shelf-left { display: none; } }
@media (max-width: 1024px) {
    html[data-theme="dark"] { --room-nav-offset: 0px; }
    html[data-theme="dark"] .sidebar { width: min(280px, calc(100vw - 32px)); transform: translateX(-100%); }
    html[data-theme="dark"] .sidebar.open { transform: translateX(0); }
    html[data-theme="dark"] .main-content { margin-left: 0; }
    html[data-theme="dark"] .menu-toggle { display: flex; padding: 8px; margin-left: -8px; }
    .sidebar-overlay.show { display: block; opacity: 1; }
    .mystery-date-card { min-width: 150px; }
}
@media (max-width: 768px) {
    html[data-theme="dark"] { --room-page-padding: 16px; --topbar-height: 64px; }
    html[data-theme="dark"] .page-content { padding: var(--room-page-padding) 20px; }
    html[data-theme="dark"] .sidebar-header { padding: 28px 22px 24px; }
    html[data-theme="dark"] .breadcrumb-current { font-family: var(--font-sans); font-size: 13px; letter-spacing: .03em; }
    html[data-theme="dark"] #authTopLoginBtn { min-height: 40px; padding: 8px 14px; }
    html[data-theme="dark"] .topbar-balance { height: 40px; }
    .mystery-shop-header { align-items: flex-start; gap: 18px; padding-top: 10px; }
    .mystery-shop-header h1 { font-size: 38px; }.mystery-shop-header p { font-size: 11px; }.mystery-eyebrow { font-size: 8px; letter-spacing: .12em; }
    .mystery-date-card { min-width: 0; margin-top: 33px; padding: 10px; }.mystery-date-card span { font-size: 9px; }.mystery-date-card strong { font-size: 10px; }
    .mystery-shop-grid { grid-template-columns: 1fr; gap: 20px; }.mystery-card-zone { min-height: 480px; }.mystery-wheel-panel { min-height: auto; padding: 25px; }
    .mystery-product-card { width: min(100%, 258px); }.mystery-card-rune { width: 140px; height: 140px; }.rune-two { width: 164px; height: 164px; }.mystery-card-mark { width: 100px; height: 100px; }.mystery-card-copy { bottom: 32px; font-size: 10px; }
    .mystery-card-front { padding: 25px 22px; }.mystery-card-front strong { font-size: 20px; margin-top: 18px; }.mystery-product-art svg { height: 76px; }
    .mystery-action-bar { align-items: flex-start; flex-direction: column; padding: 18px; gap: 16px; }.mystery-invite-copy { max-width: none; }.mystery-invite-copy strong { font-size: 12px; }.mystery-invite-actions { width: 100%; justify-content: stretch; }.mystery-invite-actions button { flex: 1; }.mystery-buy-btn { width: 100%; }
    .mystery-purchase-bar { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 14px; padding: 18px; }
    .mystery-purchase-seal { width: 46px; height: 58px; }
    .mystery-purchase-bar strong { font-size: 17px; }
    .mystery-purchase-bar .mystery-buy-btn { grid-column: 1 / -1; min-height: 46px; }
    .mystery-purchase-bar .mystery-eyebrow { font-size: 8px; letter-spacing: .12em; line-height: 1.8; }
    .mystery-shop-footer { flex-wrap: wrap; row-gap: 8px; }.mystery-orders-header { align-items: flex-start; flex-direction: column; gap: 8px; }.mystery-order-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.mystery-order-stats > div { padding: 18px 16px; }.mystery-order-stats strong { font-size: 28px; overflow-wrap: anywhere; }.mystery-order-stats span { font-size: 11px; }.mystery-order-stats [data-metric="recent"] { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 12px; }.mystery-order-stats [data-metric="recent"] strong { grid-row: 1 / 3; grid-column: 2; margin: 0; font-size: 25px; }.mystery-order-stats [data-metric="recent"] small { margin: 0; }.mystery-order-item { padding: 18px 16px; gap: 12px; }
    .room-arch { width: 450px; top: 100px; }.shelf-right { right: -60px; top: 90px; opacity: .4; }.creature-cat { top: 78px; right: -17px; width: 52px; height: 70px; }.creature-cat .creature-eyes { top: 25px; left: 6px; gap: 5px; }.creature-cat .creature-eyes i { width: 14px; height: 9px; }.creature-cat .creature-eyes i::after { height: 7px; top: 1px; left: 4px; }
    .creature-peeker { left: -35px; top: 50%; }.creature-owl { right: -54px; top: 74%; }.creature-blob { left: 56%; }
}
@media (max-width: 430px) { .mystery-shop-header { flex-direction: column; gap: 14px; }.mystery-shop-header h1 { margin: 14px 0; }.mystery-date-card { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 0; padding: 10px 12px 10px 24px; }.mystery-date-card::before { top: calc(50% - 2px); left: 11px; }.mystery-date-card strong { margin: 0; }.mystery-card-front { padding: 25px 22px; }.mystery-card-front strong { font-size: 20px; margin-top: 17px; }.mystery-card-front #mysteryCardDescription { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .creature-eyes,.room-motes i { animation: none; }.creature-eyes i::after,.mystery-card-back,.mystery-card-front,.mystery-product-card,.mystery-wheel { transition: none; }.mystery-product-card:hover { transform: none; } }

.mystery-detail-link { margin-top: 14px; padding: 5px 8px; color: #d7b785; font-size: 12px; text-underline-offset: 5px; }
.mystery-detail-link:hover { color: #f0d6ae; text-decoration: underline; }
.mystery-detail-link[hidden] { display: none; }
body.mystery-detail-open { overflow: hidden; }
#mysteryDetailModal { padding: 24px; overflow-y: auto; }
html[data-theme="dark"] .mystery-detail-modal {
    --room-gold: #d7b785;
    position: relative; display: flex; flex-direction: column; width: min(100%, 600px); max-height: calc(100dvh - 48px);
    overflow: hidden; padding: 0; border: 1px solid #b494735e; border-radius: 14px;
    background: radial-gradient(ellipse at 90% 0%, #80508736, transparent 60%), linear-gradient(145deg, #2d1a39, #160f22);
    box-shadow: 0 28px 100px #050209b3, inset 0 1px 0 #f3d4a91f;
}
.mystery-detail-scroll { --focus-ring-width: 1px; --focus-ring-offset: -4px; --focus-ring-color: #c6a5d466; --focus-ring-shadow: none; padding: 8px 34px 22px; }
.mystery-detail-scroll:focus-visible { outline: 1px solid #c6a5d466; outline-offset: -6px; }
.room-dialog-frame > .mystery-dialog-tools { position: relative; top: auto; z-index: 3; display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; height: auto; min-height: 76px; padding: 22px 26px 12px 34px; }
.room-dialog-frame > .mystery-dialog-tools .modal-close { position: static; flex-shrink: 0; }
.mystery-detail-header { padding: 0; }
.mystery-detail-meta { display: flex; align-items: center; gap: 12px; margin: 0; color: #d7b785; font-size: 11px; }
.mystery-sample-label { padding: 2px 7px; border: 1px solid #a77f694d; border-radius: 3px; color: #b8a3c5; font-size: 9px; }
.mystery-detail-header h2 { margin: 13px 0; color: #f1e8f6; font-family: var(--room-serif); font-size: 30px; font-weight: 400; line-height: 1.4; }
.mystery-detail-header p { margin: 0; color: #c3afcf; font-size: 13px; line-height: 1.9; }
.mystery-detail-content { margin-top: 25px; padding-top: 21px; border-top: 1px solid #91739433; }
.mystery-detail-content h3,.mystery-detail-bill h3 { margin: 0 0 15px; color: #dec8e9; font-size: 12px; font-weight: 400; letter-spacing: .08em; }
.mystery-detail-content ol { display: grid; gap: 13px; margin: 0; padding: 0; counter-reset: preview; list-style: none; }
.mystery-detail-content li { display: flex; align-items: center; gap: 12px; color: #c4afd0; font-size: 13px; line-height: 1.8; }
.mystery-detail-content li::before { content: counter(preview, decimal-leading-zero); counter-increment: preview; display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border: 1px solid #b4916738; border-radius: 50%; background: linear-gradient(145deg,#8a5d8b15,#170e2366); color: #d2b282; font-family: var(--room-numerals); font-size: 14px; }
.mystery-detail-specs { margin: 20px 0 0; padding: 14px; border: 1px solid #91739433; border-radius: 6px; background: #170e2373; }
.mystery-detail-specs div,.mystery-detail-bill dl div { display: flex; justify-content: space-between; gap: 20px; }
.mystery-detail-specs div + div,.mystery-detail-bill dl div + div { margin-top: 11px; }
.mystery-detail-specs dt,.mystery-detail-bill dt { color: #ae95bc; font-size: 11px; }
.mystery-detail-specs dd,.mystery-detail-bill dd { margin: 0; color: #dac4e5; font-size: 11px; text-align: right; }
.mystery-detail-bill { margin-top: 20px; padding: 18px; border: 1px solid #ba936254; border-radius: 9px; background: radial-gradient(ellipse at 0 0,#caa16e0b,transparent 65%),linear-gradient(135deg,#47304442,#21152e88); box-shadow: inset 0 1px 0 #edc99409; }
.mystery-detail-bill dl { margin: 0; }
.mystery-detail-bill dl div:last-child { align-items: center; padding-top: 13px; border-top: 1px solid #ba936230; }
.mystery-detail-bill dl div:last-child dd { color: #e7c99c; font-family: var(--room-numerals); font-size: 24px; line-height: 1.25; }
.mystery-delivery-notice { grid-column: 1 / -1; margin: 0; color: #b9a5c4; font-size: 10px; line-height: 1.7; }
.mystery-detail-feedback { color: #d7b785; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.mystery-detail-feedback:empty { display: none; }
.mystery-detail-footer { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0,1fr) auto; flex-shrink: 0; align-items: center; gap: 11px 20px; margin: 0; padding: 18px 34px 22px; border-top: 1px solid #b3916c3b; background: radial-gradient(ellipse at 0 100%,#8755841a,transparent 70%),linear-gradient(115deg,#291b34,#1c1328); box-shadow: 0 -10px 30px #08041022,inset 0 1px 0 #f4d6ad06; }
.mystery-detail-footer > div { min-width: 0; }
.mystery-detail-footer span,.mystery-detail-footer strong { display: block; }
.mystery-detail-footer span { color: #bda6c9; font-size: 10px; line-height: 1.7; }
.mystery-detail-footer strong { margin-top: 7px; color: #e1c498; font-family: var(--room-numerals); font-size: 29px; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; line-height: 1.2; }
.mystery-detail-footer button { flex-shrink: 0; min-width: 158px; min-height: 46px; font-size: 12px; }
.mystery-order-detail { flex-shrink: 0; font-size: 10px; }
@media (max-width: 520px) {
    #mysteryDetailModal { padding: 12px; }
    html[data-theme="dark"] .mystery-detail-modal { max-height: calc(100dvh - 24px); padding: 0; border-radius: 12px; }
    .mystery-detail-scroll { padding: 6px 20px 20px; }
    .room-dialog-frame > .mystery-dialog-tools { min-height: 68px; padding: 16px 16px 10px 20px; }
    .room-dialog-frame > .mystery-dialog-tools .mystery-eyebrow { font-size: 8px; letter-spacing: .13em; }
    .mystery-detail-header h2 { font-size: 25px; }
    .mystery-detail-footer { gap: 9px 12px; padding: 15px 20px 17px; }
    .mystery-detail-footer button { min-width: 140px; min-height: 44px; font-size: 11px; }
    .mystery-order-item { display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 18px 12px; }
    .mystery-order-icon { justify-self: center; }
    .mystery-order-price { font-size: 26px; }
    .mystery-order-detail { grid-column: 2; width: 100%; min-height: 44px; align-self: center; }
}
@media (prefers-reduced-motion: reduce) { .mystery-wheel.is-spinning { transition: none; } }

/* 访客订单页也属于魔法屋，不沿用旧后台的巨型门禁排版。 */
/* 水晶仪式：球体、卡牌与铜盘共用一束紫色侧光，逐步显现。 */
.mystery-shop-shell [hidden] { display: none !important; }
.crystal-intro { display: grid; justify-items: center; align-content: center; min-height: calc(100svh - var(--topbar-height) - var(--room-page-padding) * 2 - 24px); padding: 12px 0 20px; }
.crystal-scene { position: relative; width: min(450px, 100%); height: 405px; perspective: 1100px; isolation: isolate; }
.crystal-scene.has-webgl { height: clamp(230px, 43svh, 405px); }
.crystal-aura { position: absolute; inset: -55px -50px 0; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse, #a26ae529, #69449a10 45%, transparent 70%); filter: blur(25px); transition: filter .7s, transform .7s; }
.crystal-intro[data-attuned="true"] .crystal-aura { filter: blur(25px) brightness(1.7); transform: scale(1.08); }
.crystal-intro[data-attuned="true"] .crystal-sphere { border-color: #efd5ffc2; box-shadow: inset 11px 10px 30px #f6d8ff40,inset -18px -24px 38px #090317bc,inset 0 0 18px #e3b3ff60,0 0 65px #b77cf76b; }
.crystal-globe { position: absolute; width: 278px; height: 278px; left: 50%; top: 23px; margin-left: -139px; transform-style: preserve-3d; z-index: 3; }
.crystal-sphere { position: relative; width: 100%; height: 100%; overflow: hidden; border: 1px solid #dab8f68c; border-radius: 50%;
    background: radial-gradient(ellipse at 27% 18%, #f9eaffbd 0%, #c29ded36 15%, transparent 32%), radial-gradient(circle at 48% 48%, #9464c641 0%, #6d45ac73 37%, #322447cf 67%, #120b22 87%);
    box-shadow: inset 11px 10px 30px #f6d8ff2b, inset -18px -24px 38px #090317bc, inset 0 0 13px 4px #e3b3ff35, 0 0 2px 1px #eac7ffb0, 0 22px 45px #04000c9c, 0 0 65px #915ac442;
    animation: crystal-suspension 6s ease-in-out infinite; }
.crystal-sphere::before { position: absolute; content: ''; inset: 12px; border-radius: 50%; border: 1px solid #dcb4ff1f; box-shadow: inset 0 -14px 26px #c599ef35; }
.crystal-sphere::after { position: absolute; content: ''; inset: 0; border-radius: 50%; background: radial-gradient(ellipse at 70% 82%, #cf9eff63, transparent 26%), radial-gradient(ellipse at 83% 37%, #fff6ff26, transparent 12%); pointer-events: none; }
.crystal-nebula { position: absolute; inset: 14%; border-radius: 50%; filter: blur(18px); background: conic-gradient(from 40deg, transparent, #c9a3ff98, #552181ad, transparent, #bb79e085, #55339699, transparent); animation: crystal-nebula 22s linear infinite; opacity: .75; }
.crystal-orbit { position: absolute; inset: 17%; border: 1px solid #eac1ff70; border-radius: 50%; box-shadow: 0 0 12px #c183f255; transform-style: preserve-3d; }
.orbit-first { transform: rotate(-32deg) rotateX(66deg); animation: crystal-orbit-first 16s linear infinite; }
.orbit-second { transform: rotate(48deg) rotateX(72deg); border-color: #ddba7a70; animation: crystal-orbit-second 20s linear infinite; }
.crystal-heart { position: absolute; inset: 0; display: grid; place-items: center; color: #f5dcff; font-size: 64px; font-family: Georgia, serif; text-shadow: 0 0 14px #ecc7ff, 0 0 32px #c385f7, 0 0 70px #a455e9; }
.crystal-reflection { position: absolute; width: 35%; height: 19%; top: 11%; left: 15%; border-radius: 50%; transform: rotate(-38deg); background: linear-gradient(160deg, #fff7ffe3, #fff7ff30 50%, transparent); filter: blur(3px); opacity: .78; }
.crystal-stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #f6e9ff; box-shadow: 0 0 8px #dd97ff; animation: crystal-star 3s ease-in-out infinite alternate; }
.crystal-stars i:nth-child(1) { top: 27%; left: 58%; }.crystal-stars i:nth-child(2) { top: 62%; left: 26%; animation-delay: -1s; }.crystal-stars i:nth-child(3) { top: 66%; left: 69%; animation-delay: -2s; }.crystal-stars i:nth-child(4) { top: 39%; left: 31%; animation-delay: -.5s; }.crystal-stars i:nth-child(5) { top: 81%; left: 50%; animation-delay: -1.5s; }.crystal-stars i:nth-child(6) { top: 43%; left: 81%; animation-delay: -2.5s; }
.crystal-stand { position: absolute; width: 228px; height: 104px; top: 275px; left: 50%; margin-left: -114px; z-index: 2; transform-style: preserve-3d; }
.crystal-rim { position: absolute; inset: 0 0 auto; height: 41px; border-radius: 50%; border: 7px solid #8c6b47; background: radial-gradient(ellipse, #170d24 40%, #ba95624a 66%, #392636); box-shadow: inset 0 2px 3px #f8dba38c, 0 4px 0 #422c30, 0 7px 0 #b18a565c, 0 12px 20px #07030e99; }
.crystal-stand > i { position: absolute; top: 15px; width: 23px; height: 70px; border: 3px solid #886348; background: linear-gradient(90deg, #352135, #b6956187, #422940); border-radius: 12px 12px 3px 3px; box-shadow: inset 2px 0 3px #d4b17b55; }
.crystal-stand > i:nth-of-type(1) { left: 19px; transform: rotate(18deg); }.crystal-stand > i:nth-of-type(2) { right: 19px; transform: rotate(-18deg); }.crystal-stand > i:nth-of-type(3) { left: 103px; width: 21px; height: 48px; }
.crystal-foot { position: absolute; bottom: 9px; left: 18px; right: 18px; height: 19px; border: 3px solid #8a6748; border-radius: 50%; background: linear-gradient(#8e6b4f, #372031); box-shadow: inset 0 2px 2px #ebc89550, 0 12px 18px #05020ccc; }
.crystal-floor { position: absolute; width: 370px; height: 370px; top: 166px; left: 50%; margin-left: -185px; transform: rotateX(75deg); border-radius: 50%; border: 1px solid #bb89e044; background: radial-gradient(circle, #ac73d327, transparent 64%); box-shadow: 0 0 0 11px #a374c00a, 0 0 0 13px #a374c033, 0 0 0 28px #a374c009, 0 0 0 29px #a374c028; }
.crystal-floor span { position: absolute; color: #bc97d0; font-size: 27px; }.crystal-floor span:nth-child(1) { top: 0; left: 45%; }.crystal-floor span:nth-child(2) { left: 12%; bottom: 22%; }.crystal-floor span:nth-child(3) { right: 12%; bottom: 22%; }
.crystal-nova { position: absolute; inset: 95px 110px 130px; pointer-events: none; border-radius: 50%; background: #f3d8ff; box-shadow: 0 0 90px 20px #c28cff; opacity: 0; }
.crystal-question { position: relative; z-index: 4; width: min(100%, 520px); text-align: center; }
.crystal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; }
.crystal-scene.has-webgl .crystal-globe,
.crystal-scene.has-webgl .crystal-stand,
.crystal-scene.has-webgl .crystal-floor { visibility: hidden; }
.crystal-question .mystery-eyebrow { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 10px; letter-spacing: .24em; color: #c1a375; }
.crystal-question .mystery-eyebrow::before, .crystal-question .mystery-eyebrow::after { content: ''; width: 32px; height: 1px; background: linear-gradient(90deg, transparent, #bfa27e70); }
.crystal-question .mystery-eyebrow::after { transform: rotate(180deg); }
.crystal-question h1 { margin: 16px 0 25px; color: #f4e7fa; font-family: var(--room-serif); font-size: clamp(30px, 3vw, 42px); font-weight: 400; letter-spacing: .14em; text-shadow: 0 4px 24px #be8ae82e; }
.crystal-wish-form { display: flex; gap: 12px; align-items: center; min-height: 60px; padding: 7px 8px 7px 20px; border: 1px solid #b48ab15c; border-radius: 12px; background: linear-gradient(130deg, #3d28458c, #1a1126b3); box-shadow: inset 0 1px 0 #ecc9ff12, 0 10px 35px #03010a45; }
.crystal-wish-form:focus-within { border-color: #c3a27c; box-shadow: inset 0 1px 0 #ecc9ff0d, 0 0 28px #a75bcc20; }
.crystal-wish-form input { --focus-ring-width: 0px; --focus-ring-shadow: none; min-width: 0; flex: 1; width: 100%; min-height: 44px; border: 0; outline: 0; background: transparent; color: #eedcf6; font: inherit; font-size: 14px; }
.crystal-wish-form input::placeholder { color: #a88ab9; }
.crystal-wish-form button { flex-shrink: 0; min-height: 42px; padding: 11px 21px; border: 1px solid #c1a28080; border-radius: 8px; background: linear-gradient(135deg, #765584, #4c345f); color: #f0dfc3; font-size: 13px; cursor: pointer; box-shadow: inset 0 1px 0 #edd7fc33, 0 4px 12px #09031166; transition: border-color .2s, box-shadow .2s, background .2s; }
.crystal-wish-form button:hover:not(:disabled) { border-color: #e1c49b; background: linear-gradient(135deg, #896296, #5b3e70); box-shadow: inset 0 1px 0 #edd7fc40, 0 0 22px #ac78da2e; }
.crystal-wish-form button span { margin-left: 9px; color: #e2cba4; }
.crystal-wish-form[aria-busy="true"] { border-color: #d1ae8573; }
.crystal-wish-form[aria-busy="true"] button { cursor: progress; }
.crystal-wish-form[aria-busy="true"] button::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 1px solid #e2cba447; border-top-color: #f2dcb5; border-radius: 50%; vertical-align: -1px; animation: crystal-nebula 1s linear infinite; }
.crystal-feedback { min-height: 20px; margin: 12px 0 0; color: #c3a3d4; font-size: 11px; line-height: 1.8; }
.crystal-feedback[data-tone="error"] { color: #efb8c6; }
.crystal-feedback[data-tone="error"]::before { content: '◇'; margin-right: 7px; color: #d69db6; }
.crystal-feedback[data-tone="pending"] { color: #d5bd94; }
.crystal-question #mysteryOracleState { transition: color .5s; }
.crystal-intro[data-attuned="true"] #mysteryOracleState { color: #e2c38e; }
.mystery-shop-shell[data-ritual="listening"] .crystal-heart { animation: crystal-star .6s ease-in-out infinite alternate; }
.mystery-shop-shell[data-ritual="conjuring"] .crystal-nova { animation: crystal-nova 1.6s ease-in-out both; }
.mystery-shop-shell[data-ritual="conjuring"] .crystal-stand,
.mystery-shop-shell[data-ritual="conjuring"] .crystal-floor { opacity: 0; transition: opacity .9s; }
.mystery-shop-shell[data-ritual="conjuring"] .crystal-wish-form { opacity: .55; transition: opacity .5s; }
.mystery-shop-shell .mystery-shop-header { padding: 4px 0 24px; }
.mystery-shop-shell .mystery-shop-header h1 { margin: 14px 0 12px; font-size: 36px; }
.mystery-shop-shell .mystery-shop-header h1 em { font-size: 22px; }
#mysteryWishEcho { max-width: 560px; overflow-wrap: anywhere; color: #c0a2cf; font-size: 12px; }
.mystery-shop-shell[data-ritual="card"] .mystery-shop-grid { grid-template-columns: minmax(0, 540px); justify-content: center; }
.mystery-shop-shell .mystery-card-zone { perspective: 1300px; background: radial-gradient(ellipse at 50% 42%, #9652ae1c, transparent 63%); border-color: transparent; box-shadow: none; }
.mystery-shop-shell[data-ritual="card"] .mystery-card-zone { animation: crystal-card-arrival .9s cubic-bezier(.16,.8,.2,1) both; }
.mystery-product-card { --card-rest-x: 8deg; --card-rest-y: -12deg; border: 0; overflow: visible; background: transparent; transform-style: preserve-3d; scroll-margin-top: calc(var(--topbar-height) + 16px); transform: rotateX(calc(var(--card-rest-x) + var(--card-pointer-x, 0deg))) rotateY(calc(var(--card-rest-y) + var(--card-pointer-y, 0deg))) translateY(var(--card-lift, 0px)); box-shadow: none; }
.mystery-product-card:hover { transform: rotateX(calc(var(--card-rest-x) + var(--card-pointer-x, 0deg))) rotateY(calc(var(--card-rest-y) + var(--card-pointer-y, 0deg))) translateY(var(--card-lift, 0px)); box-shadow: none; }
.mystery-card-foil { position: absolute; z-index: 2; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at var(--card-light-x, 45%) var(--card-light-y, 30%),#f5debb26,transparent 52%),linear-gradient(125deg,transparent 15%,#ead5fb0c 38%,#f5debb1a 42%,transparent 65%); mix-blend-mode: screen; transition: opacity .35s; }
.mystery-product-card.is-interacting .mystery-card-foil { opacity: 1; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .mystery-product-card:hover:not(:disabled) { --card-lift: -6px; }
    .mystery-product-card.is-interacting { transition-duration: .12s; }
}
.mystery-product-card:disabled { opacity: 1 !important; }
.mystery-card-body { position: absolute; inset: 0; display: block; transform-style: preserve-3d; border-radius: 8px; transition: transform 1s cubic-bezier(.2,.7,.2,1); box-shadow: 4px 0 0 #8f704b, 7px 2px 0 #49332e, 9px 3px 0 #bc9a6355, 14px 25px 38px #05020baa, 0 0 55px #9b5bc327; }
.mystery-card-back, .mystery-card-front { border: 1px solid #c39e72a3; opacity: 1; transition: none; }
.mystery-card-back, .mystery-product-card.is-revealed .mystery-card-back { transform: translateZ(3px); opacity: 1; }
.mystery-card-front, .mystery-product-card.is-revealed .mystery-card-front { transform: rotateY(180deg) translateZ(3px); opacity: 1; }
.mystery-product-card.is-covered .mystery-card-front { visibility: visible; }
.mystery-product-card.is-revealed .mystery-card-body { transform: rotateY(180deg); }
.mystery-card-back { box-shadow: inset 3px 2px 14px #ffe5bd12, inset -4px -5px 15px #07020e70; }
.mystery-wheel-panel { perspective: 1300px; scroll-margin-top: calc(var(--topbar-height) + 20px); border-color: #b996b038; border-radius: 16px; background: radial-gradient(ellipse at 50% 40%, #83539720, transparent 68%), linear-gradient(145deg, #38243f42, #140e1fd9); box-shadow: inset 0 1px 0 #ead1ff0c, 0 18px 50px #04010924; }
.mystery-shop-shell[data-ritual="wheel"] .mystery-wheel-panel { animation: crystal-wheel-arrival .8s cubic-bezier(.16,.8,.2,1) both; }
.mystery-wheel-wrap { transform-style: preserve-3d; transform: rotateX(14deg); margin-top: 43px; margin-bottom: 35px; }
.mystery-wheel-wrap::before { inset: -15px; border: 5px solid #b18d615e; background: #2c1a3466; transform: translateZ(-12px); box-shadow: inset 0 2px 0 #ffe5b340, 0 5px 0 #6e4f39, 0 10px 0 #35212b, 0 13px 0 #b9955a70, 0 31px 28px #06020ccc; }
.mystery-wheel-wrap::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; background: repeating-conic-gradient(#f1d6a180 0deg .7deg,transparent .7deg 6deg); mask: radial-gradient(farthest-side,transparent calc(100% - 4px),#000 calc(100% - 4px)); pointer-events: none; }
.mystery-wheel-aura { position: absolute; inset: -23px; overflow: hidden; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .35s; }
.mystery-wheel-aura::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: conic-gradient(from 0deg,transparent 0deg,#c6a1e52b 80deg,#edcfa3b3 115deg,transparent 145deg,transparent 200deg,#c6a1e52b 260deg,#edcfa3b3 295deg,transparent 325deg); mask: radial-gradient(farthest-side,transparent calc(100% - 2px),#000 calc(100% - 2px)); }
.mystery-wheel-panel.is-drawing .mystery-wheel-aura { opacity: 1; }
.mystery-wheel-panel.is-drawing .mystery-wheel-aura::before { animation: crystal-nebula 2.4s linear infinite; }
.mystery-wheel { border-color: #b29468; box-shadow: inset 0 2px 1px #ffe9b993, inset 0 -3px 1px #483527, inset 0 0 0 3px #e5c28b4c, inset 0 0 25px #08031099, 0 4px 0 #614533, 0 8px 0 #9b754855, 0 19px 32px #05020a88; }
.mystery-wheel::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(125deg,#eed7ff1a,transparent 42%,#09021033 78%); pointer-events: none; }
.mystery-wheel-core { background: radial-gradient(circle at 32% 24%, #a58abd, #593c70 44%, #24162f 82%); box-shadow: inset 1px 2px 6px #edd5ffa3, inset -3px -5px 8px #100717, 0 0 0 5px #8a6a4e5e, 0 5px 0 #634931, 0 9px 12px #090311cc; }
.mystery-wheel-pointer { border-top-color: #e8c98d; filter: drop-shadow(0 2px 0 #987a4f) drop-shadow(0 6px 5px #06020a); }
.mystery-invite-disclosure { margin-top: 17px; color: #b7a0c7; }
.mystery-invite-disclosure > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; width: fit-content; min-height: 44px; margin-left: auto; padding: 9px 0 9px 12px; cursor: pointer; list-style: none; font-size: 12px; color: #c8ad8b; }
.mystery-invite-disclosure > summary small:empty { display: none; }
.mystery-invite-disclosure > summary small { padding: 2px 7px; border: 1px solid #c5a16d4d; border-radius: 4px; background: #80633a1a; color: #e3c89b; font-size: 10px; }
.mystery-invite-disclosure > summary::-webkit-details-marker { display: none; }
.mystery-invite-disclosure > summary span { margin-left: 10px; display: inline-block; transition: transform .2s; }
.mystery-invite-disclosure[open] > summary span { transform: rotate(45deg); }
.mystery-invite-disclosure .mystery-action-bar { margin-top: 6px; }
.mystery-shop-shell[data-ritual="complete"] .mystery-purchase-bar { animation: crystal-wheel-arrival .55s ease both; }
@keyframes crystal-suspension { 50% { transform: translateY(-9px); } }
@keyframes crystal-nebula { to { transform: rotate(360deg); } }
@keyframes crystal-orbit-first { to { transform: rotate(328deg) rotateX(66deg); } }
@keyframes crystal-orbit-second { to { transform: rotate(-312deg) rotateX(72deg); } }
@keyframes crystal-star { from { opacity: .35; } to { opacity: 1; } }
@keyframes crystal-nova { 0%, 40%, 100% { opacity: 0; transform: scale(.3); } 70% { opacity: .65; transform: scale(1.1); } 90% { opacity: 0; transform: scale(2.2); } }
@keyframes crystal-card-arrival { from { opacity: 0; transform: translateY(35px) scale(.83); } to { opacity: 1; transform: none; } }
@keyframes crystal-wheel-arrival { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: none; } }
/* 小紫推荐：规则版每日轮换卡片横排（公开只读，点击引导翻牌） */
.mystery-recommend { margin-top: 18px; padding: 22px 24px; border: 1px solid #91739433; border-radius: 10px; background: linear-gradient(150deg, #43234c30, #1d112c8f); box-shadow: inset 0 1px 0 #f1d8ff09; }
.mystery-recommend .mystery-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.mystery-recommend .mystery-panel-heading h2 { margin: 0; font-size: 17px; color: #ecd9f5; }
.mystery-recommend-date { color: var(--room-gold); font-size: 11px; }
.mystery-recommend-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mystery-recommend-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px; text-align: left; border: 1px solid #a98cba2e; border-radius: 9px; background: linear-gradient(160deg, #5a3a6440, #221531a8); color: #d9c4ea; cursor: pointer; transition: border-color .25s, transform .25s, box-shadow .25s; }
.mystery-recommend-card:hover { border-color: #d3a7ff59; transform: translateY(-3px); box-shadow: 0 14px 30px #0a041338; }
.mystery-recommend-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: radial-gradient(ellipse at 50% 60%, #74478833, transparent 70%); }
.mystery-recommend-cover img { width: 100%; height: 100%; object-fit: cover; }
.mystery-recommend-cover:empty::after { content: '✧'; display: grid; place-items: center; height: 100%; color: #b98fd680; font-size: 22px; }
.mystery-recommend-reason { position: absolute; top: 20px; left: 20px; padding: 3px 9px; border: 1px solid #e2cba447; border-radius: 999px; background: #2a1838cc; color: var(--room-gold); font-size: 10px; letter-spacing: .08em; }
.mystery-recommend-title { color: #ecd9f5; font-size: 14px; line-height: 1.5; }
.mystery-recommend-meta { display: flex; justify-content: space-between; color: #a98cba; font-size: 12px; }
.mystery-recommend-note { margin: 14px 0 0; color: #a48cb8; font-size: 11px; }
/* 视频课程播放器：凭据流 + 账号水印平铺 */
.mystery-player-modal { width: min(880px, 94vw); }
.mystery-player-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 4px 22px 0; }
.mystery-player-heading h2 { margin: 0; font-size: 18px; color: #ecd9f5; }
.mystery-player-meta { color: #a98cba; font-size: 12px; }
.mystery-player-stage { position: relative; margin: 14px 22px 0; border: 1px solid #a98cba2e; border-radius: 12px; overflow: hidden; background: #0b0713; }
.mystery-player-stage video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0b0713; }
.mystery-player-watermark { position: absolute; inset: 0; pointer-events: none; background-repeat: repeat; }
.mystery-player-lessons { list-style: none; margin: 14px 22px 0; padding: 0; display: grid; gap: 8px; max-height: 180px; overflow-y: auto; }
.mystery-player-lessons button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; text-align: left; border: 1px solid #a98cba2e; border-radius: 10px; background: linear-gradient(160deg, #5a3a6440, #221531a8); color: #d9c4ea; cursor: pointer; transition: border-color .25s; }
.mystery-player-lessons button:hover { border-color: #d3a7ff59; }
.mystery-player-lessons button[aria-pressed="true"] { border-color: #d3a7ff8c; background: linear-gradient(160deg, #6a457a66, #2a1a3cd9); }
.mystery-player-lessons button span { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border: 1px solid #e2cba447; border-radius: 50%; color: var(--room-gold); font-size: 11px; }
.mystery-player-lessons button strong { font-size: 13px; font-weight: 500; color: #ecd9f5; }
.mystery-player-lessons button em { margin-left: auto; font-style: normal; font-size: 11px; color: #8d7aa5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.mystery-player-note { margin: 12px 22px 18px; color: #a48cb8; font-size: 11px; line-height: 1.8; }
/* 顶栏语言切换：文字徽标按钮（与主题切换同款容器） */
.lang-toggle-label { font-size: 12px; font-weight: 600; letter-spacing: .05em; }
@media (max-width: 768px) {
    .mystery-recommend-row { grid-template-columns: 1fr; }
    .mystery-player-heading { margin: 4px 16px 0; }
    .mystery-player-stage, .mystery-player-lessons, .mystery-player-note { margin-left: 16px; margin-right: 16px; }
    .crystal-scene { height: 344px; width: min(380px, 100%); }
    .crystal-scene.has-webgl { height: clamp(230px, 40svh, 344px); }
    .crystal-aura { inset: -35px 0 0; }
    .crystal-globe { width: 236px; height: 236px; margin-left: -118px; top: 18px; }
    .crystal-stand { top: 230px; transform: scale(.85); transform-origin: top center; }
    .crystal-floor { width: 280px; height: 280px; margin-left: -140px; top: 152px; }
    .crystal-question h1 { margin: 14px 0 21px; font-size: clamp(26px, 4.6vw, 30px); letter-spacing: .08em; }
    .crystal-wish-form { min-height: 56px; padding-left: 14px; gap: 7px; }
    .crystal-wish-form button { min-height: 40px; padding: 10px 13px; }
    .crystal-wish-form input { font-size: 16px; }
    /* iOS Safari 聚焦 <16px 输入框会自动放大页面：窄屏把登录/注册输入框提到 16px。 */
    html[data-theme="dark"] .xiaozi-auth-panel .form-input { font-size: 16px; }
    .crystal-question .mystery-eyebrow { font-size: 9px; gap: 10px; }
    .crystal-question .mystery-eyebrow::before, .crystal-question .mystery-eyebrow::after { width: 20px; }
    .mystery-shop-shell .mystery-shop-header h1 { font-size: 28px; }
    .mystery-product-card { --card-rest-x: 5deg; --card-rest-y: -8deg; }
    .mystery-shop-shell .mystery-card-zone { min-height: 480px; }
    .mystery-wheel-wrap { transform: rotateX(10deg); }
}
@media (prefers-reduced-motion: reduce) {
    .crystal-sphere, .crystal-nebula, .crystal-orbit, .crystal-stars i,
    .mystery-shop-shell[data-ritual] .crystal-heart, .mystery-shop-shell[data-ritual] .crystal-nova,
    .mystery-shop-shell[data-ritual] .mystery-card-zone, .mystery-shop-shell[data-ritual] .mystery-wheel-panel,
    .mystery-shop-shell[data-ritual] .mystery-purchase-bar,
    .mystery-purchase-bar.is-collected .mystery-purchase-seal,
    .mystery-wheel-panel.has-result .mystery-wheel-core::after { animation: none; }
    .wheel-label { transition: none; }
    .crystal-aura,.crystal-question #mysteryOracleState { transition: none; }
    .crystal-wish-form[aria-busy="true"] button::before { animation: none; }
    .mystery-wheel-panel.is-drawing .mystery-wheel-aura::before,
    .mystery-wheel-panel.is-drawing .mystery-spin-btn::before { animation: none; }
    .mystery-wheel-aura,.mystery-free-badge { transition: none; }
    .mystery-card-body { transition: none; }
    .mystery-card-foil { display: none; }
    .mystery-product-card:hover { transform: rotateX(var(--card-rest-x)) rotateY(var(--card-rest-y)); }
}
.mystery-product-card.is-collected .mystery-card-front::after {
    content: '已入收藏';
    position: absolute;
    top: 24px;
    right: 21px;
    padding: 7px 9px;
    border: 1px solid #ccac7880;
    color: #e1c494;
    background: #24132de6;
    font-family: var(--room-serif);
    font-size: 11px;
    letter-spacing: .13em;
    transform: rotate(8deg);
    box-shadow: inset 0 0 0 3px #24132d, inset 0 0 0 4px #ccac7830;
}
.mystery-detail-balance { grid-column: 1 / -1; margin: 0; padding-top: 10px; border-top: 1px solid #b3916c24; color: #c0a6d1; font-size: 11px; line-height: 1.8; font-variant-numeric: tabular-nums; }
.mystery-detail-balance.is-insufficient { color: #e4b09a; }
#mysteryDetailModal[aria-busy="true"] .mystery-detail-modal { cursor: progress; }
#mysteryDetailModal[aria-busy="true"] #mysteryDetailAction { background-size: 200% 100%; animation: mystery-checkout-glow 1.5s ease-in-out infinite; }
@keyframes mystery-checkout-glow { 50% { box-shadow: 0 0 24px #b58a6140; } }
.mystery-order-item { transition: border-color .2s, background .2s, transform .2s; }
.mystery-order-item:hover { border-color: #b08b647d; background: linear-gradient(115deg,#412b49ed,#251930f5); transform: translateY(-2px); }
.mystery-order-item:focus-within { border-color: #c4a57c; }
.mystery-order-main span { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
    #mysteryDetailModal[aria-busy="true"] #mysteryDetailAction { animation: none; }
    .mystery-order-item { transition: none; }
    .mystery-order-relation { transition: none; }
    .mystery-order-item:hover { transform: none; }
}
html[data-theme="dark"] .user-role { white-space: nowrap; font-size: 11px; letter-spacing: .02em; }
@media (max-height: 680px) {
    html[data-theme="dark"] .sidebar-header { padding-block: 18px; }
    html[data-theme="dark"] .logo { gap: 12px; }
    html[data-theme="dark"] .logo-copy { gap: 5px; }
    .brand-sigil { width: 88px; height: 88px; }
    html[data-theme="dark"] .sidebar-nav { padding-block: 16px 14px; }
    html[data-theme="dark"] .nav-section-title { padding-bottom: 11px; }
    .sidebar-lore { display: none; }
}
html[data-theme="dark"] .guest-page-gate {
    grid-template-columns: minmax(190px, .7fr) minmax(0, 1.3fr);
    min-height: min(430px, calc(100vh - 160px));
    gap: clamp(28px, 5vw, 64px);
    padding: clamp(32px, 5vw, 58px);
    border-radius: 9px;
    background:
        radial-gradient(circle at 14% 24%, #8b429326, transparent 34%),
        radial-gradient(circle at 84% 74%, #6a3f7f1c, transparent 36%),
        linear-gradient(145deg, #2a1937, #180e24);
    box-shadow: inset 0 1px 0 #f1d8ff0c, 0 22px 70px #08041038;
}
html[data-theme="dark"] .guest-page-gate::before {
    opacity: .2;
    background-image: linear-gradient(#9f6bb218 1px, transparent 1px), linear-gradient(90deg, #9f6bb218 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(90deg, #000, transparent 92%);
}
html[data-theme="dark"] .guest-page-gate-visual {
    width: min(100%, 220px);
    border-color: #a779bc3d;
    background: radial-gradient(circle, #8b429328, #21142e 58%, transparent 59%);
    box-shadow: 0 0 50px #7b3c9c16;
}
html[data-theme="dark"] .guest-page-gate-visual img {
    width: 92px;
    height: 92px;
    padding: 7px;
    border-color: #b083c15e;
    border-radius: 26px;
    background: #21142eee;
    box-shadow: 0 18px 42px #07031088;
}
html[data-theme="dark"] .guest-page-gate-copy .panel-kicker {
    color: var(--room-gold);
    font-size: 9px;
    letter-spacing: .18em;
}
html[data-theme="dark"] .xiaozi-auth-brand .panel-kicker {
    color: #d7b785;
    font-size: 11px;
    letter-spacing: .16em;
}
html[data-theme="dark"] .guest-page-gate-copy h2 {
    max-width: 580px;
    margin: 14px 0 13px;
    color: #f1e8f6;
    font-family: var(--room-serif);
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: .04em;
}
html[data-theme="dark"] .guest-page-gate-copy > p {
    max-width: 510px;
    color: #baa7c7;
    font-size: 12px;
    line-height: 1.85;
}
html[data-theme="dark"] .guest-page-gate-actions { margin-top: 22px; gap: 9px; }
html[data-theme="dark"] .guest-page-gate-actions .btn { min-height: 40px; padding-inline: 17px; font-size: 11px; }
html[data-theme="dark"] .guest-page-gate-copy small { margin-top: 15px; color: #a993b4; font-size: 10px; line-height: 1.7; }
@media (max-width: 820px) {
    html[data-theme="dark"] .guest-page-gate {
        grid-template-columns: 1fr;
        min-height: 500px;
        padding: 30px 22px;
        text-align: center;
    }
    html[data-theme="dark"] .guest-page-gate-visual { width: min(58vw, 230px); }
    html[data-theme="dark"] .guest-page-gate-copy { margin: 0 auto; }
    html[data-theme="dark"] .guest-page-gate-copy > p { margin-inline: auto; }
    html[data-theme="dark"] .guest-page-gate-actions { justify-content: center; }
    html[data-theme="dark"] .guest-page-gate-copy h2 { font-size: 30px; }
}
@media (max-width: 520px) {
    html[data-theme="dark"] .guest-page-gate { min-height: 0; gap: 22px; padding: 28px 18px 30px; }
    html[data-theme="dark"] .guest-page-gate-visual { width: min(58vw, 190px); }
    html[data-theme="dark"] .guest-page-gate-copy h2 { margin-top: 11px; font-size: 25px; line-height: 1.45; }
}

/* 旅人档案与奇遇凭证：铜边、烟紫玻璃，延续魔法屋的克制质感。 */
.traveler-account-btn {
    display: inline-flex; align-items: center; gap: 9px; max-width: 185px; min-height: 40px;
    padding: 5px 12px 5px 5px; border: 1px solid #9870b044; border-radius: 8px;
    background: linear-gradient(135deg, #4c2c5d66, #24192f99); color: #ddcde9;
    font: inherit; font-size: 12px; cursor: pointer; transition: border-color .2s, background .2s;
}
.traveler-account-btn[hidden] { display: none; }
.traveler-account-btn:hover { border-color: #c8a57999; background: #4a305c88; }
#travelerAccountName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.traveler-account-seal {
    display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center;
    border: 1px solid #c1a16e55; border-radius: 50%; background: radial-gradient(circle at 30% 20%, #8761a4, #34233f);
    box-shadow: inset 0 1px 2px #f1ccff33; color: #f5dfc1; font-family: var(--room-serif);
}
body.traveler-account-open { overflow: hidden; }
.mystery-dialog-tools .modal-close { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #b58f6d55; background: linear-gradient(145deg,#3f284be6,#25182ff5); color: #c9b0d5; font-size: 24px; line-height: 1; box-shadow: inset 0 1px 0 #edcaff09,0 4px 12px #08041033; transition: color .2s, border-color .2s, background .2s; }
.mystery-dialog-tools .modal-close:hover { border-color: #c7a27399; background: #493052; color: #f2d2a2; }
.mystery-dialog-tools .modal-close:focus-visible { outline: 2px solid #c6a5d4; outline-offset: 3px; }
#travelerAccountModal { padding: 24px; overflow-y: auto; }
html[data-theme="dark"] .traveler-account-modal {
    --room-gold: #d7b785; position: relative; width: min(100%, 520px); max-height: calc(100dvh - 48px);
    display: flex; flex-direction: column; overflow: hidden; padding: 0; border: 1px solid #a485645e; border-radius: 14px;
    background: radial-gradient(ellipse at 90% 0%, #74487f44, transparent 55%), linear-gradient(145deg, #2b1b37, #170f22);
    box-shadow: 0 28px 100px #050209b3, inset 0 1px 0 #dab1e012;
}
.traveler-account-scroll { padding: 0 34px 30px; }
.traveler-account-header { padding: 8px 28px 0 0; }
.traveler-portrait {
    display: grid; float: left; width: 56px; height: 64px; margin: 0 18px 16px 0; place-items: center;
    border: 1px solid #c4a07188; border-radius: 28px 28px 8px 8px;
    background: radial-gradient(circle at 35% 20%, #80519799, #281b34 75%);
    box-shadow: 0 5px 16px #08030d66, inset 0 0 0 4px #f4d5a60a;
    color: #e6cba4; font-family: var(--room-serif); font-size: 25px;
}
.traveler-account-header .mystery-eyebrow { font-size: 8px; letter-spacing: .15em; }
.traveler-account-header h2 { margin: 8px 0 9px; color: #f0e3f4; font-family: var(--room-serif); font-size: 26px; font-weight: 400; letter-spacing: .08em; }
.traveler-account-header p { clear: both; margin: 0; color: #bba5ca; font-size: 12px; overflow-wrap: anywhere; }
.traveler-account-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 23px 0; }
.traveler-account-stats > div { padding: 17px; border: 1px solid #a4825f3b; border-radius: 9px; background: radial-gradient(ellipse at 0 0,#9b6ca219,transparent 70%),linear-gradient(145deg,#30203966,#160e2299); box-shadow: inset 0 1px 0 #e8c1f609; }
.traveler-account-stats dt { color: #af96bf; font-size: 10px; }
.traveler-account-stats dd { margin: 10px 0 0; color: #e3c598; font-family: var(--room-numerals); font-size: 27px; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; line-height: 1.2; }
.traveler-form-fields { display: grid; gap: 9px; min-width: 0; margin: 0; padding: 0; border: 0; }
.traveler-form-fields label { margin-top: 4px; color: #cfb9dc; font-size: 12px; }
.traveler-name-row { display: flex; gap: 10px; }
.traveler-name-row input { min-width: 0; flex: 1; }
.traveler-name-row button { flex-shrink: 0; }
html[data-theme="dark"] .traveler-form-fields .form-input {
    width: 100%; min-height: 42px; border: 1px solid #8e6a9d66; border-radius: 6px;
    background: #160e2280; color: #ecdcf6; font-size: 13px;
}
html[data-theme="dark"] .traveler-form-fields .form-input:focus { border-color: #c3a079; box-shadow: 0 0 0 3px #d7b7850e; outline: none; }
.traveler-form-fields:disabled { opacity: .65; }
.traveler-feedback { margin: 10px 0 0; color: #c4a9d5; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.traveler-feedback:empty { display: none; }
.traveler-feedback[data-tone="error"] { color: #efa9bb; }
.traveler-feedback[data-tone="success"] { color: #d9c39b; }
.traveler-password-disclosure { margin-top: 24px; border-top: 1px solid #97749f33; }
.traveler-password-disclosure summary { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 18px 0; color: #d4c0df; font-size: 12px; cursor: pointer; list-style: none; transition: color .2s; }
.traveler-password-disclosure summary:hover { color: #edcf9d; }
.traveler-password-disclosure summary::-webkit-details-marker { display: none; }
.traveler-password-disclosure summary > span:last-child { color: #d7b785; font-size: 18px; transition: transform .2s; }
.traveler-password-disclosure[open] summary > span:last-child { transform: rotate(45deg); }
.traveler-password-disclosure form > p:first-child { margin: 0 0 14px; color: #ac96bb; font-size: 11px; line-height: 1.8; }
.traveler-password-disclosure .btn { justify-self: start; margin-top: 7px; }
.traveler-account-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding-top: 20px; border-top: 1px solid #97749f33; }
.traveler-account-footer > span { color: #aa92b9; font-size: 10px; }
.traveler-logout { min-height: 32px; padding: 0; border: 0; background: none; color: #c8adcd; font: inherit; font-size: 11px; cursor: pointer; }
.traveler-logout:hover { color: #efc2d6; }
.traveler-logout:disabled { opacity: .5; cursor: wait; }
.mystery-order-tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 26px 0 14px; }
.mystery-order-tools[hidden] { display: none; }
.mystery-order-filters { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 3px; padding: 4px; border: 1px solid #97749f33; border-radius: 8px; background: #160f2266; }
.mystery-order-filters button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 12px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #b49ac6; font: inherit; font-size: 11px; cursor: pointer; }
.mystery-order-filters [data-filter-count] { color: #977fa8; font-family: var(--room-numerals); font-size: 16px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.mystery-order-filters button[aria-pressed="true"] [data-filter-count] { color: #ebd5b2; }
.mystery-order-filters button:hover { color: #ead5f4; }
.mystery-order-filters button[aria-pressed="true"] { border-color: #b58b6255; background: linear-gradient(135deg, #76508055, #47314f77); color: #e6ccab; box-shadow: 0 3px 9px #09040e44; }
.mystery-order-search { display: flex; align-items: center; gap: 9px; width: min(100%, 310px); min-height: 42px; padding: 0 12px; border: 1px solid #97749f44; border-radius: 7px; background: #160f2266; color: #b99ccb; }
.mystery-order-search:focus-within { border-color: #c3a079; }
.mystery-order-search svg { flex: 0 0 16px; width: 16px; height: 16px; }
.mystery-order-search input { --focus-ring-width: 0px; --focus-ring-shadow: none; min-width: 0; width: 100%; min-height: 40px; padding: 0; border: 0; outline: 0; background: transparent; color: #e4d3ee; font: inherit; font-size: 11px; }
.mystery-order-search input::placeholder { color: #a88eb9; opacity: 1; }
.mystery-order-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.mystery-search-clear { --focus-ring-offset: -3px; display: grid; flex: 0 0 32px; width: 32px; height: 36px; margin-right: -8px; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #c6acd7; font-size: 22px; cursor: pointer; }
.mystery-search-clear:hover { color: #f3e5fa; background: #b188c31a; }
.mystery-search-clear[hidden],.mystery-filter-reset[hidden] { display: none; }
.mystery-order-result-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px; margin-bottom: 14px; }
.mystery-order-result { margin: 0; color: #ac93be; font-size: 11px; line-height: 1.8; }
.mystery-order-result:empty { display: none; }
.mystery-filter-reset { min-height: 36px; padding: 4px 0; border: 0; background: transparent; color: #d7b785; font: inherit; font-size: 11px; cursor: pointer; }
.mystery-filter-reset:hover { color: #f2d5a8; text-decoration: underline; text-underline-offset: 4px; }
.mystery-order-main .mystery-order-delivery { margin-top: 9px; color: #c3ad8f; }
.mystery-order-main strong { font-size: 14px; font-weight: 500; }
.mystery-order-main span { font-size: 11px; line-height: 1.7; }
.mystery-order-detail { min-height: 38px; font-size: 11px; }
.mystery-order-receipt { position: relative; margin-top: 22px; padding: 22px; border: 1px solid #a4856473; border-radius: 9px; background: radial-gradient(ellipse at 0 0,#ad844b17,transparent 65%),repeating-linear-gradient(120deg,#e2cda003 0 1px,transparent 1px 5px),linear-gradient(145deg,#38253b,#201528); box-shadow: inset 0 1px 0 #e8c1f615,0 8px 24px #09040e33; }
.mystery-order-receipt::before { content: ''; position: absolute; inset: 6px; border: 1px solid #ba986526; border-radius: 5px; pointer-events: none; }
.mystery-order-receipt[hidden] { display: none; }
.mystery-receipt-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 19px; padding-bottom: 17px; border-bottom: 1px dashed #b897654d; }
.mystery-receipt-heading > div { flex: 1; min-width: 0; }
.mystery-receipt-heading .mystery-eyebrow { font-size: 7px; letter-spacing: .12em; line-height: 1.7; }
.mystery-receipt-heading h3 { margin: 5px 0 0; color: #efdeec; font-family: var(--room-serif); font-size: 18px; font-weight: 500; letter-spacing: .08em; }
.mystery-receipt-seal { display: grid; flex: 0 0 41px; height: 49px; place-items: center; border: 1px solid #c6a4757d; border-radius: 22px 22px 5px 5px; background: linear-gradient(135deg,#77525480,#3e2838); color: #e4c795; font-family: var(--room-serif); font-size: 23px; box-shadow: inset 0 0 0 3px #382537,inset 0 0 0 4px #c6a47530,0 4px 10px #0b041b66; }
.mystery-receipt-copy, .mystery-related-order { min-height: 36px; padding: 6px 0; border: 0; background: none; color: #d7b785; font: inherit; font-size: 11px; cursor: pointer; }
.mystery-receipt-copy { flex-shrink: 0; }
.mystery-receipt-copy:hover, .mystery-related-order:hover { color: #f2d5a8; text-decoration: underline; text-underline-offset: 4px; }
.mystery-order-receipt dl { display: grid; gap: 10px; margin: 0; }
.mystery-order-receipt dl > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; font-size: 11px; line-height: 1.8; }
.mystery-order-receipt dt { color: #ad94bc; }
.mystery-order-receipt dd { margin: 0; color: #d8c5e3; overflow-wrap: anywhere; }
.mystery-related-order { display: block; width: 100%; margin-top: 17px; padding: 12px; border: 1px solid #b8976540; border-radius: 5px; background: #a8865c0a; text-align: left; line-height: 1.8; overflow-wrap: anywhere; }
.mystery-related-order[hidden] { display: none; }
@media (max-width: 768px) {
    html[data-theme="dark"] :is(.xiaozi-auth-panel,.traveler-form-fields) .form-input,
    html[data-theme="dark"] .mystery-order-search input { font-size: 16px; }
    .password-visibility { width: 44px; }
    html[data-theme="dark"] .password-field .form-input { padding-right: 52px; }
}
@media (max-width: 650px) {
    .mystery-order-tools { align-items: stretch; flex-direction: column; gap: 12px; }
    .mystery-order-meta { flex-direction: column; gap: 1px; }
    .mystery-order-main .mystery-order-number { max-width: 100%; }
    .mystery-order-stats [data-metric="recent"]::after { display: none; }
    .mystery-order-filters { align-self: flex-start; max-width: 100%; }
    .mystery-order-search { width: 100%; }
}
@media (max-width: 520px) {
    /* 顶栏右侧收纳：语言按钮加入后，窄屏收紧间距与余额徽标宽度防横向溢出 */
    .topbar-right { gap: 4px; }
    .topbar-btn { padding: 8px; }
    .lang-toggle-label { font-size: 11px; }
    .topbar-balance { min-width: 0; padding: 4px 8px; }
    .topbar-balance strong { max-width: 64px; }
    /* 旅人档案按钮窄屏只留印章徽标，文字由 aria-label 与弹窗承载 */
    .traveler-account-btn { max-width: 40px; padding: 4px; }
    #travelerAccountName { display: none; }
    #xiaoziAuthModal { padding: 12px; }
    html[data-theme="dark"] .xiaozi-auth-modal { padding: 0; max-height: calc(100dvh - 24px); border-radius: 13px; }
    .xiaozi-auth-scroll { padding: 8px 22px 22px; }
    html[data-theme="dark"] .xiaozi-auth-brand { gap: 14px; padding-right: 18px; }
    html[data-theme="dark"] .xiaozi-auth-brand img { width: 52px; height: 52px; border-radius: 16px; }
    html[data-theme="dark"] .xiaozi-auth-brand .modal-title { font-size: 22px; }
    .traveler-account-btn { max-width: 105px; padding: 4px 8px 4px 4px; gap: 6px; font-size: 10px; }
    .traveler-account-seal { flex-basis: 24px; width: 24px; height: 24px; }
    #travelerAccountModal { padding: 12px; }
    html[data-theme="dark"] .traveler-account-modal { max-height: calc(100dvh - 24px); padding: 0; border-radius: 12px; }
    .traveler-account-scroll { padding: 0 21px 21px; }
    .traveler-account-header h2 { font-size: 23px; }
    .traveler-account-header .mystery-eyebrow { font-size: 7px; letter-spacing: .1em; }
    .traveler-portrait { margin-right: 14px; }
    .traveler-account-stats > div { padding: 14px; }
    .traveler-account-stats dd { font-size: 20px; }
    .mystery-order-filters button { gap: 5px; padding-inline: 10px; }
    .mystery-order-receipt { padding: 16px; }
    .mystery-receipt-heading { flex-wrap: wrap; gap: 10px; }
    .mystery-receipt-heading .mystery-receipt-copy { flex-basis: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid #b8976540; border-radius: 4px; background: #a8865c0a; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .traveler-account-btn, .traveler-password-disclosure summary > span:last-child { transition: none; }
}
/* 订单内按需展开的交付日志，不增加主导航页面。 */
.mystery-delivery-history { margin-top: 18px; border-top: 1px solid #b28cda33; padding-top: 16px; }
.mystery-delivery-history summary { cursor: pointer; color: #d7bced; font-size: 13px; line-height: 1.8; }
.mystery-delivery-event { padding: 14px 0; border-bottom: 1px solid #b28cda22; display: grid; gap: 7px; overflow-wrap: anywhere; }
.mystery-delivery-event strong { color: #d9c18f; font-size: 12px; font-weight: 500; }
.mystery-delivery-event time, .mystery-delivery-event p { font-size: 11px; line-height: 1.8; color: #b5a5c7; margin: 0; }
.mystery-delivery-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 16px; color: #b5a5c7; font-size: 12px; }

/* === 浅色主题 · 水晶舞台对比度修复（magic-room 区为暗色优先设计，白底下需加深文字与亮化玻璃） === */
[data-theme="light"] .crystal-question h1 { color: #3f2b5c; text-shadow: none; }
[data-theme="light"] .crystal-question .mystery-eyebrow { color: #8a6d2f; }
[data-theme="light"] .crystal-question .mystery-eyebrow::before,
[data-theme="light"] .crystal-question .mystery-eyebrow::after { background: linear-gradient(90deg, transparent, #b89a6280); }
[data-theme="light"] .crystal-wish-form { border-color: #b48ab166; background: linear-gradient(130deg, #ffffffeb, #f3ecfaeb); box-shadow: inset 0 1px 0 #ffffff, 0 10px 35px #7c4fa014; }
[data-theme="light"] .crystal-wish-form input { color: #2f2340; }
[data-theme="light"] .crystal-wish-form input::placeholder { color: #8d7f9e; }
[data-theme="light"] .crystal-wish-form button { border-color: #b48ab180; background: linear-gradient(135deg, #8a63a8, #5c3f74); }
[data-theme="light"] .crystal-feedback { color: #7d5f96; }
[data-theme="light"] .crystal-feedback[data-tone="error"] { color: #b4556b; }
[data-theme="light"] .mystery-card-hint { color: #7d6b90; }

/* === 极窄屏（≤359px）topbar 收缩：主题切换按钮常驻后整体仍不横向溢出。
       用 html[data-theme] 前缀对齐 magic-room 主题作用域规则的特异性（同特异性时靠后者胜） === */
@media (max-width: 359px) {
    html[data-theme] .topbar { padding-inline: 8px; }
    html[data-theme] .topbar-left { gap: 8px; }
    html[data-theme] .topbar-right { gap: 5px; }
    html[data-theme] .topbar-btn { padding: 7px; }
    html[data-theme] .topbar-right .btn.btn-glass { padding-left: 10px; padding-right: 10px; }
    html[data-theme] .topbar-balance { min-width: 0; max-width: 62px; padding: 7px 8px; }
    html[data-theme] .topbar-balance strong { max-width: 100%; }
}

/* ==================== 新手引导三步浮层 ==================== */
.onboarding-card { width: min(420px, 92vw); }
.onboarding-scroll { display: grid; gap: 12px; text-align: center; padding: 4px 2px 0; }
.onboarding-glyph {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; margin: 6px auto 0; border-radius: 50%;
    border: 1px solid #c79af540; background: radial-gradient(circle at 32% 28%, #6f4b9c2e, #2b1d3f66);
    color: #e2c9ff; font: 30px Georgia, serif; text-shadow: 0 0 18px #b98cf55e;
}
.onboarding-scroll .modal-title { font-family: var(--room-serif, Georgia, serif); letter-spacing: .04em; }
.onboarding-step-tag { margin: -6px 0 0; color: #c79af5b8; font-size: 12px; letter-spacing: .18em; }
.onboarding-text { margin: 0; color: var(--text-secondary, #b5a5c7); font-size: 14px; line-height: 2; text-wrap: pretty; }
.onboarding-dots { display: flex; justify-content: center; gap: 8px; padding-top: 14px; }
.onboarding-dot { width: 8px; height: 8px; border-radius: 999px; background: #9a7fc03d; transition: all var(--transition-fast, .2s ease); }
.onboarding-dot.is-past { background: #9a7fc066; }
.onboarding-dot.is-active { width: 22px; background: linear-gradient(90deg, #c79af5, #8a63d2); box-shadow: 0 0 10px #b98cf547; }
.onboarding-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 2px 0; }
.onboarding-nav { display: flex; gap: 8px; }
.onboarding-replay {
    margin-top: 12px; padding: 7px 16px; border: 1px solid #c79af533; border-radius: 999px;
    background: #2b1d3f4d; color: #cfa9f0; font-size: 13px; letter-spacing: .06em; cursor: pointer;
    transition: all var(--transition-fast, .2s ease);
}
.onboarding-replay:hover { border-color: #c79af566; color: #e6d3ff; background: #3a28566e; }
[data-theme="light"] .onboarding-replay { border-color: #8a63a84d; background: #f3ecfab0; color: #6a4a8c; }
[data-theme="light"] .onboarding-replay:hover { border-color: #8a63a880; background: #ece2f8; color: #4e3368; }
@media (max-width: 480px) {
    .onboarding-actions { flex-direction: column-reverse; align-items: stretch; }
    .onboarding-actions .btn { justify-content: center; }
}
@media (max-width: 359px) {
    html[data-theme] .onboarding-card { width: 96vw; }
}
[data-theme="light"] .onboarding-glyph { color: #6a4a8c; border-color: #8a63a83d; background: radial-gradient(circle at 32% 28%, #ead9f8, #d9c4ee); text-shadow: none; }
[data-theme="light"] .onboarding-step-tag { color: #8a63a8; }
[data-theme="light"] .onboarding-text { color: #55446a; }
[data-theme="light"] .onboarding-dot { background: #b9a6d080; }
[data-theme="light"] .onboarding-dot.is-active { background: linear-gradient(90deg, #8a5fc0, #6a46a0); box-shadow: 0 0 8px #a07fd230; }

/* ==================== 音效开关（神秘商店 header 内，随 header 显隐） ==================== */
.mystery-header-side { display: flex; align-items: flex-start; gap: 10px; }
.sound-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0;
    border: 1px solid #b28cda33; border-radius: 10px;
    background: #2b1d3f4d; color: #b5a5c7; cursor: pointer;
    transition: all var(--transition-fast, .2s ease);
}
.sound-toggle svg { width: 17px; height: 17px; }
.sound-toggle:hover { border-color: #c79af566; color: #e2c9ff; background: #3a28566e; }
.sound-toggle .icon-sound-on { display: none; }
.sound-toggle[aria-pressed="true"] { border-color: #c79af57a; color: #d9b8ff; background: #44306466; }
.sound-toggle[aria-pressed="true"] .icon-sound-off { display: none; }
.sound-toggle[aria-pressed="true"] .icon-sound-on { display: block; }
@media (max-width: 768px) {
    .sound-toggle { margin-top: 33px; }
}
@media (max-width: 430px) {
    .sound-toggle { margin-top: 0; }
}
[data-theme="light"] .sound-toggle { border-color: #8a63a84d; background: #f3ecfab0; color: #6a4a8c; }
[data-theme="light"] .sound-toggle:hover { border-color: #8a63a880; background: #ece2f8; color: #4e3368; }
[data-theme="light"] .sound-toggle[aria-pressed="true"] { border-color: #8a5fc099; background: #e6d8f6; color: #4e3368; }

/* ==================== 命运之书时间轴（订单页第二视图） ==================== */
.mystery-view-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #b28cda2e; border-radius: 999px; background: #2b1d3f3d; margin-top: 14px; width: fit-content; }
.mystery-view-switch button { padding: 7px 18px; border: 0; border-radius: 999px; background: transparent; color: #b5a5c7; font-size: 13px; letter-spacing: .04em; cursor: pointer; transition: all var(--transition-fast, .2s ease); }
.mystery-view-switch button:hover { color: #e2c9ff; }
.mystery-view-switch button[aria-pressed="true"] { background: linear-gradient(135deg, #6f4b9c, #4e3368); color: #f2e6ff; box-shadow: 0 4px 14px #7c4fa033; }
.fate-timeline { list-style: none; margin: 8px 0 0; padding: 4px 0 4px 28px; position: relative; }
.fate-timeline::before { content: ''; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, #c79af552, #8a63d21f); }
.fate-chapter { position: relative; padding-bottom: 28px; }
.fate-chapter:last-child { padding-bottom: 4px; }
.fate-chapter::before { content: ''; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d8b6ff, #7c52b4); box-shadow: 0 0 0 4px #7c52b42b, 0 0 12px #b98cf547; }
.fate-chapter-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.fate-chapter-heading h2 { margin: 0; color: #d8b4f1; font-family: var(--room-serif, Georgia, serif); font-size: 17px; letter-spacing: .06em; font-weight: 500; }
.fate-chapter-heading span { color: #b5a5c799; font-size: 12px; }
.fate-pages { display: grid; gap: 12px; }
.fate-page { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #b28cda26; border-radius: 12px; background: linear-gradient(135deg, #2b1d3f66, #1a10268c); transition: border-color var(--transition-fast, .2s ease); }
.fate-page:hover { border-color: #c79af55c; }
.fate-page-node { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid #c79af538; background: radial-gradient(circle at 32% 28%, #6f4b9c3d, #24163180); color: #e2c9ff; font-size: 15px; }
.fate-page-body { flex: 1; min-width: 0; }
.fate-page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fate-page-head strong { color: #e6d3ff; font-size: 15px; overflow-wrap: anywhere; }
.fate-page-status { padding: 3px 10px; border-radius: 999px; border: 1px solid #b28cda3d; color: #c8b3d8; font-size: 11px; letter-spacing: .05em; }
.fate-page-status[data-status="已入藏"] { border-color: #d4b27b66; color: #e8cd9a; }
.fate-page-status[data-status="已退款"] { border-color: #c76a8a5c; color: #e8a0b8; }
.fate-page-meta { margin: 6px 0 0; display: flex; gap: 12px; flex-wrap: wrap; color: #b5a5c7b8; font-size: 12px; }
[data-theme="light"] .mystery-view-switch { border-color: #8a63a83d; background: #f3ecfa80; }
[data-theme="light"] .mystery-view-switch button { color: #6a5a80; }
[data-theme="light"] .mystery-view-switch button:hover { color: #4e3368; }
[data-theme="light"] .mystery-view-switch button[aria-pressed="true"] { background: linear-gradient(135deg, #8a63a8, #5c3f74); color: #fdf7ff; }
[data-theme="light"] .fate-timeline::before { background: linear-gradient(180deg, #8a63a85c, #8a63a81f); }
[data-theme="light"] .fate-chapter::before { background: radial-gradient(circle at 35% 30%, #b78fe0, #6a46a0); box-shadow: 0 0 0 4px #8a63a826, 0 0 10px #8a63a833; }
[data-theme="light"] .fate-chapter-heading h2 { color: #4e3368; }
[data-theme="light"] .fate-chapter-heading span { color: #7d6b90; }
[data-theme="light"] .fate-page { border-color: #8a63a833; background: linear-gradient(135deg, #ffffffd9, #f4edfad9); }
[data-theme="light"] .fate-page:hover { border-color: #8a63a880; }
[data-theme="light"] .fate-page-node { border-color: #8a63a84d; background: radial-gradient(circle at 32% 28%, #ead9f8, #dcc8f0); color: #5c3f74; }
[data-theme="light"] .fate-page-head strong { color: #3f2b5c; }
[data-theme="light"] .fate-page-status { border-color: #8a63a84d; color: #6a5a80; }
[data-theme="light"] .fate-page-status[data-status="已入藏"] { border-color: #8a6d2f66; color: #7d5f1e; }
[data-theme="light"] .fate-page-status[data-status="已退款"] { border-color: #b4556b66; color: #96395a; }
[data-theme="light"] .fate-page-meta { color: #7d6b90; }
@media (max-width: 480px) {
    .fate-page { align-items: flex-start; flex-wrap: wrap; }
    .fate-page .mystery-order-detail { width: 100%; justify-content: center; }
}

/* ==================== 命运连击徽章（连续许愿签到） ==================== */
.mystery-streak-chip {
    display: inline-block; margin: 10px auto 0; padding: 6px 16px;
    border: 1px solid #d4b27b4d; border-radius: 999px;
    background: linear-gradient(135deg, #3c2a1f66, #2b1d3f66);
    color: #e8cd9a; font-size: 12px; letter-spacing: .08em; text-align: center;
}
.mystery-streak-chip[data-state="pending"] { border-color: #c79af566; background: #4430644d; color: #d9b8ff; }
.mystery-streak-chip[data-state="idle"] { border-color: #b28cda2e; background: #2b1d3f3d; color: #b5a5c7; }
.crystal-question .mystery-streak-chip { margin-top: 14px; }
[data-theme="light"] .mystery-streak-chip { border-color: #8a6d2f66; background: #f7f1e6; color: #7d5f1e; }
[data-theme="light"] .mystery-streak-chip[data-state="pending"] { border-color: #8a63a880; background: #f0e7fa; color: #5c3f74; }
[data-theme="light"] .mystery-streak-chip[data-state="idle"] { border-color: #8a63a84d; background: #f3ecfa; color: #6a5a80; }

/* ==================== 旅人档案 · 余额兑换区 ==================== */
.traveler-redeem-form { display: grid; gap: 8px; text-align: left; }
.traveler-redeem-form label { color: #cfa9f0; font-size: 13px; letter-spacing: .08em; }
.traveler-redeem-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; text-align: left; }
.traveler-redeem-feedback { margin: -6px 0 0; min-height: 1.4em; font-size: 12.5px; line-height: 1.6; color: #b5a5c7; text-align: left; }
.traveler-redeem-feedback[data-tone="success"] { color: #d9c18f; }
.traveler-redeem-feedback[data-tone="error"] { color: #e8a0b8; }
.traveler-redeem-transactions { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.traveler-redeem-transaction { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 8px 10px; border: 1px solid #b28cda1f; border-radius: 10px; background: #2b1d3f3d; }
.traveler-redeem-transaction strong { display: block; color: #ddc4ef; font-size: 13px; font-weight: 500; }
.traveler-redeem-transaction span { display: block; color: #b5a5c799; font-size: 11.5px; overflow-wrap: anywhere; }
.traveler-redeem-transaction time { color: #b5a5c780; font-size: 11px; white-space: nowrap; }
.traveler-redeem-transaction .traveler-redeem-delta { font-family: var(--font-mono, monospace); font-size: 13px; }
.traveler-redeem-transaction.is-income .traveler-redeem-delta { color: #e8cd9a; }
.traveler-redeem-transaction.is-expense .traveler-redeem-delta { color: #e8a0b8; }
.traveler-redeem-empty { color: #b5a5c799; font-size: 12.5px; text-align: center; padding: 12px 0 4px; }
[data-theme="light"] .traveler-redeem-form label { color: #6a4a8c; }
[data-theme="light"] .traveler-redeem-feedback { color: #6a5a80; }
[data-theme="light"] .traveler-redeem-feedback[data-tone="success"] { color: #7d5f1e; }
[data-theme="light"] .traveler-redeem-feedback[data-tone="error"] { color: #b4556b; }
[data-theme="light"] .traveler-redeem-transaction { border-color: #8a63a826; background: #f6f1fb; }
[data-theme="light"] .traveler-redeem-transaction strong { color: #3f2b5c; }
[data-theme="light"] .traveler-redeem-transaction span { color: #7d6b90; }
[data-theme="light"] .traveler-redeem-transaction time { color: #8d7f9e; }
[data-theme="light"] .traveler-redeem-empty { color: #7d6b90; }
@media (max-width: 480px) {
    .traveler-redeem-row { grid-template-columns: 1fr; }
}

/* ==================== B2 商品图集与富介绍 ==================== */
.mystery-detail-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin: -6px 0 22px; scrollbar-width: thin; }
.mystery-detail-thumb { flex: 0 0 auto; width: 58px; height: 58px; padding: 0; border: 1px solid #b38bd34d; border-radius: 10px; background: #100b19; cursor: pointer; overflow: hidden; transition: border-color .2s, transform .2s; }
.mystery-detail-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mystery-detail-thumb:hover { border-color: #d9b97699; transform: translateY(-1px); }
.mystery-detail-thumb[aria-current] { border-color: #d9b976; box-shadow: 0 0 10px #d9b97640; }
.mystery-detail-thumb:focus-visible { outline: 2px solid #d9b976; outline-offset: 2px; }
#mysteryDetailLongDescription h3 { margin: 20px 0 6px; color: #d4b8f2; font-size: 14px; letter-spacing: .06em; font-weight: 600; }
#mysteryDetailLongDescription ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
#mysteryDetailLongDescription li::marker { color: #d9b97699; }
#mysteryDetailLongDescription strong { color: #e8d5a4; font-weight: 600; }
#mysteryDetailLongDescription code { padding: 1px 6px; border: 1px solid #b38bd340; border-radius: 6px; background: #2b1d3f55; font-family: var(--font-mono, monospace); font-size: 11px; color: #d4c0df; }
[data-theme="light"] .mystery-detail-thumbs { scrollbar-color: #8a63a855 transparent; }
[data-theme="light"] .mystery-detail-thumb { border-color: #8a63a84d; background: #f6f1fb; }
[data-theme="light"] .mystery-detail-thumb:hover { border-color: #a8761f; }
[data-theme="light"] .mystery-detail-thumb[aria-current] { border-color: #a8761f; box-shadow: 0 0 8px #a8761f33; }
[data-theme="light"] #mysteryDetailLongDescription h3 { color: #6a4a8c; }
[data-theme="light"] #mysteryDetailLongDescription strong { color: #8a5d16; }
[data-theme="light"] #mysteryDetailLongDescription code { border-color: #8a63a840; background: #f0e9f8; color: #5c4470; }
@media (max-width: 480px) {
    .mystery-detail-thumb { width: 48px; height: 48px; }
}


/* ==================== B5 旅人评价 ==================== */
.mystery-detail-reviews { margin-top: 24px; border-top: 1px solid #b38bd333; padding-top: 18px; }
.mystery-detail-reviews h3 { margin: 0 0 12px; color: #d4b8f2; font-size: 14px; letter-spacing: .06em; font-weight: 600; }
.mystery-reviews-summary { margin-left: 8px; color: #d9b976; font-size: 12px; font-weight: 400; letter-spacing: 0; }
.mystery-review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mystery-review-list li { border: 1px solid #b28cda1f; border-radius: 12px; background: #2b1d3f3d; padding: 12px 14px; }
.mystery-review-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.mystery-review-stars-view { color: #d9b976; font-size: 13px; letter-spacing: 2px; }
.mystery-review-head strong { color: #ddc4ef; font-size: 12.5px; font-weight: 500; }
.mystery-review-head time { margin-left: auto; color: #b5a5c780; font-size: 11px; }
.mystery-review-list p { margin: 0; color: #b9a5c4; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.mystery-review-empty { color: #b5a5c799; font-size: 12px; text-align: center; padding: 14px 0; }
.mystery-review-own { border: 1px solid #d9b9764d; border-radius: 12px; background: #d9b9760d; padding: 12px 14px; }
.mystery-review-own strong { display: block; margin-bottom: 6px; color: #e8d5a4; font-size: 12.5px; font-weight: 500; }
.mystery-review-own p { margin: 0 0 6px; color: #d4c0df; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.mystery-review-own small { color: #b5a5c799; font-size: 11px; line-height: 1.7; }
.mystery-review-form { display: grid; gap: 10px; margin-top: 14px; }
.mystery-review-stars { display: flex; align-items: center; gap: 4px; }
.mystery-review-stars button { border: 0; background: none; color: #5c4470; font-size: 20px; line-height: 1; padding: 2px 4px; cursor: pointer; transition: color .15s, transform .15s; }
.mystery-review-stars button:hover { transform: scale(1.12); }
.mystery-review-stars button[aria-pressed="true"] { color: #d9b976; }
.mystery-review-stars button:focus-visible { outline: 2px solid #d9b976; outline-offset: 2px; border-radius: 4px; }
.mystery-review-stars span { margin-left: 8px; color: #d9b976; font-size: 12px; }
.mystery-review-form textarea { width: 100%; min-height: 64px; resize: vertical; }
.mystery-review-feedback { min-height: 1.4em; margin: 0; font-size: 12px; color: #b5a5c7; }
.mystery-review-feedback[data-tone="success"] { color: #d9c18f; }
.mystery-review-feedback[data-tone="error"] { color: #e8a0b8; }
.mystery-review-form .btn { justify-self: start; }
[data-theme="light"] .mystery-detail-reviews { border-color: #8a63a833; }
[data-theme="light"] .mystery-detail-reviews h3 { color: #6a4a8c; }
[data-theme="light"] .mystery-review-list li { border-color: #8a63a826; background: #f6f1fb; }
[data-theme="light"] .mystery-review-head strong { color: #3f2b5c; }
[data-theme="light"] .mystery-review-list p { color: #6a5a80; }
[data-theme="light"] .mystery-review-empty { color: #7d6b90; }
[data-theme="light"] .mystery-review-own { border-color: #a8761f4d; background: #a8761f0d; }
[data-theme="light"] .mystery-review-own strong { color: #8a5d16; }
[data-theme="light"] .mystery-review-own p { color: #5c4470; }
[data-theme="light"] .mystery-review-own small { color: #8d7f9e; }
[data-theme="light"] .mystery-review-stars button { color: #c9bfe0; }
[data-theme="light"] .mystery-review-stars button[aria-pressed="true"] { color: #a8761f; }
[data-theme="light"] .mystery-review-stars span { color: #a8761f; }
[data-theme="light"] .mystery-review-feedback { color: #6a5a80; }
[data-theme="light"] .mystery-review-feedback[data-tone="success"] { color: #7d5f1e; }
[data-theme="light"] .mystery-review-feedback[data-tone="error"] { color: #b4556b; }

/* ==================== B7 每日签到与活动日历 ==================== */
.traveler-checkin { border: 1px solid #b28cda26; border-radius: 12px; background: #2b1d3f26; padding: 14px; display: grid; gap: 10px; }
.traveler-checkin-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.traveler-checkin-head h3 { margin: 0; color: #d4b8f2; font-size: 13px; letter-spacing: .06em; font-weight: 600; }
.traveler-checkin-streak { color: #d9b976; font-size: 12px; }
.traveler-checkin-head .btn { margin-left: auto; }
.traveler-checkin-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.traveler-checkin-week { color: #b5a5c780; font-size: 10px; text-align: center; }
.traveler-checkin-day { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; background: #100c184d; color: #b5a5c799; font-size: 11px; font-variant-numeric: tabular-nums; }
.traveler-checkin-day.is-checked { background: #6b42905c; color: #eee0ff; box-shadow: inset 0 0 0 1px #ae80de66; }
.traveler-checkin-day.is-today { outline: 2px solid #d9b976; outline-offset: 1px; color: #f0e6ff; font-weight: 600; }
.traveler-festival-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.traveler-festival-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 10px; border: 1px solid #b28cda1f; border-radius: 10px; background: #100c184d; font-size: 12px; }
.traveler-festival-list li strong { color: #ddc4ef; font-weight: 500; }
.traveler-festival-list li span { color: #b5a5c780; }
.traveler-festival-list li[data-festival-today="true"] { border-color: #d9b97699; background: #d9b97614; }
.traveler-festival-list li[data-festival-today="true"] strong { color: #e8d5a4; }
[data-theme="light"] .traveler-checkin { border-color: #8a63a833; background: #f6f1fb; }
[data-theme="light"] .traveler-checkin-head h3 { color: #6a4a8c; }
[data-theme="light"] .traveler-checkin-day { background: #ffffffa8; color: #8d7f9e; }
[data-theme="light"] .traveler-checkin-day.is-checked { background: #e3d3f5; color: #4a3560; box-shadow: inset 0 0 0 1px #8a63a866; }
[data-theme="light"] .traveler-festival-list li { border-color: #8a63a826; background: #ffffffcc; }
[data-theme="light"] .traveler-festival-list li strong { color: #3f2b5c; }
[data-theme="light"] .traveler-festival-list li[data-festival-today="true"] { border-color: #a8761f99; background: #f5e9d2; }

/* ==================== B7 节日换肤（html data-festival，轻量色相偏移与角标） ==================== */
[data-festival="frost"] { --festival-accent: #7cc4e8; }
[data-festival="blossom"] { --festival-accent: #f0a3bf; }
[data-festival="fortune"] { --festival-accent: #e8564f; }
[data-festival="moonlight"] { --festival-accent: #e8d5a4; }
[data-festival="pumpkin"] { --festival-accent: #ef9a3c; }
[data-festival] .topbar { box-shadow: inset 0 -2px 0 var(--festival-accent, transparent); }
[data-festival] .topbar::after { content: '✦'; position: absolute; top: 4px; right: 10px; color: var(--festival-accent); font-size: 11px; opacity: .8; pointer-events: none; }
.topbar { position: relative; }
[data-festival] .crystal-scene { filter: hue-rotate(18deg) saturate(1.06); }
[data-festival="pumpkin"] .crystal-scene { filter: hue-rotate(-38deg) saturate(1.15); }
[data-festival="fortune"] .crystal-scene { filter: hue-rotate(-55deg) saturate(1.2); }
[data-theme="light"][data-festival] .topbar { box-shadow: inset 0 -2px 0 var(--festival-accent, transparent); }
@media (prefers-reduced-motion: reduce) { [data-festival] .crystal-scene { transition: none; } }
