/* OzGeo Desk — 设计令牌 + 壳层细节（站在 Tailwind 之上） */
:root {
    --ink-950: #07141f;
    --ink-900: #0b1f33;
    --ink-800: #0f2433;
    --ink-700: #162a3a;
    --ink-600: #243848;
    --ink-500: #3d5166;
    --ink-400: #6b7c8f;
    --ink-300: #a8b4c0;
    --ink-200: #d0d8e0;
    --ink-100: #e8ecf0;
    --ink-50: #f4f6f8;
    --sight-950: #042f2e;
    --sight-800: #115e59;
    --sight-700: #0d5f59;
    --sight-600: #0f766e;
    --sight-500: #14b8a6;
    --sight-100: #ccfbf1;
    --sight-50: #f0fdfa;
    --surface-app: #f2f4f6;
    --surface-panel: #ffffff;
    --border-subtle: rgb(11 31 51 / 0.08);
    --radius-control: 0.5rem;
    --radius-panel: 0.75rem;
    --shadow-panel: 0 1px 2px 0 rgb(11 31 51 / 0.04);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast: 0.15s;
    --dur-med: 0.22s;
}

html, body { height: 100%; }
[v-cloak] { display: none; }

body {
    background-color: var(--surface-app);
    background-image: none;
    color: var(--ink-800);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--sight-100); color: var(--ink-900); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 999px; border: 2px solid transparent; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

code {
    background: var(--ink-100);
    padding: 0 .3rem;
    border-radius: .25rem;
    font-size: .85em;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--sight-600);
    outline-offset: 2px;
    border-radius: 4px;
}

.tabular {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-feature-settings: 'tnum';
}

@keyframes oz-fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.oz-fade-up { animation: oz-fade-up var(--dur-med) var(--ease-out-expo); }

/* Stage Rail 连接线 */
.oz-step { position: relative; }
.oz-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.125rem;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--ink-200);
    z-index: 0;
}
.oz-step.oz-step-done:not(:last-child)::after { background: var(--sight-500); }

.oz-step-btn {
    border: 0;
    background: transparent;
    cursor: default;
    color: inherit;
}
.oz-step-clickable .oz-step-btn {
    cursor: pointer;
}
.oz-step-clickable .oz-step-btn:hover:not(:disabled) {
    background: rgb(15 118 110 / 0.06);
}
.oz-step-clickable .oz-step-btn:focus-visible {
    outline: 2px solid var(--sight-600);
    outline-offset: 2px;
}
.oz-step-btn:disabled {
    cursor: not-allowed;
}
.oz-step-selected .oz-step-dot {
    box-shadow: 0 0 0 3px rgb(15 118 110 / 0.28);
}

/* ===== 左右布局壳层 ===== */
.oz-shell {
    display: flex;
    min-height: 100vh;
}

.oz-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 12rem;
    height: 100vh;
    border-right: 1px solid var(--border-subtle);
    background: color-mix(in srgb, var(--ink-50) 88%, white);
    transition: width 0.2s var(--ease-out-expo);
}

.oz-sidebar--collapsed {
    width: 3.5rem;
}

.oz-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    height: 3.25rem;
    padding: 0 0.5rem 0 0.625rem;
    border-bottom: 1px solid rgb(226 232 240 / 0.9);
}

.oz-sidebar__toggle {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.oz-sidebar__toggle:hover {
    background: #f1f5f9;
    color: #334155;
}

.oz-sidebar__section {
    margin: 0.75rem 0.75rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-400);
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.15s ease;
}

.oz-sidebar--collapsed .oz-sidebar__section {
    opacity: 0;
    height: 0;
    margin: 0;
}

.oz-sidebar__logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    border-radius: 0.5rem;
    padding: 0.25rem;
    text-decoration: none;
}

.oz-sidebar__logo-text {
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.15s ease, width 0.2s ease;
}

/* 品牌字：墨印 OZ + GEO 字标 → OZ GEO（无渐变字） */
.oz-brand-mark {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background: var(--ink-900);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.oz-brand-mark--lg {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.75rem;
}

.oz-brand-word {
    display: inline-flex;
    align-items: baseline;
    line-height: 1;
    user-select: none;
}

.oz-brand-word__text {
    display: inline-block;
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: lowercase;
    color: var(--ink-900);
}

.oz-brand-word--lg .oz-brand-word__text {
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

.oz-sidebar__logo:hover .oz-brand-word__text {
    color: var(--sight-700);
}

.oz-sidebar--collapsed .oz-sidebar__logo-text {
    width: 0;
    opacity: 0;
    overflow: hidden;
}

.oz-sidebar__nav {
    flex: 1;
    padding: 0.375rem 0.5rem;
    overflow-y: auto;
}

.oz-nav-item,
.oz-sidebar__btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    min-height: 2.375rem;
    padding: 0.45rem 0.55rem;
    border: 0;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--ink-500);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}

.oz-nav-item:hover,
.oz-sidebar__btn:hover {
    background: rgb(11 31 51 / 0.04);
    color: var(--ink-900);
}

.oz-nav-item--active {
    background: rgb(15 118 110 / 0.08);
    color: var(--ink-900);
    font-weight: 650;
}

.oz-nav-item--active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 1.125rem;
    border-radius: 0 2px 2px 0;
    background: var(--sight-600);
}

.oz-nav-icon-wrap {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--ink-400);
    transition: color var(--dur-fast) ease;
}

.oz-nav-item--active .oz-nav-icon-wrap {
    background: transparent;
    color: var(--sight-600);
}

.oz-nav-icon-wrap--muted {
    background: transparent;
}

.oz-nav-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
}

.oz-nav-label,
.oz-sidebar__user-text {
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.15s ease, width 0.2s ease;
}

.oz-sidebar--collapsed .oz-nav-label,
.oz-sidebar--collapsed .oz-sidebar__user-text {
    width: 0;
    opacity: 0;
}

.oz-sidebar--collapsed .oz-nav-item,
.oz-sidebar--collapsed .oz-sidebar__btn,
.oz-sidebar--collapsed .oz-sidebar__user {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.oz-sidebar--collapsed .oz-nav-item--active::before {
    display: none;
}

.oz-sidebar__foot {
    padding: 0.5rem;
    border-top: 1px solid rgb(226 232 240 / 0.9);
}

.oz-sidebar__user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    padding: 0.375rem 0.5rem;
    min-height: 2.25rem;
}

.oz-sidebar__btn--muted {
    color: #64748b;
}

.oz-sidebar__btn--muted:hover {
    color: #dc2626;
    background: #fef2f2;
}

.oz-main-wrap {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.oz-main {
    flex: 1;
    width: 100%;
    padding: 1rem 1.25rem 1.5rem;
}

.oz-main--dense {
    padding: 0.5rem 0.875rem 0.75rem;
}

@media (max-width: 767px) {
    .oz-sidebar {
        position: fixed;
        left: 0;
        box-shadow: 4px 0 24px rgb(15 23 42 / 0.08);
    }

    .oz-sidebar--collapsed {
        width: 3.5rem;
        box-shadow: none;
    }

    .oz-main {
        padding: 0.75rem 0.875rem 1rem;
    }

    .oz-main--dense {
        padding: 0.5rem 0.625rem 0.625rem;
    }
}

/* 报告页：主区略收边距，报告内容在 iframe 内居中限宽 */
.report-viewer {
    min-height: calc(100vh - 1rem);
    margin: -0.35rem -0.5rem 0;
    padding: 0;
}
@media (max-width: 767px) {
    .report-viewer {
        margin: -0.5rem -0.625rem 0;
    }
}
.report-viewer__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 1rem 0.625rem;
    border-bottom: 1px solid rgb(226 232 240 / 0.75);
    background: rgb(255 255 255 / 0.72);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 5;
}
.report-iframe {
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
    background: transparent;
}

/* ===== 页面通用 ===== */
.oz-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.oz-page-header--compact {
    margin-bottom: 0;
    align-items: center;
}

.oz-page-title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink-900);
    line-height: 1.25;
}

.oz-page-desc {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--ink-400);
    line-height: 1.5;
}

.oz-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.oz-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.oz-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.oz-breadcrumb a:hover {
    color: var(--sight-700);
}

/* ===== 主体行卡（指挥台）===== */
.oz-subject-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 52rem;
}

.oz-subject-card {
    position: relative;
    display: grid;
    grid-template-columns: 3px 1fr auto;
    align-items: center;
    gap: 0.875rem 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-panel);
    border: 1px solid var(--border-subtle);
    background: var(--surface-panel);
    text-decoration: none;
    box-shadow: var(--shadow-panel);
    transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.oz-subject-card__rail {
    align-self: stretch;
    border-radius: 2px;
    background: var(--ink-300);
    min-height: 2.5rem;
}

.oz-subject-card__rail.oz-kind--brand { background: #7c3aed; }
.oz-subject-card__rail.oz-kind--domain { background: #0284c7; }
.oz-subject-card__rail.oz-kind--product { background: #059669; }
.oz-subject-card__rail.oz-kind--person { background: #d97706; }

.oz-subject-card:hover {
    border-color: rgb(15 118 110 / 0.35);
    box-shadow: 0 2px 10px rgb(11 31 51 / 0.06);
}

.oz-subject-card--compact {
    padding: 0.75rem 1rem;
}

.oz-subject-card__arrow {
    font-size: 0.875rem;
    color: var(--ink-300);
    transition: color 0.15s ease, transform 0.15s ease;
}

.oz-subject-card:hover .oz-subject-card__arrow {
    color: var(--sight-600);
    transform: translateX(2px);
}

.oz-kind-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.oz-kind-badge--lg {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
}

.oz-kind--brand { background: #f3e8ff; color: #6b21a8; }
.oz-kind--domain { background: #e0f2fe; color: #0369a1; }
.oz-kind--product { background: #d1fae5; color: #047857; }
.oz-kind--person { background: #fef3c7; color: #b45309; }
.oz-kind--default { background: var(--ink-100); color: var(--ink-500); }

.oz-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ===== 轮次卡片 ===== */
.oz-campaign-card {
    position: relative;
    border-radius: var(--radius-panel);
    border: 1px solid var(--border-subtle);
    background: var(--surface-panel);
    transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.oz-campaign-card:hover {
    border-color: rgb(15 118 110 / 0.3);
    box-shadow: 0 2px 10px rgb(11 31 51 / 0.05);
}

.oz-campaign-card--current {
    border-color: rgb(15 118 110 / 0.45);
    box-shadow: inset 0 0 0 1px rgb(15 118 110 / 0.12);
}

.oz-campaign-card--scored {
    border-left-width: 3px;
    border-left-style: solid;
}

.oz-campaign-card--tier-excellent { border-left-color: #22c55e; }
.oz-campaign-card--tier-good { border-left-color: #14b8a6; }
.oz-campaign-card--tier-fair { border-left-color: #f59e0b; }
.oz-campaign-card--tier-poor { border-left-color: #f97316; }
.oz-campaign-card--tier-bad { border-left-color: #ef4444; }

.oz-campaign-card__delete {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.125rem 0.375rem;
    border: 0;
    background: transparent;
    font-size: 0.6875rem;
    color: #94a3b8;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.oz-campaign-card:hover .oz-campaign-card__delete {
    opacity: 1;
}

.oz-campaign-card__delete:hover {
    color: #dc2626;
}

/* ===== API Key 行 ===== */
.oz-key-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(226 232 240 / 0.85);
    background: white;
}

/* ===== 空状态 ===== */
.oz-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.5rem;
    border-radius: 1rem;
    border: 1px dashed rgb(203 213 225 / 0.9);
    background: rgb(255 255 255 / 0.5);
    text-align: center;
}

.oz-empty--compact {
    padding: 2rem 1rem;
}

.oz-empty__icon {
    font-size: 2rem;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

/* ===== 新用户引导（主体页空状态）===== */
.oz-onboard {
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgb(226 232 240 / 0.85);
    background: rgb(255 255 255 / 0.65);
}

.oz-onboard__steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0;
    margin-top: 0.75rem;
    list-style: none;
    padding: 0;
}

.oz-onboard__step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.oz-onboard__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background: rgb(30 41 59);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.oz-onboard__arrow {
    padding: 0 0.375rem;
    color: #cbd5e1;
}

.oz-onboard__hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

/* ===== 弹窗 ===== */
.oz-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.oz-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(15 23 42 / 0.45);
    backdrop-filter: blur(4px);
}

.oz-modal__panel {
    position: relative;
    width: 100%;
    max-width: 28rem;
    border-radius: 1rem;
    border: 1px solid rgb(226 232 240 / 0.9);
    background: white;
    box-shadow: 0 20px 48px rgb(15 23 42 / 0.16);
    overflow: hidden;
}

.oz-modal__panel--md {
    max-width: 32rem;
}

.oz-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgb(241 245 249);
}

.oz-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #94a3b8;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.oz-modal__close:hover {
    background: #f1f5f9;
    color: #475569;
}

.oz-modal__body {
    padding: 1rem 1.25rem;
    max-height: min(70vh, 32rem);
    overflow-y: auto;
}

.oz-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid rgb(241 245 249);
    background: #fafbfc;
}

/* ===== Toast ===== */
.oz-toast {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 80;
    max-width: min(22rem, calc(100vw - 2rem));
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #0f172a;
    background: white;
    border: 1px solid rgb(226 232 240 / 0.95);
    box-shadow: 0 12px 32px rgb(15 23 42 / 0.14);
    animation: oz-toast-in 0.22s ease-out;
}

.oz-toast--ok { border-color: rgb(167 243 208 / 0.9); background: #ecfdf5; color: #047857; }
.oz-toast--err { border-color: rgb(254 202 202 / 0.95); background: #fef2f2; color: #b91c1c; }
.oz-toast--warn { border-color: rgb(253 230 138 / 0.95); background: #fffbeb; color: #b45309; }

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

/* ===== 看板 Meta 行（替代 KPI 胶囊）===== */
.oz-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 1.25rem;
    font-size: 0.8125rem;
    color: var(--ink-400);
    line-height: 1.4;
}

.oz-meta-row b {
    color: var(--ink-900);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.oz-meta-row__status {
    color: var(--sight-700);
    font-weight: 650;
}

.oz-stage-rail {
    padding: 1rem 1.25rem 0.875rem;
    border-radius: var(--radius-panel);
    border: 1px solid var(--border-subtle);
    background: var(--surface-panel);
    box-shadow: var(--shadow-panel);
    margin-bottom: 1.25rem;
}

.oz-action-priority {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.oz-action-priority__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-control);
    border: 1px solid var(--border-subtle);
    background: var(--ink-50);
}

.oz-action-priority__rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.25rem;
    background: var(--ink-900);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.oz-action-priority__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink-900);
}

.oz-action-priority__why {
    grid-column: 2;
    font-size: 0.75rem;
    color: var(--ink-500);
    line-height: 1.45;
}

.oz-more-menu {
    position: relative;
}

.oz-more-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 20;
    min-width: 8.5rem;
    padding: 0.25rem;
    border-radius: var(--radius-control);
    border: 1px solid var(--border-subtle);
    background: var(--surface-panel);
    box-shadow: 0 8px 24px rgb(11 31 51 / 0.12);
}

.oz-more-menu__item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.625rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    font-size: 0.8125rem;
    color: var(--ink-700);
    cursor: pointer;
}

.oz-more-menu__item:hover { background: var(--ink-50); }
.oz-more-menu__item--danger { color: #b91c1c; }
.oz-more-menu__item--danger:hover { background: #fef2f2; }

/* legacy kpi aliases（少量残留） */
.oz-kpi-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.oz-kpi {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.25rem 0; font-size: 0.75rem; color: var(--ink-400);
}
.oz-kpi b { color: var(--ink-900); font-weight: 600; font-variant-numeric: tabular-nums; }
.oz-kpi--accent { color: var(--sight-700); }
.oz-kpi--accent b { color: var(--sight-700); }

/* ===== 看板阶段面板 ===== */
.oz-board-stage {
    width: 100%;
    max-width: 72rem;
}

.oz-board-split {
    display: grid;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .oz-board-split {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        align-items: start;
    }
}

.oz-board-form {
    border-radius: var(--radius-panel);
    border: 1px solid var(--border-subtle);
    background: var(--ink-50);
    padding: 1rem;
}

.oz-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.oz-task-row {
    border: 1px solid rgb(241 245 249);
    border-radius: 0.75rem;
    padding: 0.75rem 0.875rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.oz-task-row:hover {
    border-color: rgb(226 232 240);
    box-shadow: 0 1px 4px rgb(15 23 42 / 0.04);
}

.oz-btn-quiet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.375rem 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.oz-btn-quiet:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.oz-btn-quiet:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.oz-btn-quiet.is-loading::after {
    content: '';
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid #cbd5e1;
    border-top-color: var(--sight-600);
    border-radius: 9999px;
    animation: oz-spin 0.7s linear infinite;
}

@keyframes oz-spin {
    to { transform: rotate(360deg); }
}

/* ===== 迷你 Stepper（轮次卡）===== */
.oz-mini-steps {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.75rem;
}

.oz-mini-step {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.oz-mini-step__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #e2e8f0;
    flex-shrink: 0;
}

.oz-mini-step__label {
    font-size: 0.625rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oz-mini-step--done .oz-mini-step__dot { background: #10b981; }
.oz-mini-step--done .oz-mini-step__label { color: #059669; }
.oz-mini-step--current .oz-mini-step__dot {
    background: var(--sight-600);
    box-shadow: 0 0 0 3px rgb(15 118 110 / 0.2);
}
.oz-mini-step--current .oz-mini-step__label {
    color: var(--sight-700);
    font-weight: 600;
}

.oz-mini-step__rail {
    flex: 0 0 0.5rem;
    height: 2px;
    background: #e2e8f0;
    border-radius: 1px;
}

.oz-mini-step__rail--done { background: #a7f3d0; }

/* ===== 主体卡摘要 ===== */
.oz-subject-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding-right: 1.5rem;
}

.oz-subject-card__stat {
    font-size: 0.6875rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

/* ===== 轮次卡增强 ===== */
.oz-campaign-card__body {
    display: block;
    padding: 1rem 1.125rem 0.875rem;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.oz-campaign-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.625rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgb(241 245 249);
}

/* ===== 轮次卡 · 总评分 ===== */
.oz-campaign-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.75rem;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #64748b;
}

.oz-campaign-summary__item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.oz-campaign-summary__tier {
    margin-left: 0.25rem;
    padding: 0.0625rem 0.375rem;
    border-radius: 0.25rem;
    background: rgb(241 245 249 / 0.9);
    font-size: 0.6875rem;
    font-weight: 600;
    color: #475569;
}

.oz-campaign-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.625rem;
    border: 1px solid transparent;
}

.oz-campaign-score__left {
    min-width: 0;
}

.oz-campaign-score__value-row {
    display: flex;
    align-items: baseline;
    gap: 0.125rem;
}

.oz-campaign-score__value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.oz-campaign-score__scale {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.65;
}

.oz-campaign-score__meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.125rem;
}

.oz-campaign-score__label {
    font-size: 0.6875rem;
    font-weight: 600;
    opacity: 0.85;
}

.oz-campaign-score__tier {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.0625rem 0.3125rem;
    border-radius: 0.25rem;
    background: rgb(255 255 255 / 0.45);
    letter-spacing: 0.02em;
}

.oz-campaign-score__pending {
    font-size: 0.6875rem;
    font-weight: 600;
    opacity: 0.75;
}

.oz-score-delta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.0625rem;
    padding: 0.25rem 0.4375rem;
    border-radius: 0.4375rem;
    background: rgb(255 255 255 / 0.55);
    white-space: nowrap;
    flex-shrink: 0;
}

.oz-score-delta--inline {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.4375rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
}

.oz-score-delta__label {
    font-size: 0.5625rem;
    font-weight: 600;
    opacity: 0.75;
    letter-spacing: 0.02em;
}

.oz-score-delta__value {
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1.1;
}

.oz-score-delta--up {
    color: #15803d;
    background: rgb(220 252 231 / 0.85);
}

.oz-score-delta--down {
    color: #dc2626;
    background: rgb(254 226 226 / 0.85);
}

.oz-score-delta--flat {
    color: #64748b;
    background: rgb(248 250 252 / 0.9);
}

.oz-score-text--excellent { color: #15803d; }
.oz-score-text--good { color: #0f766e; }
.oz-score-text--fair { color: #b45309; }
.oz-score-text--poor { color: #c2410c; }
.oz-score-text--bad { color: #dc2626; }
.oz-score-text--none { color: #64748b; }

.oz-campaign-score--excellent {
    background: linear-gradient(135deg, #dcfce7 0%, #86efac 100%);
    border-color: rgb(34 197 94 / 0.35);
    color: #15803d;
    box-shadow: 0 1px 6px rgb(34 197 94 / 0.18);
}

.oz-campaign-score--good {
    background: linear-gradient(135deg, #ccfbf1 0%, #5eead4 100%);
    border-color: rgb(20 184 166 / 0.35);
    color: #0f766e;
    box-shadow: 0 1px 6px rgb(20 184 166 / 0.18);
}

.oz-campaign-score--fair {
    background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
    border-color: rgb(245 158 11 / 0.4);
    color: #b45309;
    box-shadow: 0 1px 6px rgb(245 158 11 / 0.2);
}

.oz-campaign-score--poor {
    background: linear-gradient(135deg, #ffedd5 0%, #fdba74 100%);
    border-color: rgb(249 115 22 / 0.4);
    color: #c2410c;
    box-shadow: 0 1px 6px rgb(249 115 22 / 0.2);
}

.oz-campaign-score--bad {
    background: linear-gradient(135deg, #fee2e2 0%, #fca5a5 100%);
    border-color: rgb(239 68 68 / 0.35);
    color: #dc2626;
    box-shadow: 0 1px 6px rgb(239 68 68 / 0.18);
}

.oz-campaign-score--none {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: rgb(203 213 225 / 0.6);
    color: #64748b;
}

/* ===== 指标对比表 ===== */
.oz-compare-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    background: #fffbeb;
    border: 1px solid rgb(253 230 138 / 0.8);
    color: #92400e;
    font-size: 0.75rem;
}

.oz-compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border: 1px solid rgb(226 232 240 / 0.85);
    border-radius: 0.875rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.03);
}

.oz-compare-table th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid rgb(226 232 240 / 0.9);
}

.oz-compare-table td {
    padding: 0.75rem 0.875rem;
    border-bottom: 1px solid rgb(241 245 249);
    font-size: 0.8125rem;
    vertical-align: middle;
}

.oz-compare-table tr:last-child td { border-bottom: 0; }
.oz-compare-table tbody tr:hover td { background: var(--ink-50); }

.oz-section {
    margin-bottom: 1.5rem;
}
.oz-section__title {
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin-bottom: 0.625rem;
}

.oz-key-ttl {
    margin-top: 0.375rem;
    height: 3px;
    border-radius: 2px;
    background: var(--ink-100);
    overflow: hidden;
    max-width: 12rem;
}
.oz-key-ttl__bar {
    height: 100%;
    background: var(--sight-600);
    border-radius: 2px;
}

.oz-delta {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.oz-delta--up { color: #059669; }
.oz-delta--down { color: #dc2626; }
.oz-delta--flat { color: #94a3b8; }
.oz-delta--na { color: #94a3b8; font-weight: 500; }

/* ===== 事件流工具栏 ===== */
.oz-events-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.oz-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    border: 1px solid rgb(226 232 240);
    background: white;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.oz-chip {
    border-radius: 0.375rem;
}
.oz-chip:hover { border-color: var(--sight-500); color: var(--sight-700); }
.oz-chip--on {
    background: var(--sight-50);
    border-color: var(--sight-500);
    color: var(--sight-700);
    font-weight: 600;
}

.oz-event-card--AGENT { border-left: 3px solid var(--sight-600); }
.oz-event-card--SYSTEM { border-left: 3px solid var(--ink-300); }
.oz-event-card--HUMAN { border-left: 3px solid #b45309; }

.oz-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--ink-500);
}
.oz-event-meta code {
    background: transparent;
    padding: 0;
    color: var(--ink-700);
}

.oz-events-list {
    position: relative;
    border-left: 2px solid #e2e8f0;
    margin-left: 0.75rem;
    padding: 0;
    list-style: none;
}

.oz-events-list > li {
    position: relative;
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.oz-event-dot {
    position: absolute;
    left: -1.55rem;
    top: 0.9rem;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    box-shadow: 0 0 0 3px #f8fafc;
}

.oz-event-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid rgb(226 232 240 / 0.75);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.03);
    padding: 0.75rem 0.875rem;
}

/* ===== 骨架 / 空态增强 ===== */
.oz-skeleton {
    border-radius: 0.75rem;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 400% 100%;
    animation: oz-shimmer 1.2s ease infinite;
}

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

.oz-empty--guided {
    padding: 2.5rem 1.5rem;
    max-width: 36rem;
    margin: 0 auto;
}

.oz-empty__steps {
    margin: 1rem auto 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    max-width: 18rem;
}

.oz-empty__steps li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
}

.oz-empty__steps li::before {
    content: attr(data-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    background: #1e293b;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* 宽屏内容收束，避免筛选条被拉得过散 */
.oz-content-cap {
    width: 100%;
    max-width: 72rem;
}

.oz-panel-enter {
    animation: oz-fade-up 0.2s ease-out;
}

/* ===== JSON 查看 / 编辑 ===== */
.oz-json-panel {
    border-radius: 0.75rem;
    border: 1px solid rgb(226 232 240 / 0.9);
    background: rgb(255 255 255 / 0.85);
    overflow: hidden;
}

.oz-json-panel__summary {
    cursor: pointer;
    select: none;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    list-style: none;
}

.oz-json-panel__summary::-webkit-details-marker {
    display: none;
}

.oz-json-panel__summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 0.375rem;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.oz-json-panel[open] .oz-json-panel__summary::before {
    transform: rotate(90deg);
}

.oz-json-block {
    margin: 0;
    padding: 0.875rem 1rem 1rem;
    max-height: min(28rem, 55vh);
    overflow: auto;
    border-top: 1px solid rgb(241 245 249);
    background: #f8fafc;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.75rem;
    line-height: 1.65;
    color: #334155;
    white-space: pre;
    tab-size: 2;
}

.oz-json-edit {
    min-height: 12rem;
    resize: vertical;
    tab-size: 2;
    white-space: pre;
    overflow-x: auto;
}
