/* ═══════════════════════════════════════════════════════════════
   TMSdevpDash · 现代化商务主题 v2
   设计语言：
     · 主色 蓝 (深蓝 #0055A4) · 辅色 青 (#00A0B0)
     · 中性色 slate 色阶
     · 语义色：成功/警告/危险/信息
     · 柔和阴影 + 微圆角 + 1.2x 行高
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* 主色 / 品牌 */
    --brand-primary:      #0055A4;
    --brand-primary-10:   rgba(0,85,164,0.08);
    --brand-primary-20:   rgba(0,85,164,0.15);
    --brand-dark:         #003d7a;
    --brand-light:        #4a8fc9;
    --brand-cyan:         #00A0B0;

    /* 语义色 */
    --success:            #10b981;
    --success-light:      #dcfce7;
    --warning:            #f59e0b;
    --warning-light:      #fef3c7;
    --danger:             #dc2626;
    --danger-light:       #fee2e2;
    --info:               #3b82f6;
    --info-light:         #dbeafe;

    /* 中性 slate */
    --slate-50:           #f8fafc;
    --slate-100:          #f1f5f9;
    --slate-200:          #e5e7eb;
    --slate-300:          #cbd5e1;
    --slate-400:          #94a3b8;
    --slate-500:          #64748b;
    --slate-600:          #475569;
    --slate-700:          #334155;
    --slate-800:          #1e293b;
    --slate-900:          #0f172a;

    /* 层次色（页面背景 / 卡片 / 分隔） */
    --bg-page:            #f6f8fb;
    --bg-card:            #ffffff;
    --bg-subtle:          #f8fafc;
    --border-subtle:      #e5e7eb;
    --border-normal:      #cbd5e1;

    /* 阴影三级 */
    --shadow-sm:          0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.03);
    --shadow-md:          0 4px 6px -1px rgba(15,23,42,0.06), 0 2px 4px -2px rgba(15,23,42,0.04);
    --shadow-lg:          0 10px 15px -3px rgba(15,23,42,0.08), 0 4px 6px -4px rgba(15,23,42,0.05);
    --shadow-primary:     0 4px 12px rgba(0,85,164,0.12);

    /* 圆角 */
    --radius-sm:          6px;
    --radius-md:          10px;
    --radius-lg:          14px;
    --radius-xl:          20px;

    /* 过渡 */
    --t-fast:             0.12s ease;
    --t-normal:           0.2s ease;

    /* 字号梯度 */
    --fs-xxs:             10px;
    --fs-xs:              11px;
    --fs-sm:              12px;
    --fs-base:            13px;
    --fs-md:              14px;
    --fs-lg:              16px;
    --fs-xl:              20px;
    --fs-2xl:             26px;
    --fs-3xl:             34px;
    --fs-4xl:             44px;
}

/* ═══════════════════════════════════════════════════════════════
   Reset · 基础
   ═══════════════════════════════════════════════════════════════ */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    background-color: var(--bg-page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
                 sans-serif;
    color: var(--slate-800);
    line-height: 1.55;
    font-size: var(--fs-md);
}

::selection {
    background: var(--brand-primary-20);
    color: var(--brand-dark);
}

/* 自定义滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }

/* ═══════════════════════════════════════════════════════════════
   侧边栏 · 可滚动 · 品牌区顶部固定
   ═══════════════════════════════════════════════════════════════ */
.app-sidebar {
    background: linear-gradient(180deg, #003d7a 0%, #0055A4 45%, #004d94 100%);
    color: #fff;
    height: 100vh;
    padding: 0;
    position: sticky;
    top: 0;
    overflow: hidden;             /* 外层不滚动 */
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

/* 内部导航列表单独滚动，避免内容溢出与底部控制区叠加 */
.app-sidebar .nav-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   顶部全局参数条（场景 · 密级）
   — 贴在主内容区顶部，sticky；视觉权重低于页面 hero
   ═══════════════════════════════════════════════════════════════ */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    height: 44px;
    padding: 0 28px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-subtle);
    overflow: visible;           /* 确保下拉菜单不被裁剪 */
}
.app-topbar .topbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.app-topbar .topbar-label {
    font-size: var(--fs-xs);
    color: var(--slate-500);
    letter-spacing: 0.5px;
    font-weight: 500;
}
/* ── Dash 4.1 dcc.Dropdown class 体系 ──
   结构:
     .dash-dropdown-wrapper        (外层容器，带 className)
       .dash-dropdown-trigger      (触发区, display:grid)
         button.dash-dropdown      (按钮本体)
           .dash-dropdown-value    (已选值文字)
         .dash-dropdown-trigger-icon (箭头)
       .dash-dropdown-content      (弹出菜单, portal 渲染)
         .dash-dropdown-search     (搜索框)
         .dash-dropdown-options    (选项列表)
           .dash-dropdown-option   (单个选项)
   ─────────────────────────────────────────────────── */

/* ── 顶部栏下拉：场景 + 密级 ── */
.app-topbar .topbar-dd {
    min-width: 160px;
    font-size: var(--fs-sm);
}

/* 外层容器 */
.app-topbar .topbar-dd .dash-dropdown-wrapper {
    position: relative;
}

/* 触发区 grid 容器 */
.app-topbar .topbar-dd .dash-dropdown-trigger {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    min-height: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--slate-50);
    border: 1px solid var(--border-subtle);
    padding: 0 8px 0 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.app-topbar .topbar-dd .dash-dropdown-trigger:hover {
    border-color: var(--brand-primary);
}

/* 按钮本体 — 去除浏览器默认样式 */
.app-topbar .topbar-dd button.dash-dropdown {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    font-size: var(--fs-sm);
    color: var(--slate-700);
}

/* 已选值文字 */
.app-topbar .topbar-dd .dash-dropdown-value {
    line-height: 28px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--fs-sm);
    color: var(--slate-700);
}

/* 箭头图标 */
.app-topbar .topbar-dd .dash-dropdown-trigger-icon {
    display: flex;
    align-items: center;
    color: var(--slate-400);
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.15s;
}

/* 展开态 */
.app-topbar .topbar-dd .dash-dropdown-wrapper[data-open="true"] .dash-dropdown-trigger,
.app-topbar .topbar-dd .dash-dropdown-trigger:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary-10);
}

/* ── 弹出菜单（可能通过 portal 渲染到 body 层） ── */
.dash-dropdown-content {
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14) !important;
    border: 1px solid var(--border-subtle) !important;
    background: #fff !important;
    z-index: 9999 !important;
    overflow: hidden;
}

/* 搜索框 */
.dash-dropdown-content .dash-dropdown-search {
    height: 32px;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    outline: none;
    background: var(--slate-50);
    font-size: var(--fs-sm);
    padding: 4px 10px;
    width: 100%;
}

/* 选项列表 */
.dash-dropdown-content .dash-dropdown-options {
    max-height: 240px;
    overflow-y: auto;
}

/* 单个选项 */
.dash-dropdown-content .dash-dropdown-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--slate-700);
    transition: background 0.1s;
    border-bottom: 1px solid var(--border-subtle);
}
.dash-dropdown-content .dash-dropdown-option:last-child {
    border-bottom: none;
}
.dash-dropdown-content .dash-dropdown-option:hover {
    background: var(--brand-primary-10) !important;
    color: var(--brand-primary);
}
.dash-dropdown-content .dash-dropdown-option[aria-selected="true"],
.dash-dropdown-content .dash-dropdown-option.selected {
    background: var(--brand-primary) !important;
    color: #fff !important;
    font-weight: 500;
}

/* ── 密级下拉特殊样式 ── */
.app-topbar .topbar-dd-sec { min-width: 110px; }
.app-topbar .topbar-dd-sec .dash-dropdown-trigger {
    background: var(--warning-light);
    border-color: transparent;
}
.app-topbar .topbar-dd-sec .dash-dropdown-trigger:hover {
    border-color: var(--warning);
}

/* ── 全局 dropdown 基础（非 topbar 区域的下拉也适用） ── */
.dash-dropdown-wrapper {
    position: relative;
}
.dash-dropdown-trigger {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    min-height: 36px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--border-normal);
    padding: 0 8px 0 10px;
    cursor: pointer;
    font-size: var(--fs-base);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dash-dropdown-trigger:hover {
    border-color: var(--brand-light);
}
.dash-dropdown-trigger:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary-10);
}
button.dash-dropdown {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    font-size: var(--fs-base);
    color: var(--slate-700);
}
.dash-dropdown-trigger-icon {
    display: flex;
    align-items: center;
    color: var(--slate-400);
    font-size: 10px;
    margin-left: 4px;
}
.dash-dropdown-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-dropdown-placeholder {
    color: var(--slate-400) !important;
}

/* 侧边栏滚动条（细、半透明、hover 变清晰） */
.app-sidebar::-webkit-scrollbar {
    width: 8px;
}
.app-sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.08);
}
.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 6px;
    transition: background var(--t-fast);
}
.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.35);
}

/* 品牌区 · 粘在侧边栏顶部，即使向下滚动也可见 */
.app-sidebar .brand {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 20px 22px 16px;
    background: linear-gradient(180deg, #003d7a 0%, #004487 100%);
    border-bottom: 1px solid rgba(255,255,255,0.14);
    margin-bottom: 10px;
    backdrop-filter: blur(4px);
}
.app-sidebar .brand h4 {
    color: #fff;
    margin: 0;
    font-weight: 700;
    font-size: var(--fs-xl);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.app-sidebar .brand h4::before {
    content: "🌡";
    font-size: 18px;
}
.app-sidebar .brand small {
    color: rgba(255,255,255,0.72);
    font-size: var(--fs-xs);
    letter-spacing: 0.8px;
    display: block;
    margin-top: 4px;
}

/* 分组标题 · 彩色色点 + 左色条（按 --section-color 变化） */
.app-sidebar .nav-section-title {
    position: relative;
    color: rgba(255,255,255,0.65) !important;
    font-size: var(--fs-xxs) !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    padding: 16px 22px 8px 32px !important;
    text-transform: uppercase;
}
.app-sidebar .nav-section-title::before {
    content: "";
    position: absolute;
    left: 20px; top: 50%;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--section-color, var(--brand-cyan));
    box-shadow: 0 0 8px var(--section-color, rgba(0,160,176,0.7));
    transform: translateY(-50%);
}

/* 分组容器 · 左侧浮现当前段的主题色细线 */
.app-sidebar .nav-group {
    position: relative;
    padding-left: 0;
}
.app-sidebar .nav-group::before {
    content: "";
    position: absolute;
    left: 22px; top: 2px; bottom: 4px;
    width: 2px;
    background: var(--section-color, transparent);
    opacity: 0.15;
    border-radius: 1px;
}
/* 该段内选中项的色条，使用段的主题色 */
.app-sidebar .nav-group .nav-link.active::before {
    background: var(--section-color, var(--brand-cyan));
    box-shadow: 0 0 10px var(--section-color, rgba(0,160,176,0.7));
}
.app-sidebar .nav-group .nav-link.active {
    background: linear-gradient(90deg,
                color-mix(in srgb, var(--section-color) 28%, transparent) 0%,
                rgba(255,255,255,0.12) 100%);
}

/* 导航项 · hover/active 精细化 */
.app-sidebar .nav-link {
    position: relative;
    color: rgba(255,255,255,0.78);
    border-radius: var(--radius-sm);
    margin: 1px 10px;
    padding: 8px 14px;
    transition: all var(--t-fast);
    font-size: var(--fs-base);
    display: flex;
    align-items: center;
    line-height: 1.4;
    white-space: nowrap;
}
.app-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding-left: 18px;
}
.app-sidebar .nav-link.active {
    background: linear-gradient(90deg,
                rgba(0,160,176,0.35) 0%,
                rgba(255,255,255,0.16) 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1),
                0 2px 8px rgba(0,0,0,0.15);
}
.app-sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    left: -10px; top: 15%; bottom: 15%;
    width: 3px;
    background: var(--brand-cyan);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px rgba(0,160,176,0.6);
}

/* 侧边栏里的下拉/复选 · 白色优化 */
.app-sidebar .form-check-input { cursor: pointer; }
.app-sidebar .form-check-label {
    color: rgba(255,255,255,0.92);
    font-size: var(--fs-sm);
    cursor: pointer;
}
.app-sidebar .form-check-input:checked {
    background-color: var(--brand-cyan);
    border-color: var(--brand-cyan);
}

/* 侧边栏下拉菜单/输入框在暗色背景下的样式 */
.app-sidebar button.dash-dropdown {
    background: rgba(255,255,255,0.95) !important;
    border-color: rgba(255,255,255,0.2) !important;
}
.app-sidebar .dash-dropdown-trigger {
    background: rgba(255,255,255,0.95) !important;
    border-color: rgba(255,255,255,0.2) !important;
}
.app-sidebar .form-control {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
}
.app-sidebar .form-control::placeholder {
    color: rgba(255,255,255,0.5);
}
.app-sidebar .form-control:focus {
    background: rgba(255,255,255,0.18);
    border-color: var(--brand-cyan);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(0,160,176,0.25);
}

/* 侧边栏滚动条移到 nav-scroll */
.app-sidebar .nav-scroll::-webkit-scrollbar { width: 8px; }
.app-sidebar .nav-scroll::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.08);
}
.app-sidebar .nav-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 6px;
}
.app-sidebar .nav-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.35);
}

/* ═══════════════════════════════════════════════════════════════
   主内容区
   ═══════════════════════════════════════════════════════════════ */
.app-main {
    padding: 28px 36px 80px;
    max-width: 1600px;
}

/* ── Hero 页头 v2 ── */
.page-hero {
    position: relative;
    padding: 20px 26px 22px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.page-hero::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-cyan));
}
.page-hero .hero-title {
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0 0 4px;
    font-size: var(--fs-2xl);
    letter-spacing: -0.3px;
}
.page-hero .hero-subtitle {
    color: var(--slate-500);
    font-size: var(--fs-md);
    margin: 0;
}

/* 旧 page-title 保持兼容 */
.page-title {
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}
.page-subtitle {
    color: var(--slate-500);
    margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   Metric Card v2
   ═══════════════════════════════════════════════════════════════ */
.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-subtle);
    height: 100%;
    transition: all var(--t-normal);
    position: relative;
    overflow: hidden;
}
.metric-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--slate-300);
}
.metric-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    opacity: 0.6;
}
.metric-card .metric-label {
    font-size: var(--fs-sm);
    color: var(--slate-500);
    margin-bottom: 4px;
    font-weight: 500;
}
.metric-card .metric-value {
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--brand-primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.metric-card .metric-delta {
    font-size: var(--fs-xs);
    margin-top: 3px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   Section Header v2
   ═══════════════════════════════════════════════════════════════ */
.section-header {
    position: relative;
    font-weight: 700;
    color: var(--slate-800);
    margin: 28px 0 14px;
    padding: 4px 0 8px 14px;
    font-size: var(--fs-lg);
    letter-spacing: -0.2px;
}
.section-header::before {
    content: "";
    position: absolute;
    left: 0; top: 6px; bottom: 10px;
    width: 4px;
    background: var(--brand-primary);
    border-radius: 2px;
}
.section-header::after {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(90deg, var(--brand-primary-20) 0%, transparent 100%);
    margin-top: 6px;
}
.section-header + small,
.section-header small {
    color: var(--slate-500);
    font-weight: 400;
    font-size: var(--fs-sm);
    margin-left: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   Cards / Panels
   ═══════════════════════════════════════════════════════════════ */
.card-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t-normal);
}
.card-panel:hover { box-shadow: var(--shadow-md); }

.card {
    border-radius: var(--radius-md);
    border-color: var(--border-subtle);
    transition: box-shadow var(--t-normal);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 600;
    color: var(--slate-700);
}

/* ═══════════════════════════════════════════════════════════════
   按钮
   ═══════════════════════════════════════════════════════════════ */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all var(--t-fast);
    letter-spacing: 0.1px;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}
.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    box-shadow: var(--shadow-primary);
}
.btn-outline-primary { color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-outline-primary:hover { background: var(--brand-primary); }

/* ═══════════════════════════════════════════════════════════════
   表单
   ═══════════════════════════════════════════════════════════════ */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border-normal);
    font-size: var(--fs-base);
    transition: all var(--t-fast);
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 0.18rem var(--brand-primary-20);
}

/* Dropdown (Dash 4 dcc.Dropdown) */
button.dash-dropdown {
    border-radius: var(--radius-sm);
    border-color: var(--border-normal);
}

/* ═══════════════════════════════════════════════════════════════
   Tabs
   ═══════════════════════════════════════════════════════════════ */
.nav-tabs {
    border-bottom: 2px solid var(--border-subtle);
}
.nav-tabs .nav-link {
    border: none;
    color: var(--slate-500);
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 0;
    transition: all var(--t-fast);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.nav-tabs .nav-link:hover {
    color: var(--brand-primary);
    background: var(--brand-primary-10);
}
.nav-tabs .nav-link.active {
    color: var(--brand-primary);
    background: transparent;
    border-bottom-color: var(--brand-primary);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   Alerts
   ═══════════════════════════════════════════════════════════════ */
.alert {
    border-radius: var(--radius-md);
    border: none;
    border-left: 3px solid;
    padding: 12px 16px;
    font-size: var(--fs-base);
}
.alert-info { background: var(--info-light); border-left-color: var(--info); color: #1e40af; }
.alert-success { background: var(--success-light); border-left-color: var(--success); color: #065f46; }
.alert-warning { background: var(--warning-light); border-left-color: var(--warning); color: #92400e; }
.alert-danger { background: var(--danger-light); border-left-color: var(--danger); color: #991b1b; }
.alert-light { background: var(--slate-50); border-left-color: var(--slate-400); color: var(--slate-700); }

/* ═══════════════════════════════════════════════════════════════
   Badges
   ═══════════════════════════════════════════════════════════════ */
.badge {
    font-weight: 500;
    letter-spacing: 0.2px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
}

/* ═══════════════════════════════════════════════════════════════
   DataTable / AgGrid
   ═══════════════════════════════════════════════════════════════ */
.dash-table-container .dash-spreadsheet-container {
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.dash-header, .ag-theme-alpine .ag-header {
    background: var(--bg-subtle) !important;
    border-bottom: 2px solid var(--brand-primary) !important;
}
.ag-theme-alpine .ag-header-cell-label {
    font-weight: 600;
    color: var(--slate-800);
}
.ag-theme-alpine .ag-row { font-size: var(--fs-sm); }
.ag-theme-alpine .ag-row:hover { background: var(--brand-primary-10) !important; }
.ag-theme-alpine {
    --ag-borders: 1px solid var(--border-subtle);
    --ag-border-color: var(--border-subtle);
    --ag-row-border-color: var(--border-subtle);
    --ag-font-family: -apple-system, "PingFang SC", sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   Leaflet 地图
   ═══════════════════════════════════════════════════════════════ */
.leaflet-tooltip.base-label {
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border-normal);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--slate-800);
    box-shadow: var(--shadow-sm);
}
.leaflet-tooltip.base-label::before { display: none; }

/* ═══════════════════════════════════════════════════════════════
   工具类
   ═══════════════════════════════════════════════════════════════ */
.text-muted-sm   { color: var(--slate-500); font-size: var(--fs-sm); }
.text-muted-xs   { color: var(--slate-400); font-size: var(--fs-xs); letter-spacing: 0.3px; }
.label-strong-sm { color: var(--slate-600); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.3px; }

.hover-lift { transition: all var(--t-normal); }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.divider-soft { height: 1px; background: var(--border-subtle); margin: 16px 0; }

/* 状态色徽章（兼容旧代码） */
.badge-prod  { background: var(--success); color: #fff; }
.badge-dev   { background: var(--warning); color: #fff; }
.badge-pre   { background: var(--slate-400); color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   全局货币徽章
   ═══════════════════════════════════════════════════════════════ */
.currency-badge {
    position: fixed;
    bottom: 14px;
    right: 18px;
    background: linear-gradient(135deg, rgba(0,85,164,0.92), rgba(0,160,176,0.88));
    color: #fff;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 600;
    z-index: 999;
    box-shadow: 0 3px 10px rgba(0,85,164,0.25);
    letter-spacing: 0.3px;
    pointer-events: none;
    backdrop-filter: blur(6px);
}

/* ═══════════════════════════════════════════════════════════════
   动画
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.app-main > * { animation: fadeInUp 0.35s ease-out; }

/* Loading shimmer */
@keyframes shimmer {
    0%   { background-position: -100% 0; }
    100% { background-position:  200% 0; }
}
.skeleton {
    background: linear-gradient(90deg,
                var(--slate-100) 25%, var(--slate-200) 50%, var(--slate-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════════
   响应式（可选）
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .app-main { padding: 20px 24px 80px; }
    .page-hero { padding: 16px 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   X08 现状诊断页 专用样式
   ═══════════════════════════════════════════════════════════════ */

/* 根本矛盾逻辑链 */
.dx-narrative { margin-bottom: 20px; }
.dx-narrative .dx-step {
    padding: 12px 16px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    min-height: 88px;
    transition: all var(--t-normal);
    border: 1px solid var(--border-subtle);
}
.dx-narrative .dx-step:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.dx-narrative .dx-step-title {
    font-weight: 700;
    font-size: var(--fs-base);
    margin-bottom: 4px;
}
.dx-narrative .dx-step-desc {
    font-size: var(--fs-sm);
    color: var(--slate-700);
    line-height: 1.45;
}
.dx-narrative .dx-step-sub {
    font-size: var(--fs-xs);
    color: var(--slate-500);
    margin-top: 3px;
    line-height: 1.4;
}
.dx-narrative .dx-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--slate-300);
    padding: 0 4px;
    flex-shrink: 0;
}

/* 诊断评分卡 — 覆盖通用 metric-card */
.dx-score-card {
    display: flex;
    align-items: stretch;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
    transition: all var(--t-normal);
}
.dx-score-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.dx-score-card .dx-score-bar {
    width: 4px;
    flex-shrink: 0;
    border-radius: 2px 0 0 2px;
}
.dx-score-card .dx-score-body {
    flex: 1;
    padding: 10px 14px;
}
.dx-score-card .dx-score-label {
    font-size: var(--fs-sm);
    color: var(--slate-500);
    font-weight: 500;
}
.dx-score-card .dx-score-value {
    font-size: var(--fs-xl);
    font-weight: 700;
    line-height: 1.2;
    margin: 2px 0;
}
.dx-score-card .dx-score-detail {
    font-size: var(--fs-xs);
    font-weight: 500;
}

/* 挑战防御 Accordion */
.dx-defense .accordion-item {
    border-color: var(--border-subtle);
    margin-bottom: 2px;
}
.dx-defense .accordion-button {
    font-size: var(--fs-base);
    font-weight: 500;
    color: var(--slate-700);
    padding: 10px 16px;
    background: var(--bg-subtle);
}
.dx-defense .accordion-button:not(.collapsed) {
    background: var(--brand-primary-10);
    color: var(--brand-primary);
    font-weight: 600;
}
.dx-defense .accordion-button::after {
    width: 14px;
    height: 14px;
    background-size: 14px;
}
.dx-defense .accordion-body {
    padding: 10px 16px;
    font-size: var(--fs-base);
    color: var(--slate-700);
    background: #fff;
    line-height: 1.6;
}

/* 100天计划卡片 */
.dx-plan-phase {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    min-height: 200px;
    border: 1px solid transparent;
    transition: all var(--t-normal);
}
.dx-plan-phase:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.dx-plan-phase .dx-phase-title {
    font-weight: 700;
    font-size: var(--fs-md);
    margin-bottom: 2px;
}
.dx-plan-phase .dx-phase-sub {
    font-size: var(--fs-base);
    font-weight: 600;
    margin-bottom: 8px;
}
.dx-plan-phase ul {
    font-size: var(--fs-sm);
    padding-left: 18px;
    margin: 0;
    line-height: 1.65;
}
.dx-plan-phase ul li { margin-bottom: 3px; }

/* 龙头对标卡片 */
.dx-benchmark-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    transition: all var(--t-normal);
    height: 100%;
}
.dx-benchmark-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}
.dx-benchmark-card .card-body { padding: 14px 16px; }
.dx-benchmark-card h6 {
    font-weight: 700;
    margin-bottom: 6px;
}
.dx-benchmark-card p {
    font-size: var(--fs-sm);
    color: var(--slate-700);
    margin-bottom: 4px;
    line-height: 1.5;
}

/* VBU 对比卡片 — 三色面板增强 */
.dx-vbu-panel {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--t-normal);
    height: 100%;
}
.dx-vbu-panel:hover { box-shadow: var(--shadow-md); }
.dx-vbu-panel .dx-vbu-header {
    padding: 10px 16px;
    font-weight: 700;
    font-size: var(--fs-md);
    color: #fff;
}
.dx-vbu-panel .dx-vbu-body {
    padding: 14px 16px;
    min-height: 220px;
}
.dx-vbu-panel .dx-vbu-body ul { padding-left: 18px; }
.dx-vbu-panel .dx-vbu-body li {
    margin-bottom: 8px;
    font-size: var(--fs-base);
    line-height: 1.5;
}

/* 方法论速查表 — 紧凑行 */
.dx-methods .ag-theme-alpine .ag-row { font-size: var(--fs-xs); }
.dx-methods .ag-theme-alpine .ag-header-cell-label { font-size: var(--fs-xs); }

/* ═══════════════════════════════════════════════════════════════
   OEM 生态图谱 · x09 专用样式
   ═══════════════════════════════════════════════════════════════ */

/* 供应商卡片：悬停微浮 */
.card-supplier {
    transition: box-shadow var(--t-fast), transform var(--t-fast);
    cursor: default;
    border: 1px solid var(--border-subtle) !important;
}
.card-supplier:hover {
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-2px);
    border-color: var(--border-normal) !important;
}

/* OEM 信息卡片：左色条 + 淡蓝渐变背景 */
.oem-info-card {
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
    overflow: hidden;
}
.oem-info-card .card-body {
    padding: 10px 14px;
}

/* 供应商面板滚动区域：细滚动条 */
.oem-supplier-scroll {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}
.oem-supplier-scroll::-webkit-scrollbar { width: 4px; }
.oem-supplier-scroll::-webkit-scrollbar-track {
    background: var(--slate-100);
    border-radius: 4px;
}
.oem-supplier-scroll::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 4px;
}
.oem-supplier-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* Sankey 图容器：轻微内阴影 */
.oem-sankey-container {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    background: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   打印模式（策划案评审投影友好）
   ═══════════════════════════════════════════════════════════════ */
@media print {
    .app-sidebar, .currency-badge { display: none; }
    .app-main { padding: 10px; }
    .card, .metric-card { box-shadow: none; border: 1px solid #ccc; }
    body { background: #fff; }
}
