/* =====================================================
   大鱼数据导出器 · kami 设计语言实现
   Token 全部从 kami 权威 design.md (§1-§5) 引用
   - 颜色 §1 Color / Surface / Text / Border / Tag / Breaking
   - 字体 §2 Typography Stacks
   - 间距 §3 Spacing(4pt 网格)
   - 圆角 §4 Components · Cards(2pt chips / 4pt blocks / 8pt screen)
   - 阴影 §5 Depth & Shadow(ring / whisper)
   - 过渡 §2-5 默认 0.15-0.2s
   ===================================================== */

:root {
    /* ---------- 1. 颜色(从 kami design.md §1) ---------- */

    /* 品牌强调(单一色) */
    --brand:        #1B365D;   /* §1 Brand · Ink Blue - 唯一彩色 */
    --brand-light:  #2D5A8A;   /* §1 Brand · Ink Light - 深底链接 */

    /* 表面(5 个 surface token) */
    --parchment:    #f5f4ed;   /* §1 Surface · 页背景 - 暖米纸 */
    --canvas:       #f5f4ed;   /* 别名(保留 dydow 旧名, 避免破坏外部 inline 引用) */
    --ivory:        #faf9f5;   /* §1 Surface · 卡片 / 提升容器 */
    --warm-sand:    #e8e6dc;   /* §1 Surface · 按钮默认 / 交互面 */
    --dark-surface: #30302e;   /* §1 Surface · 深色容器(暖炭) */
    --deep-dark:    #141413;   /* §1 Surface · 深色页背景 */

    /* 文字四级(§1 Text) */
    --near-black:   #141413;   /* §1 Text · 主文字 - 暖橄榄底 */
    --dark-warm:    #3d3d3a;   /* §1 Text · 次级 / 表头 / 链接 */
    --olive:        #504e49;   /* §1 Text · 辅助 / 描述 / 字幕 */
    --stone:        #6b6a64;   /* §1 Text · 三级 / 日期 / 元数据 */

    /* 边框(§1 Border) */
    --border:       #e8e6dc;   /* §1 Border · 主边框(对齐 kami 权威值) */
    --border-soft:  #e5e3d8;   /* §1 Border · 次级边框 / 行分割 */

    /* Tag / tint(§1 Translucent → Solid) */
    --tag-bg:       #E4ECF5;   /* §1 tag 默认背景 */
    --brand-tint:   #EEF2F7;   /* §1 tag 浅色背景 */

    /* 语义暖色(§1 唯一例外 - breaking changelog) */
    --breaking-bg:  #f0e0d8;   /* §1 breaking · 暖桃背景 */
    --breaking-fg:  #8b4513;   /* §1 breaking · 暖棕文字 */

    /* dydow 业务色(非 kami 规范, 但需保留 - 后端 / 业务逻辑依赖) */
    --error:        #b53333;   /* 错误 */
    --success:      #4a7a3a;   /* 成功 */
    --pause:        #6b6a64;   /* 暂停(== --stone) */

    /* ---------- 2. 字体栈(从 kami design.md §2) ---------- */
    /* --serif: Charter 优先(英文衬线), TsangerJinKai02 中文衬线 fallback */
    --serif: "Charter", "TsangerJinKai02", "Source Han Serif SC",
             "Source Han Serif CN", "Noto Serif CJK SC", "Noto Serif SC",
             "Songti SC", "STSong", Georgia, serif;
    /* --sans: 屏幕 dashboard 场景用 sans 仍合理, 但 font 栈对齐 kami 推荐(CJK 兜底) */
    --sans: "Charter", "TsangerJinKai02", "PingFang SC",
            "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
    /* --mono: 加 CJK fallback(kami §2 要求) */
    --mono: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, Monaco,
            "TsangerJinKai02", "Source Han Serif SC", monospace;

    /* ---------- 3. 间距(从 kami design.md §3 · 4pt 网格) ---------- */
    --space-xs:  4px;          /* §3 sm 4-5pt · 行内紧邻元素 */
    --space-sm:  8px;          /* §3 md 8-10pt · 组件内 */
    --space-md:  12px;         /* §3 md 上限 */
    --space-lg:  16px;         /* §3 lg 16-20pt · 卡片 padding / 组件间距 */
    --space-xl:  24px;         /* §3 xl 24-32pt · 章节间距 */
    --space-2xl: 32px;         /* §3 xl 上限 */
    --space-3xl: 48px;         /* §3 2xl 40-60pt · 主要段落间距 */

    /* ---------- 4. 圆角(从 kami design.md §4 Cards) ---------- */
    --radius-sm:   4px;        /* §4 chips / dense blocks */
    --radius-md:   6px;        /* inputs / buttons / 中等容器 */
    --radius-lg:   8px;        /* screen cards / landing-page */
    --radius-pill: 999px;      /* 标签 / 圆角 */

    /* ---------- 5. 阴影(从 kami design.md §5) ---------- */
    --shadow-ring:        0 0 0 1px var(--border);          /* §5.1 ring default */
    --shadow-ring-brand:  0 0 0 1px var(--brand);           /* §5.1 ring active */
    --shadow-whisper:     0 4px 24px rgba(20, 20, 19, 0.05); /* §5.2 whisper lift */
    --shadow-modal:       0 12px 40px rgba(20, 20, 19, 0.15); /* modal 暖阴影 */
    --shadow-drawer:      -8px 0 32px rgba(20, 20, 19, 0.10); /* drawer 暖阴影 */
    --shadow-toast:       0 4px 16px rgba(20, 20, 19, 0.20);  /* toast 暖阴影 */

    /* ---------- 6. 过渡(从 kami design.md) ---------- */
    --t-fast:  0.15s;
    --t-base:  0.2s;
    --ease:    cubic-bezier(0.4, 0, 0.2, 1);
}


/* =====================================================
   Reset / Base
   ===================================================== */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--parchment);            /* §1 parchment · 暖米纸底, 禁纯白 */
    color: var(--near-black);                /* §1 Text 主 */
    font-family: var(--sans);                /* 屏幕 dashboard 走 sans(kami §2 允许) */
    font-size: 14px;                          /* §2 ladder · 14px 是 prose 起步 */
    line-height: 1.55;                        /* §2 reading body 1.5-1.55 */
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
}
a:hover { text-decoration: underline; }

code {
    font-family: var(--mono);
    font-size: 0.85em;
    background: var(--ivory);
    color: var(--brand);
    padding: 1px 5px;
    border-radius: var(--radius-sm);
}

pre {
    display: block;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
    padding: var(--space-md) var(--space-lg);
    background: var(--ivory);
    color: var(--dark-warm);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}


/* =====================================================
   通用容器
   ===================================================== */

.page {
    min-height: 100vh;
    padding: var(--space-2xl) var(--space-xl) 80px;     /* §3 xl 24-32pt */
}

.container {
    max-width: 920px;
    margin: 0 auto;
}


/* =====================================================
   登录页
   ===================================================== */

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: var(--space-3xl) var(--space-2xl) var(--space-2xl);
    background: var(--ivory);
    border-radius: var(--radius-lg);                  /* §4 screen 8px max(原 16px 偏大) */
    box-shadow: var(--shadow-ring), var(--shadow-whisper);  /* §5.1 + §5.2 组合 */
}

.eyebrow {
    margin: 0 0 var(--space-md);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--olive);
    letter-spacing: 0.5px;                            /* §2 small labels +0.2~0.5pt */
    text-transform: uppercase;
}

.login-title {
    margin: 0 0 var(--space-sm);
    font-family: var(--serif);                         /* §4 login 大字走 serif */
    font-weight: 500;                                 /* §2 serif heading 500 */
    font-size: 36px;                                  /* §2 display 36pt 起步 */
    line-height: 1.15;                                /* §2 tight headline 1.1-1.3 */
    color: var(--near-black);
}

.login-subtitle {
    margin: 0 0 var(--space-2xl);
    font-size: 14px;
    color: var(--stone);
    line-height: 1.55;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.login-form input[type="password"] {
    width: 100%;
    padding: 14px var(--space-lg);
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);                  /* §4 inputs 6px */
    color: var(--near-black);
    font-size: 15px;
    transition: border-color var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease);
}
.login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.08);    /* §5 focus ring 暖调 */
}

.alert-error {
    padding: var(--space-sm) var(--space-lg);
    margin-bottom: var(--space-lg);
    background: var(--breaking-bg);                  /* §1 breaking 暖桃 */
    border: 1px solid var(--border-soft);
    border-left: 2px solid var(--error);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 13px;
}


/* =====================================================
   顶部条
   ===================================================== */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.brand-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand);                         /* §1 brand ink blue */
}

.brand-name {
    font-family: var(--serif);
    font-weight: 500;                                 /* §2 serif heading 500 */
    font-size: 18px;
    color: var(--near-black);
    letter-spacing: 0.5px;
}

.topbar-actions {                                     /* 补 .topbar-actions 容器(原 HTML inline) */
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logout-form { margin: 0; }


/* =====================================================
   Cookie 状态条
   ===================================================== */

.cookie-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-xl);
    background: var(--ivory);
    border-radius: var(--radius-lg);                  /* §4 screen card 8px */
    border: 1px solid var(--border);
}

.cookie-bar.is-missing { border-left: 3px solid var(--error); }    /* §4 单边 brand rule */
.cookie-bar.is-ok      { border-left: 3px solid var(--brand); }    /* §1 brand edge */

.cookie-bar-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    font-size: 14px;
}

.cookie-bar-label {
    font-family: var(--serif);
    font-weight: 500;
    color: var(--near-black);
    margin-right: var(--space-xs);
}

.cookie-bar-status { font-weight: 500; }
.cookie-bar-status.ok  { color: var(--success); }
.cookie-bar-status.err { color: var(--error); }
.cookie-bar-time { color: var(--stone); font-size: 13px; }

.cookie-bar-actions {
    display: flex;
    gap: var(--space-sm);
}


/* =====================================================
   任务卡片
   ===================================================== */

.tasks {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);                             /* dydow 已有"3 个板块间距 16px"意图, 保留 */
}

.task-card {
    background: var(--ivory);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);             /* §4 卡片默认单边 border(原双层改单层) */
    border-radius: var(--radius-lg);                  /* §4 screen 8px */
    padding: var(--space-xl) var(--space-xl);
    transition: box-shadow var(--t-fast) var(--ease);
}
.task-card:hover { box-shadow: var(--shadow-whisper); }  /* §5.2 whisper lift */

.task-card.is-success { border-left-color: var(--success); }  /* §4 单边 brand edge */
.task-card.is-failure { border-left-color: var(--error); }
.task-card.is-disabled { opacity: 0.7; }

.task-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.task-title {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 18px;
    color: var(--near-black);
}

.task-status {                                        /* 补 .task-status 容器(原无样式) */
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.status-pill {
    display: inline-block;
    padding: 3px var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    background: var(--warm-sand);
    color: var(--olive);
}
.status-pill.is-running { background: var(--brand-tint); color: var(--success); }   /* §1 tag 浅色 */
.status-pill.is-error   { background: var(--breaking-bg); color: var(--error); }     /* §1 breaking */
.status-pill.is-paused  { background: var(--warm-sand); color: var(--stone); }
.status-pill.is-pending { background: var(--ivory); color: var(--stone); border: 1px dashed var(--border); }
.status-pill.is-warning { background: var(--breaking-bg); color: var(--breaking-fg); }  /* §1 breaking */

/* checkbox field */
.field-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
    color: var(--olive);
    cursor: pointer;
    user-select: none;
}
.field-check input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.task-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md) var(--space-xl);
    margin-bottom: var(--space-lg);
}

.meta-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.meta-label {
    color: var(--stone);
    font-size: 12px;
}

.meta-value {
    color: var(--near-black);
    font-variant-numeric: tabular-nums;               /* §4 kami-table 数字对齐 */
}
.meta-value.highlight {
    font-family: var(--serif);
    font-weight: 500;
    color: var(--brand);
    font-size: 16px;
}
.meta-value.ok  { color: var(--success); }
.meta-value.err { color: var(--error); }
.meta-value .meta-sub { color: var(--stone); font-size: 12px; margin-left: 6px; }

.meta-row.error-row {
    grid-column: 1 / -1;
    background: var(--breaking-bg);                  /* §1 breaking 暖桃底 */
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-sm);
    margin-top: var(--space-xs);
}

.error-detail {
    grid-column: 1 / -1;
    margin-top: var(--space-sm);
}
.error-detail[hidden] { display: none; }

.task-foot {
    display: flex;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}


/* =====================================================
   按钮系统
   ===================================================== */

.btn-primary, .btn-secondary, .btn-ghost {
    display: inline-block;
    padding: var(--space-sm) 18px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--t-fast) var(--ease);
    box-shadow: 0 0 0 1px transparent;                /* §5.1 准备 ring */
}

.btn-primary {
    background: var(--brand);
    color: var(--ivory);
}
.btn-primary:hover  { box-shadow: 0 0 0 1px var(--brand); }     /* §5.1 ring active */
.btn-primary:focus  { outline: none; box-shadow: 0 0 0 1px var(--brand), 0 0 0 3px rgba(27,54,93,0.08); }
.btn-primary:active { transform: translateY(0.5px); }

.btn-secondary {
    background: var(--warm-sand);
    color: var(--dark-warm);
}
.btn-secondary:hover  { box-shadow: 0 0 0 1px var(--border); }  /* §5.1 ring border */
.btn-secondary:focus  { outline: none; box-shadow: 0 0 0 1px var(--border), 0 0 0 3px rgba(27,54,93,0.08); }
.btn-secondary.is-active {                                              /* §1 brand edge 选中态 */
    background: var(--brand);
    color: var(--ivory);
    box-shadow: 0 0 0 1px var(--brand);
}

.btn-ghost {
    background: transparent;
    color: var(--stone);
    padding: var(--space-sm) var(--space-md);
}
.btn-ghost:hover  { color: var(--near-black); box-shadow: 0 0 0 1px var(--border); }
.btn-ghost:focus  { outline: none; box-shadow: 0 0 0 1px var(--border); }

.btn-link {
    background: transparent;
    border: none;
    color: var(--brand);
    padding: 0;
    margin-left: var(--space-sm);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

.login-form .btn-primary {
    padding: 14px var(--space-xl);
    font-size: 15px;
    margin-top: var(--space-xs);
}


/* =====================================================
   模态框
   ===================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal[hidden] { display: none; }

.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 19, 0.4);                /* §1 deep-dark 暖遮罩 */
    backdrop-filter: blur(2px);
}

.modal-card {
    position: relative;
    width: 92%;
    max-width: 560px;
    max-height: 90vh;
    background: var(--ivory);
    border-radius: var(--radius-lg);                  /* §4 screen 8px */
    box-shadow: var(--shadow-modal);                  /* §5 暖阴影(原偏重) */
    display: flex;
    flex-direction: column;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border);
}
.modal-head h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 16px;
}

.modal-body {
    padding: var(--space-xl);
    overflow-y: auto;
    flex: 1;
}

.modal-foot {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    padding: 14px var(--space-xl);
    border-top: 1px solid var(--border);
}

.hint {
    margin: 0 0 var(--space-md);
    font-size: 13px;
    color: var(--olive);
    line-height: 1.6;
}
.hint.warn {
    color: var(--error);
    background: var(--breaking-bg);                  /* §1 breaking 暖底 */
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--error);
}

textarea, input[type="text"], input[type="time"], input[type="date"], input[type="number"], select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--near-black);
    font-size: 14px;
    transition: border-color var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease);
}
textarea {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
}
textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.08);
}


/* =====================================================
   日期 & 数字输入框(kami 化)
   1) date input: 改写日历图标, 让它在米色底上不突兀
   2) number input: 去掉浏览器原生的上下箭头小按钮
   3) date input 在 inline-flex 容器里不强行 100% 宽
   ===================================================== */

/* date: 浏览器自带日历图标调色 + 增大点击区 */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.45;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: opacity var(--t-fast) var(--ease),
                background var(--t-fast) var(--ease);
    filter: invert(0.25) sepia(0.2) saturate(2) hue-rotate(185deg);
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: rgba(27, 54, 93, 0.08);
}

/* 解决 Chrome date input 内部内嵌边线带来的"凹"感 */
input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 38px;       /* 与 button 高度对齐 */
}
input[type="date"]::-webkit-datetime-edit {
    color: var(--near-black);
}
input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }

/* number: 去掉上下小箭头 */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
    -webkit-appearance: none;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* date 在 meta-row(inline-flex)里保持紧凑, 不抢满整行 */
.meta-value input[type="date"] {
    width: auto;
    min-width: 150px;
    flex: 0 0 auto;
}


/* =====================================================
   抽屉
   ===================================================== */

.drawer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    justify-content: flex-end;
}
.drawer[hidden] { display: none; }

.drawer-mask {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 19, 0.4);
    backdrop-filter: blur(2px);
}

.drawer-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--ivory);
    box-shadow: var(--shadow-drawer);                 /* §5 暖阴影(原偏重) */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border);
}
.drawer-head h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 16px;
}

.drawer-body {
    padding: var(--space-xl);
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.drawer-foot {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    padding: 14px var(--space-xl);
    border-top: 1px solid var(--border);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--olive);
    letter-spacing: 0.3px;                            /* §2 small labels tracking */
}

.field-hint {
    font-size: 12px;
    color: var(--stone);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}


/* =====================================================
   Toast
   ===================================================== */

.toast {
    position: fixed;
    top: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding: var(--space-sm) 18px;
    background: var(--near-black);
    color: var(--parchment);
    border-radius: var(--radius-md);
    font-size: 14px;
    box-shadow: var(--shadow-toast);                  /* §5 暖阴影 */
}
.toast[hidden] { display: none; }
.toast.is-error   { background: var(--error); }
.toast.is-success { background: var(--success); }
.toast.is-warn    { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }  /* 暖黄警告,大鱼 SSO 提示 */


/* =====================================================
   页脚
   ===================================================== */

.footer-hint {
    text-align: center;
    margin: var(--space-3xl) 0 0;
    font-size: 12px;
    color: var(--stone);
    letter-spacing: 0.3px;
}


/* =====================================================
   响应式(窄屏)
   ===================================================== */

@media (max-width: 640px) {
    .page { padding: var(--space-xl) var(--space-lg) 60px; }
    .task-meta { grid-template-columns: 1fr; }
    .cookie-bar { flex-direction: column; align-items: flex-start; }
    .field-row { grid-template-columns: 1fr; }
    .login-card { padding: var(--space-2xl) var(--space-xl); }
    .login-title { font-size: 28px; }
}


/* =====================================================
   客户 ID 标签(从 dashboard.html inline 块迁出, kami token 化)
   dashboard.html 已清理 inline 块, kami.css 接管生效
   ===================================================== */

.customer-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 3px 4px 3px var(--space-sm);
    background: var(--ivory);                        /* §1 Surface · ivory */
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-family: var(--mono);
}
.chip-del {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--stone);
    font-size: 12px;
    padding: 0 6px;
    line-height: 1;
    border-radius: var(--radius-pill);
}
.chip-del:hover {
    color: var(--error);
    background: var(--breaking-bg);                  /* §1 breaking 暖桃 */
}


/* =====================================================
   自定义列模态框(从 dashboard.html inline 块迁出, kami token 化)
   ===================================================== */

.run-output {
    margin-top: var(--space-md);
    max-height: 320px;
    overflow: auto;
    background: var(--dark-surface);                 /* §1 dark-surface 暖炭 */
    color: var(--ivory);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-family: var(--mono);
    line-height: 1.7;
    white-space: pre-wrap;
    margin-bottom: 0;
}

/* =====================================================
   导出模态框 · 实时日志(行级颜色 + 工具条)
   ===================================================== */

.log-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: var(--space-sm);
    margin-bottom: 4px;
    padding: 0 2px;
}
.log-toolbar-hint {
    color: var(--stone);
    font-size: 12px;
}
.log-toolbar-actions {
    display: flex;
    gap: 6px;
}
.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.run-log {
    margin-top: 0;
}
.run-log .log-line {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 1px 0;
    color: var(--ivory);
}
.run-log .log-ts {
    color: var(--stone);
    flex-shrink: 0;
    font-size: 11px;
    user-select: none;
}
.run-log .log-msg {
    flex: 1;
    word-break: break-all;
    white-space: pre-wrap;
}
.run-log .log-info  { color: var(--ivory); }
.run-log .log-info  .log-msg { color: var(--ivory); }
.run-log .log-warning { color: var(--breaking-fg); }
.run-log .log-warning .log-ts { color: var(--breaking-fg); }
.run-log .log-warning .log-msg { color: var(--breaking-fg); }
.run-log .log-error { color: var(--error); }
.run-log .log-error .log-ts { color: var(--error); }
.run-log .log-error .log-msg { color: var(--error); }

.header-config-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}
.header-config-tab {
    padding: var(--space-sm) 14px;
    cursor: pointer;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--stone);
    font-size: 14px;
    transition: color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease);
}
.header-config-tab.is-active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    font-weight: 600;
}
.header-config-hint {
    font-size: 12px;
    color: var(--stone);
    margin: 0 0 var(--space-sm);
}
.header-config-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 50vh;
    overflow-y: auto;
    padding: var(--space-xs);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--brand-tint);                   /* §1 brand-tint 浅蓝 */
}
.header-config-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px var(--space-sm);
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.header-config-row.is-disabled { opacity: 0.5; }
.header-config-row input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.header-config-row input[type="text"] {
    flex: 1;
    padding: var(--space-xs) var(--space-sm);
    font-size: 13px;
    min-width: 0;
}
.header-config-row .row-key {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--stone);
    min-width: 90px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-config-row .move-btn {
    padding: 2px 6px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    border-radius: 3px;
    color: var(--stone);
}
.header-config-row .move-btn:hover { background: var(--warm-sand); }
.header-config-row .move-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.header-config-empty {
    padding: var(--space-xl);
    text-align: center;
    color: var(--stone);
    font-size: 13px;
}
