/* ============================================================
   快递001 ExpressHub · 全局导航栏 & 智能助手样式 v2
   ============================================================ */

@import url('design-tokens.css');
@import url('components.css');
@import url('dashboard-base.css');

/* ---- 响应式基础变量 ---- */
:root {
    /* 基础尺寸变量 - 根据视口宽度动态调整 */
    --viewport-width: 1920;
    --scale-factor: 1;
    
    /* 导航栏尺寸 */
    --nav-height: 52px;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 56px;
    
    /* 容器宽度 */
    --container-max-width: 1600px;
    --container-min-width: 1200px;
    
    /* 间距变量 */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* 字体尺寸 */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.5rem;
    --font-2xl: 2rem;
    
    /* 卡片尺寸 */
    --card-radius: 12px;
    --card-padding: 20px;
}

/* ---- 大屏幕优化 (2K+) ---- */
@media (min-width: 2560px) {
    :root {
        --nav-height: 60px;
        --sidebar-width: 280px;
        --container-max-width: 2000px;
        --card-padding: 24px;
    }
}

@media (min-width: 3840px) {
    :root {
        --nav-height: 72px;
        --sidebar-width: 320px;
        --container-max-width: 2400px;
        --card-padding: 32px;
    }
}

/* ---- 小屏幕适配 ---- */
@media (max-width: 1366px) {
    :root {
        --container-max-width: 1400px;
    }
}

/* ---- 顶部导航栏 ---- */
.kuaidi-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--th-nav-bg);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--eh-border);
    box-shadow: var(--eh-shadow-xs);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    z-index: 99998;
    font-family: var(--eh-font-sans);
}

.kuaidi-nav-bar .nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kuaidi-nav-bar .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--eh-text-primary);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.kuaidi-nav-bar .brand .icon {
    width: 28px;
    height: 28px;
    background: var(--eh-grad-brand);
    border-radius: var(--eh-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--eh-text-inverse);
    font-weight: 800;
}

.kuaidi-nav-bar .breadcrumb {
    color: var(--eh-text-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kuaidi-nav-bar .breadcrumb .sep {
    color: var(--eh-text-faint);
}

.kuaidi-nav-bar .breadcrumb .current {
    color: var(--eh-text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kuaidi-nav-bar .nav-center {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.kuaidi-nav-bar .domain-link {
    padding: 6px 14px;
    color: var(--eh-text-muted);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--eh-radius-sm);
    transition: all var(--eh-duration);
    white-space: nowrap;
}

.kuaidi-nav-bar .domain-link:hover {
    background: var(--eh-brand-subtle);
    color: var(--eh-brand);
}

.kuaidi-nav-bar .nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kuaidi-nav-bar .quick-nav-btn {
    background: var(--eh-brand-subtle);
    border: 1px solid var(--eh-border-brand);
    border-radius: var(--eh-radius-md);
    color: var(--eh-brand);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kuaidi-nav-bar .quick-nav-btn:hover {
    background: var(--eh-brand-muted);
    border-color: var(--eh-brand);
}

.kuaidi-nav-bar .home-btn {
    background: transparent;
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-md);
    color: var(--eh-text-secondary);
    font-size: 12px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.kuaidi-nav-bar .home-btn:hover {
    background: var(--eh-brand-subtle);
    color: var(--eh-brand);
    border-color: var(--eh-border-strong);
}

/* 为 body 添加顶部 + 左侧 padding 避免被导航栏遮挡 */
body.kuaidi-nav-active {
    padding-top: var(--nav-height) !important;
    padding-left: var(--sidebar-width) !important;
    transition: padding-left 0.3s ease, padding-top 0.3s ease;
}

body.kuaidi-nav-active.sidebar-collapsed {
    padding-left: var(--sidebar-collapsed-width) !important;
}

body.kuaidi-nav-active.sidebar-hidden {
    padding-left: 0 !important;
}

/* 确保 body 可以占满视口高度 */
body.kuaidi-nav-active {
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- 左侧导航栏 ---- */
.kuaidi-sidebar {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--th-sidebar-bg);
    border-right: 1px solid var(--eh-border);
    z-index: 99997;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, transform 0.3s ease;
    font-family: var(--eh-font-sans);
    overflow: hidden;
    box-shadow: var(--eh-shadow-xs);
}

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

.kuaidi-sidebar.hidden {
    transform: translateX(-100%);
    width: 0;
}

.kuaidi-sidebar .sidebar-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--eh-shell-divider);
    flex-shrink: 0;
}

.kuaidi-sidebar .sidebar-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--eh-brand);
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
}

.kuaidi-sidebar .sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--eh-text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--eh-radius-sm);
    transition: 0.2s;
    flex-shrink: 0;
}

.kuaidi-sidebar .sidebar-toggle:hover {
    background: var(--eh-shell-hover);
    color: var(--eh-brand);
}

.kuaidi-sidebar .sidebar-search {
    padding: 10px 12px;
    flex-shrink: 0;
}

.kuaidi-sidebar .sidebar-search input {
    width: 100%;
    background: var(--eh-shell-input-bg);
    border: 1px solid var(--eh-shell-input-border);
    border-radius: var(--eh-radius-md);
    padding: 8px 12px;
    color: var(--eh-text-primary);
    font-size: 12px;
    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
}

.kuaidi-sidebar .sidebar-search input:focus {
    border-color: var(--eh-brand);
    box-shadow: 0 0 0 3px var(--eh-brand-subtle);
}

.kuaidi-sidebar .sidebar-search input::placeholder {
    color: var(--eh-text-faint);
}

.kuaidi-sidebar .sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
}

.kuaidi-sidebar .sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.kuaidi-sidebar .sidebar-content::-webkit-scrollbar-thumb {
    background: var(--eh-shell-scrollbar);
    border-radius: 10px;
}

.kuaidi-sidebar .domain-group {
    margin-bottom: 4px;
}

.kuaidi-sidebar .domain-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--eh-text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: 0.2s;
    user-select: none;
    white-space: nowrap;
}

.kuaidi-sidebar .domain-header:hover {
    background: var(--eh-shell-hover);
    color: var(--eh-text-secondary);
}

.kuaidi-sidebar .domain-header .domain-icon {
    width: 20px;
    text-align: center;
    font-size: 13px;
    flex-shrink: 0;
}

.kuaidi-sidebar .domain-header .domain-name {
    flex: 1;
}

.kuaidi-sidebar .domain-header .domain-count {
    font-size: 10px;
    color: var(--eh-text-faint);
    background: var(--eh-bg-muted);
    padding: 1px 7px;
    border-radius: 10px;
}

.kuaidi-sidebar .domain-header .chevron {
    font-size: 9px;
    transition: transform 0.25s;
    color: var(--eh-text-faint);
    flex-shrink: 0;
}

.kuaidi-sidebar .domain-group.open .chevron {
    transform: rotate(90deg);
}

.kuaidi-sidebar .domain-pages {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.kuaidi-sidebar .domain-group.open .domain-pages {
    max-height: 500px;
}

.kuaidi-sidebar .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px 7px 40px;
    color: var(--eh-text-secondary);
    font-size: 12px;
    text-decoration: none;
    transition: 0.2s;
    border-left: 2px solid transparent;
    position: relative;
    white-space: nowrap;
}

.kuaidi-sidebar .sidebar-item:hover {
    background: var(--eh-shell-hover);
    color: var(--eh-text-primary);
    border-left-color: var(--eh-border-strong);
}

.kuaidi-sidebar .sidebar-item.active {
    background: var(--eh-shell-active-bg);
    color: var(--eh-brand);
    border-left-color: var(--eh-brand);
    font-weight: 600;
}

.kuaidi-sidebar .sidebar-item .item-code {
    font-family: var(--eh-font-mono);
    font-size: 9px;
    font-weight: 700;
    color: var(--eh-brand);
    background: var(--eh-brand-subtle);
    padding: 2px 6px;
    border-radius: var(--eh-radius-sm);
    flex-shrink: 0;
}

.kuaidi-sidebar .sidebar-item .item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kuaidi-sidebar .sidebar-item .item-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--eh-border-strong);
    flex-shrink: 0;
}

.kuaidi-sidebar .sidebar-item.active .item-dot {
    background: var(--eh-brand);
    box-shadow: none;
}

/* Collapsed state styles */
.kuaidi-sidebar.collapsed .sidebar-title,
.kuaidi-sidebar.collapsed .sidebar-search,
.kuaidi-sidebar.collapsed .domain-name,
.kuaidi-sidebar.collapsed .domain-count,
.kuaidi-sidebar.collapsed .chevron,
.kuaidi-sidebar.collapsed .item-title,
.kuaidi-sidebar.collapsed .item-code {
    display: none;
}

.kuaidi-sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 12px 8px;
}

.kuaidi-sidebar.collapsed .domain-header {
    padding: 10px 16px;
    justify-content: center;
}

.kuaidi-sidebar.collapsed .sidebar-item {
    padding: 8px 0;
    justify-content: center;
    border-left: none;
}

.kuaidi-sidebar.collapsed .sidebar-item:hover {
    border-left: none;
    background: var(--eh-shell-hover);
}

.kuaidi-sidebar.collapsed .sidebar-item.active {
    border-left: none;
    background: var(--eh-shell-active-bg);
    box-shadow: inset 0 0 0 2px var(--eh-border-brand);
}

.kuaidi-sidebar.collapsed .domain-pages {
    display: none;
}

/* Sidebar bottom */
.kuaidi-sidebar .sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--eh-shell-divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.kuaidi-sidebar .sidebar-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--eh-text-muted);
    font-size: 10px;
}

.kuaidi-sidebar .sidebar-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--eh-success);
    box-shadow: none;
}

.kuaidi-sidebar-toggle {
    position: fixed;
    top: 60px;
    left: 8px;
    width: 36px;
    height: 36px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-md);
    color: var(--eh-brand);
    font-size: 14px;
    cursor: pointer;
    z-index: 99997;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--eh-shadow-sm);
    transition: 0.2s;
}

.kuaidi-sidebar-toggle:hover {
    background: var(--eh-bg-subtle);
    border-color: var(--eh-border-strong);
}

/* Filter state */
.kuaidi-sidebar .domain-group.hidden {
    display: none;
}

.kuaidi-sidebar .sidebar-item.hidden {
    display: none;
}

.kuaidi-sidebar .sidebar-item.access-denied {
    opacity: 0.42;
    cursor: not-allowed;
    filter: grayscale(0.35);
}
.kuaidi-sidebar .sidebar-item.access-denied:hover {
    background: transparent;
    border-color: transparent;
}
.kuaidi-sidebar .sidebar-item.access-denied .item-code {
    color: var(--eh-text-muted, #9ca3af);
}
.kuaidi-sidebar .sidebar-item.access-hidden {
    display: none !important;
}
.kuaidi-sidebar .domain-group.access-empty {
    display: none;
}
.kuaidi-sidebar .sidebar-access-btn {
    width: 100%;
    margin-bottom: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--eh-border, #e5e7eb);
    background: var(--eh-bg-subtle, #f9fafb);
    color: var(--eh-text-2, #6b7280);
    font-size: 11px;
    cursor: pointer;
    transition: 0.15s;
}
.kuaidi-sidebar .sidebar-access-btn:hover,
.kuaidi-sidebar .sidebar-access-btn.active {
    border-color: var(--eh-brand, #2563eb);
    color: var(--eh-brand, #2563eb);
    background: var(--eh-brand-subtle, rgba(37, 99, 235, 0.08));
}

/* ---- 页面切换下拉菜单 ---- */
.kuaidi-page-menu {
    position: fixed;
    top: 52px;
    left: 20px;
    right: 20px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-lg);
    box-shadow: var(--eh-shadow-lg);
    padding: 20px;
    z-index: 99997;
    display: none;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    font-family: var(--eh-font-sans);
}

.kuaidi-page-menu.open {
    display: block;
    animation: kuaidiMenuIn 0.25s ease;
}

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

.kuaidi-page-menu .menu-section {
    margin-bottom: 16px;
}

.kuaidi-page-menu .menu-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--eh-text-muted);
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--eh-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.kuaidi-page-menu .page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
}

.kuaidi-page-menu .page-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--eh-bg-subtle);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-md);
    color: var(--eh-text-secondary);
    font-size: 12px;
    text-decoration: none;
    transition: all 0.15s;
}

.kuaidi-page-menu .page-item:hover {
    background: var(--eh-brand-subtle);
    border-color: var(--eh-border-brand);
    color: var(--eh-brand);
}

.kuaidi-page-menu .page-item.active {
    background: var(--eh-brand-muted);
    border-color: var(--eh-border-brand);
    color: var(--eh-brand);
    font-weight: 600;
}

.kuaidi-page-menu .page-code {
    font-family: var(--eh-font-mono);
    font-size: 9px;
    font-weight: 600;
    color: var(--eh-brand);
    background: var(--eh-brand-subtle);
    padding: 2px 6px;
    border-radius: var(--eh-radius-sm);
    flex-shrink: 0;
}

.kuaidi-page-menu .page-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kuaidi-page-menu .close-menu {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--eh-text-muted);
    font-size: 18px;
    cursor: pointer;
}

.kuaidi-page-menu .close-menu:hover {
    color: var(--eh-danger);
}

/* ---- 智能助手 · Enterprise Office v3 ---- */
.assistant-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: var(--eh-font-sans);
}

.assistant-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 18px 0 14px;
    border: 1px solid var(--eh-border-brand);
    border-radius: var(--eh-radius-full);
    background: var(--eh-grad-brand);
    color: var(--eh-text-inverse);
    font-size: var(--eh-text-sm);
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--eh-shadow-brand);
    transition: transform var(--eh-duration) var(--eh-ease), box-shadow var(--eh-duration) var(--eh-ease);
}

.assistant-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--eh-shadow-md);
}

.assistant-toggle .asst-fab-inner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.assistant-toggle .asst-fab-text { letter-spacing: 0.02em; }

.assistant-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 420px;
    max-width: calc(100vw - 32px);
    max-height: min(680px, calc(100vh - 120px));
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-xl);
    box-shadow: var(--eh-shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: asstPanelIn 0.28s var(--eh-ease);
}

.assistant-panel.open { display: flex; }

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

.assistant-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--eh-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: var(--eh-grad-brand-soft);
}

.asst-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.asst-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--eh-radius-lg);
    background: var(--eh-grad-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: var(--eh-shadow-xs);
}

.asst-name {
    font-weight: 700;
    font-size: var(--eh-text-sm);
    color: var(--eh-text-primary);
    line-height: 1.3;
}

.asst-status {
    font-size: 11px;
    color: var(--eh-success);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-weight: 500;
}

.asst-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--eh-success);
    animation: asstBlink 1.6s ease-in-out infinite;
}

@keyframes asstBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.asst-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-md);
    background: var(--eh-surface-solid);
    color: var(--eh-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--eh-duration);
    flex-shrink: 0;
}

.asst-close:hover {
    color: var(--eh-danger);
    border-color: var(--eh-danger-muted);
    background: var(--eh-danger-muted);
}

.assistant-messages {
    flex: 1;
    padding: 14px 16px;
    overflow-y: auto;
    min-height: 180px;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--eh-bg-subtle);
}

.assistant-messages::-webkit-scrollbar { width: 4px; }
.assistant-messages::-webkit-scrollbar-thumb {
    background: var(--eh-shell-scrollbar);
    border-radius: var(--eh-radius-full);
}

.assistant-msg {
    display: flex;
    gap: 10px;
    font-size: var(--eh-text-sm);
    line-height: 1.55;
    animation: asstMsgIn 0.25s var(--eh-ease);
}

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

.asst-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--eh-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

.asst-msg-avatar.bot {
    background: var(--eh-brand-muted);
    color: var(--eh-brand);
}

.asst-msg-avatar.user {
    background: var(--eh-success-muted);
    color: var(--eh-success);
}

.assistant-msg .bubble {
    background: var(--eh-surface-solid);
    border-radius: var(--eh-radius-lg) var(--eh-radius-lg) var(--eh-radius-lg) var(--eh-radius-sm);
    padding: 10px 12px;
    color: var(--eh-text-secondary);
    border: 1px solid var(--eh-border);
    flex: 1;
    min-width: 0;
    box-shadow: var(--eh-shadow-xs);
}

.assistant-msg.user {
    flex-direction: row-reverse;
}

.assistant-msg.user .bubble {
    background: var(--eh-brand-subtle);
    border-color: var(--eh-border-brand);
    border-radius: var(--eh-radius-lg) var(--eh-radius-lg) var(--eh-radius-sm) var(--eh-radius-lg);
    color: var(--eh-text-primary);
}

.asst-welcome-title {
    font-weight: 700;
    font-size: var(--eh-text-sm);
    color: var(--eh-text-primary);
    margin-bottom: 4px;
}

.asst-welcome-desc {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--eh-text-muted);
}

.asst-demo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.asst-demo-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--eh-radius-full);
    background: var(--eh-brand-muted);
    color: var(--eh-brand);
    border: 1px solid var(--eh-border-brand);
}

.assistant-msg .bubble .hl { color: var(--eh-brand); font-weight: 600; }
.assistant-msg .bubble .hl-green { color: var(--eh-success); font-weight: 600; }

.asst-em { font-weight: 700; }
.asst-em.info { color: var(--eh-brand); }
.asst-em.success { color: var(--eh-success); }
.asst-em.danger { color: var(--eh-danger); }
.asst-muted { margin: 4px 0; font-size: 12px; color: var(--eh-text-muted); }
.asst-hint { font-size: 11px; color: var(--eh-text-faint); }

.assistant-msg .bubble .tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: var(--eh-radius-full);
    background: var(--eh-bg-muted);
    color: var(--eh-text-muted);
    margin-top: 8px;
    border: 1px solid var(--eh-border);
}

.asst-code, .qb-code {
    display: inline-block;
    font-family: var(--eh-font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--eh-radius-sm);
    background: var(--eh-brand-muted);
    color: var(--eh-brand);
    margin-right: 6px;
}

.asst-result-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
    padding: 8px 10px;
    background: var(--eh-bg-subtle);
    border-radius: var(--eh-radius-md);
    border: 1px solid var(--eh-border);
}

.asst-domain {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--domain-color, var(--eh-text-muted));
    font-weight: 600;
}

.assistant-msg .bubble .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.assistant-msg .bubble .actions button,
.asst-jump-item,
.asst-suggest {
    font-family: var(--eh-font-sans);
    cursor: pointer;
    transition: all var(--eh-duration);
}

.assistant-msg .bubble .actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-md);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--eh-text-secondary);
}

.assistant-msg .bubble .actions button:hover {
    border-color: var(--eh-border-brand);
    color: var(--eh-brand);
    background: var(--eh-brand-subtle);
}

.assistant-msg .bubble .actions button.primary {
    background: var(--eh-grad-brand);
    border-color: transparent;
    color: #fff;
}

.assistant-msg .bubble .actions button.primary:hover {
    box-shadow: var(--eh-shadow-brand);
    color: #fff;
}

.asst-suggest-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.asst-suggest {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-full);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    color: var(--eh-text-secondary);
}

.asst-suggest:hover {
    border-color: var(--eh-border-brand);
    background: var(--eh-brand-subtle);
    color: var(--eh-brand);
}

.asst-jump-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.asst-jump-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-md);
    padding: 8px 10px;
    font-size: 12px;
    color: var(--eh-text-secondary);
}

.asst-jump-item:hover {
    border-color: var(--eh-border-brand);
    background: var(--eh-brand-subtle);
}

.asst-jump-title { flex: 1; min-width: 0; }

.asst-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.asst-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--eh-font-sans);
    border-radius: var(--eh-radius-md);
    border: 1px solid var(--eh-border);
    background: var(--eh-surface-solid);
    color: var(--eh-text-secondary);
    cursor: pointer;
    transition: all var(--eh-duration);
}

.asst-btn:hover {
    border-color: var(--eh-border-brand);
    color: var(--eh-brand);
    background: var(--eh-brand-subtle);
}

.asst-btn-primary {
    background: var(--eh-grad-brand);
    border-color: transparent;
    color: #fff;
}

.asst-btn-primary:hover {
    color: #fff;
    box-shadow: var(--eh-shadow-brand);
}

.asst-btn-block { width: 100%; }
.asst-btn-sso {
    border-color: rgba(109, 40, 217, 0.25);
    color: #6d28d9;
    background: rgba(109, 40, 217, 0.06);
}

.asst-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.asst-input {
    width: 100%;
    background: var(--eh-shell-input-bg);
    border: 1px solid var(--eh-shell-input-border);
    border-radius: var(--eh-radius-md);
    padding: 8px 12px;
    color: var(--eh-text-primary);
    font-size: 12px;
    font-family: var(--eh-font-sans);
    outline: none;
    transition: border-color var(--eh-duration);
}

.asst-input:focus {
    border-color: var(--eh-brand);
    box-shadow: 0 0 0 3px var(--eh-brand-subtle);
}

.assistant-quick {
    padding: 10px 16px 12px;
    border-top: 1px solid var(--eh-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    max-height: 150px;
    overflow-y: auto;
    background: var(--eh-surface-solid);
}

.assistant-quick::-webkit-scrollbar { width: 3px; }
.assistant-quick::-webkit-scrollbar-thumb { background: var(--eh-shell-scrollbar); }

.asst-quick-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--eh-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.asst-quick-head i { color: var(--eh-brand); margin-right: 4px; }
.asst-quick-count {
    font-size: 10px;
    font-weight: 600;
    color: var(--eh-text-faint);
    text-transform: none;
    letter-spacing: 0;
}

.assistant-quick .quick-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.assistant-quick .group-label {
    font-size: 10px;
    color: var(--domain-color, var(--eh-text-muted));
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--eh-radius-sm);
    background: var(--eh-bg-subtle);
    border-left: 3px solid var(--domain-color, var(--eh-brand));
    white-space: nowrap;
}

.assistant-quick .quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-full);
    padding: 3px 10px 3px 6px;
    font-family: var(--eh-font-sans);
    font-size: 11px;
    font-weight: 500;
    color: var(--eh-text-secondary);
    cursor: pointer;
    transition: all var(--eh-duration);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assistant-quick .quick-btn .qb-code { margin-right: 4px; padding: 1px 5px; }

.assistant-quick .quick-btn:hover {
    border-color: var(--eh-border-brand);
    background: var(--eh-brand-subtle);
    color: var(--eh-brand);
}

.assistant-footer {
    border-top: 1px solid var(--eh-border);
    background: var(--eh-surface-solid);
    flex-shrink: 0;
}

.assistant-setting {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--eh-border);
}

.assistant-setting .set-label {
    font-size: 11px;
    color: var(--eh-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 600;
}

.assistant-setting .set-label i { color: var(--eh-brand); font-size: 10px; }

.assistant-setting .seg {
    display: flex;
    background: var(--eh-bg-muted);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-md);
    padding: 2px;
    gap: 2px;
}

.assistant-setting .seg button {
    border: none;
    background: transparent;
    color: var(--eh-text-muted);
    font-size: 11px;
    font-family: var(--eh-font-sans);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--eh-radius-sm);
    cursor: pointer;
    transition: all var(--eh-duration);
    white-space: nowrap;
}

.assistant-setting .seg button:hover { color: var(--eh-text-primary); }

.assistant-setting .seg button.active {
    color: var(--eh-brand);
    background: var(--eh-surface-solid);
    box-shadow: var(--eh-shadow-xs);
}

.assistant-setting .assist-auth-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    color: var(--eh-text-muted);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--eh-font-sans);
    padding: 5px 10px;
    border-radius: var(--eh-radius-md);
    cursor: pointer;
    transition: all var(--eh-duration);
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assistant-setting .assist-auth-btn:hover {
    border-color: var(--eh-border-brand);
    color: var(--eh-brand);
}

.assistant-setting .assist-auth-btn.logged {
    color: var(--eh-success);
    border-color: rgba(21, 128, 61, 0.25);
    background: var(--eh-success-muted);
}

.assistant-input {
    padding: 10px 16px 14px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.assistant-input input {
    flex: 1;
    background: var(--eh-shell-input-bg);
    border: 1px solid var(--eh-shell-input-border);
    border-radius: var(--eh-radius-full);
    padding: 9px 16px;
    color: var(--eh-text-primary);
    font-size: var(--eh-text-sm);
    font-family: var(--eh-font-sans);
    outline: none;
    transition: border-color var(--eh-duration), box-shadow var(--eh-duration);
    min-width: 0;
}

.assistant-input input:focus {
    border-color: var(--eh-brand);
    box-shadow: 0 0 0 3px var(--eh-brand-subtle);
}

.assistant-input input::placeholder { color: var(--eh-text-faint); }

.assistant-input .send-btn {
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all var(--eh-duration);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.assistant-input .send-voice {
    background: var(--eh-bg-muted);
    color: var(--eh-text-muted);
    border: 1px solid var(--eh-border);
}

.assistant-input .send-voice:hover {
    color: var(--eh-brand);
    border-color: var(--eh-border-brand);
    background: var(--eh-brand-subtle);
}

.assistant-input .send-primary {
    background: var(--eh-grad-brand);
    color: #fff;
    box-shadow: var(--eh-shadow-xs);
}

.assistant-input .send-primary:hover {
    transform: scale(1.04);
    box-shadow: var(--eh-shadow-brand);
}

.assistant-input .send-btn.listening {
    background: var(--eh-danger);
    color: #fff;
    border-color: transparent;
    animation: asstMicPulse 1.2s ease-out infinite;
}

@keyframes asstMicPulse {
    0% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.35); }
    100% { box-shadow: 0 0 0 10px rgba(185, 28, 28, 0); }
}

/* 遮罩层 */
.kuaidi-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99996;
    display: none;
    backdrop-filter: blur(4px);
}

.kuaidi-overlay.show { display: block; }

/* 响应式 */
@media (max-width: 768px) {
    body.kuaidi-nav-active {
        padding-left: 0 !important;
    }
    body.kuaidi-nav-active.sidebar-collapsed {
        padding-left: 0 !important;
    }
    .kuaidi-sidebar {
        transform: translateX(-100%);
        width: 240px !important;
    }
    .kuaidi-sidebar:not(.hidden) {
        transform: translateX(0);
    }
    .kuaidi-sidebar.collapsed {
        transform: translateX(-100%);
    }
    body.kuaidi-nav-active:not(.sidebar-hidden) .kuaidi-sidebar:not(.collapsed) {
        transform: translateX(0);
    }
    .kuaidi-sidebar-toggle {
        display: flex;
    }
    .kuaidi-nav-bar {
        padding: 0 12px;
        height: 48px;
    }
    .kuaidi-nav-bar .nav-center { display: none; }
    .kuaidi-nav-bar .breadcrumb .current { max-width: 120px; }
    
    .assistant-panel {
        width: calc(100vw - 24px);
        right: -4px;
        bottom: 56px;
        max-height: calc(100vh - 100px);
    }
    .assistant-toggle {
        height: 44px;
        padding: 0 14px 0 12px;
    }
    .assistant-toggle .asst-fab-text { display: none; }
    
    .kuaidi-page-menu {
        top: 48px;
        left: 12px;
        right: 12px;
        padding: 16px;
    }
}

/* ============================================================
   全局响应式容器与自适应布局
   ============================================================ */

/* 全局容器 - 自适应宽度 */
.kuaidi-container,
.container {
    width: 100%;
    max-width: var(--container-max-width);
    min-width: var(--container-min-width);
    margin: 0 auto;
    padding: clamp(16px, 2vw, 32px);
    box-sizing: border-box;
}

/* 全屏容器 - 大屏展示模式 */
.kuaidi-container-full {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(16px, 2vw, 32px);
    box-sizing: border-box;
}

/* 响应式 body 样式 */
body {
    /* 确保 body 可以完整占满视口 */
    min-height: 100vh;
    min-height: 100dvh;
}

/* 大屏幕优化样式 */
@media (min-width: 1920px) {
    .kuaidi-container,
    .container {
        max-width: calc(100vw - 60px);
    }
}

/* 超宽屏优化 (2K+) */
@media (min-width: 2560px) {
    .kuaidi-container,
    .container {
        max-width: var(--container-max-width);
    }
    
    /* 基础字号随屏幕增大 */
    body {
        font-size: 16px;
    }
}

/* 响应式卡片网格 */
.kuaidi-grid {
    display: grid;
    gap: clamp(12px, 1.5vw, 24px);
}

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

.kuaidi-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.kuaidi-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.kuaidi-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* 中屏幕适配 */
@media (max-width: 1600px) {
    .kuaidi-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 小屏幕适配 */
@media (max-width: 1200px) {
    .kuaidi-grid-4,
    .kuaidi-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 响应式卡片 */
.kuaidi-card {
    background: rgba(14, 14, 26, 0.85);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.kuaidi-card:hover {
    border-color: rgba(0, 240, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.08);
}

/* 响应式间距工具类 */
.kuaidi-spacer {
    height: clamp(16px, 2vh, 32px);
}

/* 响应式头部区域 */
.kuaidi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(8px, 1vw, 16px);
    padding-bottom: clamp(12px, 1.5vh, 24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: clamp(16px, 2vh, 32px);
}

/* 响应式标题 */
.kuaidi-title {
    font-size: clamp(20px, 2vw, 32px);
    font-weight: 700;
    line-height: 1.2;
}

.kuaidi-subtitle {
    font-size: clamp(12px, 1vw, 16px);
    color: #4a6a7a;
}

/* 响应式图表容器 */
.kuaidi-chart-container {
    position: relative;
    width: 100%;
    height: clamp(200px, 25vh, 350px);
}

.kuaidi-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* 响应式表格 */
.kuaidi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(12px, 0.9vw, 14px);
}

.kuaidi-table th,
.kuaidi-table td {
    padding: clamp(6px, 0.6vw, 12px) clamp(8px, 1vw, 16px);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* 响应式统计卡片 */
.kuaidi-stat-card {
    background: rgba(14, 14, 26, 0.6);
    border-radius: 10px;
    padding: clamp(12px, 1vw, 20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.kuaidi-stat-card .num {
    font-size: clamp(20px, 2vw, 32px);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.kuaidi-stat-card .label {
    font-size: clamp(11px, 0.9vw, 14px);
    color: #4a6a7a;
    margin-top: 4px;
}

/* 响应式按钮 */
.kuaidi-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 8px;
    color: #00f0ff;
    font-size: clamp(11px, 0.9vw, 13px);
    font-weight: 500;
    padding: clamp(6px, 0.5vw, 10px) clamp(12px, 1.2vw, 20px);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.kuaidi-btn:hover {
    background: rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.2);
}

/* ============================================================
   动态缩放机制 (通过 JS 设置 --scale-factor)
   用法: body { transform: scale(var(--scale-factor)); }
   ============================================================ */

/* 当 scale-factor 被 JS 设置时，应用缩放 */
body.scale-adjusted {
    transform-origin: top left;
    transition: transform 0.3s ease;
}

/* 防止缩放时出现滚动条问题 */
body.scale-adjusted {
    overflow: hidden;
}

#kuaidi-content-wrapper {
    overflow: auto;
    height: 100vh;
    height: 100dvh;
}

/* 大屏幕文字放大 */
@media (min-width: 2560px) {
    .kuaidi-title {
        font-size: clamp(28px, 1.5vw, 42px);
    }
    
    .kuaidi-stat-card .num {
        font-size: clamp(28px, 1.8vw, 44px);
    }
}

/* 4K 超高清屏优化 */
@media (min-width: 3840px) {
    :root {
        --nav-height: 80px;
        --sidebar-width: 360px;
        --container-max-width: 3200px;
    }
}

/* ============================================================
   主题系统 (Theme System) v1.0
   保留默认深色科技风, 补充多套可选主题:
   - dark      默认深色科技 (青绿)
   - dark-high 高对比深色 (提升识别度)
   - light     浅色简约 (白底)
   - eye-care  护眼豆沙绿 (低蓝光)
   - midnight  午夜蓝 (深蓝)
   - warm      暖阳米白 (暖色)
   ============================================================ */

/* ---- 语义色变量 (默认深色科技主题) ---- */
:root {
    --th-bg: #08080e;                     /* 页面背景 */
    --th-bg-2: #0a0a14;                   /* 次级背景 */
    --th-surface: rgba(10, 14, 26, 0.9);  /* 卡片/面板背景 */
    --th-surface-solid: #0c1220;          /* 弹层/实底 */
    --th-text: #e0e0e0;                   /* 主要文字 */
    --th-text-2: #b0c0d0;                 /* 次要文字 */
    --th-text-muted: #4a6a7a;             /* 弱化文字 */
    --th-accent: #00f0ff;                 /* 主强调色 */
    --th-accent-2: #00ffc8;               /* 次强调色 */
    --th-accent-3: #c084fc;               /* 第三强调(紫) */
    --th-border: rgba(0, 240, 255, 0.12); /* 主边框 */
    --th-border-soft: rgba(255, 255, 255, 0.06);
    --th-hover: rgba(0, 240, 255, 0.06);  /* 悬停背景 */
    --th-success: #00ffc8;
    --th-warning: #ffb400;
    --th-danger: #ff6b6b;
    --th-nav-bg: rgba(6, 6, 16, 0.95);
    --th-sidebar-bg: rgba(8, 8, 18, 0.97);
}

/* ---- 主题 0: 企业办公 (默认) ---- */
html[data-theme="express"] {
    --th-bg: #ffffff;
    --th-bg-2: #f7f8fa;
    --th-surface: #ffffff;
    --th-surface-solid: #ffffff;
    --th-text: #111827;
    --th-text-2: #374151;
    --th-text-muted: #6b7280;
    --th-accent: #2563eb;
    --th-accent-2: #15803d;
    --th-accent-3: #6d28d9;
    --th-border: #e5e7eb;
    --th-border-soft: #eef0f3;
    --th-hover: rgba(37, 99, 235, 0.06);
    --th-nav-bg: rgba(255, 255, 255, 0.98);
    --th-sidebar-bg: #fafbfc;
    --eh-bg-base: #ffffff;
    --eh-bg-elevated: #ffffff;
    --eh-bg-subtle: #f7f8fa;
    --eh-bg-muted: #eef0f3;
    --eh-surface: #ffffff;
    --eh-surface-solid: #ffffff;
    --eh-surface-hover: #f5f7fa;
    --eh-brand: #1d4ed8;
    --eh-brand-light: #2563eb;
    --eh-brand-muted: rgba(37, 99, 235, 0.1);
    --eh-brand-subtle: rgba(37, 99, 235, 0.06);
    --eh-text-primary: #111827;
    --eh-text-secondary: #374151;
    --eh-text-muted: #6b7280;
    --eh-text-faint: #9ca3af;
    --eh-border: #e5e7eb;
    --eh-border-strong: #d1d5db;
    --eh-grad-mesh: #ffffff;
    --eh-shell-divider: #e5e7eb;
    --eh-shell-input-bg: #ffffff;
    --eh-shell-input-border: #d1d5db;
    --eh-shell-hover: rgba(37, 99, 235, 0.06);
    --eh-shell-active-bg: rgba(37, 99, 235, 0.1);
    --eh-shell-scrollbar: #d1d5db;
}

/* ---- 主题 0b: 浅灰办公 ---- */
html[data-theme="office-gray"] {
    --th-bg: #f0f2f5;
    --th-bg-2: #e8eaed;
    --th-surface: #ffffff;
    --th-surface-solid: #ffffff;
    --th-text: #111827;
    --th-text-2: #374151;
    --th-text-muted: #6b7280;
    --th-accent: #2563eb;
    --th-accent-2: #15803d;
    --th-accent-3: #6d28d9;
    --th-border: #e5e7eb;
    --th-border-soft: #e8eaed;
    --th-hover: rgba(37, 99, 235, 0.06);
    --th-nav-bg: rgba(255, 255, 255, 0.96);
    --th-sidebar-bg: #f5f6f8;
    --eh-bg-base: #f0f2f5;
    --eh-bg-elevated: #ffffff;
    --eh-bg-subtle: #f5f6f8;
    --eh-bg-muted: #e8eaed;
    --eh-grad-mesh: #f0f2f5;
}

/* ---- 主题 1: 深色科技 (经典) ---- */
html[data-theme="dark"] {
    --th-bg: #08080e;
    --th-bg-2: #0a0a14;
    --th-surface: rgba(10, 14, 26, 0.9);
    --th-surface-solid: #0c1220;
    --th-text: #e0e0e0;
    --th-text-2: #b0c0d0;
    --th-text-muted: #4a6a7a;
    --th-accent: #00f0ff;
    --th-accent-2: #00ffc8;
    --th-accent-3: #c084fc;
    --th-border: rgba(0, 240, 255, 0.12);
    --th-border-soft: rgba(255, 255, 255, 0.06);
    --th-hover: rgba(0, 240, 255, 0.06);
    --th-success: #00ffc8;
    --th-warning: #ffb400;
    --th-danger: #ff6b6b;
    --th-nav-bg: rgba(6, 6, 16, 0.95);
    --th-sidebar-bg: rgba(8, 8, 18, 0.97);
}

/* ---- 主题 2: 高对比深色 (解决视觉识别困难) ---- */
html[data-theme="dark-high"] {
    --th-bg: #0a0a0f;
    --th-bg-2: #0d0d14;
    --th-surface: rgba(16, 16, 26, 0.96);
    --th-surface-solid: #10101a;
    --th-text: #f5f5f7;
    --th-text-2: #cfd4de;
    --th-text-muted: #8a93a6;
    --th-accent: #4dd8ff;
    --th-accent-2: #3dffc8;
    --th-accent-3: #c79aff;
    --th-border: rgba(77, 216, 255, 0.22);
    --th-border-soft: rgba(255, 255, 255, 0.12);
    --th-hover: rgba(77, 216, 255, 0.12);
    --th-nav-bg: rgba(10, 10, 16, 0.98);
    --th-sidebar-bg: rgba(12, 12, 20, 0.98);
}

/* ---- 主题 3: 浅色简约 (白底) ---- */
html[data-theme="light"] {
    --th-bg: #f5f7fa;
    --th-bg-2: #eef1f5;
    --th-surface: #ffffff;
    --th-surface-solid: #ffffff;
    --th-text: #1f2430;
    --th-text-2: #3d4553;
    --th-text-muted: #8a93a6;
    --th-accent: #2563eb;
    --th-accent-2: #059669;
    --th-accent-3: #7c3aed;
    --th-border: #e5e7eb;
    --th-border-soft: #eef1f5;
    --th-hover: rgba(37, 99, 235, 0.06);
    --th-success: #059669;
    --th-warning: #d97706;
    --th-danger: #dc2626;
    --th-nav-bg: rgba(255, 255, 255, 0.92);
    --th-sidebar-bg: rgba(250, 251, 252, 0.98);
}

/* ---- 主题 4: 护眼豆沙绿 (低蓝光, 柔和) ---- */
html[data-theme="eye-care"] {
    --th-bg: #eef2e6;
    --th-bg-2: #e6ecda;
    --th-surface: #f6f8f0;
    --th-surface-solid: #f8faf2;
    --th-text: #3a4332;
    --th-text-2: #55604a;
    --th-text-muted: #8a937c;
    --th-accent: #4a7c59;
    --th-accent-2: #6a9c6b;
    --th-accent-3: #7c6a9c;
    --th-border: #d5ddca;
    --th-border-soft: #e2e8d8;
    --th-hover: rgba(74, 124, 89, 0.08);
    --th-success: #4a7c59;
    --th-warning: #b8860b;
    --th-danger: #c05b4d;
    --th-nav-bg: rgba(238, 242, 230, 0.96);
    --th-sidebar-bg: rgba(230, 236, 218, 0.98);
}

/* ---- 主题 5: 午夜蓝 (深蓝护眼) ---- */
html[data-theme="midnight"] {
    --th-bg: #0d1b2a;
    --th-bg-2: #10202f;
    --th-surface: rgba(19, 38, 58, 0.96);
    --th-surface-solid: #13263a;
    --th-text: #e0e1dd;
    --th-text-2: #a8b6c4;
    --th-text-muted: #5f7183;
    --th-accent: #4da3ff;
    --th-accent-2: #3ddbd9;
    --th-accent-3: #9f8fff;
    --th-border: rgba(77, 163, 255, 0.2);
    --th-border-soft: rgba(255, 255, 255, 0.08);
    --th-hover: rgba(77, 163, 255, 0.1);
    --th-nav-bg: rgba(13, 27, 42, 0.97);
    --th-sidebar-bg: rgba(15, 30, 47, 0.98);
}

/* ---- 主题 6: 暖阳米白 (暖色) ---- */
html[data-theme="warm"] {
    --th-bg: #fdf6ec;
    --th-bg-2: #f9efe0;
    --th-surface: #fffaf2;
    --th-surface-solid: #fffdf8;
    --th-text: #4a3f35;
    --th-text-2: #6b5d4f;
    --th-text-muted: #a39480;
    --th-accent: #e07a5f;
    --th-accent-2: #d4a373;
    --th-accent-3: #a86f8a;
    --th-border: #eadfcd;
    --th-border-soft: #f2e9d9;
    --th-hover: rgba(224, 122, 95, 0.08);
    --th-success: #7a9c6b;
    --th-warning: #d9a13c;
    --th-danger: #c05b4d;
    --th-nav-bg: rgba(253, 246, 236, 0.96);
    --th-sidebar-bg: rgba(249, 239, 224, 0.98);
}

/* ---- 主题 7: 专业青绿 · 浅色 (复刻 governix Teal+Slate) ---- */
html[data-theme="teal"] {
    --th-bg: #f8fafc;
    --th-bg-2: #eef2f6;
    --th-surface: #ffffff;
    --th-surface-solid: #ffffff;
    --th-text: #1e293b;
    --th-text-2: #475569;
    --th-text-muted: #64748b;
    --th-accent: #0f766e;
    --th-accent-2: #14b8a6;
    --th-accent-3: #2dd4bf;
    --th-border: #e2e8f0;
    --th-border-soft: #eef1f5;
    --th-hover: rgba(15, 118, 110, 0.08);
    --th-success: #059669;
    --th-warning: #d97706;
    --th-danger: #dc2626;
    --th-nav-bg: rgba(248, 250, 252, 0.95);
    --th-sidebar-bg: rgba(248, 250, 252, 0.98);
}

/* ---- 主题 8: 专业青绿 · 深色 Slate ---- */
html[data-theme="teal-dark"] {
    --th-bg: #0f172a;
    --th-bg-2: #1e293b;
    --th-surface: rgba(30, 41, 59, 0.96);
    --th-surface-solid: #1e293b;
    --th-text: #f1f5f9;
    --th-text-2: #cbd5e1;
    --th-text-muted: #94a3b8;
    --th-accent: #2dd4bf;
    --th-accent-2: #14b8a6;
    --th-accent-3: #5eead4;
    --th-border: rgba(45, 212, 191, 0.22);
    --th-border-soft: rgba(255, 255, 255, 0.08);
    --th-hover: rgba(45, 212, 191, 0.12);
    --th-success: #34d399;
    --th-warning: #fbbf24;
    --th-danger: #f87171;
    --th-nav-bg: rgba(15, 23, 42, 0.97);
    --th-sidebar-bg: rgba(20, 28, 45, 0.98);
}

/* ---- 主题 9: 护眼青绿 (低蓝光) ---- */
html[data-theme="eye-teal"] {
    --th-bg: #ecfdf5;
    --th-bg-2: #d1fae5;
    --th-surface: #ffffff;
    --th-surface-solid: #f0fdfa;
    --th-text: #134e4a;
    --th-text-2: #2f6b63;
    --th-text-muted: #5f8a82;
    --th-accent: #0f766e;
    --th-accent-2: #14b8a6;
    --th-accent-3: #2dd4bf;
    --th-border: #c7e8e0;
    --th-border-soft: #ddf0ea;
    --th-hover: rgba(15, 118, 110, 0.08);
    --th-success: #0f766e;
    --th-warning: #b8860b;
    --th-danger: #c05b4d;
    --th-nav-bg: rgba(236, 253, 245, 0.96);
    --th-sidebar-bg: rgba(222, 247, 236, 0.98);
}

/* ============================================================
   主题通用覆盖规则 (设置 data-theme 后生效)
   覆盖全局组件 + 各驾驶舱通用卡片的硬编码深色
   ============================================================ */

/* 页面基底 */
html[data-theme] body {
    background: var(--th-bg) !important;
    color: var(--th-text) !important;
}

/* 全局顶部导航栏 */
html[data-theme] .kuaidi-nav-bar {
    background: var(--th-nav-bg) !important;
    border-bottom-color: var(--th-border) !important;
}
html[data-theme] .kuaidi-nav-bar .brand,
html[data-theme] .kuaidi-nav-bar .breadcrumb .current {
    color: var(--th-text) !important;
}
html[data-theme] .kuaidi-nav-bar .domain-link,
html[data-theme] .kuaidi-nav-bar .quick-nav-btn,
html[data-theme] .kuaidi-nav-bar .home-btn {
    color: var(--th-text-2) !important;
    border-color: var(--th-border) !important;
}
html[data-theme] .kuaidi-nav-bar .theme-btn {
    color: var(--th-text-2) !important;
}
html[data-theme] .kuaidi-nav-bar .theme-btn:hover {
    color: var(--th-accent) !important;
    background: var(--th-hover) !important;
}
html[data-theme] .kuaidi-nav-bar .domain-link:hover,
html[data-theme] .kuaidi-nav-bar .quick-nav-btn:hover,
html[data-theme] .kuaidi-nav-bar .home-btn:hover {
    color: var(--th-accent) !important;
    background: var(--th-hover) !important;
}

/* 全局侧边栏 */
html[data-theme] .kuaidi-sidebar {
    background: var(--th-sidebar-bg) !important;
    border-right-color: var(--th-border) !important;
}
html[data-theme] .kuaidi-sidebar .sidebar-title {
    color: var(--th-accent) !important;
}
html[data-theme] .kuaidi-sidebar .domain-name {
    color: var(--th-text) !important;
}
html[data-theme] .kuaidi-sidebar .domain-count {
    color: var(--th-text-muted) !important;
}
html[data-theme] .kuaidi-sidebar .sidebar-item {
    color: var(--th-text-2) !important;
}
html[data-theme] .kuaidi-sidebar .sidebar-item:hover {
    color: var(--th-accent) !important;
    background: var(--th-hover) !important;
}
html[data-theme] .kuaidi-sidebar .sidebar-item.active {
    color: var(--th-accent) !important;
    background: var(--th-hover) !important;
}
html[data-theme] .kuaidi-sidebar .sidebar-search input {
    background: var(--th-bg-2) !important;
    color: var(--th-text) !important;
    border-color: var(--th-border) !important;
}
html[data-theme] .kuaidi-sidebar .sidebar-status {
    color: var(--th-text-muted) !important;
}

/* 全局智能助手 */
html[data-theme] .assistant-float,
html[data-theme] .assistant-panel {
    background: var(--th-surface-solid) !important;
    border-color: var(--th-border) !important;
}
html[data-theme] .assistant-panel {
    background: var(--th-surface-solid) !important;
}
html[data-theme] .assistant-header .info .name {
    color: var(--th-text) !important;
}
html[data-theme] .assistant-header .info .status {
    color: var(--th-text-muted) !important;
}
html[data-theme] .assistant-msg .bubble {
    color: var(--th-text) !important;
    background: var(--th-bg-2) !important;
}
html[data-theme] .assistant-msg.user .bubble {
    background: var(--th-hover) !important;
    color: var(--th-text) !important;
}
html[data-theme] .assistant-input input {
    background: var(--th-bg-2) !important;
    color: var(--th-text) !important;
    border-color: var(--th-border) !important;
}

/* 驾驶舱通用卡片 (覆盖各页面硬编码深色) */
html[data-theme] .stat-card,
html[data-theme] .kpi-card,
html[data-theme] .card,
html[data-theme] .panel,
html[data-theme] .panel-card,
html[data-theme] .matrix-card,
html[data-theme] .chart-card {
    background: var(--th-surface) !important;
    border-color: var(--th-border) !important;
    color: var(--th-text) !important;
}
html[data-theme] .stat-card:hover,
html[data-theme] .card:hover,
html[data-theme] .panel:hover,
html[data-theme] .matrix-card:hover {
    border-color: var(--th-accent) !important;
}

/* 页头 / 标题 */
html[data-theme] .page-header,
html[data-theme] .page-head {
    color: var(--th-text) !important;
}
html[data-theme] .page-header .sub,
html[data-theme] .page-head .sub {
    color: var(--th-text-muted) !important;
}
html[data-theme] .page-header .title,
html[data-theme] .page-head .title {
    color: var(--th-text) !important;
}

/* 卡片内文字 */
html[data-theme] .card-title,
html[data-theme] .panel .t,
html[data-theme] .matrix-card .t {
    color: var(--th-accent) !important;
}
html[data-theme] .label,
html[data-theme] .sub,
html[data-theme] .desc {
    color: var(--th-text-muted) !important;
}
html[data-theme] .num,
html[data-theme] .value {
    color: var(--th-text) !important;
}

/* 表格 */
html[data-theme] table th {
    color: var(--th-text-muted) !important;
    border-color: var(--th-border-soft) !important;
}
html[data-theme] table td {
    color: var(--th-text) !important;
    border-color: var(--th-border-soft) !important;
}
html[data-theme] table tr:hover td {
    background: var(--th-hover) !important;
}

/* 页脚 */
html[data-theme] .footer {
    color: var(--th-text-muted) !important;
    border-top-color: var(--th-border-soft) !important;
}

/* 输入框/按钮通用 */
html[data-theme] input,
html[data-theme] select {
    background: var(--th-bg-2) !important;
    color: var(--th-text) !important;
    border-color: var(--th-border) !important;
}
html[data-theme] .btn,
html[data-theme] .mini-btn {
    color: var(--th-accent) !important;
    border-color: var(--th-border) !important;
    background: var(--th-hover) !important;
}

/* ============================================================
   主题切换面板
   ============================================================ */
.theme-panel {
    position: fixed;
    top: var(--nav-height);
    right: 16px;
    width: 300px;
    max-width: 92vw;
    background: var(--th-surface-solid);
    border: 1px solid var(--th-border);
    border-radius: 14px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
    z-index: 100000;
    padding: 16px;
    color: var(--th-text);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    display: none;
}
.theme-panel.open { display: block; }
.theme-panel .tp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.theme-panel .tp-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--th-accent);
}
.theme-panel .tp-close {
    cursor: pointer;
    color: var(--th-text-muted);
    font-size: 16px;
    border: none;
    background: none;
}
.theme-panel .tp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.theme-panel .tp-item {
    border: 1px solid var(--th-border);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.theme-panel .tp-item:hover {
    border-color: var(--th-accent);
    background: var(--th-hover);
}
.theme-panel .tp-item.active {
    border-color: var(--th-accent);
    background: var(--th-hover);
}
.theme-panel .tp-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
}
.theme-panel .tp-name {
    font-weight: 600;
    color: var(--th-text);
}
.theme-panel .tp-desc {
    font-size: 10px;
    color: var(--th-text-muted);
}
.theme-panel .tp-custom {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--th-border);
}
.theme-panel .tp-custom label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--th-text-2);
}
.theme-panel .tp-custom input[type="color"] {
    width: 40px;
    height: 26px;
    border: 1px solid var(--th-border);
    border-radius: 6px;
    background: transparent;
    padding: 0;
    cursor: pointer;
}
.theme-panel .tp-custom .reset-btn {
    width: 100%;
    padding: 6px;
    border: 1px solid var(--th-border);
    border-radius: 8px;
    background: transparent;
    color: var(--th-text-muted);
    cursor: pointer;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
}
.theme-panel .tp-custom .reset-btn:hover {
    color: var(--th-danger);
    border-color: var(--th-danger);
}

.theme-panel .tp-preview {
    margin-top: 10px;
    padding: 8px 10px;
    background: var(--th-bg-2);
    border: 1px solid var(--th-border);
    border-radius: 8px;
    font-size: 10px;
    color: var(--th-text-muted);
    line-height: 1.5;
    font-family: var(--eh-font-mono, monospace);
}

.theme-panel .tp-custom-hint {
    font-size: 10px;
    color: var(--th-text-muted);
    margin-top: 6px;
    line-height: 1.45;
}

/* 导航栏主题按钮 */
.kuaidi-nav-bar .theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    color: #8a9aaa;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
}
.kuaidi-nav-bar .theme-btn:hover {
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.06);
}

/* 侧边栏主题按钮 (覆盖首页等无导航栏的页面) */
.sidebar-theme-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 8px;
    background: rgba(0, 240, 255, 0.05);
    color: #8a9aaa;
    font-size: 11px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Inter', sans-serif;
}
.sidebar-theme-btn:hover {
    color: #00f0ff;
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.1);
}
html[data-theme] .sidebar-theme-btn {
    color: var(--th-text-2) !important;
    border-color: var(--th-border) !important;
    background: var(--th-hover) !important;
}

/* F-W0 页面权限拒绝提示 */
.kuaidi-access-deny-toast {
    position: fixed;
    top: 56px;
    right: 20px;
    z-index: 100020;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.kuaidi-access-deny-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.kuaidi-access-deny-toast .deny-login-btn {
    align-self: flex-start;
    border: 1px solid #f87171;
    background: #fff;
    color: #b91c1c;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.kuaidi-access-deny-toast .deny-login-btn:hover {
    background: #fee2e2;
}

/* 门户顶栏鉴权：菜单 + 登录弹层 */
.user-profile {
    position: relative;
}
.user-profile .user-caret {
    font-size: 10px;
    color: var(--text-3, #94a3b8);
    margin-left: 2px;
    transition: transform 0.15s ease;
}
.user-profile[aria-expanded="true"] .user-caret {
    transform: rotate(180deg);
}
.user-profile.is-guest .user-avatar {
    background: #64748b;
}
.hdr-user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    z-index: 100030;
}
.hdr-user-menu.show { display: block; }
.hdr-user-menu .hdr-menu-meta {
    padding: 8px 10px 10px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 6px;
}
.hdr-user-menu .hdr-menu-meta b {
    display: block;
    font-size: 13px;
    color: #0f172a;
}
.hdr-user-menu .hdr-menu-meta span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #64748b;
}
.hdr-user-menu button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    text-align: left;
}
.hdr-user-menu button:hover { background: #f8fafc; }
.hdr-user-menu button.primary { color: #0f766e; font-weight: 600; }
.hdr-user-menu button.danger { color: #b91c1c; }

.kuaidi-auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100040;
    align-items: center;
    justify-content: center;
}
.kuaidi-auth-modal.show { display: flex; }
.kuaidi-auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.kuaidi-auth-panel {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px 22px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
    z-index: 1;
}
.kuaidi-auth-x {
    position: absolute;
    top: 12px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
}
.kuaidi-auth-head { text-align: center; margin-bottom: 18px; }
.kuaidi-auth-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
    font-size: 18px;
}
.kuaidi-auth-head h2 {
    margin: 0 0 6px;
    font-size: 18px;
    color: #0f172a;
}
.kuaidi-auth-head p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}
.kuaidi-auth-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}
.kuaidi-auth-form input {
    display: block;
    width: 100%;
    margin-top: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    box-sizing: border-box;
}
.kuaidi-auth-form input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.kuaidi-auth-err {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12px;
}
.kuaidi-auth-submit {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 11px 14px;
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.kuaidi-auth-submit:disabled { opacity: 0.65; cursor: wait; }
.kuaidi-auth-demos {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}
.kuaidi-auth-demo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    text-align: left;
}
.kuaidi-auth-demo:hover { border-color: #99f6e4; background: #f0fdfa; }
.kuaidi-auth-demo b { font-size: 12px; color: #0f766e; }
.kuaidi-auth-demo span { font-size: 11px; color: #64748b; }
.kuaidi-auth-sso {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kuaidi-auth-sso-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f766e;
    text-align: center;
}
.kuaidi-auth-sso-hint {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    margin: 0;
}
.kuaidi-auth-sso-btn {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 13px;
    cursor: pointer;
}
.kuaidi-auth-sso-btn:hover { background: #ccfbf1; }
html[data-theme] .sidebar-theme-btn:hover {
    color: var(--th-accent) !important;
    border-color: var(--th-accent) !important;
}
