/**
 * GWM 全景业务指挥舱样式
 * 调用方：index.html
 * 边界：仅负责视觉与动画，不含数据逻辑
 */

:root {
    --gwm-bg: #000000;
    --gwm-panel: #151923;
    --gwm-panel-hover: #1a1f2e;
    --gwm-border: #2a3143;
    --gwm-feed-bar-height: 48px;
}

/* ==================== 1. 基础重置与响应式滚动条 ==================== */
html,
body {
    margin: 0;
    padding: 0;
    padding-bottom: var(--gwm-feed-bar-height);
    background-color: var(--gwm-bg);
    color: #f1f5f9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    body {
        overflow: hidden;
        height: 100vh;
    }

    body > main {
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gwm-border);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* ==================== 2. 高级暗黑网格背景 ==================== */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 42%);
}

.gwm-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid var(--gwm-border);
    background: #10141c;
}

.gwm-header__inner {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr) minmax(108px, max-content);
    align-items: center;
    gap: 12px 20px;
    min-height: 64px;
    padding: 8px 20px 8px 16px;
}

.gwm-header__left,
.gwm-header__right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.gwm-header__right {
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}

.gwm-header__clock {
    display: flex;
    align-items: baseline;
    font-family: "Oswald", "JetBrains Mono", sans-serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    color: #f1f5f9;
}

.gwm-header__colon {
    animation: gwmColon 1s steps(1) infinite;
    margin: 0 1px;
    color: #22d3ee;
}

@keyframes gwmColon {
    50% {
        opacity: 0.28;
    }
}

.gwm-header__meta {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
    margin-left: 12px;
}

.gwm-header__date {
    grid-column: 1 / -1;
}

.gwm-header__date,
.gwm-header__sync,
.gwm-header__poll,
.gwm-header__range {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    line-height: 1.25;
    color: #94a3b8;
    white-space: nowrap;
}

.gwm-header__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    color: #34d399;
}

.gwm-header__sync {
    color: #7dd3fc;
}

.gwm-header__title {
    margin: 0;
    min-width: 0;
    justify-self: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #f8fafc;
    text-align: center;
}

.gwm-header__range {
    color: #cbd5e1;
}

.gwm-header__when {
    position: relative;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.gwm-header__filters {
    position: relative;
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: max-content;
    max-width: none;
    background: #0b0f16;
    border: 1px solid var(--gwm-border);
    border-radius: 8px;
    padding: 3px;
}

.gwm-header__select {
    display: none;
    box-sizing: border-box;
    width: 100%;
    min-width: 108px;
    height: 32px;
    margin: 0;
    padding: 0 28px 0 10px;
    border: 1px solid var(--gwm-border);
    border-radius: 8px;
    background-color: #0b0f16;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2394a3b8' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    line-height: 32px;
    white-space: nowrap;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.gwm-header__when.is-compact .gwm-header__filters {
    display: none;
}

.gwm-header__when.is-compact .gwm-header__select {
    display: block;
}

.gwm-header__filters-pill {
    position: absolute;
    top: 3px;
    left: 0;
    z-index: 0;
    height: calc(100% - 6px);
    border-radius: 6px;
    background: #1d4ed8;
    transform: translateX(3px);
    transition: transform 180ms ease-out, width 180ms ease-out;
    pointer-events: none;
}

.gwm-header__chip {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    margin: 0;
    padding: 6px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
    writing-mode: horizontal-tb;
    word-break: keep-all;
    cursor: pointer;
}

.gwm-header__chip:hover {
    color: #e2e8f0;
}

.gwm-header__chip.is-on {
    color: #fff;
}

.gwm-header__chip:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 1px;
}

.gwm-header__fs {
    display: flex;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #0b0f16;
    border: 1px solid var(--gwm-border);
    color: #94a3b8;
    align-items: center;
    justify-content: center;
}

.gwm-header__fs:hover {
    color: #e2e8f0;
    border-color: #475569;
}

.gwm-header__fs:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
    .gwm-header__colon,
    .gwm-header__filters-pill {
        animation: none;
        transition: none;
    }
}

@media (max-width: 1023px) {
    .gwm-header__inner {
        grid-template-columns: minmax(0, 1fr) minmax(108px, max-content);
        grid-template-areas:
            "title title"
            "left right";
        min-height: 0;
        padding: 8px 14px 10px;
        gap: 8px 12px;
    }

    .gwm-header__left {
        grid-area: left;
    }

    .gwm-header__title {
        grid-area: title;
        justify-self: start;
        font-size: 15px;
        text-align: left;
    }

    .gwm-header__right {
        grid-area: right;
        min-width: 0;
    }

    .gwm-header__range {
        display: none;
    }
}

/* ==================== 3. 科技感面板容器 ==================== */
.dv-panel {
    background-color: var(--gwm-panel);
    border: 1px solid var(--gwm-border);
    border-radius: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
}

.dv-panel:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background-color: var(--gwm-panel-hover);
}

.dv-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dv-panel:hover::before {
    opacity: 1;
}

.dv-title {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gwm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.title-dot {
    width: 3px;
    height: 14px;
    background-color: #ff9800;
    border-radius: 1px;
    margin-right: 8px;
    display: inline-block;
    box-shadow: 0 0 8px #ff9800;
}

.title-dot--cyan {
    background-color: #00f0ff;
    box-shadow: 0 0 8px #00f0ff;
}

.title-dot--purple {
    background-color: #7c4dff;
    box-shadow: 0 0 8px #7c4dff;
}

.gwm-engine-meta {
    align-items: center;
    gap: 12px;
    color: #6b829e;
    font-size: 10px;
}

.gwm-engine-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

.gwm-engine-swatch {
    display: inline-block;
    width: 10px;
    height: 2px;
}

.gwm-engine-swatch--cyan {
    background: #00f0ff;
}

.gwm-engine-swatch--purple {
    background: #7c4dff;
}

/* ==================== 4. KPI 卡片 ==================== */
.kpi-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--gwm-border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

@media (hover: hover) {
    .kpi-card:hover {
        transform: translateY(-2px);
        border-color: rgba(59, 130, 246, 0.3);
        background: rgba(59, 130, 246, 0.03);
    }
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.warning-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    animation: pulse-yellow 2s infinite;
}

@keyframes pulse-yellow {
    70% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* ==================== 5. 垂直滚动列表 ==================== */
.v-scroll-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 120px;
}

.v-scroll-container::before,
.v-scroll-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 24px;
    z-index: 10;
    pointer-events: none;
}

.v-scroll-container::before {
    top: 0;
    background: linear-gradient(to bottom, var(--gwm-panel), transparent);
}

.v-scroll-container::after {
    bottom: 0;
    background: linear-gradient(to top, var(--gwm-panel), transparent);
}

.v-scroll-list {
    margin: 0;
    padding: 0;
    list-style: none;
    position: absolute;
    width: 100%;
}

.list-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background-color 0.2s;
}

.list-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* ==================== 6. 底部单行动态轮播（固定高度、单行、横向滚动） ==================== */
.feed-ticker-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    height: var(--gwm-feed-bar-height);
    min-height: var(--gwm-feed-bar-height);
    max-height: var(--gwm-feed-bar-height);
    display: flex;
    align-items: center;
    border-top: 1px solid var(--gwm-border);
    border-radius: 0;
    background: rgba(21, 25, 35, 0.96);
    overflow: hidden;
    box-sizing: border-box;
}

.feed-ticker-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    height: 100%;
    font-size: 12px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    border-right: 1px solid var(--gwm-border);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), transparent);
}

.feed-ticker-track {
    flex: 1;
    overflow: hidden;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.feed-ticker-content {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    height: 100%;
    white-space: nowrap;
    animation: feedTickerMove 50s linear infinite;
    will-change: transform;
}

.feed-ticker-track:hover .feed-ticker-content {
    animation-play-state: paused;
}

.feed-ticker-content.is-empty {
    width: 100%;
    justify-content: center;
    color: #64748b;
    font-size: 12px;
    animation: none;
}

.feed-ticker-item {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    height: 32px;
    margin-right: 28px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(51, 65, 85, 0.65);
    background: rgba(30, 41, 59, 0.75);
    font-size: 12px;
    line-height: 1;
    color: #cbd5e1;
    white-space: nowrap;
    box-sizing: border-box;
}

.feed-ticker-time {
    flex-shrink: 0;
    margin-right: 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #06b6d4;
}

.feed-ticker-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #334155;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #94a3b8;
}

@keyframes feedTickerMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.notice-avatar,
.rank-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #334155;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #94a3b8;
}

.rank-row {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    gap: 8px;
}

.rank-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.kpi-gmv-row {
    min-width: 0;
}

.kpi-gmv-odometer {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.1;
}

/* ==================== 7. ECharts 容器（撑满面板，避免 flex 下高度塌陷被裁切） ==================== */
.echarts-box {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* ==================== 8. 八槽布局 + KPI 压缩 + 外派占位 ==================== */
.gwm-kpi-row .kpi-card {
    padding: 10px 12px;
}

.gwm-board {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

.gwm-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    min-height: 0;
}

.gwm-col .dv-panel {
    flex: 1 1 0;
    min-height: 140px;
}

@media (min-width: 1024px) {
    .gwm-board {
        flex-direction: row;
        gap: 0.75rem;
    }

    .gwm-col--side {
        width: 25%;
    }

    .gwm-col--mid {
        width: 50%;
    }
}

.gwm-module-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 12px;
    pointer-events: none;
    z-index: 2;
}

.v-scroll-container .gwm-module-placeholder {
    inset: 0;
}

.v-scroll-list.is-empty {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-scroll-list.is-empty > li {
    border: none;
    height: auto;
    padding: 0;
    background: transparent;
}

.v-scroll-container:has(.gwm-module-placeholder:not(.is-hidden))::before,
.v-scroll-container:has(.gwm-module-placeholder:not(.is-hidden))::after,
.v-scroll-container:has(.v-scroll-list.is-empty)::before,
.v-scroll-container:has(.v-scroll-list.is-empty)::after {
    display: none;
}

/* 空态藏表头，文案在标题下整块内容区正中 */
.gwm-board .dv-panel:has(.v-scroll-list.is-empty) .gwm-table-head,
.gwm-board .dv-panel:has(#dispatchDealsEmpty:not(.is-hidden)) .gwm-table-head {
    display: none;
}

.gwm-board .dv-panel:has(#orderMixEmpty:not(.is-hidden)) #chartPie,
.gwm-board .dv-panel:has(#orderMixEmpty:not(.is-hidden)) #orderMixLegend {
    visibility: hidden;
}

.gwm-module-placeholder.is-hidden {
    display: none;
}

/* 跨店外派：空态盖住整块内容区，统计列一并藏掉 */
.gwm-dispatch-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px;
    gap: 8px;
    padding: 8px 12px 12px;
    min-width: 0;
    min-height: 0;
    position: relative;
}

@media (max-width: 767px) {
    .gwm-dispatch-body {
        grid-template-columns: 1fr;
    }
}

.gwm-dispatch-body:has(#dispatchHubEmpty:not(.is-hidden)) .gwm-dispatch-graph,
.gwm-dispatch-body:has(#dispatchHubEmpty:not(.is-hidden)) .gwm-dispatch-stats {
    visibility: hidden;
}

.gwm-dispatch-graph {
    position: relative;
    min-width: 0;
    min-height: 148px;
}

.gwm-dispatch-hub {
    position: absolute;
    inset: 0;
}

.gwm-dispatch-hub canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: default;
}

.gwm-dispatch-focus {
    position: absolute;
    left: 8px;
    top: 6px;
    z-index: 2;
    max-width: calc(100% - 16px);
    padding: 5px 8px;
    border: 1px solid rgba(0, 240, 255, 0.28);
    border-radius: 6px;
    background: rgba(12, 24, 41, 0.82);
    color: #e2e8f0;
    font-size: 11px;
    line-height: 1.35;
    pointer-events: none;
}

.gwm-dispatch-focus.is-hidden {
    display: none;
}

.gwm-dispatch-focus b {
    color: #67e8f9;
    font-weight: 700;
}

.gwm-dispatch-watermark {
    position: absolute;
    left: 8px;
    bottom: 6px;
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    pointer-events: none;
    letter-spacing: 0.04em;
}

.gwm-dispatch-empty {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 0 12px;
}

.gwm-dispatch-empty i {
    font-size: 20px;
    color: #3f4a5a;
}

.gwm-dispatch-empty b {
    color: #8b93a1;
    font-size: 12px;
    font-weight: 600;
}

.gwm-dispatch-empty small {
    color: #5b6474;
    font-size: 10px;
}

.gwm-dispatch-stats {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 6px;
    padding: 8px;
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.4);
    border: 1px solid rgba(30, 41, 59, 0.45);
    min-height: 0;
}

.gwm-dispatch-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0 8px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.55);
}

.gwm-dispatch-stat--last {
    padding-bottom: 0;
    border-bottom: 0;
}

.gwm-dispatch-stat__label {
    color: #6b829e;
    font-size: 10px;
}

.gwm-dispatch-stat__value {
    font-family: "Oswald", "JetBrains Mono", ui-monospace, monospace;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
}

.gwm-dispatch-stat__unit {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
}

@media (max-width: 640px) {
    .gwm-dispatch-stat__value {
        font-size: 17px;
    }
}

.gwm-order-mix-legend .mix-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gwm-order-mix-legend .mix-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    color: #e2e8f0;
}

.gwm-order-mix-legend .mix-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.gwm-order-mix-legend .mix-bar {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.gwm-order-mix-legend .mix-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.gwm-app.is-hidden,
.gwm-gate.is-hidden,
.gwm-boot.is-hidden {
    display: none !important;
}

.gwm-boot {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #04070f;
    color: #a9b5c8;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.gwm-boot__dot {
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border-radius: 50%;
    background: #53d9ff;
    box-shadow: 0 0 12px rgba(83, 217, 255, 0.55);
    animation: gwmBootPulse 1.1s ease-in-out infinite;
}

@keyframes gwmBootPulse {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.85);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.gwm-gate {
    flex: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 20% 10%, rgba(83, 217, 255, 0.12), transparent 42%),
        radial-gradient(circle at 80% 90%, rgba(167, 139, 250, 0.1), transparent 40%),
        #04070f;
}

.gwm-gate__card {
    max-width: 460px;
    width: 100%;
    padding: 28px 28px 22px;
    border-radius: 16px;
    border: 1px solid rgba(150, 175, 215, 0.18);
    background: rgba(8, 14, 26, 0.92);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    text-align: left;
}

.gwm-gate__status {
    text-align: center;
    margin-bottom: 4px;
}

.gwm-gate__code {
    font-size: 56px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: rgba(83, 217, 255, 0.28);
    font-family: "Oswald", "JetBrains Mono", monospace;
    margin-bottom: 10px;
}

.gwm-gate__invalid {
    font-size: 22px;
    font-weight: 800;
    color: #eef4fb;
    margin-bottom: 8px;
}

.gwm-gate__hint {
    font-size: 14px;
    line-height: 1.6;
    color: #a9b5c8;
}

.gwm-gate__divider {
    height: 1px;
    margin: 22px 0 20px;
    background: linear-gradient(90deg, transparent, rgba(150, 175, 215, 0.35), transparent);
}

.gwm-gate__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.gwm-gate__mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #041018;
    background: linear-gradient(135deg, #53d9ff, #7ab8ff);
}

.gwm-gate__brand-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #eef4fb;
}

.gwm-gate__title {
    font-size: 26px;
    line-height: 1.25;
    font-weight: 800;
    color: #eef4fb;
    margin-bottom: 12px;
}

.gwm-gate__desc {
    font-size: 14px;
    line-height: 1.7;
    color: #a9b5c8;
    margin-bottom: 22px;
}

.gwm-gate__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.gwm-gate__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(150, 175, 215, 0.28);
    color: #eef4fb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.gwm-gate__btn:hover {
    border-color: rgba(83, 217, 255, 0.55);
    background: rgba(83, 217, 255, 0.08);
}

.gwm-gate__btn--primary {
    border-color: transparent;
    color: #041018;
    background: linear-gradient(135deg, #53d9ff, #7ab8ff);
}

.gwm-gate__btn--primary:hover {
    filter: brightness(1.06);
    border-color: transparent;
    background: linear-gradient(135deg, #53d9ff, #7ab8ff);
}

.gwm-gate__foot {
    font-size: 11px;
    color: #71809a;
}

/* ==================== 9. Mono dashboard reference pass ====================
 * 保留 GWM 的数据模块和 ECharts，仅将结构语言对齐到 admin-ui-10/09：
 * 灰阶表面、柔和层次、顶部指标矩阵 + 右侧趋势、下方表格化流水。
 */
:root {
    --gwm-bg: #0f0f10;
    --gwm-panel: #161617;
    --gwm-panel-hover: #1d1d1f;
    --gwm-border: rgba(255, 255, 255, 0.065);
    --gwm-mono-accent: #5a7fb5;
    --gwm-mono-accent-strong: #6d90c2;
}

.gwm-app {
    background: var(--gwm-bg);
}

.gwm-app > header {
    background: rgba(22, 22, 23, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.065) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.bg-grid {
    background-image: radial-gradient(circle at 70% 0%, rgba(90, 127, 181, 0.08), transparent 42%);
}

.gwm-main {
    scrollbar-width: thin;
    scrollbar-color: #2b2b2f transparent;
}

.gwm-overview {
    /* 6 张 KPI 通栏单行 */
    display: block;
    min-height: 0;
}

.gwm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.gwm-kpi-grid .kpi-card {
    min-width: 0;
    min-height: 118px;
    padding: 12px 12px 10px;
    border: 0;
    border-radius: 12px;
    background: var(--gwm-panel);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.gwm-kpi-grid .kpi-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 10px;
    color: var(--gwm-text-sub, #94a3b8);
    min-width: 0;
}

.gwm-kpi-grid .kpi-delta-box {
    min-width: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    flex: 1;
}

.gwm-kpi-grid .kpi-delta {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #94a3b8;
}

.gwm-kpi-grid .kpi-delta.is-up {
    color: #f87171;
}

.gwm-kpi-grid .kpi-delta.is-down {
    color: #34d399;
}

.gwm-kpi-grid .kpi-delta.is-flat {
    color: #94a3b8;
}

.gwm-kpi-grid .kpi-note {
    font-size: 10px;
    color: #64748b;
}

.gwm-kpi-grid .kpi-foot--amber {
    color: rgba(245, 158, 11, 0.8);
}

.gwm-kpi-grid .kpi-foot > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gwm-kpi-grid .kpi-spark {
    display: block;
    flex: none;
    width: 72px;
    height: 22px;
}

.gwm-kpi-grid .kpi-spark polyline {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gwm-kpi-grid .kpi-card:hover {
    transform: translateY(-1px);
    border-color: transparent;
    background: var(--gwm-panel-hover);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.gwm-kpi-grid .kpi-card > div:first-child {
    color: #a2a2a8;
}

.gwm-kpi-grid .kpi-card .odometer {
    font-size: clamp(18px, 1.35vw, 28px);
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.gwm-kpi-grid .kpi-card .border-t {
    border-color: rgba(255, 255, 255, 0.055) !important;
}

.gwm-board {
    gap: 12px;
    min-height: 560px;
}

.gwm-col {
    gap: 12px;
}

.gwm-col .dv-panel {
    min-height: 150px;
}

.gwm-board .dv-panel,
.gwm-board .dv-panel:hover {
    border: 0;
    border-radius: 12px;
    background: var(--gwm-panel);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.gwm-board .dv-panel:hover {
    background: var(--gwm-panel-hover);
}

.gwm-board .dv-title {
    padding: 13px 15px 11px;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.055);
}

.gwm-table-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 1px 10px 7px;
    color: #7e7e84;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.gwm-table-head span:last-child {
    text-align: right;
}

.gwm-board .v-scroll-container::before {
    background: linear-gradient(to bottom, var(--gwm-panel), transparent);
}

.gwm-board .v-scroll-container::after {
    background: linear-gradient(to top, var(--gwm-panel), transparent);
}

.gwm-board .list-row,
.gwm-board .rank-row {
    border-bottom-color: rgba(255, 255, 255, 0.045);
    padding-left: 10px;
    padding-right: 10px;
}

.gwm-board .list-row:hover,
.gwm-board .rank-row:hover {
    background: var(--gwm-panel-hover);
}

@media (min-width: 1024px) {
    .gwm-col--side {
        width: 28%;
    }

    .gwm-col--mid {
        width: 44%;
    }
}

/* 桌面区间保持 6 卡单行，只压缩卡片内边距与字号 */
@media (max-width: 1439px) {
    .gwm-kpi-grid {
        gap: 10px;
    }

    .gwm-kpi-grid .kpi-card {
        min-height: 110px;
        padding: 10px 10px 8px;
    }
}

/* 1024 以下横向排不下 6 卡，退成 3 列 */
@media (max-width: 1023px) {
    .gwm-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gwm-board {
        min-height: 860px;
    }
}

@media (max-width: 640px) {
    .gwm-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .gwm-kpi-grid .kpi-card {
        min-height: 104px;
        padding: 12px;
    }

    .gwm-kpi-grid .kpi-card .odometer {
        font-size: 25px;
    }
}

/* H5 / 手机竖屏：顶栏三行、KPI 两列、模块纵向滑、刘海安全区 */
@media (max-width: 767px) {
    :root {
        --gwm-feed-bar-height: 44px;
    }

    html,
    body {
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        padding-bottom: calc(var(--gwm-feed-bar-height) + env(safe-area-inset-bottom, 0px));
    }

    .gwm-header {
        padding-top: env(safe-area-inset-top, 0px);
    }

    .gwm-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "title fs"
            "left left"
            "filters filters";
        gap: 8px;
        min-height: 0;
        padding: 8px 12px 10px;
    }

    .gwm-header__left {
        grid-area: left;
        width: 100%;
    }

    .gwm-header__clock {
        font-size: 20px;
        letter-spacing: 0.04em;
    }

    .gwm-header__meta {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 10px;
        margin-left: 10px;
    }

    .gwm-header__date {
        grid-column: auto;
    }

    .gwm-header__title {
        grid-area: title;
        justify-self: start;
        font-size: 14px;
        letter-spacing: 0.02em;
        text-align: left;
    }

    .gwm-header__right {
        display: contents;
    }

    .gwm-header__range,
    .gwm-header__poll {
        display: none !important;
    }

    .gwm-header__when {
        grid-area: filters;
        width: 100%;
    }

    .gwm-header__filters {
        display: inline-flex;
        width: max-content;
    }

    .gwm-header__chip {
        flex: 0 0 auto;
        min-width: max-content;
        min-height: 36px;
        padding: 8px 12px;
        font-size: 12px;
        text-align: center;
        white-space: nowrap;
    }

    .gwm-header__fs {
        grid-area: fs;
        justify-self: end;
    }

    .gwm-main {
        padding: 8px 10px 12px;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .gwm-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .gwm-kpi-grid .kpi-card {
        min-height: 88px;
        padding: 10px 10px 8px;
    }

    .gwm-kpi-grid .kpi-spark,
    .gwm-kpi-grid .kpi-note {
        display: none;
    }

    .gwm-kpi-grid .kpi-foot {
        margin-top: 4px;
        padding-top: 4px;
    }

    .gwm-board {
        min-height: 0 !important;
        gap: 10px;
    }

    .gwm-col {
        gap: 10px;
    }

    .gwm-col .dv-panel {
        flex: 0 0 auto;
        min-height: 220px;
    }

    .echarts-box,
    #chartCenter,
    #chartPie {
        min-height: 200px;
    }

    [data-module="orderMix"] .flex.gap-2 {
        flex-direction: column;
    }

    .gwm-order-mix-legend {
        width: 100% !important;
    }

    .gwm-dispatch-graph {
        min-height: 240px;
    }

    .gwm-dispatch-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .gwm-engine-meta {
        display: none !important;
    }

    .feed-ticker-bar {
        height: auto;
        min-height: var(--gwm-feed-bar-height);
        max-height: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .feed-ticker-label {
        padding: 0 10px;
        font-size: 11px;
    }
}

.gwm-local-watermark {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    user-select: none;
    background-repeat: repeat;
    background-size: 280px 170px;
    background-position: center;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='170' viewBox='0 0 280 170'%3E%3Ctext x='140' y='90' text-anchor='middle' dominant-baseline='middle' transform='rotate(-24 140 90)' font-size='22' font-weight='700' font-family='-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif' fill='%23ffffff' fill-opacity='0.28'%3E%E6%9C%AC%E5%9C%B0%E8%B0%83%E8%AF%95%E6%A8%A1%E5%BC%8F%3C/text%3E%3C/svg%3E");
}
