/* console-base.css
   全站共享的控制台底色、滚动条与卡片质感。
   仅视觉层，不改动任何业务结构与脚本。加载顺序在各页面主样式之后。 */

:root {
    --console-bg: #f5f7fa;
    --console-card-shadow: 0 1px 4px rgba(0, 21, 41, 0.05);
    --console-radius: 8px;
}

html.dark {
    /* 与 design-system 深色面板同色系，避免冷黑底 + 暖灰卡的色温冲突 */
    --console-bg: #141412;
    --console-card-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

html {
    background: var(--console-bg);
}

body {
    background: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(144, 147, 153, 0.45) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

*::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(144, 147, 153, 0.35);
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(144, 147, 153, 0.65);
    background-clip: padding-box;
}

html.dark * {
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

html.dark *::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    background-clip: padding-box;
}
/* ---------- 登录页：顶栏压缩、卡片统一质感 ---------- */

.auth-topbar {
    height: 56px;
    background: var(--surface);
    box-shadow: 0 1px 0 rgba(0, 21, 41, 0.06);
}

.auth-topbar-inner {
    width: min(1240px, calc(100% - 36px));
}

.auth-brand {
    min-height: 36px;
}

.auth-toplink {
    min-height: 32px;
    border-radius: 6px;
}

.auth-main {
    width: min(1240px, calc(100% - 36px));
    min-height: calc(100vh - 56px);
    min-height: calc(100svh - 56px);
    padding: 24px 0;
    grid-template-columns: minmax(0, 1fr) 396px;
    gap: 16px;
}

.auth-story {
    min-height: 480px;
    padding: 36px;
    border-radius: var(--console-radius);
    box-shadow: var(--console-card-shadow);
}

.auth-story h1 {
    margin: 14px 0 14px;
    font-size: 34px;
    line-height: 1.25;
}

.auth-story-copy > p:last-child {
    font-size: 13px;
    line-height: 1.75;
}

.auth-panel {
    border-radius: var(--console-radius);
    box-shadow: var(--console-card-shadow);
}

.auth-panel-heading h2 {
    font-family: var(--font-sans);
    font-size: 19px;
    font-weight: 700;
}

.auth-panel-heading > p:last-child {
    font-size: 13px;
}

.tab {
    min-height: 34px;
    font-size: 13px;
}

.form-group input {
    min-height: 38px;
    border-radius: 6px;
}

.auth-panel .btn {
    min-height: 40px;
    border-radius: 6px;
}

/* ---------- 订单查询页 ---------- */

.status-topbar {
    height: 56px;
    background: var(--surface);
    box-shadow: 0 1px 0 rgba(0, 21, 41, 0.06);
}

.status-topbar-inner {
    width: min(1240px, calc(100% - 36px));
}

.status-brand {
    min-height: 36px;
}

.status-back {
    min-height: 32px;
    border-radius: 6px;
}

.status-page {
    width: min(1240px, calc(100% - 36px));
    padding: 22px 0 48px;
}

.status-heading {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.status-kicker {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-heading h1 {
    margin: 4px 0;
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.status-heading > p:last-child {
    font-size: 13px;
}

.status-workspace {
    gap: 16px;
}

.query-panel,
.result-panel {
    border-radius: var(--console-radius);
    box-shadow: var(--console-card-shadow);
}

.panel-heading h2 {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
}

.panel-index {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    border-radius: 5px;
    font-size: 10px;
}

.query-panel input {
    min-height: 36px;
    border-radius: 6px;
}

.query-panel .btn {
    min-height: 38px;
    border-radius: 6px;
}

.status-row {
    padding: 10px 0;
}

.status-badge {
    border-radius: 999px;
}

@media (max-width: 1020px) {
    .auth-topbar-inner,
    .auth-main,
    .status-topbar-inner,
    .status-page {
        width: min(100% - 24px, 900px);
    }
}

@media (max-width: 720px) {
    .auth-story {
        padding: 24px;
        min-height: 0;
    }

    .auth-story h1 {
        font-size: 26px;
    }

    .status-heading h1 {
        font-size: 18px;
    }
}

/* ---------- 背景光斑：还原 .bg-glow 缓慢漂移装饰 ----------
   运动轨迹与模糊半径沿用旧版（20s / 25s infinite alternate、blur 40px），
   配色改为对齐当前 design-system 的暖调，透明度压低以免干扰信息密度。 */

:root {
    --glow-opacity: 1;
    --glow-a: rgba(179, 75, 46, 0.10);
    --glow-b: rgba(138, 97, 0, 0.08);
}

html.dark {
    --glow-a: rgba(236, 139, 104, 0.14);
    --glow-b: rgba(225, 188, 97, 0.10);
}

.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: var(--glow-opacity);
    transition: opacity 0.3s;
    overflow: hidden;
}

.bg-glow::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-a) 0%, transparent 60%);
    animation: console-glow-drift-a 20s ease-in-out infinite alternate;
    filter: blur(40px);
}

.bg-glow::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--glow-b) 0%, transparent 60%);
    animation: console-glow-drift-b 25s ease-in-out infinite alternate;
    filter: blur(40px);
}

.bg-boid-canvas {
    position: fixed;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.55;
    mix-blend-mode: multiply;
}

html.dark .bg-boid-canvas {
    opacity: 0.68;
    mix-blend-mode: screen;
}

/* ---------- 背景游鱼：轻量 CSS 装饰，不依赖图片或脚本 ---------- */

.bg-fish-layer {
    position: fixed;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.bg-fish {
    position: absolute;
    width: 58px;
    height: 28px;
    border-radius: 58% 52% 52% 58%;
    background: rgba(179, 75, 46, 0.16);
    box-shadow: 0 0 18px rgba(179, 75, 46, 0.12);
    opacity: 0.62;
    mix-blend-mode: multiply;
}

.bg-fish::before {
    content: '';
    position: absolute;
    top: 9px;
    right: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--ink);
}

.bg-fish::after {
    content: '';
    position: absolute;
    top: 2px;
    left: -18px;
    width: 24px;
    height: 24px;
    background: inherit;
    clip-path: polygon(100% 50%, 0 0, 18% 50%, 0 100%);
}

.bg-fish-a {
    top: 22%;
    left: -90px;
    animation: bg-fish-swim-a 24s linear infinite;
}

.bg-fish-b {
    top: 48%;
    right: -120px;
    left: auto;
    width: 42px;
    height: 21px;
    background: rgba(138, 97, 0, 0.15);
    box-shadow: 0 0 16px rgba(138, 97, 0, 0.10);
    animation: bg-fish-swim-b 31s linear 4s infinite;
}

.bg-fish-c {
    top: 74%;
    left: -80px;
    width: 34px;
    height: 17px;
    background: rgba(179, 75, 46, 0.12);
    animation: bg-fish-swim-c 38s linear 9s infinite;
}

html.dark .bg-fish {
    background: rgba(236, 139, 104, 0.16);
    box-shadow: 0 0 18px rgba(236, 139, 104, 0.12);
    mix-blend-mode: screen;
}

html.dark .bg-fish-b {
    background: rgba(225, 188, 97, 0.14);
}

@keyframes bg-fish-swim-a {
    0% { transform: translateX(0) translateY(0) scaleX(1); }
    25% { transform: translateX(28vw) translateY(-18px) scaleX(1); }
    55% { transform: translateX(62vw) translateY(12px) scaleX(1); }
    80% { transform: translateX(90vw) translateY(-10px) scaleX(1); }
    100% { transform: translateX(112vw) translateY(8px) scaleX(1); }
}

@keyframes bg-fish-swim-b {
    0% { transform: translateX(0) translateY(0) scaleX(-1); }
    30% { transform: translateX(-32vw) translateY(16px) scaleX(-1); }
    65% { transform: translateX(-72vw) translateY(-14px) scaleX(-1); }
    100% { transform: translateX(-112vw) translateY(8px) scaleX(-1); }
}

@keyframes bg-fish-swim-c {
    0% { transform: translateX(0) translateY(0); opacity: 0; }
    8% { opacity: 0.72; }
    92% { opacity: 0.72; }
    100% { transform: translateX(115vw) translateY(-28px); opacity: 0; }
}

@keyframes console-glow-drift-a {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 30px); }
}

@keyframes console-glow-drift-b {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-30px, -20px); }
}

@media (prefers-reduced-motion: reduce) {
    .bg-glow::before,
    .bg-glow::after,
    .bg-fish {
        animation: none !important;
    }
}

@media (max-width: 720px) {
    /* 窄屏缩小光斑，避免撑出视口造成横向滚动 */
    .bg-glow::before {
        width: 320px;
        height: 320px;
    }

    .bg-glow::after {
        width: 280px;
        height: 280px;
    }
}
