/* Procurement overlays on native GPT Researcher styles.css — keep logic IDs, not a new theme. */

/* ==========================================================================
   主题令牌
   所有值都是裸 RGB 三元组，通过 rgb()/rgba() 包裹使用，这样同一个 token
   既能做实色也能带透明度。深色是默认值，html[data-theme="light"] 整体翻转。
   命名后缀 -t 表示「作为文字色使用」的变体：浅色主题下必须压暗才够对比度，
   而同一个色相做背景/描边时反而要保持明亮，所以两者不能共用一个 token。
   天眼查弹框（文件末尾章节）刻意不使用这些令牌，保持固定浅色商务风。
   ========================================================================== */

:root {
    color-scheme: dark;

    /* 中性文字 */
    --c-ink-0: 255, 255, 255;
    --c-ink-1: 248, 250, 252;
    --c-ink-2: 226, 232, 240;
    --c-ink-3: 203, 213, 225;
    --c-ink-4: 148, 163, 184;

    /* 叠加膜与分隔线 */
    --c-veil: 255, 255, 255;
    --c-line: 100, 100, 130;
    --c-shade: 0, 0, 0;

    /* 面板层次 */
    --c-surf-1: 15, 23, 42;
    --c-surf-2: 8, 25, 35;
    --c-surf-3: 6, 45, 48;
    --c-surf-4: 11, 20, 32;
    --c-surf-5: 6, 78, 79;
    --c-scrim: 2, 8, 23;
    --c-shadow: 2, 8, 23;

    /* 主色（背景 / 描边 / 光晕） */
    --c-tl-1: 20, 184, 166;
    --c-tl-2: 45, 212, 191;
    --c-tl-3: 94, 234, 212;
    --c-tl-4: 13, 148, 136;
    --c-tl-5: 15, 118, 110;
    --c-tl-6: 6, 182, 212;
    --c-sky: 56, 189, 248;

    /* 主色（文字） */
    --c-tlt-2: 45, 212, 191;
    --c-tlt-3: 94, 234, 212;
    --c-tlt-4: 153, 246, 228;
    --c-tlt-5: 204, 251, 241;
    --c-tlt-6: 230, 255, 251;
    --c-tlt-7: 165, 243, 252;

    /* 主色/警示色实心块上的文字：深色主题下底色亮，浅色主题下底色暗，因此要反过来 */
    --c-on-accent: 4, 35, 31;
    --c-on-warn: 59, 37, 3;

    /* 语义色（背景 / 描边） */
    --c-green: 34, 197, 94;
    --c-green-d: 21, 128, 61;
    --c-amber: 245, 158, 11;
    --c-amber-2: 251, 191, 36;
    --c-amber-fill: 252, 211, 77;
    --c-amber-d: 180, 83, 9;
    --c-rose: 244, 63, 94;
    --c-rose-2: 251, 113, 133;
    --c-mint: 204, 251, 241;
    --c-blue: 59, 130, 246;
    --c-blue-2: 96, 165, 250;
    --c-blue-d: 31, 111, 235;
    --c-purple: 192, 132, 252;
    --c-violet: 139, 92, 246;
    --c-fuchsia: 217, 70, 239;

    /* 语义色（文字） */
    --c-green-t: 134, 239, 172;
    --c-amber-t: 252, 211, 77;
    --c-amber-t2: 253, 230, 138;
    --c-amber-t3: 251, 191, 36;
    --c-rose-t: 253, 164, 175;
    --c-rose-t2: 254, 205, 211;
    --c-blue-t: 147, 197, 253;
    --c-blue-t2: 191, 219, 254;
    --c-blue-t3: 219, 234, 254;
    --c-purple-t: 233, 213, 255;
    --c-purple-t2: 196, 181, 253;
    --c-fuchsia-t: 240, 171, 252;

    /* 渐变文字色标（大标题） */
    --c-grad-1: 255, 255, 255;
    --c-grad-2: 167, 243, 234;
    --c-grad-3: 94, 234, 212;
    --c-grad-4: 45, 212, 191;
    --c-grad-5: 56, 189, 248;

    /* 页面底色 */
    --c-page-a: 26, 26, 46;
    --c-page-b: 8, 25, 47;
    --c-page-c: 15, 35, 81;
    --page-logo-opacity: 0.4;
    --page-vignette: radial-gradient(circle at 30% 20%, #151520 0%, #080808 80%);
}

html[data-theme="light"] {
    color-scheme: light;

    /* 次级文字比「深色主题里对应色的镜像」再压深一档：
       深色底上 0.5 透明度的浅灰仍然清楚，浅色底上却会糊掉 */
    --c-ink-0: 12, 28, 53;
    --c-ink-1: 16, 34, 60;
    --c-ink-2: 31, 49, 79;
    --c-ink-3: 46, 66, 95;
    --c-ink-4: 72, 94, 126;

    --c-veil: 15, 42, 84;
    --c-line: 148, 170, 200;
    --c-shade: 155, 182, 214;

    --c-surf-1: 255, 255, 255;
    --c-surf-2: 238, 246, 254;
    --c-surf-3: 225, 245, 243;
    --c-surf-4: 233, 241, 252;
    --c-surf-5: 214, 240, 238;
    --c-scrim: 22, 44, 80;
    --c-shadow: 112, 142, 184;

    /* 青色整体压深一档：低透明度时是淡青底纹，实心时白字仍有对比度 */
    --c-tl-1: 13, 140, 129;
    --c-tl-2: 13, 132, 122;
    --c-tl-3: 14, 148, 137;
    --c-tl-4: 12, 112, 104;
    --c-tl-5: 14, 96, 90;
    --c-tl-6: 8, 145, 178;
    --c-sky: 14, 165, 233;

    --c-tlt-2: 11, 112, 102;
    --c-tlt-3: 13, 100, 93;
    --c-tlt-4: 14, 88, 82;
    --c-tlt-5: 16, 80, 74;
    --c-tlt-6: 16, 80, 74;
    --c-tlt-7: 12, 100, 124;

    /* 浅色下青色实心块变深，块上的文字要反过来用白色；琥珀色仍偏亮，保持深字 */
    --c-on-accent: 255, 255, 255;

    --c-green: 22, 163, 74;
    --c-green-d: 21, 128, 61;
    --c-amber: 217, 119, 6;
    --c-amber-2: 202, 138, 4;
    --c-amber-fill: 245, 178, 45;
    --c-amber-d: 180, 83, 9;
    --c-rose: 225, 29, 72;
    --c-rose-2: 236, 72, 100;
    --c-mint: 20, 170, 158;
    --c-blue: 37, 99, 235;
    --c-blue-2: 59, 130, 246;
    --c-blue-d: 29, 78, 216;
    --c-purple: 147, 51, 234;
    --c-violet: 124, 58, 237;
    --c-fuchsia: 192, 38, 211;

    --c-green-t: 21, 128, 61;
    --c-amber-t: 161, 98, 7;
    --c-amber-t2: 146, 64, 14;
    --c-amber-t3: 161, 98, 7;
    --c-rose-t: 190, 18, 60;
    --c-rose-t2: 190, 18, 60;
    --c-blue-t: 29, 78, 216;
    --c-blue-t2: 29, 78, 216;
    --c-blue-t3: 29, 78, 216;
    --c-purple-t: 126, 34, 206;
    --c-purple-t2: 109, 40, 217;
    --c-fuchsia-t: 162, 28, 175;

    --c-grad-1: 17, 45, 86;
    --c-grad-2: 13, 124, 116;
    --c-grad-3: 13, 148, 136;
    --c-grad-4: 15, 118, 110;
    --c-grad-5: 29, 78, 216;

    --c-page-a: 232, 241, 252;
    --c-page-b: 219, 234, 250;
    --c-page-c: 226, 239, 248;
    --page-logo-opacity: 0.05;
    --page-vignette: radial-gradient(circle at 30% 18%, #ffffff 0%, #dce9f8 78%);
}

.hidden {
    display: none !important;
}

/* 预留滚动条槽位，避免弹框开关时页面横向跳动 */
html {
    scrollbar-gutter: stable;
}

/* ---------- 布局宽度：表单保持窄栏，工作区铺满宽屏 ---------- */

main#form.container {
    max-width: 1480px !important;
    width: 100%;
    padding: 28px 30px 36px;
}

/* styles.css 在此断点把 .container 压到 900px，这里必须同断点覆盖 */
@media (min-width: 1400px) {
    main#form.container {
        max-width: 1480px !important;
    }
}

/* 首页不再是整屏 landing，撑满视口避免底部露出 html 渐变 */
body {
    min-height: 100vh;
}

main#form.container {
    background-color: transparent;
    box-shadow: none;
    margin-bottom: 72px;
}

main#form.container:hover {
    box-shadow: none;
}

/* ---------- 首页顶部品牌区 ---------- */

/* 首屏铺满视口：body 上边距 40px + main 上边距 28px */
.landing-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 68px);
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 20px 56px;
    text-align: center;
}

.landing-hero::before {
    content: "";
    position: absolute;
    inset: -10% 12% 20%;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 42%, rgba(var(--c-tl-1), 0.16), transparent 68%);
}

.landing-hero > * {
    position: relative;
    z-index: 1;
}

.landing-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border: 1px solid rgba(var(--c-tl-2), 0.28);
    border-radius: 999px;
    background: rgba(var(--c-tl-1), 0.12);
    color: rgb(var(--c-tlt-3));
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.landing-hero h1 {
    margin: 22px 0 0;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.26;
    color: rgb(var(--c-ink-1));
}

.landing-hero-accent {
    background-image: linear-gradient(96deg, rgb(var(--c-grad-3)), rgb(var(--c-grad-4)) 42%, rgb(var(--c-grad-5)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.landing-hero p {
    max-width: 900px;
    margin: 22px auto 0;
    font-size: 1.06rem;
    line-height: 2;
    color: rgba(var(--c-ink-3), 0.7);
}

.landing-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 34px;
    padding: 14px 36px;
    border-radius: 999px;
    background: linear-gradient(96deg, rgb(var(--c-tl-4)), rgb(var(--c-tl-2)));
    color: rgb(var(--c-on-accent));
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 14px 34px rgba(var(--c-tl-1), 0.28);
    transition: all 0.22s ease;
}

.landing-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(var(--c-tl-1), 0.38);
    color: rgb(var(--c-on-accent));
    text-decoration: none;
}

@media (max-width: 991px) {
    .landing-hero {
        min-height: calc(100vh - 60px);
        padding: 32px 8px 40px;
    }

    .landing-hero h1 {
        font-size: 2.1rem;
    }

    .landing-hero p {
        font-size: 0.92rem;
        line-height: 1.9;
    }
}

/* ---------- 首页寻源控制台：与「寻源进度」雷达同一套配色语言 ---------- */

.sourcing-console {
    position: relative;
    max-width: 1120px;
    margin: 0 auto 6px;
    padding: 38px 40px 32px;
    border: 1px solid rgba(var(--c-tl-2), 0.2);
    border-radius: 24px;
    background:
        radial-gradient(circle at 12% -4%, rgba(var(--c-tl-1), 0.18), transparent 42%),
        radial-gradient(circle at 88% 6%, rgba(var(--c-sky), 0.1), transparent 46%),
        linear-gradient(160deg, rgba(var(--c-surf-1), 0.94), rgba(var(--c-surf-5), 0.3));
    box-shadow: inset 0 1px 0 rgba(var(--c-veil), 0.06), 0 26px 70px rgba(var(--c-shadow), 0.45);
    overflow: hidden;
    text-align: left;
}

/* 雷达同款网格纹理 */
.sourcing-console::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(var(--c-tl-2), 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--c-tl-2), 0.05) 1px, transparent 1px);
    background-size: 34px 34px, 34px 34px;
    -webkit-mask-image: radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.95), transparent 72%);
    mask-image: radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.95), transparent 72%);
}

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

.console-hero {
    position: relative;
    z-index: 1;
    padding-bottom: 24px;
    text-align: center;
}

.console-orb {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background:
        linear-gradient(rgba(var(--c-tl-2), 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--c-tl-2), 0.08) 1px, transparent 1px),
        radial-gradient(circle, rgba(var(--c-tl-5), 0.3), rgba(var(--c-surf-3), 0.12) 68%, transparent 69%);
    background-size: 17px 17px, 17px 17px, 100% 100%;
    border: 1px solid rgba(var(--c-tl-3), 0.24);
    box-shadow: 0 0 46px rgba(var(--c-tl-1), 0.2);
}

.console-orb-ring,
.console-orb-sweep,
.console-orb-core,
.console-orb-node {
    position: absolute;
    display: block;
}

.console-orb-ring {
    inset: 50%;
    border: 1px solid rgba(var(--c-tl-3), 0.22);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.console-orb-ring-outer {
    width: 90px;
    height: 90px;
}

.console-orb-ring-inner {
    width: 62px;
    height: 62px;
}

.console-orb-sweep {
    inset: 4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 70%, rgba(var(--c-tl-2), 0.42) 94%, transparent 100%);
    animation: procurement-radar-sweep 5.6s linear infinite;
}

.console-orb-core {
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(var(--c-tl-5), 0.9), rgba(var(--c-tl-1), 0.75));
    box-shadow: 0 0 0 7px rgba(var(--c-tl-1), 0.12), 0 0 26px rgba(var(--c-tl-2), 0.4);
    animation: console-orb-breathe 4.2s ease-in-out infinite;
    z-index: 2;
}

.console-orb-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.console-orb-node {
    width: 7px;
    height: 7px;
    border: 2px solid rgba(var(--c-mint), 0.9);
    border-radius: 50%;
    background: rgb(var(--c-tl-1));
    box-shadow: 0 0 10px rgba(var(--c-tl-2), 0.7);
    animation: procurement-radar-node 2.4s ease-in-out infinite;
}

.console-orb-node-1 { left: 12px; top: 30px; }
.console-orb-node-2 { right: 11px; top: 24px; animation-delay: 0.3s; }
.console-orb-node-3 { right: 22px; bottom: 14px; animation-delay: 0.6s; }
.console-orb-node-4 { left: 18px; bottom: 22px; animation-delay: 0.9s; }

.console-title {
    margin: 0;
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.25;
    background: linear-gradient(94deg, rgb(var(--c-grad-1)) 10%, rgb(var(--c-grad-2)) 56%, rgb(var(--c-grad-3)) 96%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.console-subtitle {
    margin: 12px 0 0;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: rgba(var(--c-ink-3), 0.66);
}

.console-form {
    position: relative;
    z-index: 1;
}

/* ---------- 主输入框 ---------- */

.console-field {
    position: relative;
    padding: 18px 20px 12px;
    border: 1px solid rgba(var(--c-tl-3), 0.18);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(var(--c-surf-2), 0.86), rgba(var(--c-surf-4), 0.92));
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.console-field.is-focus {
    border-color: rgba(var(--c-tl-2), 0.52);
    box-shadow: 0 0 0 4px rgba(var(--c-tl-1), 0.1), 0 18px 44px rgba(var(--c-shadow), 0.4);
}

.console-textarea {
    display: block;
    width: 100%;
    min-height: 108px;
    max-height: 320px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgb(var(--c-ink-2));
    font-family: inherit;
    font-size: 1.02rem;
    line-height: 1.78;
    resize: none;
    outline: none;
    overflow-y: auto;
}

.console-textarea::placeholder {
    color: rgba(var(--c-ink-4), 0.5);
}

.console-field-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(var(--c-ink-4), 0.1);
}

.console-counter {
    font-size: 0.72rem;
    color: rgba(var(--c-ink-4), 0.55);
    font-variant-numeric: tabular-nums;
}

.console-counter b {
    color: rgba(var(--c-ink-3), 0.9);
    font-weight: 600;
}

.console-counter.is-limit b {
    color: rgb(var(--c-rose-t));
}

.console-field-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.console-ai-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: rgba(var(--c-tlt-3), 0.72);
}

.console-help-btn {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(var(--c-tl-3), 0.35);
    border-radius: 50%;
    background: rgba(var(--c-tl-1), 0.12);
    color: rgb(var(--c-tlt-3));
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.console-help-btn:hover {
    border-color: rgb(var(--c-tl-2));
    background: rgba(var(--c-tl-1), 0.28);
    color: rgb(var(--c-tlt-5));
    box-shadow: 0 0 0 4px rgba(var(--c-tl-1), 0.12);
}

/* ---------- 数量 / 地区 ---------- */

.console-grid {
    margin-top: 16px;
    gap: 0 18px;
}

.console-group {
    min-width: 0;
    margin-bottom: 14px;
}

.console-label {
    display: block;
    margin: 0 0 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(var(--c-ink-3), 0.76);
}

.console-input-wrap {
    position: relative;
}

.console-input-icon,
.console-input-caret {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.console-input-icon {
    left: 15px;
    font-size: 0.82rem;
    color: rgba(var(--c-tlt-3), 0.66);
}

.console-input-caret {
    right: 15px;
    font-size: 0.68rem;
    color: rgba(var(--c-ink-4), 0.55);
}

.console-input {
    width: 100%;
    height: 48px;
    padding: 0 38px 0 40px;
    border: 1px solid rgba(var(--c-ink-4), 0.16);
    border-radius: 12px;
    background-color: rgba(var(--c-surf-2), 0.72);
    color: rgb(var(--c-ink-2));
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.console-input-plain {
    padding: 0 14px;
}

.console-input::placeholder {
    color: rgba(var(--c-ink-4), 0.45);
}

.console-input:hover {
    border: 1px solid rgba(var(--c-tl-3), 0.3);
    background-color: rgba(var(--c-surf-2), 0.86);
    box-shadow: none;
}

.console-input:focus {
    border: 1px solid rgba(var(--c-tl-2), 0.5);
    background-color: rgba(var(--c-surf-2), 0.95);
    box-shadow: 0 0 0 3px rgba(var(--c-tl-1), 0.1);
    color: rgb(var(--c-ink-2));
    outline: none;
}

/* ---------- 高级设置 ---------- */

.console-advanced {
    margin-top: 16px;
    padding: 18px 20px 6px;
    border: 1px solid rgba(var(--c-ink-4), 0.14);
    border-radius: 16px;
    background: rgba(var(--c-surf-4), 0.55);
    animation: console-fade-in 0.28s ease;
}

.console-advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.console-group-wide {
    grid-column: 1 / -1;
}

.console-select {
    width: 100%;
    height: 46px;
    padding: 0 36px 0 14px;
    border: 1px solid rgba(var(--c-ink-4), 0.16);
    border-radius: 12px;
    background-color: rgba(var(--c-surf-2), 0.72);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 14px 14px;
    color: rgb(var(--c-ink-2));
    font-size: 0.88rem;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.console-select:hover,
.console-select:focus {
    border-color: rgba(var(--c-tl-2), 0.5);
    background-color: rgba(var(--c-surf-2), 0.95);
    box-shadow: 0 0 0 3px rgba(var(--c-tl-1), 0.1);
    color: rgb(var(--c-ink-2));
    outline: none;
}

.console-select option {
    background-color: rgb(var(--c-surf-2));
    color: rgb(var(--c-ink-2));
}

.console-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.7rem;
    line-height: 1.5;
    color: rgba(var(--c-ink-4), 0.6);
}

/* ---------- 操作按钮 ---------- */

.console-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.console-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 52px;
    padding: 0 26px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
}

.console-btn-primary {
    flex: 1 1 300px;
    background: linear-gradient(96deg, rgb(var(--c-tl-4)), rgb(var(--c-tl-2)));
    color: rgb(var(--c-on-accent));
    box-shadow: 0 12px 30px rgba(var(--c-tl-1), 0.26);
}

.console-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(var(--c-tl-1), 0.36);
}

.console-btn-ghost {
    flex: 0 0 auto;
    border: 1px solid rgba(var(--c-ink-4), 0.24);
    background: rgba(var(--c-ink-4), 0.08);
    color: rgba(var(--c-ink-2), 0.86);
}

.console-btn-ghost:hover {
    border-color: rgba(var(--c-tl-3), 0.5);
    background: rgba(var(--c-tl-1), 0.12);
    color: rgb(var(--c-tlt-5));
}

.console-btn-link {
    height: auto;
    margin-left: auto;
    padding: 8px 10px;
    background: none;
    color: rgba(var(--c-ink-4), 0.78);
    font-size: 0.82rem;
    font-weight: 500;
}

.console-btn-link:hover,
.console-btn-link[aria-expanded="true"] {
    color: rgb(var(--c-tlt-3));
}

.console-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.console-form .preview-requirements {
    margin-top: 16px;
    border-color: rgba(var(--c-tl-3), 0.2);
    background: rgba(var(--c-surf-2), 0.6);
    color: rgba(var(--c-ink-2), 0.86);
    font-size: 0.84rem;
}

/* ---------- 搜索结果后的紧凑形态 ---------- */

.sourcing-console.is-compact {
    padding: 20px 24px;
    border-radius: 18px;
}

.sourcing-console.is-compact::before {
    opacity: 0.4;
}

.sourcing-console.is-compact .console-field {
    padding: 14px 16px 10px;
}

.sourcing-console.is-compact .console-textarea {
    min-height: 66px;
    font-size: 0.95rem;
}

.sourcing-console.is-compact .console-grid {
    margin-top: 12px;
}

.sourcing-console.is-compact .console-actions {
    margin-top: 14px;
}

.sourcing-console.is-compact .console-btn {
    height: 46px;
    font-size: 0.9rem;
}

@keyframes console-orb-breathe {
    50% { transform: translate(-50%, -50%) scale(1.06); }
}

@keyframes console-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 991px) {
    .sourcing-console {
        padding: 28px 20px 24px;
        border-radius: 20px;
    }

    .console-title {
        font-size: 1.72rem;
    }

    .console-orb {
        width: 84px;
        height: 84px;
    }

    .console-orb-ring-outer { width: 72px; height: 72px; }
    .console-orb-ring-inner { width: 50px; height: 50px; }
    .console-orb-core { width: 44px; height: 44px; }
    .console-orb-logo { width: 32px; height: 32px; }
    .console-orb-node { display: none; }

    .console-advanced-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .console-subtitle {
        font-size: 0.8rem;
    }

    .console-ai-hint {
        display: none;
    }

    .console-btn-primary,
    .console-btn-ghost {
        flex: 1 1 100%;
    }

    .console-btn-link {
        margin: 0 auto;
    }
}

/* 宽屏下把两个短输入框并排，避免整行留白 */
.form-row-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
}

@media (max-width: 760px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

.workspace {
    width: 100%;
}

.workspace .margin-div {
    padding: 26px 28px;
}

@media (max-width: 991px) {
    main#form.container {
        padding: 20px 16px 28px;
    }

    .workspace .margin-div {
        padding: 18px 16px;
    }
}

/* ---------- 统一面板标题头 ---------- */

.panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(var(--c-tl-2), 0.22);
    text-align: left;
}

.panel-head-main {
    min-width: 0;
    flex: 1 1 320px;
}

.panel-head h2,
.research-output-container .panel-head h2,
.report-container .panel-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    border-bottom: none;
    font-size: 1.42rem;
    font-weight: 650;
    line-height: 1.3;
    color: rgb(var(--c-ink-0));
}

.panel-head .panel-icon,
.report-container .panel-head h2::before {
    margin-right: 0;
    font-size: 1.05rem;
    color: rgb(var(--c-tlt-2));
}

.panel-head h2 .status-pill {
    margin-left: 0;
}

.panel-head-desc {
    margin: 6px 0 0;
    font-size: 0.84rem;
    line-height: 1.6;
    color: rgba(var(--c-ink-2), 0.58);
}

.panel-head-pill {
    flex: 0 0 auto;
    align-self: center;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgb(var(--c-tlt-3));
    background: rgba(var(--c-tl-1), 0.14);
    border: 1px solid rgba(var(--c-tl-1), 0.32);
    white-space: nowrap;
}

#downloadActions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
}

.report-actions-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: rgba(var(--c-ink-4), 0.85);
}

.report-actions-label i {
    color: rgb(var(--c-tlt-2));
}

.preview-requirements {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(var(--c-veil), 0.08);
    border: 1px solid rgba(var(--c-veil), 0.12);
    text-align: left;
    font-size: 0.9rem;
}

.preview-requirements ul {
    margin: 8px 0 0;
    padding-left: 1.2rem;
}

.status-pill {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
    background: rgba(var(--c-tl-1), 0.18);
    color: rgb(var(--c-tlt-3));
}

.status-pill.running {
    background: rgba(var(--c-blue), 0.2);
    color: rgb(var(--c-blue-t));
}

.status-pill.completed {
    background: rgba(var(--c-green), 0.18);
    color: rgb(var(--c-green-t));
}

.status-pill.partial_ready {
  background: rgba(var(--c-amber), 0.15);
  color: rgb(var(--c-amber-t3));
  border-color: rgba(var(--c-amber), 0.35);
}

.status-pill.failed {
    background: rgba(var(--c-rose), 0.2);
    color: rgb(var(--c-rose-t));
}

.progress-activity {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    margin: 16px 0 18px;
    padding: 18px 20px;
    border: 1px solid rgba(var(--c-tl-2), 0.2);
    border-radius: 16px;
    background:
        radial-gradient(circle at 10% 20%, rgba(var(--c-tl-1), 0.15), transparent 34%),
        linear-gradient(135deg, rgba(var(--c-surf-1), 0.88), rgba(var(--c-surf-5), 0.24));
    box-shadow: inset 0 1px 0 rgba(var(--c-veil), 0.06), 0 18px 45px rgba(var(--c-shadow), 0.2);
    overflow: hidden;
    position: relative;
    text-align: left;
}

.progress-activity::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(var(--c-tl-3), 0.06) 50%, transparent 65%);
    transform: translateX(-100%);
}

.progress-activity.is-running::after {
    animation: procurement-panel-shimmer 3.6s ease-in-out infinite;
}

.progress-radar {
    width: 116px;
    height: 116px;
    position: relative;
    justify-self: center;
    border-radius: 50%;
    background:
        linear-gradient(rgba(var(--c-tl-2), 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--c-tl-2), 0.08) 1px, transparent 1px),
        radial-gradient(circle, rgba(var(--c-tl-5), 0.24), rgba(var(--c-surf-3), 0.1) 68%, transparent 69%);
    background-size: 18px 18px, 18px 18px, 100% 100%;
    border: 1px solid rgba(var(--c-tl-3), 0.22);
    box-shadow: 0 0 30px rgba(var(--c-tl-1), 0.12);
}

.radar-ring,
.radar-sweep,
.radar-core,
.radar-node {
    position: absolute;
    display: block;
}

.radar-ring {
    inset: 50%;
    border: 1px solid rgba(var(--c-tl-3), 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radar-ring-outer {
    width: 84px;
    height: 84px;
}

.radar-ring-inner {
    width: 48px;
    height: 48px;
}

.radar-sweep {
    inset: 5px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 72%, rgba(var(--c-tl-2), 0.5) 94%, transparent 100%);
    opacity: 0.2;
}

.progress-activity.is-running .radar-sweep {
    opacity: 0.85;
    animation: procurement-radar-sweep 2.4s linear infinite;
}

.radar-core {
    width: 32px;
    height: 32px;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: rgb(var(--c-tlt-5));
    background: linear-gradient(145deg, rgb(var(--c-tl-5)), rgb(var(--c-tl-1)));
    box-shadow: 0 0 0 6px rgba(var(--c-tl-1), 0.12), 0 0 24px rgba(var(--c-tl-2), 0.34);
    z-index: 2;
}

.progress-activity.is-running .radar-core {
    animation: procurement-radar-core 1.8s ease-in-out infinite;
}

.radar-node {
    width: 8px;
    height: 8px;
    border: 2px solid rgba(var(--c-mint), 0.88);
    border-radius: 50%;
    background: rgb(var(--c-tl-1));
    box-shadow: 0 0 10px rgba(var(--c-tl-2), 0.7);
}

.radar-node-1 { left: 17px; top: 33px; }
.radar-node-2 { right: 14px; top: 26px; }
.radar-node-3 { right: 24px; bottom: 16px; }
.radar-node-4 { left: 20px; bottom: 25px; }

.progress-activity.is-running .radar-node {
    animation: procurement-radar-node 1.6s ease-in-out infinite;
}

.progress-activity.is-running .radar-node-2 { animation-delay: 0.28s; }
.progress-activity.is-running .radar-node-3 { animation-delay: 0.56s; }
.progress-activity.is-running .radar-node-4 { animation-delay: 0.84s; }

.progress-activity.is-completed .radar-core {
    background: linear-gradient(145deg, rgb(var(--c-green-d)), rgb(var(--c-green)));
    box-shadow: 0 0 0 6px rgba(var(--c-green), 0.12), 0 0 24px rgba(var(--c-green), 0.3);
}

.progress-activity-content {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.progress-activity-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.progress-live-label {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: rgb(var(--c-tlt-4));
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.progress-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgb(var(--c-tl-3));
    box-shadow: 0 0 0 4px rgba(var(--c-tl-2), 0.12);
}

.progress-activity.is-running .progress-live-dot {
    animation: procurement-live-dot 1.5s ease-out infinite;
}

.progress-activity-heading h3 {
    margin: 5px 0 0;
    color: rgb(var(--c-ink-1));
    font-size: 1.2rem;
    font-weight: 650;
}

.progress-percent {
    flex: 0 0 auto;
    min-width: 54px;
    padding: 5px 10px;
    border: 1px solid rgba(var(--c-tl-3), 0.22);
    border-radius: 999px;
    color: rgb(var(--c-tlt-5));
    background: rgba(var(--c-tl-5), 0.18);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
}

.progress-activity-message {
    margin: 8px 0 12px;
    color: rgba(var(--c-ink-2), 0.72);
    font-size: 0.86rem;
    line-height: 1.55;
}

/* 整体耗时预期：仅在运行中出现 */
.progress-eta-hint {
    display: none;
    align-items: center;
    gap: 13px;
    margin: 0 0 13px;
    padding: 12px 16px;
    border: 1px solid rgba(var(--c-tl-2), 0.26);
    border-radius: 12px;
    background: linear-gradient(96deg, rgba(var(--c-tl-1), 0.18), rgba(var(--c-surf-1), 0.32));
}

.progress-activity.is-running .progress-eta-hint {
    display: flex;
}

.progress-eta-hint-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(var(--c-tl-3), 0.3);
    border-radius: 50%;
    background: rgba(var(--c-tl-1), 0.18);
    color: rgb(var(--c-tlt-3));
    font-size: 0.88rem;
    animation: procurement-eta-pulse 2.6s ease-in-out infinite;
}

.progress-eta-hint-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.progress-eta-hint strong {
    color: rgb(var(--c-tlt-6));
    font-size: 1.04rem;
    font-weight: 600;
    line-height: 1.3;
}

.progress-eta-hint strong b {
    margin: 0 2px;
    color: rgb(var(--c-tlt-3));
    font-size: 1.26rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.progress-eta-hint-text > span {
    color: rgba(var(--c-ink-3), 0.62);
    font-size: 0.76rem;
    line-height: 1.5;
}

@keyframes procurement-eta-pulse {
    50% {
        box-shadow: 0 0 0 6px rgba(var(--c-tl-1), 0.08);
        color: rgb(var(--c-tlt-5));
    }
}

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

.progress-metric {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid rgba(var(--c-ink-4), 0.12);
    border-radius: 10px;
    background: rgba(var(--c-surf-1), 0.4);
}

.progress-metric-label {
    display: block;
    margin-bottom: 3px;
    color: rgba(var(--c-ink-4), 0.82);
    font-size: 0.68rem;
}

.progress-metric strong {
    color: rgb(var(--c-ink-1));
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

/* 剩余时间改为文字提示时，避免撑破指标卡 */
.progress-metric strong.is-text {
    font-size: 0.82rem;
    color: rgb(var(--c-tlt-4));
}

.progress-channel-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 11px;
    color: rgba(var(--c-ink-3), 0.72);
    font-size: 0.7rem;
}

.progress-channel-strip span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.progress-channel-strip i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(var(--c-ink-4), 0.5);
}

.progress-activity.is-running .progress-channel-strip i {
    background: rgb(var(--c-tl-2));
    box-shadow: 0 0 7px rgba(var(--c-tl-2), 0.6);
}

@keyframes procurement-radar-sweep {
    to { transform: rotate(360deg); }
}

@keyframes procurement-radar-core {
    50% { transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes procurement-radar-node {
    50% { opacity: 0.38; transform: scale(0.72); }
}

@keyframes procurement-live-dot {
    0% { box-shadow: 0 0 0 0 rgba(var(--c-tl-2), 0.52); }
    70% { box-shadow: 0 0 0 7px rgba(var(--c-tl-2), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--c-tl-2), 0); }
}

@keyframes procurement-panel-shimmer {
    0%, 45% { transform: translateX(-100%); }
    75%, 100% { transform: translateX(100%); }
}

.stage-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(var(--c-veil), 0.12);
    overflow: hidden;
    margin: 12px 0 16px;
}

.stage-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(to right, rgb(var(--c-tl-4)), rgb(var(--c-tl-1)));
    transition: width 0.35s ease;
}

.stage-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.stage-list li {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(var(--c-veil), 0.08);
    color: rgba(var(--c-ink-0), 0.65);
    border: 1px solid rgba(var(--c-veil), 0.08);
}

.stage-list li.active {
    color: rgb(var(--c-ink-0));
    border-color: rgba(var(--c-tl-1), 0.55);
    background: rgba(var(--c-tl-1), 0.22);
}

.stage-list li.done {
    color: rgb(var(--c-green-t));
    border-color: rgba(var(--c-green), 0.35);
}

.stage-message {
    font-size: 0.9rem;
    color: rgba(var(--c-ink-0), 0.75);
    margin-bottom: 0;
}

.search-sources-table tr.provider-waiting {
    color: rgba(var(--c-ink-3), 0.58);
}

@media (max-width: 760px) {
    .progress-activity {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    .progress-radar {
        width: 76px;
        height: 76px;
    }

    .radar-ring-outer {
        width: 58px;
        height: 58px;
    }

    .radar-ring-inner {
        width: 34px;
        height: 34px;
    }

    .radar-node {
        display: none;
    }

    .progress-metrics {
        grid-template-columns: repeat(2, minmax(86px, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .progress-activity::after,
    .progress-activity.is-running .radar-sweep,
    .progress-activity.is-running .radar-core,
    .progress-activity.is-running .radar-node,
    .progress-activity.is-running .progress-live-dot,
    .progress-eta-hint-icon {
        animation: none !important;
    }
}

.log-output {
    max-height: 260px;
    overflow-y: auto;
    padding: 12px;
    border-radius: 8px;
    background: rgba(var(--c-shade), 0.25);
    border: 1px solid rgba(var(--c-veil), 0.08);
    text-align: left;
    font-size: 0.85rem;
}

.log-item {
    padding: 4px 0;
    border-bottom: 1px solid rgba(var(--c-veil), 0.05);
    color: rgba(var(--c-ink-0), 0.82);
}

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

.result-summary {
    text-align: left;
    font-size: 0.95rem;
}

.result-summary p {
    margin-bottom: 0.5rem;
}

.summary-waiting {
    color: rgba(var(--c-ink-0), 0.55);
}

.summary-request {
    padding: 16px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--c-tl-1), 0.1), rgba(var(--c-veil), 0.03));
    border: 1px solid rgba(var(--c-tl-2), 0.18);
}

.summary-request-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    color: rgba(var(--c-tlt-3), 0.85);
}

.summary-request-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgb(var(--c-ink-0));
}

.summary-request-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.summary-request-pills span {
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    color: rgba(var(--c-ink-2), 0.82);
    background: rgba(var(--c-veil), 0.07);
    border: 1px solid rgba(var(--c-veil), 0.12);
}

.summary-request-pills i {
    margin-right: 3px;
    font-size: 0.72rem;
    color: rgba(var(--c-tlt-3), 0.8);
}

.summary-channels {
    font-size: 0.83rem;
    color: rgba(var(--c-ink-2), 0.72);
}

.summary-channels strong {
    color: rgba(var(--c-ink-4), 0.9);
    font-weight: 600;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.summary-stat {
    position: relative;
    padding: 15px 16px;
    border-radius: 12px;
    background: rgba(var(--c-veil), 0.04);
    border: 1px solid rgba(var(--c-veil), 0.09);
    overflow: hidden;
}

.summary-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--stat-accent, rgb(var(--c-tl-2)));
}

.summary-stat-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: rgba(var(--c-ink-2), 0.6);
}

.summary-stat-head i {
    color: var(--stat-accent, rgb(var(--c-tlt-2)));
    font-size: 0.8rem;
}

.summary-stat-num {
    display: block;
    margin-top: 6px;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    color: rgb(var(--c-ink-0));
}

.summary-stat-num small {
    margin-left: 3px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(var(--c-ink-2), 0.55);
}

.summary-stat-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.74rem;
    color: rgba(var(--c-ink-2), 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: rgba(var(--c-amber-t), 0.82);
}

.summary-note i {
    margin-top: 2px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.supplier-table {
    margin-bottom: 0;
    font-size: 0.85rem;
}

.supplier-table .empty-cell {
    text-align: center;
    color: rgba(var(--c-ink-0), 0.55);
    padding: 24px 12px;
}

.supplier-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.supplier-card {
    text-align: left;
    padding: 14px;
    border-radius: 10px;
    background: rgba(var(--c-veil), 0.08);
    border: 1px solid rgba(var(--c-veil), 0.1);
}

.supplier-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.supplier-card p {
    margin: 0 0 4px;
    font-size: 0.85rem;
    color: rgba(var(--c-ink-0), 0.75);
}

.report-placeholder {
    color: rgba(var(--c-ink-0), 0.55);
    padding: 12px 0;
}

#reportContainer {
    text-align: left;
    min-height: 80px;
}

#chatPanel.chat-container {
    display: block;
}

#chatPanel.hidden {
    display: none !important;
}

.chip {
    border-color: rgba(var(--c-veil), 0.35) !important;
    color: rgb(var(--c-ink-0)) !important;
}

.chip:hover {
    background: rgba(var(--c-tl-1), 0.25) !important;
    border-color: rgb(var(--c-tl-1)) !important;
}

textarea.form-control,
input.form-control {
    background-color: rgba(var(--c-veil), 0.1);
    border: none;
    color: rgb(var(--c-ink-0));
}

textarea.form-control:focus,
input.form-control:focus {
    background-color: #dfe4ea;
    color: #111;
}

.history-entry {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}

.history-entry-main {
    min-width: 0;
    flex: 1;
}

.history-delete-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 1px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(var(--c-ink-3), 0.7);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.history-delete-btn:hover,
.history-delete-btn:focus-visible {
    background: rgba(225, 29, 72, 0.14);
    color: #e11d48;
    outline: none;
}

.history-entry h4 {
    font-size: 0.95rem;
    margin: 0 0 6px;
    color: rgb(var(--c-ink-0));
}

.history-entry p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(var(--c-ink-0), 0.65);
}

#resetBtn {
    cursor: pointer;
}

.search-sources-panel {
    margin-top: 16px;
    padding: 14px;
    border-radius: 10px;
    background: rgba(var(--c-shade), 0.22);
    border: 1px solid rgba(var(--c-veil), 0.08);
    text-align: left;
}

.search-sources-panel h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.search-sources-table {
    margin-bottom: 0;
    font-size: 0.82rem;
}

.search-sources-table .best-row {
    background: rgba(var(--c-tl-1), 0.18) !important;
}

.summary-search-sources {
    margin-top: 12px;
}

.summary-search-sources-body .provider-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.provider-stat-pill {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(var(--c-veil), 0.08);
    border: 1px solid rgba(var(--c-veil), 0.1);
}

.provider-stat-pill.best {
    border-color: rgba(var(--c-tl-1), 0.55);
    background: rgba(var(--c-tl-1), 0.16);
}

.provider-stat-pill .name {
    font-weight: 700;
    font-size: 0.85rem;
}

.provider-stat-pill .meta {
    font-size: 0.75rem;
    color: rgba(var(--c-ink-0), 0.7);
}

/* ---------- 企业线索列表 ---------- */

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

.lead-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.lead-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(var(--c-ink-2), 0.58);
}

.lead-legend-item .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(var(--c-veil), 0.3);
}

.lead-legend-item .dot.tier-confirmed {
    background: rgb(var(--c-green));
}

.lead-legend-item .dot.tier-likely {
    background: rgb(var(--c-amber));
}

.lead-legend-item .dot.tier-rejected {
    background: rgb(var(--c-rose));
}

.lead-th-with-help {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tier-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(var(--c-ink-4), 0.85);
    font-size: 0.72rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.tier-help-btn:hover,
.tier-help-btn:focus-visible {
    color: rgb(var(--c-tl-2));
    background: rgba(var(--c-tl-1), 0.14);
    outline: none;
    transform: translateY(-0.5px);
}

.lead-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgb(var(--c-tlt-4));
    background: rgba(var(--c-tl-1), 0.12);
    border: 1px solid rgba(var(--c-tl-1), 0.32);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.lead-tool-btn:hover {
    background: rgba(var(--c-tl-1), 0.22);
    border-color: rgba(var(--c-tl-1), 0.5);
}

/* 表格是本页最宽的内容，面板内边距收窄让列有更多空间 */
.workspace .lead-panel {
    padding-left: 20px;
    padding-right: 20px;
}

.lead-list {
    text-align: left;
}

.lead-empty {
    padding: 30px 12px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(var(--c-ink-0), 0.48);
    border: 1px dashed rgba(var(--c-line), 0.32);
    border-radius: 12px;
}

.lead-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(var(--c-line), 0.24);
    background: rgba(var(--c-surf-4), 0.5);
}

.lead-table {
    width: 100%;
    min-width: 1250px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.84rem;
    color: rgba(var(--c-ink-2), 0.88);
}

.lead-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 11px 12px;
    text-align: left;
    white-space: nowrap;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(var(--c-ink-4), 0.92);
    background: linear-gradient(180deg, rgba(var(--c-surf-4), 0.99), rgba(var(--c-surf-4), 0.99));
    border-bottom: 1px solid rgba(var(--c-line), 0.34);
}

.lead-table tbody td {
    padding: 11px 12px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(var(--c-line), 0.14);
}

.lead-table tbody tr:last-child td {
    border-bottom: none;
}

.lead-row {
    scroll-margin-top: 90px;
    transition: background 0.18s ease;
}

.lead-row:hover {
    background: rgba(var(--c-tl-2), 0.06);
}

.lead-row.is-open {
    background: rgba(var(--c-tl-2), 0.09);
}

.lead-row.is-open > td {
    border-bottom-color: transparent;
}

.lead-row.is-target {
    box-shadow: inset 0 0 0 1px rgba(var(--c-tl-2), 0.55);
}

/* 列宽与分层色条 */
.lead-col-toggle {
    width: 40px;
}

.lead-col-rank {
    width: 48px;
}

.lead-col-region {
    width: 132px;
}

.lead-col-tier {
    width: 110px;
}

.lead-col-role {
    width: 114px;
}

.lead-col-score {
    width: 98px;
}

.lead-col-contact {
    width: 242px;
}

.lead-col-fit {
    width: 120px;
}

.lead-col-evidence {
    width: 76px;
}

.lead-col-op {
    width: 106px;
}

.lead-table tbody .lead-cell-toggle {
    padding-left: 9px;
    padding-right: 0;
    border-left: 3px solid transparent;
}

.lead-row.tier-confirmed > .lead-cell-toggle {
    border-left-color: rgb(var(--c-green));
}

.lead-row.tier-likely > .lead-cell-toggle {
    border-left-color: rgb(var(--c-amber));
}

.lead-row.tier-rejected > .lead-cell-toggle {
    border-left-color: rgb(var(--c-rose));
}

.lead-toggle {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.7rem;
    color: rgba(var(--c-ink-4), 0.9);
    background: rgba(var(--c-veil), 0.06);
    border: 1px solid rgba(var(--c-veil), 0.1);
    cursor: pointer;
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.lead-toggle:hover {
    color: rgb(var(--c-tlt-3));
    background: rgba(var(--c-tl-1), 0.18);
}

.lead-row.is-open .lead-toggle {
    transform: rotate(90deg);
    color: rgb(var(--c-tlt-3));
    background: rgba(var(--c-tl-1), 0.22);
}

.lead-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    color: rgba(var(--c-ink-2), 0.75);
    background: rgba(var(--c-veil), 0.06);
}

.lead-row.is-top .lead-rank {
    color: #0f172a;
    background: linear-gradient(135deg, rgb(var(--c-tl-3)), rgb(var(--c-tl-2)));
}

/* 企业名称列 */
.lead-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.lead-logo {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    color: rgb(var(--c-ink-0));
    box-shadow: 0 4px 10px rgba(var(--c-shadow), 0.3);
}

.lead-name-text {
    min-width: 0;
}

.lead-name {
    display: block;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
    font-weight: 600;
    color: rgb(var(--c-ink-0));
    text-decoration: none;
}

a.lead-name:hover {
    color: rgb(var(--c-tlt-3));
    text-decoration: none;
}

.lead-name-sub {
    display: block;
    margin-top: 2px;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.73rem;
    color: rgba(var(--c-ink-4), 0.75);
}

.lead-name-sub i {
    margin-right: 4px;
    font-size: 0.68rem;
}

.lead-name-sub .verified {
    color: rgba(var(--c-tlt-3), 0.85);
}

.lead-region {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    color: rgba(var(--c-ink-2), 0.86);
}

.lead-region i {
    flex: 0 0 auto;
    font-size: 0.72rem;
    color: rgba(var(--c-tlt-3), 0.75);
}

/* 标签 */
.lead-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 500;
    white-space: nowrap;
    color: rgba(var(--c-ink-0), 0.8);
    background: rgba(var(--c-veil), 0.06);
    border: 1px solid rgba(var(--c-veil), 0.12);
}

.lead-badge.tone-tier-confirmed {
    color: rgb(var(--c-green-t));
    background: rgba(var(--c-green), 0.14);
    border-color: rgba(var(--c-green), 0.38);
}

.lead-badge.tone-tier-likely {
    color: rgb(var(--c-amber-t));
    background: rgba(var(--c-amber), 0.14);
    border-color: rgba(var(--c-amber), 0.38);
}

.lead-badge.tone-tier-rejected {
    color: rgb(var(--c-rose-t));
    background: rgba(var(--c-rose), 0.14);
    border-color: rgba(var(--c-rose), 0.38);
}

.lead-badge.tone-role {
    color: rgb(var(--c-blue-t));
    background: rgba(var(--c-blue), 0.14);
    border-color: rgba(var(--c-blue), 0.34);
}

.lead-badge.tone-screening {
    color: rgb(var(--c-fuchsia-t));
    background: rgba(var(--c-fuchsia), 0.14);
    border-color: rgba(var(--c-fuchsia), 0.34);
}

.lead-badge.tone-structured {
    color: rgb(var(--c-purple-t2));
    background: rgba(var(--c-violet), 0.14);
    border-color: rgba(var(--c-violet), 0.34);
}

/* 评分 / 完整度 */
.lead-score-num {
    font-size: 0.98rem;
    font-weight: 700;
    color: rgb(var(--c-tlt-3));
    line-height: 1.1;
}

.lead-score-num.is-empty {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(var(--c-ink-4), 0.7);
}

.lead-bar {
    height: 4px;
    margin-top: 6px;
    border-radius: 999px;
    background: rgba(var(--c-veil), 0.09);
    overflow: hidden;
}

.lead-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgb(var(--c-tl-4)), rgb(var(--c-tl-2)));
}

.lead-bar.tone-amber span {
    background: linear-gradient(90deg, rgb(var(--c-amber-d)), rgb(var(--c-amber-2)));
}

.lead-fit-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(var(--c-ink-2), 0.88);
}

.lead-fit-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.7rem;
    color: rgba(var(--c-ink-4), 0.7);
}

/* 联系方式 */
.lead-contacts {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lead-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    font-size: 0.79rem;
    color: rgba(var(--c-ink-2), 0.9);
}

.lead-contact i {
    flex: 0 0 auto;
    width: 12px;
    font-size: 0.72rem;
    color: rgba(var(--c-tlt-3), 0.8);
}

.lead-contact span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-muted {
    font-size: 0.78rem;
    color: rgba(var(--c-ink-4), 0.65);
}

.lead-locked {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    color: rgb(var(--c-amber-t));
    background: rgba(var(--c-amber), 0.12);
    border: 1px solid rgba(var(--c-amber), 0.3);
}

.lead-evidence-count {
    font-size: 0.86rem;
    font-weight: 600;
    color: rgba(var(--c-ink-2), 0.85);
}

.lead-evidence-count small {
    margin-left: 2px;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(var(--c-ink-4), 0.65);
}

/* 操作列 */
.lead-cell-op {
    text-align: right;
}

.lead-op-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 7px;
    font-size: 0.76rem;
    white-space: nowrap;
    color: rgba(var(--c-blue-t2), 0.9);
    background: rgba(var(--c-blue), 0.12);
    border: 1px solid rgba(var(--c-blue), 0.32);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.lead-op-btn:hover {
    background: rgba(var(--c-blue), 0.22);
    border-color: rgba(var(--c-blue), 0.52);
}

.lead-op-btn.is-pending {
    color: rgba(var(--c-ink-4), 0.8);
    background: rgba(var(--c-veil), 0.05);
    border-color: rgba(var(--c-veil), 0.12);
    cursor: not-allowed;
}

.lead-op-btn.is-pending:hover {
    background: rgba(var(--c-veil), 0.08);
    border-color: rgba(var(--c-veil), 0.18);
}

.lead-op-btn.is-verified {
    color: rgb(var(--c-green-t));
    background: rgba(var(--c-green), 0.12);
    border-color: rgba(var(--c-green), 0.38);
}

.lead-op-btn.is-verified:hover {
    background: rgba(var(--c-green), 0.2);
    border-color: rgba(var(--c-green), 0.55);
}

.lead-badge.tone-tyc {
    color: rgb(var(--c-blue-t));
    background: rgba(var(--c-blue-d), 0.14);
    border: 1px solid rgba(var(--c-blue), 0.35);
}

.lead-tyc-block .lead-field .value {
    color: rgb(var(--c-blue-t3));
}

/* 展开详情 */
.lead-detail-row > td {
    padding: 0 12px 14px 12px;
    background: rgba(var(--c-tl-2), 0.05);
    border-bottom: 1px solid rgba(var(--c-line), 0.14);
}

.lead-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 14px 20px;
    padding: 16px 18px;
    border-radius: 10px;
    background: rgba(var(--c-surf-4), 0.6);
    border: 1px solid rgba(var(--c-line), 0.22);
}

.lead-detail-block {
    min-width: 0;
}

.lead-detail-block.is-wide {
    grid-column: 1 / -1;
}

.lead-detail-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(var(--c-tlt-3), 0.82);
}

.lead-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 8px 18px;
}

.lead-field {
    min-width: 0;
    font-size: 0.8rem;
    color: rgba(var(--c-ink-2), 0.86);
}

.lead-field .label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.72rem;
    color: rgba(var(--c-ink-4), 0.7);
}

.lead-field .value {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-field a {
    color: rgb(var(--c-tlt-2));
    text-decoration: none;
}

.lead-field a:hover {
    text-decoration: underline;
}

.lead-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 需求核验明细表 */
.lead-check-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.79rem;
    table-layout: fixed;
}

.lead-check-table th {
    padding: 7px 10px;
    text-align: left;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(var(--c-ink-4), 0.85);
    background: rgba(var(--c-veil), 0.04);
    border-bottom: 1px solid rgba(var(--c-line), 0.28);
}

.lead-check-table th:first-child {
    border-top-left-radius: 7px;
}

.lead-check-table th:last-child {
    border-top-right-radius: 7px;
}

.lead-check-table td {
    padding: 7px 10px;
    vertical-align: top;
    color: rgba(var(--c-ink-2), 0.84);
    border-bottom: 1px solid rgba(var(--c-line), 0.12);
    overflow-wrap: anywhere;
}

.lead-check-table tbody tr:last-child td {
    border-bottom: none;
}

.lead-check-table tbody tr:hover td {
    background: rgba(var(--c-veil), 0.03);
}

.lead-check-table th:nth-child(1) {
    width: 15%;
}

.lead-check-table th:nth-child(2) {
    width: 15%;
}

.lead-check-table th:nth-child(3) {
    width: 14%;
}

.lead-check-table th:nth-child(4) {
    width: 28%;
}

.lead-check-table th:nth-child(5) {
    width: 28%;
}

.lead-check-name {
    font-weight: 600;
    color: rgb(var(--c-ink-0));
}

.lead-check-hit {
    color: rgba(var(--c-ink-2), 0.92);
}

.lead-check-note {
    color: rgba(var(--c-ink-2), 0.62);
}

.lead-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    color: rgba(var(--c-ink-0), 0.75);
    background: rgba(var(--c-veil), 0.05);
    border: 1px solid rgba(var(--c-veil), 0.1);
}

.lead-check .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(var(--c-veil), 0.35);
}

.lead-check.status-confirmed {
    color: rgb(var(--c-green-t));
    border-color: rgba(var(--c-green), 0.35);
}

.lead-check.status-confirmed .dot {
    background: rgb(var(--c-green));
}

.lead-check.status-likely {
    color: rgb(var(--c-amber-t));
    border-color: rgba(var(--c-amber), 0.35);
}

.lead-check.status-likely .dot {
    background: rgb(var(--c-amber));
}

.lead-check.status-not_met {
    color: rgb(var(--c-rose-t));
    border-color: rgba(var(--c-rose), 0.35);
}

.lead-check.status-not_met .dot {
    background: rgb(var(--c-rose));
}

.lead-source {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.73rem;
    color: rgb(var(--c-tlt-7));
    background: rgba(var(--c-tl-6), 0.13);
    border: 1px solid rgba(var(--c-tl-6), 0.32);
}

.lead-evidence-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.73rem;
    color: rgba(var(--c-tlt-3), 0.9);
    background: rgba(var(--c-tl-1), 0.1);
    border: 1px solid rgba(var(--c-tl-1), 0.28);
    text-decoration: none;
}

.lead-evidence-link:hover {
    color: rgb(var(--c-tlt-3));
    background: rgba(var(--c-tl-1), 0.2);
    text-decoration: none;
}

.lead-review-reason,
.lead-review-missing {
    margin: 8px 0 0;
    font-size: 0.79rem;
    line-height: 1.6;
}

.lead-review-reason {
    color: rgba(var(--c-ink-2), 0.8);
}

.lead-review-missing {
    color: rgba(var(--c-amber-t), 0.8);
}

.lead-next {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.79rem;
    line-height: 1.6;
    color: rgba(var(--c-amber-t), 0.88);
}

.lead-next i {
    margin-top: 3px;
}

@media (max-width: 1200px) {
    .lead-detail {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stage-list {
        flex-direction: column;
    }

    .nav-buttons {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    .panel-head h2,
    .research-output-container .panel-head h2,
    .report-container .panel-head h2 {
        font-size: 1.2rem;
    }

    .lead-detail {
        padding: 14px;
    }

    .report-kpi-grid,
    .report-pick-grid,
    .report-insight-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }
}

/* Procurement report dashboard */
.report-dash {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.report-hero,
.report-panel {
    background: linear-gradient(145deg, rgba(var(--c-veil), 0.05), rgba(var(--c-veil), 0.02));
    border: 1px solid rgba(var(--c-veil), 0.08);
    border-radius: 14px;
    padding: 20px 22px;
}

.report-hero {
    position: relative;
    overflow: hidden;
    padding: 24px 26px;
    background:
        radial-gradient(circle at 6% 10%, rgba(var(--c-tl-1), 0.2), transparent 42%),
        linear-gradient(135deg, rgba(var(--c-surf-1), 0.9), rgba(var(--c-surf-5), 0.28));
    border-color: rgba(var(--c-tl-2), 0.24);
    border-left: 3px solid rgb(var(--c-tl-1));
}

.report-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 3px 11px;
    border-radius: 999px;
    color: rgb(var(--c-tlt-3));
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    background: rgba(var(--c-tl-1), 0.14);
    border: 1px solid rgba(var(--c-tl-1), 0.3);
}

.report-hero h3 {
    font-size: 1.32rem;
    line-height: 1.45;
}

.report-hero > p:not(.report-kicker):not(.report-time) {
    max-width: 90ch;
    margin: 0 0 10px;
    font-size: 0.93rem;
    line-height: 1.75;
    color: rgba(var(--c-ink-2), 0.82);
}

.report-hero h3,
.report-panel h3,
.report-pick h4 {
    color: rgb(var(--c-ink-0));
    margin: 0 0 8px;
}

.report-panel h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    font-size: 1.05rem;
    font-weight: 620;
}

.report-panel h3::before {
    content: "";
    width: 3px;
    height: 15px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgb(var(--c-tl-3)), rgb(var(--c-tl-4)));
}

.report-time,
.report-desc,
.report-empty,
.report-pick-meta {
    color: rgba(var(--c-ink-0), 0.58);
    font-size: 0.85rem;
}

.report-time {
    margin: 0;
    font-size: 0.78rem;
}

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

.report-kpi {
    position: relative;
    background: linear-gradient(160deg, rgba(var(--c-tl-1), 0.12), rgba(var(--c-tl-1), 0.04));
    border: 1px solid rgba(var(--c-tl-1), 0.24);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.report-kpi:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--c-tl-2), 0.45);
}

.report-kpi-num {
    font-size: 1.7rem;
    font-weight: 700;
    color: rgb(var(--c-tlt-3));
    line-height: 1.1;
}

.report-kpi-label {
    margin-top: 5px;
    font-size: 0.77rem;
    letter-spacing: 0.03em;
    color: rgba(var(--c-ink-0), 0.62);
}

.report-pick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.report-pick {
    border: 1px solid rgba(var(--c-veil), 0.1);
    border-radius: 12px;
    padding: 16px;
    background: rgba(var(--c-shade), 0.18);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.report-pick:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--c-tl-2), 0.35);
    box-shadow: 0 12px 26px rgba(var(--c-shadow), 0.3);
}

.report-pick h4 {
    font-size: 1rem;
    line-height: 1.45;
}

.report-pick > p:not(.report-pick-meta) {
    margin: 8px 0 0;
    font-size: 0.85rem;
    line-height: 1.65;
    color: rgba(var(--c-ink-2), 0.8);
}

.report-pick-rank {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 9px;
    border-radius: 6px;
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, rgb(var(--c-tl-3)), rgb(var(--c-tl-2)));
}

.report-pick-link {
    display: inline-block;
    margin-top: 8px;
    color: rgb(var(--c-tlt-2));
    text-decoration: none;
}

.report-pick-link:hover {
    text-decoration: underline;
}

.report-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px;
}

.report-pills span {
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(var(--c-tl-1), 0.15);
    color: rgb(var(--c-tlt-4));
    font-size: 0.8rem;
}

.req-row {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(var(--c-veil), 0.08);
}

.req-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dist-row {
    margin-bottom: 11px;
}

.dist-row:last-child {
    margin-bottom: 0;
}

.req-head,
.dist-row {
    display: grid;
    gap: 10px;
    align-items: center;
}

.req-head {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) auto;
    margin-bottom: 7px;
    font-size: 0.85rem;
}

.req-head > span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(var(--c-ink-2), 0.7);
}

.req-head > span:last-child {
    font-weight: 600;
    color: rgb(var(--c-tlt-3));
}

.dist-row {
    grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) 92px;
    font-size: 0.83rem;
}

.dist-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dist-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dist-label,
.dist-value {
    color: rgba(var(--c-ink-0), 0.75);
}

.dist-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(var(--c-veil), 0.08);
    overflow: hidden;
}

.dist-track span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, rgb(var(--c-tl-4)), rgb(var(--c-tl-2)));
}

.report-insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

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

.action-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 0.86rem;
    line-height: 1.65;
    background: rgba(var(--c-veil), 0.04);
    border: 1px solid rgba(var(--c-veil), 0.08);
}

.action-index {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--c-tl-1), 0.2);
    color: rgb(var(--c-tlt-3));
    font-size: 0.8rem;
    flex-shrink: 0;
}

.action-card p,
.report-list {
    margin: 0;
}

.report-list {
    padding-left: 0;
    list-style: none;
}

.report-list li {
    margin: 0 0 8px;
    font-size: 0.86rem;
    line-height: 1.65;
    color: rgba(var(--c-ink-0), 0.82);
}

.report-list li:last-child {
    margin-bottom: 0;
}

.report-list.checklist li::before {
    content: "☐ ";
    color: rgb(var(--c-tlt-3));
}

.risk-item .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.risk-item .dot.warn {
    background: rgb(var(--c-amber));
}

.limit-item {
    color: rgba(var(--c-ink-0), 0.55) !important;
}

.report-fold {
    border: 1px solid rgba(var(--c-veil), 0.1);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(var(--c-shade), 0.12);
}

.report-fold summary {
    cursor: pointer;
    color: rgb(var(--c-tlt-4));
}

.report-fold ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

.report-fold a {
    color: rgb(var(--c-tlt-2));
}

@media (max-width: 1024px) {
    .report-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .report-pick-grid,
    .report-insight-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .report-kpi-grid,
    .report-pick-grid,
    .report-insight-grid,
    .action-grid,
    .req-head,
    .dist-row {
        grid-template-columns: 1fr;
    }
}

/* ---------- 使用说明弹框：输入示例 + 寻源流程 ---------- */

.guide-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px 18px;
}

.guide-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(var(--c-scrim), 0.74);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: console-fade-in 0.2s ease;
}

.guide-modal-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1000px, 100%);
    max-height: 88vh;
    border: 1px solid rgba(var(--c-tl-2), 0.24);
    border-radius: 22px;
    background:
        radial-gradient(circle at 10% -6%, rgba(var(--c-tl-1), 0.2), transparent 40%),
        linear-gradient(165deg, rgba(var(--c-surf-4), 0.98), rgba(var(--c-surf-3), 0.96));
    box-shadow: 0 40px 90px rgba(var(--c-shadow), 0.6);
    overflow: hidden;
    text-align: left;
    animation: guide-modal-in 0.26s ease;
}

.guide-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px 16px;
    border-bottom: 1px solid rgba(var(--c-tl-2), 0.16);
}

.guide-modal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgb(var(--c-tlt-3));
}

.guide-modal-head h2 {
    margin: 8px 0 0;
    padding: 0;
    border: none;
    font-size: 1.34rem;
    font-weight: 650;
    color: rgb(var(--c-ink-1));
}

.guide-modal-head p {
    margin: 7px 0 0;
    font-size: 0.82rem;
    color: rgba(var(--c-ink-3), 0.62);
}

.guide-modal-close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(var(--c-ink-4), 0.2);
    border-radius: 10px;
    background: rgba(var(--c-surf-1), 0.5);
    color: rgba(var(--c-ink-3), 0.75);
    cursor: pointer;
    transition: all 0.2s ease;
}

.guide-modal-close:hover {
    border-color: rgba(var(--c-rose), 0.45);
    background: rgba(var(--c-rose), 0.12);
    color: rgb(var(--c-rose-t));
}

.guide-modal-body {
    flex: 1 1 auto;
    padding: 22px 26px 6px;
    overflow-y: auto;
}

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

.guide-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 0.98rem;
    font-weight: 650;
    color: rgb(var(--c-ink-1));
}

.guide-step-no {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgb(var(--c-tl-3)), rgb(var(--c-tl-1)));
    color: rgb(var(--c-on-accent));
    font-size: 0.76rem;
    font-weight: 700;
}

.guide-flow-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(var(--c-ink-4), 0.7);
}

.guide-flow-legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.guide-flow-legend i.is-auto {
    background: rgb(var(--c-tl-2));
}

.guide-flow-legend i.is-manual {
    margin-left: 8px;
    background: rgb(var(--c-amber));
}

.guide-sample {
    position: relative;
    padding: 20px 20px 18px;
    border: 1px solid rgba(var(--c-tl-3), 0.22);
    border-radius: 16px;
    background: linear-gradient(150deg, rgba(var(--c-tl-4), 0.16), rgba(var(--c-surf-2), 0.7));
}

.guide-sample-tag {
    position: absolute;
    top: -11px;
    left: 18px;
    padding: 3px 11px;
    border-radius: 999px;
    background: linear-gradient(96deg, rgb(var(--c-tl-1)), rgb(var(--c-tl-3)));
    color: rgb(var(--c-on-accent));
    font-size: 0.68rem;
    font-weight: 700;
}

.guide-sample-text {
    margin: 6px 0 16px;
    font-size: 1rem;
    line-height: 2.1;
    color: rgb(var(--c-ink-2));
}

.guide-sample-text .seg {
    padding: 3px 5px;
    border-radius: 6px;
    font-style: normal;
}

.seg-cat { background: rgba(var(--c-tl-2), 0.16); box-shadow: inset 0 -2px 0 rgba(var(--c-tl-2), 0.85); }
.seg-spec { background: rgba(var(--c-blue-2), 0.16); box-shadow: inset 0 -2px 0 rgba(var(--c-blue-2), 0.85); }
.seg-qual { background: rgba(var(--c-amber-2), 0.16); box-shadow: inset 0 -2px 0 rgba(var(--c-amber-2), 0.85); }
.seg-qty { background: rgba(var(--c-purple), 0.16); box-shadow: inset 0 -2px 0 rgba(var(--c-purple), 0.85); }
.seg-region { background: rgba(var(--c-rose-2), 0.16); box-shadow: inset 0 -2px 0 rgba(var(--c-rose-2), 0.85); }

.guide-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.guide-keys span {
    padding: 3px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    box-shadow: none;
    font-size: 0.72rem;
    font-weight: 600;
}

.guide-keys .seg-cat { border-color: rgba(var(--c-tl-2), 0.45); color: rgb(var(--c-tlt-4)); }
.guide-keys .seg-spec { border-color: rgba(var(--c-blue-2), 0.45); color: rgb(var(--c-blue-t2)); }
.guide-keys .seg-qual { border-color: rgba(var(--c-amber-2), 0.45); color: rgb(var(--c-amber-t2)); }
.guide-keys .seg-qty { border-color: rgba(var(--c-purple), 0.45); color: rgb(var(--c-purple-t)); }
.guide-keys .seg-region { border-color: rgba(var(--c-rose-2), 0.45); color: rgb(var(--c-rose-t2)); }

.guide-fill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(var(--c-tl-2), 0.4);
    border-radius: 10px;
    background: rgba(var(--c-tl-1), 0.14);
    color: rgb(var(--c-tlt-5));
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guide-fill-btn:hover {
    border-color: rgb(var(--c-tl-2));
    background: rgba(var(--c-tl-1), 0.28);
    transform: translateY(-1px);
}

.guide-flow {
    display: flex;
    align-items: stretch;
    gap: 4px;
}

.guide-node {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 15px 10px 14px;
    border: 1px solid rgba(var(--c-tl-2), 0.24);
    border-radius: 14px;
    background: linear-gradient(170deg, rgba(var(--c-tl-4), 0.16), rgba(var(--c-surf-2), 0.6));
    text-align: center;
}

.guide-node-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgb(var(--c-tl-3)), rgb(var(--c-tl-1)));
    box-shadow: 0 0 0 5px rgba(var(--c-tl-1), 0.1);
    color: rgb(var(--c-on-accent));
    font-size: 0.82rem;
}

.guide-node b {
    font-size: 0.84rem;
    font-weight: 650;
    color: rgb(var(--c-ink-1));
}

.guide-node small {
    font-size: 0.7rem;
    line-height: 1.55;
    color: rgba(var(--c-ink-3), 0.6);
}

.guide-node.is-manual {
    border-color: rgba(var(--c-amber), 0.3);
    background: linear-gradient(170deg, rgba(var(--c-amber), 0.14), rgba(var(--c-surf-2), 0.6));
}

.guide-node.is-manual .guide-node-icon {
    background: linear-gradient(145deg, rgb(var(--c-amber-fill)), rgb(var(--c-amber)));
    box-shadow: 0 0 0 5px rgba(var(--c-amber), 0.12);
    color: rgb(var(--c-on-warn));
}

.guide-arrow {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: rgba(var(--c-tlt-3), 0.45);
    font-size: 0.72rem;
}

.guide-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 26px;
    border-top: 1px solid rgba(var(--c-tl-2), 0.16);
    background: rgba(var(--c-surf-4), 0.6);
}

.guide-modal-foot > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.76rem;
    color: rgba(var(--c-ink-4), 0.7);
}

.guide-modal-done {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 24px;
    font-size: 0.9rem;
}


@keyframes guide-modal-in {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
    .guide-modal {
        padding: 14px 10px;
    }

    .guide-modal-card {
        max-height: 92vh;
        border-radius: 18px;
    }

    .guide-modal-head,
    .guide-modal-body,
    .guide-modal-foot {
        padding-left: 18px;
        padding-right: 18px;
    }

    .guide-sample-text {
        font-size: 0.92rem;
        line-height: 2;
    }

    .guide-flow {
        flex-direction: column;
        gap: 2px;
    }

    .guide-node {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 11px 14px;
        text-align: left;
    }

    .guide-node b {
        flex: 0 0 auto;
    }

    .guide-arrow {
        transform: rotate(90deg);
    }

    .guide-section h3 {
        flex-wrap: wrap;
    }

    .guide-flow-legend {
        width: 100%;
        margin: 4px 0 0;
    }

    .guide-modal-foot > span {
        display: none;
    }

    .guide-modal-done {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .console-orb-sweep,
    .console-orb-core,
    .console-orb-node,
    .console-advanced,
    .guide-modal-card,
    .guide-modal-backdrop,
    .tip-modal-card,
    .tip-modal-backdrop,
    .tyc-modal-card,
    .tyc-modal-backdrop {
        animation: none !important;
    }
}

/* ---------- 分层「已证实」说明弹框 ---------- */

.tip-modal {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
}

.tip-modal.hidden {
    display: none;
}

.tip-modal-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(var(--c-tl-1), 0.16), transparent 55%),
        rgba(var(--c-scrim), 0.62);
    backdrop-filter: blur(4px);
}

.tip-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 320px);
    border-radius: 14px;
    border: 1px solid rgba(var(--c-tl-1), 0.28);
    background:
        linear-gradient(165deg, rgba(var(--c-surf-3), 0.96), rgba(var(--c-surf-1), 0.98) 42%, rgba(var(--c-surf-2), 0.98)),
        rgb(var(--c-surf-1));
    box-shadow:
        0 18px 40px rgba(var(--c-shadow), 0.4),
        0 0 0 1px rgba(var(--c-veil), 0.04) inset;
    color: rgb(var(--c-ink-1));
    animation: tip-modal-in 0.22s ease;
    overflow: hidden;
}

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

.tip-modal-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: start;
    padding: 12px 12px 0;
}

.tip-modal-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--c-green-t));
    background:
        radial-gradient(circle at 30% 25%, rgba(var(--c-green), 0.35), transparent 70%),
        rgba(var(--c-green), 0.14);
    border: 1px solid rgba(var(--c-green), 0.35);
    font-size: 0.82rem;
}

.tip-modal-eyebrow {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgb(var(--c-tlt-3));
    margin-bottom: 2px;
}

.tip-modal-head h2 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    color: rgb(var(--c-ink-0));
}

.tip-modal-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: rgba(var(--c-veil), 0.06);
    color: rgba(var(--c-ink-2), 0.75);
    cursor: pointer;
    font-size: 0.78rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.tip-modal-close:hover,
.tip-modal-close:focus-visible {
    background: rgba(var(--c-veil), 0.12);
    color: rgb(var(--c-ink-0));
    outline: none;
}

.tip-modal-body {
    padding: 10px 12px 4px;
    display: grid;
    gap: 8px;
}

.tip-modal-lead {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: rgba(var(--c-ink-1), 0.92);
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(var(--c-green), 0.1);
    border: 1px solid rgba(var(--c-green), 0.28);
}

.tip-modal-block {
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(var(--c-veil), 0.04);
    border: 1px solid rgba(var(--c-veil), 0.1);
}

.tip-modal-block h3 {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 650;
    color: rgb(var(--c-tlt-4));
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tip-modal-block p {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.55;
    color: rgba(var(--c-ink-2), 0.88);
}

.tip-modal-note {
    margin: 0;
    display: flex;
    gap: 6px;
    align-items: flex-start;
    font-size: 0.7rem;
    line-height: 1.5;
    color: rgba(var(--c-ink-3), 0.9);
}

.tip-modal-note i {
    margin-top: 2px;
    color: rgb(var(--c-amber-t));
}

.tip-modal-foot {
    display: flex;
    justify-content: flex-end;
    padding: 6px 12px 12px;
}

.tip-modal-done {
    min-width: 72px;
    padding: 5px 12px;
    font-size: 0.78rem;
}

.confirm-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 6px 12px 14px;
}

.confirm-modal-foot .console-btn {
    flex: 0 0 auto;
    height: 38px;
    min-width: 88px;
    padding: 0 16px;
    font-size: 0.82rem;
}

.confirm-modal-danger {
    background: #e11d48;
    color: #fff;
    box-shadow: 0 8px 18px rgba(225, 29, 72, 0.28);
}

.confirm-modal-danger:hover {
    background: #be123c;
    transform: translateY(-1px);
}

html[data-theme="light"] .tip-modal-backdrop {
    background:
        radial-gradient(ellipse at 50% 20%, rgba(var(--c-tl-1), 0.12), transparent 55%),
        rgba(15, 35, 60, 0.38);
}

html[data-theme="light"] .tip-modal-card {
    box-shadow:
        0 20px 48px rgba(15, 42, 84, 0.16),
        0 0 0 1px rgba(15, 42, 84, 0.04) inset;
}

html[data-theme="light"] .tip-modal-lead {
    color: rgb(var(--c-ink-1));
}

html[data-theme="light"] .tip-modal-block p,
html[data-theme="light"] .tip-modal-note {
    color: rgba(var(--c-ink-2), 0.92);
}

@media (max-width: 480px) {
    .tip-modal-card {
        width: min(100%, 100%);
        border-radius: 12px;
    }
}

/* ---------- 天眼查企业信息核验报告弹框 ---------- */

/* 锁定滚动时补偿滚动条宽度，防止 body / 右上角固定按钮抖动 */
body.modal-scroll-lock {
    overflow: hidden;
    padding-right: var(--modal-scrollbar-comp, 0px);
}

body.modal-scroll-lock .nav-buttons {
    right: calc(20px + var(--modal-scrollbar-comp, 0px));
}

.tyc-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(18px, 3.5vh) 16px 18px;
    overflow: hidden;
}

.tyc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 23, 0.8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.tyc-modal-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1180px, 100%);
    /* 固定高度，避免加载明细时卡片变高再被居中导致整页“抖一下” */
    height: min(92vh, 920px);
    max-height: 92vh;
    border-radius: 18px;
    background: #f4f6fb;
    box-shadow: 0 46px 110px rgba(2, 8, 23, 0.7);
    overflow: hidden;
    color: #1f2a3a;
    text-align: left;
    animation: tyc-modal-in 0.22s ease;
}

@keyframes tyc-modal-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 报告抬头：深蓝 + 金线 */
.tyc-report-head {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px 22px 18px;
    background:
        radial-gradient(circle at 88% -40%, rgba(240, 205, 130, 0.18), transparent 42%),
        linear-gradient(120deg, #072a55 0%, #0d3f7d 52%, #12569f 100%);
    color: #fff;
}

.tyc-report-head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, #a9761f, #f0cd82 45%, #f7e3b6 50%, #f0cd82 55%, #a9761f);
}

.tyc-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tyc-brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.02rem;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.tyc-brand-text {
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}

.tyc-brand-text em {
    font-style: normal;
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: rgba(191, 219, 254, 0.72);
}

.tyc-report-title {
    text-align: center;
    min-width: 0;
}

.tyc-official-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 12px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #3b2a06;
    background: linear-gradient(120deg, #f7e3b6, #d9a441);
    box-shadow: 0 2px 8px rgba(217, 164, 65, 0.3);
}

.tyc-report-title h2 {
    margin: 8px 0 0;
    padding: 0;
    border: none;
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #fff;
}

.tyc-report-title p {
    margin: 5px 0 0;
    font-size: 0.77rem;
    color: rgba(219, 234, 254, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tyc-modal-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.tyc-modal-close:hover {
    background: rgba(244, 63, 94, 0.85);
    border-color: transparent;
    color: #fff;
}

.tyc-modal-body {
    flex: 1 1 auto;
    min-height: 0; /* 固定卡片高度下允许内部滚动，避免内容撑开整页 */
    padding: 16px 22px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f4f6fb;
}

/* 加载 / 错误 */
.tyc-loading {
    display: grid;
    gap: 10px;
    padding: 20px 0;
}

.tyc-loading-bar {
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e8edf6, #d5deee, #e8edf6);
    background-size: 200% 100%;
    animation: tyc-shimmer 1.2s linear infinite;
}

.tyc-loading-bar:nth-child(2) { width: 88%; }
.tyc-loading-bar:nth-child(3) { width: 72%; }

@keyframes tyc-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.tyc-loading p {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.tyc-error {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #f3c2c8;
    background: #fdf0f1;
    color: #a3202f;
    font-size: 0.85rem;
}

/* 主体识别卡 */
.tyc-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px 18px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e3e9f4;
    box-shadow: 0 2px 10px rgba(15, 42, 84, 0.05);
}

.tyc-hero-logo {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #1a63d8, #4b95f7);
    box-shadow: 0 6px 16px rgba(26, 99, 216, 0.28);
}

.tyc-hero-main {
    min-width: 0;
}

.tyc-hero-main h3 {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 800;
    color: #12203a;
    word-break: break-word;
}

.tyc-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tyc-hero-meta {
    margin-top: 8px;
}

.tyc-uscc {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.77rem;
    color: #4a5a72;
}

.tyc-verdict {
    margin: 10px 0 0;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 0.79rem;
    font-weight: 600;
    color: #14663f;
    background: #e9f7ef;
    border: 1px solid #bfe6cf;
}

.tyc-verdict.is-warn {
    color: #8a5a09;
    background: #fdf5e6;
    border-color: #f0d9a8;
}

.tyc-verdict.is-danger {
    color: #a3202f;
    background: #fdf0f1;
    border-color: #f3c2c8;
}

.tyc-hero-score {
    min-width: 156px;
    padding-left: 18px;
    border-left: 1px dashed #e3e9f4;
    text-align: center;
}

.tyc-score-label {
    font-size: 0.72rem;
    color: #64748b;
}

.tyc-score-value {
    margin-top: 2px;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.12;
    color: #1a63d8;
}

.tyc-score-value.is-warn { color: #c98a12; }
.tyc-score-value.is-danger { color: #c0392f; }

.tyc-score-bar {
    height: 6px;
    margin-top: 4px;
    border-radius: 999px;
    background: #e8edf6;
    overflow: hidden;
}

.tyc-score-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1a63d8, #4b95f7);
    transition: width 0.5s ease;
}

.tyc-score-note {
    margin-top: 5px;
    font-size: 0.69rem;
    color: #8595ab;
}

.tyc-hero-switch {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px dashed #e3e9f4;
}

.tyc-hero-switch label {
    font-size: 0.74rem;
    color: #64748b;
    white-space: nowrap;
}

.tyc-hero-switch select {
    flex: 1 1 auto;
    max-width: 460px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d6deec;
    background: #fff;
    color: #1f2a3a;
    font-size: 0.79rem;
}

/* 通用徽标 */
.tyc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.tyc-badge.is-ok { color: #147a45; background: #e9f7ef; border-color: #bfe6cf; }
.tyc-badge.is-info { color: #1a5bb8; background: #eaf2fd; border-color: #c3d9f7; }
.tyc-badge.is-warn { color: #8a5a09; background: #fdf5e6; border-color: #f0d9a8; }
.tyc-badge.is-danger { color: #a3202f; background: #fdf0f1; border-color: #f3c2c8; }
.tyc-badge.is-muted { color: #64748b; background: #f1f4f9; border-color: #e0e6f0; }
.tyc-badge.is-gold { color: #7a5406; background: #fdf3dc; border-color: #ecd49a; }

/* 四大维度卡片 */
.tyc-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
    align-items: start;
}

.tyc-card {
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e3e9f4;
    box-shadow: 0 2px 10px rgba(15, 42, 84, 0.05);
    overflow: hidden;
}

.tyc-card-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    border-bottom: 1px solid #eef1f7;
    background: linear-gradient(180deg, #fbfcfe, #f6f8fc);
}

.tyc-card-badge {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    background: #1a63d8;
}

.tyc-card-icon {
    font-size: 0.9rem;
    color: #1a63d8;
}

.tyc-card[data-tone="risk"] .tyc-card-badge { background: #0f766e; }
.tyc-card[data-tone="risk"] .tyc-card-icon { color: #0f766e; }
.tyc-card[data-tone="ip"] .tyc-card-badge { background: #b45309; }
.tyc-card[data-tone="ip"] .tyc-card-icon { color: #b45309; }
.tyc-card[data-tone="operation"] .tyc-card-badge { background: #6d43c8; }
.tyc-card[data-tone="operation"] .tyc-card-icon { color: #6d43c8; }

.tyc-card-head h4 {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: #12203a;
}

.tyc-card-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 7px;
    border: 1px solid #c3d9f7;
    background: #eaf2fd;
    color: #1a5bb8;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease;
}

.tyc-card-more:hover:not(:disabled) { background: #dbeafd; }
.tyc-card-more:disabled { opacity: 0.6; cursor: not-allowed; }
.tyc-card-more.is-loaded { color: #147a45; background: #e9f7ef; border-color: #bfe6cf; }

.tyc-card-body {
    padding: 13px 15px;
}

/* 字段行 */
.tyc-rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 18px;
}

.tyc-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    min-width: 0;
}

.tyc-row.is-wide { grid-column: 1 / -1; }

.tyc-row .k {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    color: #6b7a90;
    white-space: nowrap;
}

.tyc-row .k i {
    width: 12px;
    text-align: center;
    font-size: 0.72rem;
    color: #a3b3c9;
}

.tyc-row .v {
    min-width: 0;
    font-size: 0.79rem;
    font-weight: 650;
    color: #17233a;
    word-break: break-word;
}

.tyc-row .v a { color: #1a5bb8; }

.tyc-row .v.is-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
    color: #42536b;
}

/* 风险合规 */
.tyc-risk-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 11px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #f8fafd;
    border: 1px solid #eef1f7;
}

.tyc-risk-dial {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 800;
    color: #147a45;
    background: #e9f7ef;
    border: 2px solid #bfe6cf;
}

.tyc-risk-dial.is-warn { color: #8a5a09; background: #fdf5e6; border-color: #f0d9a8; }
.tyc-risk-dial.is-danger { color: #a3202f; background: #fdf0f1; border-color: #f3c2c8; }

.tyc-risk-head-text strong {
    display: block;
    font-size: 0.82rem;
    color: #17233a;
}

.tyc-risk-head-text span {
    font-size: 0.73rem;
    color: #6b7a90;
}

.tyc-risk-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 14px;
}

.tyc-risk-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 9px;
    border-radius: 8px;
    background: #f8fafd;
    border: 1px solid #eef1f7;
}

.tyc-risk-row.is-hit { background: #fff8f8; border-color: #f6d7da; }
.tyc-risk-row .t { font-size: 0.75rem; color: #42536b; }

/* 知识产权统计 */
.tyc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 9px;
    margin-bottom: 12px;
}

.tyc-stat {
    padding: 9px 6px;
    border-radius: 10px;
    text-align: center;
    background: #f8fafd;
    border: 1px solid #eef1f7;
}

.tyc-stat b {
    display: block;
    font-size: 1.16rem;
    font-weight: 800;
    color: #12203a;
    line-height: 1.2;
}

.tyc-stat span {
    font-size: 0.69rem;
    color: #6b7a90;
}

/* 说明块 */
.tyc-note {
    margin-top: 11px;
    padding: 8px 11px;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #42536b;
    background: #f8fafd;
    border: 1px solid #eef1f7;
}

.tyc-note.is-ok { color: #147a45; background: #e9f7ef; border-color: #cfeadb; }
.tyc-note.is-warn { color: #8a5a09; background: #fdf5e6; border-color: #f3e2bd; }

.tyc-empty-note {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px dashed #d8e0ec;
    background: #fbfcfe;
    color: #7b8a9f;
    font-size: 0.77rem;
}

.tyc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
}

.tyc-tag {
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    color: #1a5bb8;
    background: #eff5fe;
    border: 1px solid #cfe0f8;
}

/* 明细区 */
.tyc-card-detail {
    padding: 0 15px 15px;
    border-top: 1px dashed #e6ebf4;
    margin-top: -1px;
}

.tyc-detail-group { margin-top: 13px; }

.tyc-detail-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 7px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #1a5bb8;
}

.tyc-detail-title i { font-size: 0.68rem; color: #9db7dd; }

.tyc-detail-title .n {
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #1a5bb8;
    background: #eaf2fd;
    border: 1px solid #c3d9f7;
}

.tyc-detail-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 5px;
    font-size: 0.73rem;
    font-weight: 700;
    color: #42536b;
}

.tyc-detail-sub .n {
    font-size: 0.66rem;
    font-weight: 600;
    color: #8595ab;
}

.tyc-detail-card {
    margin-bottom: 6px;
    padding: 9px 11px;
    border-radius: 9px;
    background: #f8fafd;
    border: 1px solid #eef1f7;
    font-size: 0.76rem;
    color: #42536b;
}

.tyc-detail-card:last-child { margin-bottom: 0; }

.tyc-kv {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
    gap: 4px 14px;
}

.tyc-kv > div {
    min-width: 0;
    font-size: 0.745rem;
    color: #6b7a90;
    word-break: break-word;
}

.tyc-kv > div b {
    font-weight: 650;
    color: #17233a;
}

.tyc-sublist {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f2;
}

.tyc-subchip {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    color: #42536b;
    background: #fff;
    border: 1px solid #e2e8f2;
}

.tyc-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 14px 0 0;
    font-size: 0.73rem;
    line-height: 1.6;
    color: #7b8a9f;
}

.tyc-disclaimer i { margin-top: 2px; color: #a3b3c9; }

/* 底栏 */
.tyc-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 22px;
    border-top: 1px solid #e3e9f4;
    background: #fff;
}

.tyc-foot-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 0.72rem;
    color: #6b7a90;
}

.tyc-foot-meta i { margin-right: 4px; color: #a3b3c9; }

.tyc-foot-actions {
    display: flex;
    gap: 8px;
}

.tyc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.18s ease, background 0.18s ease;
}

.tyc-btn-primary {
    color: #fff;
    background: linear-gradient(120deg, #1a63d8, #3f8bf5);
    box-shadow: 0 4px 12px rgba(26, 99, 216, 0.28);
}

.tyc-btn-primary:hover { filter: brightness(1.06); }

.tyc-btn-ghost {
    color: #1a5bb8;
    background: #eaf2fd;
    border-color: #c3d9f7;
}

.tyc-btn-ghost:hover { background: #dbeafd; color: #1a5bb8; }

.tyc-btn:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 1040px) {
    .tyc-sections { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .tyc-report-head {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .tyc-brand { grid-column: 1; }
    .tyc-report-title { grid-column: 1 / -1; text-align: left; }
    .tyc-modal-close { grid-row: 1; grid-column: 2; }

    .tyc-hero {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tyc-hero-score {
        grid-column: 1 / -1;
        padding-left: 0;
        padding-top: 12px;
        border-left: none;
        border-top: 1px dashed #e3e9f4;
        text-align: left;
    }

    .tyc-rows,
    .tyc-risk-grid {
        grid-template-columns: 1fr;
    }

    .tyc-modal-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .tyc-foot-actions .tyc-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tyc-modal-card,
    .tyc-loading-bar,
    .tyc-score-bar span {
        animation: none !important;
        transition: none !important;
    }
}


/* ==========================================================================
   主题化：GPT Researcher 原生 styles.css 遗留元素
   这些选择器归 styles.css 所有，为了不改上游文件，统一在这里按令牌重写。
   天眼查弹框（.tyc-*）不在此列，保持固定配色。
   ========================================================================== */

/* ---------- 页面底色 ---------- */

html,
body {
    background: linear-gradient(45deg,
            rgb(var(--c-page-a)),
            rgb(var(--c-page-b)),
            rgb(var(--c-page-c)),
            rgb(var(--c-page-a)));
    background-size: 400% 400%;
}

body {
    color: rgb(var(--c-ink-0));
    background-color: rgb(var(--c-page-a)) !important;
    background-image: var(--page-vignette);
}

body::before {
    opacity: var(--page-logo-opacity);
}

/* ---------- 右上角工具条 ---------- */

.nav-buttons {
    display: block;
}

.nav-dock {
    width: 78px;
    padding: 4px;
    border: 1px solid rgba(var(--c-tl-2), 0.2);
    border-radius: 14px;
    background: rgba(var(--c-surf-4), 0.78);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-dock-actions {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(var(--c-tl-2), 0.16);
}

.nav-dock-item {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-height: 24px;
    padding: 0 6px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgb(var(--c-tlt-2));
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1;
    text-align: left;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.nav-dock-item i {
    width: 0.88em;
    font-size: 0.62rem;
    text-align: center;
    opacity: 0.92;
}

.nav-dock-item:hover,
.nav-dock-item:focus-visible {
    background: rgba(var(--c-tl-1), 0.22);
    color: rgb(var(--c-tlt-3));
    outline: none;
}

.top-history-button,
.top-websocket-button {
    gap: 5px;
    padding: 4px 9px;
    border-radius: 14px;
    font-size: 0.6rem;
    min-width: 58px;
    margin-left: 0;
}

.top-history-button i,
.top-websocket-button i {
    font-size: 0.67rem;
}

.top-history-button,
.top-websocket-button,
.download-option-btn {
    background: rgba(var(--c-tl-1), 0.2);
    color: rgb(var(--c-tlt-2));
}

.top-history-button:hover,
.top-websocket-button:hover,
.download-option-btn:hover {
    background: rgba(var(--c-tl-1), 0.32);
    color: rgb(var(--c-tlt-3));
}

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

/* 主题切换：铺满工具条宽度，滑块占一半，避免圆点在宽容器里显得空 */
.nav-dock .theme-toggle {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 100%;
    height: 24px;
    padding: 2px;
    border: 1px solid rgba(var(--c-tl-2), 0.22);
    border-radius: 10px;
    background: rgba(var(--c-tl-1), 0.14);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-dock .theme-toggle:hover {
    border-color: rgba(var(--c-tl-2), 0.48);
    background: rgba(var(--c-tl-1), 0.22);
}

.nav-dock .theme-toggle:focus-visible {
    outline: 2px solid rgb(var(--c-tl-2));
    outline-offset: 2px;
}

.nav-dock .theme-toggle-thumb {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc((100% - 4px) / 2);
    height: auto;
    border-radius: 8px;
    background: linear-gradient(145deg, rgb(var(--c-tl-3)), rgb(var(--c-tl-1)));
    box-shadow: 0 2px 6px rgba(var(--c-tl-1), 0.4);
    transition: transform 0.26s cubic-bezier(0.34, 1.3, 0.64, 1);
}

html[data-theme="light"] .nav-dock .theme-toggle-thumb {
    transform: translateX(100%);
}

.nav-dock .theme-toggle i {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 0.54rem;
    color: rgba(var(--c-ink-2), 0.55);
    transition: color 0.26s ease;
}

html:not([data-theme="light"]) .nav-dock .theme-toggle .fa-moon,
html[data-theme="light"] .nav-dock .theme-toggle .fa-sun {
    color: rgb(var(--c-on-accent));
}

html[data-theme="light"] .nav-dock {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(15, 42, 84, 0.1);
    box-shadow: 0 12px 28px rgba(15, 42, 84, 0.1);
}

html[data-theme="light"] .nav-dock-actions {
    border-top-color: rgba(15, 42, 84, 0.08);
}

/* ---------- 工作区面板容器 ---------- */

.margin-div {
    background-color: rgba(var(--c-surf-4), 0.8);
    border-color: rgba(var(--c-line), 0.25);
}

/* Bootstrap 的 .table-dark 写死了深色，检索来源表要跟随主题 */
.table-dark {
    color: rgb(var(--c-ink-2));
    background-color: rgba(var(--c-veil), 0.05);
}

.table-dark th,
.table-dark td,
.table-dark thead th {
    border-color: rgba(var(--c-veil), 0.16);
}

.table-dark.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(var(--c-veil), 0.05);
}

/* ---------- 表单控件 ---------- */

input,
select,
#output,
#reportContainer {
    background-color: rgba(var(--c-veil), 0.1);
    color: rgb(var(--c-ink-0));
}

input:hover,
input:focus,
select:hover,
select:focus {
    background-color: rgba(var(--c-veil), 0.06);
    border: 1px solid rgba(var(--c-tl-2), 0.5);
    color: rgb(var(--c-ink-0));
    box-shadow: 0 4px 8px rgba(var(--c-shadow), 0.14);
}

.tags-input {
    border-color: rgba(var(--c-veil), 0.22);
}

.tag {
    background-color: rgb(var(--c-tl-1));
    color: rgb(var(--c-on-accent));
}

/* ---------- 主按钮 ---------- */

.btn-primary {
    background: linear-gradient(to right, rgb(var(--c-tl-4)), rgb(var(--c-tl-1)));
    color: rgb(var(--c-on-accent));
    box-shadow: 0 4px 15px rgba(var(--c-tl-1), 0.3);
}

.btn:hover {
    box-shadow: 0 10px 20px rgba(var(--c-shadow), 0.28);
}

/* ---------- 页脚 ---------- */

footer {
    color: rgb(var(--c-ink-1));
    background: rgba(var(--c-surf-4), 0.8);
    border-top: 1px solid rgba(var(--c-tl-1), 0.3);
}

footer a {
    color: rgb(var(--c-tlt-2));
}

footer a:hover {
    color: rgb(var(--c-tlt-3));
}

/* ---------- 侧滑面板：状态 / 历史 ---------- */

.history-panel,
.websocket-panel {
    background: rgba(var(--c-surf-4), 0.95);
    box-shadow: 0 0 25px rgba(var(--c-shadow), 0.35);
}

.history-panel {
    border-left: 1px solid rgba(var(--c-tl-1), 0.3);
}

.websocket-panel {
    border-right: 1px solid rgba(var(--c-tl-1), 0.3);
}

.history-panel-header,
.websocket-panel-header,
.history-panel-search,
.history-panel-filters {
    border-bottom-color: rgba(var(--c-tl-1), 0.26);
}

.history-panel-header h3,
.websocket-panel-header h3 {
    color: rgb(var(--c-ink-1));
}

.history-panel-header h3 i,
.websocket-panel-header h3 i,
.history-entry-format span i {
    color: rgb(var(--c-tlt-2));
}

.history-action-btn,
.websocket-action-btn,
.history-entry-action,
.report-action-btn {
    color: rgb(var(--c-ink-2));
}

.history-action-btn:hover,
.websocket-action-btn:hover,
.history-entry-action:hover,
.report-action-btn:hover {
    background: rgba(var(--c-tl-1), 0.2);
    border-color: rgba(var(--c-tl-2), 0.5);
    color: rgb(var(--c-ink-0));
}

.history-panel-search input,
.history-panel-filters select,
.history-entry-action,
.report-action-btn {
    background: rgba(var(--c-veil), 0.08);
    border: 1px solid rgba(var(--c-tl-1), 0.3);
    color: rgb(var(--c-ink-2));
}

.history-panel-entries,
.chat-messages {
    scrollbar-color: rgb(var(--c-tl-1)) rgba(var(--c-veil), 0.12);
}

.history-panel-entries::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track,
#output::-webkit-scrollbar-track {
    background: rgba(var(--c-veil), 0.12);
}

.history-panel-entries::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
#output::-webkit-scrollbar-thumb {
    background-color: rgb(var(--c-tl-1));
}

.history-entry {
    background: rgba(var(--c-veil), 0.06);
    border-left-color: rgb(var(--c-tl-1));
}

.history-entry:hover {
    background: rgba(var(--c-tl-1), 0.12);
    box-shadow: 0 5px 15px rgba(var(--c-shadow), 0.18);
}

.history-entry-title {
    color: rgb(var(--c-ink-1));
}

.history-entry-timestamp,
.history-entry-preview,
.history-entry-detail,
.history-entry-format span,
.status-label {
    color: rgba(var(--c-ink-3), 0.85);
}

.history-entry-format span {
    background: rgba(var(--c-veil), 0.08);
}

.status-value {
    color: rgb(var(--c-ink-1));
}

.status-divider {
    background: rgba(var(--c-tl-1), 0.22);
}

.status-indicator {
    background-color: rgba(var(--c-ink-4), 0.7);
}

.status-indicator.connected {
    background-color: rgb(var(--c-green));
    box-shadow: 0 0 10px rgba(var(--c-green), 0.7);
}

.status-indicator.connecting {
    background-color: rgb(var(--c-amber));
    box-shadow: 0 0 10px rgba(var(--c-amber), 0.7);
}

.status-indicator.disconnected {
    background-color: rgb(var(--c-rose));
    box-shadow: 0 0 10px rgba(var(--c-rose), 0.7);
}

/* ---------- 报告 / 聊天 ---------- */

.report-actions {
    background: rgba(var(--c-veil), 0.05);
    border-color: rgba(var(--c-line), 0.25);
}

.report-action-btn i {
    color: rgb(var(--c-tlt-2));
}

#reportContainer h1,
#reportContainer h2,
#reportContainer h3 {
    color: rgb(var(--c-ink-1));
}

#reportContainer a {
    color: rgb(var(--c-tlt-2));
}

#reportContainer blockquote {
    border-left-color: rgb(var(--c-tl-1));
    color: rgba(var(--c-ink-3), 0.9);
}

#reportContainer th,
#reportContainer td {
    border-color: rgba(var(--c-veil), 0.2);
}

#reportContainer th {
    background-color: rgba(var(--c-veil), 0.08);
}

#reportContainer tr:nth-child(even) {
    background-color: rgba(var(--c-veil), 0.04);
}

.chat-container {
    background-color: rgba(var(--c-surf-1), 0.7);
    border-color: rgba(var(--c-veil), 0.12);
}

.user-message {
    background-color: rgba(var(--c-veil), 0.12);
    color: rgb(var(--c-ink-0));
}

.ai-message {
    background-color: rgb(var(--c-tl-1));
    color: rgb(var(--c-on-accent));
}

.chat-input {
    background-color: rgba(var(--c-veil), 0.1);
    border-color: rgba(var(--c-veil), 0.22);
    color: rgb(var(--c-ink-0));
}

.chat-input::placeholder {
    color: rgba(var(--c-ink-4), 0.9);
}

.chat-input:focus {
    background-color: rgba(var(--c-veil), 0.06);
    border-color: rgb(var(--c-tl-1));
    box-shadow: 0 0 0 0.2rem rgba(var(--c-tl-1), 0.25);
    color: rgb(var(--c-ink-0));
}

.chat-timestamp {
    color: rgba(var(--c-ink-4), 0.9);
}

/* ---------- 浮层条 ---------- */

.sticky-downloads-bar {
    background: rgba(var(--c-surf-4), 0.86) !important;
    border-top: 1px solid rgba(var(--c-tl-1), 0.3) !important;
    box-shadow: 0 -5px 15px rgba(var(--c-shadow), 0.28) !important;
}

.toast-notification {
    background: rgba(var(--c-surf-4), 0.96);
    color: rgb(var(--c-ink-1));
    border-left-color: rgb(var(--c-tl-1));
    box-shadow: 0 5px 15px rgba(var(--c-shadow), 0.3);
}

.credits-bar a {
    color: rgb(var(--c-tlt-2));
}

/* ---------- 浅色下的细节收敛 ---------- */

/* 深色底上「浅色文字 + 低透明度」还能看清，浅色底上同样的透明度会被白底冲淡到
   2~3:1。这里把次级文字换成实色，层级改由 ink-2 / ink-3 / ink-4 三档色阶承担。 */
html[data-theme="light"] .console-counter,
html[data-theme="light"] .lead-muted,
html[data-theme="light"] .guide-flow-legend,
html[data-theme="light"] .lead-name-sub,
html[data-theme="light"] .progress-metric-label,
html[data-theme="light"] .report-actions-label,
html[data-theme="light"] .guide-node small,
html[data-theme="light"] .guide-modal-foot > span,
html[data-theme="light"] .lead-field .label {
    color: rgb(var(--c-ink-4));
}

html[data-theme="light"] .summary-stat-hint,
html[data-theme="light"] .summary-stat-head,
html[data-theme="light"] .panel-head-desc,
html[data-theme="light"] .lead-legend-item,
html[data-theme="light"] .guide-modal-head p,
html[data-theme="light"] .landing-hero p {
    color: rgb(var(--c-ink-3));
}

/* 源规则带 !important，覆盖时必须跟上 */
html[data-theme="light"] .limit-item {
    color: rgb(var(--c-ink-3)) !important;
}

html[data-theme="light"] .summary-note {
    color: rgb(var(--c-amber-t));
}

html[data-theme="light"] .console-ai-hint,
html[data-theme="light"] .lead-detail-title,
html[data-theme="light"] .summary-request-label {
    color: rgb(var(--c-tlt-3));
}

html[data-theme="light"] body {
    background-attachment: fixed;
}

/* 浅色底不需要靠阴影撑层次，压掉原生的重投影 */
html[data-theme="light"] .history-panel,
html[data-theme="light"] .websocket-panel {
    box-shadow: 0 0 30px rgba(var(--c-shadow), 0.18);
}

html[data-theme="light"] select option {
    background-color: #ffffff;
    color: #12203a;
}
