/* ============================================================
   活动网后台设计系统 v2（2026-09 后台重设计专项）
   一份 CSS、两个主题：默认商家中心（蓝），[data-theme=admin] 管理后台（墨蓝）。
   目标：专业、好用的工具界面——信息密度高于 C 端、状态先行、反馈有层次。
   正式文件；demo/console2/ 的评审页直接引用本文件（2026-09-20 起无副本，不用两处同步）。
   命名：token --c-*，组件 .c-*。不写页面专属选择器；提升优先级只允许 [hidden] 那一处。
   ============================================================ */

/* ---------- 1. Token ---------- */
:root {
    /* 色：中性底 + 单一强调色。橙是状态色（待审 / 提醒），不做主色 */
    --c-bg: #f4f5f7;
    --c-surface: #ffffff;
    --c-surface-2: #f7f8fa;
    --c-surface-3: #eef0f3;
    --c-text: #1a1d23;
    --c-text-2: #5b6270;
    --c-text-3: #8a919e;
    --c-line: #e5e8ee;
    --c-line-2: #cfd5de;
    --c-primary: #146ef5;
    --c-primary-hover: #0f5ad0;
    --c-primary-soft: #eaf2ff;
    --c-primary-ink: #0d4fb8;
    --c-ok: #178a44;      --c-ok-bg: #e8f6ed;     --c-ok-line: #b9e3c7;
    --c-warn: #b45309;    --c-warn-bg: #fdf3e4;   --c-warn-line: #f2d9ad;
    --c-err: #d0281f;     --c-err-bg: #fdecea;    --c-err-line: #f4c2bd;
    --c-info: #0d4fb8;    --c-info-bg: #eaf2ff;   --c-info-line: #c3d9fb;
    --c-focus: 0 0 0 3px rgba(20, 110, 245, .22);

    /* 尺度：4px 基准 */
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px;
    --r: 8px; --r-sm: 6px; --r-lg: 12px;
    --shadow: 0 1px 2px rgba(20, 24, 33, .04), 0 2px 8px rgba(20, 24, 33, .05);
    --shadow-pop: 0 4px 16px rgba(20, 24, 33, .12), 0 1px 3px rgba(20, 24, 33, .08);
    --shadow-bar: 0 -4px 16px rgba(20, 24, 33, .08);

    /* 布局 */
    --topbar-h: 48px;
    --sidebar-w: 224px;
    --content-max: 1120px;
    --form-max: 760px;
    --z-sticky: 100; --z-bar: 150; --z-drawer: 200; --z-pop: 300; --z-modal: 400; --z-toast: 500;

    /* 字 */
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --fs: 14px; --fs-sm: 13px; --fs-xs: 12px;
    --fs-h1: 20px; --fs-h2: 15px; --fs-num: 26px;

    /* 控件 */
    --ctl-h: 36px; --ctl-h-sm: 28px; --ctl-h-lg: 44px;
    --row-h: 44px;
}
[data-theme="admin"] {
    --c-primary: #32405c;
    --c-primary-hover: #243049;
    --c-primary-soft: #eceff5;
    --c-primary-ink: #243049;
    --c-focus: 0 0 0 3px rgba(50, 64, 92, .22);
    --content-max: 1280px;
    --fs: 13px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--fs);
    line-height: 1.55;
    color: var(--c-text);
    background: var(--c-bg);
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: var(--fs-h1); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.4; }
h3 { font-size: var(--fs); font-weight: 600; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }  /* 全文件唯一一处强制优先级：hidden 属性必须压过组件的 display */
strong, b { font-weight: 600; }
.c-muted { color: var(--c-text-2); }
.c-dim { color: var(--c-text-3); }
.c-sm { font-size: var(--fs-sm); }
.c-xs { font-size: var(--fs-xs); }
.c-num { font-variant-numeric: tabular-nums; }
.c-mono { font-family: var(--mono); font-size: var(--fs-sm); }
.c-nowrap { white-space: nowrap; }
.c-right { text-align: right; }
.c-row { display: flex; align-items: center; gap: var(--s2); }
.c-row-wrap { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.c-grow { flex: 1; min-width: 0; }
.c-stack { display: flex; flex-direction: column; gap: var(--s4); }
.c-stack-sm { display: flex; flex-direction: column; gap: var(--s2); }
.c-mt-2 { margin-top: var(--s2); }
.c-mt-3 { margin-top: var(--s3); }
.c-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--c-focus); }

/* 图标：内联 SVG sprite，尺寸随字号 */
.c-ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.c-ic-sm { width: 1em; height: 1em; }
.c-ic-lg { width: 20px; height: 20px; }

/* ---------- 3. Shell ---------- */
.c-topbar {
    position: sticky; top: 0; z-index: var(--z-sticky);
    height: var(--topbar-h);
    display: flex; align-items: center; gap: var(--s3);
    padding: 0 var(--s4);
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
}
.c-brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--c-text); white-space: nowrap; }
.c-brand:hover { text-decoration: none; }
.c-brand em { font-style: normal; font-weight: 600; font-size: 13px; color: var(--c-primary); }
.c-brand .c-mark { width: 22px; height: 22px; border-radius: 6px; background: #ff5a1f; color: #fff; display: inline-grid; place-items: center; font-size: 13px; font-weight: 800; }
.c-topbar .c-spacer { flex: 1; }
.c-toplink {
    display: inline-flex; align-items: center; gap: 4px;
    height: 32px; padding: 0 8px; border-radius: var(--r-sm);
    color: var(--c-text-2); font-size: var(--fs-sm); white-space: nowrap; position: relative;
}
.c-toplink:hover { background: var(--c-surface-2); color: var(--c-text); text-decoration: none; }
.c-toplink .c-dot { position: absolute; top: 5px; right: 4px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: var(--c-err); color: #fff; font-size: 10px; line-height: 15px; text-align: center; font-weight: 600; }
.c-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--c-primary); color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; }
.c-merchant-switch { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--c-line); font-size: var(--fs-sm); color: var(--c-text); background: var(--c-surface); }
.c-merchant-switch:hover { background: var(--c-surface-2); text-decoration: none; }
.c-merchant-switch .c-role { color: var(--c-text-3); }
.c-menu-btn { display: none; width: 36px; height: 36px; border: 0; background: none; border-radius: var(--r-sm); color: var(--c-text-2); align-items: center; justify-content: center; }
.c-menu-btn:hover { background: var(--c-surface-2); }

.c-shell { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.c-sidebar {
    width: var(--sidebar-w); flex: none;
    background: var(--c-surface);
    border-right: 1px solid var(--c-line);
    padding: var(--s3) var(--s3) var(--s6);
    position: sticky; top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
}
.c-sidebar-scrim { display: none; }

/* 场馆切换器：单馆只显示名字和状态，多馆点开下拉 */
.c-venue-switch {
    display: block; width: 100%; text-align: left;
    padding: 10px 12px; border-radius: var(--r);
    background: var(--c-surface-2); border: 1px solid var(--c-line);
    margin-bottom: var(--s3); position: relative;
}
.c-venue-switch:hover { text-decoration: none; }
.c-venue-switch b { display: block; font-size: 14px; font-weight: 600; color: var(--c-text); line-height: 1.3; padding-right: 20px; }
.c-venue-switch small { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--fs-xs); color: var(--c-text-3); }
.c-venue-switch .c-chev { position: absolute; right: 10px; top: 12px; color: var(--c-text-3); }
.c-venue-switch[data-single] .c-chev { display: none; }
.c-venue-menu {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: var(--z-pop);
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r);
    box-shadow: var(--shadow-pop); padding: 6px; display: none;
}
.c-venue-switch[aria-expanded="true"] .c-venue-menu { display: block; }
.c-venue-menu a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--c-text); font-size: var(--fs-sm); }
.c-venue-menu a:hover { background: var(--c-surface-2); text-decoration: none; }
.c-venue-menu a.is-current { background: var(--c-primary-soft); color: var(--c-primary-ink); }
.c-venue-menu a .c-grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-venue-menu hr { border: 0; border-top: 1px solid var(--c-line); margin: 6px 0; }
.c-venue-menu .c-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--c-err); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
.c-venue-switch.is-empty { background: var(--c-surface); border-style: dashed; }
.c-venue-switch.is-empty b { font-weight: 500; }

.c-nav-group { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--c-text-3); padding: 14px 12px 4px; }
.c-nav-item {
    display: flex; align-items: center; gap: 10px;
    height: 36px; padding: 0 12px; border-radius: var(--r-sm);
    color: var(--c-text-2); font-size: var(--fs); position: relative;
}
.c-nav-item:hover { background: var(--c-surface-2); color: var(--c-text); text-decoration: none; }
.c-nav-item.is-active { background: var(--c-primary-soft); color: var(--c-primary-ink); font-weight: 600; }
.c-nav-item .c-ic { width: 17px; height: 17px; color: var(--c-text-3); }
.c-nav-item.is-active .c-ic { color: var(--c-primary); }
.c-nav-item .c-count { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--c-err); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
.c-nav-item .c-count.is-quiet { background: var(--c-surface-3); color: var(--c-text-2); }

.c-main { flex: 1; min-width: 0; }
.c-content { max-width: var(--content-max); margin: 0 auto; padding: var(--s6) var(--s6) 96px; }
.c-content.is-form { max-width: calc(var(--form-max) + 200px + var(--s6)); }

/* ---------- 4. 页头 / 状态带 / 横幅 ---------- */
.c-page-head { display: flex; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s5); }
.c-page-head .c-grow { min-width: 0; }
.c-page-head h1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-page-head .c-lede { margin-top: 4px; color: var(--c-text-2); font-size: var(--fs-sm); }
.c-page-head .c-actions { display: flex; gap: var(--s2); flex: none; align-items: center; }
.c-help { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--c-line-2); color: var(--c-text-3); font-size: 11px; font-weight: 600; }
.c-help:hover { color: var(--c-primary); border-color: var(--c-primary); text-decoration: none; }
.c-crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--c-text-3); margin-bottom: var(--s2); }
.c-crumbs a { color: var(--c-text-2); }

/* 状态带：提交型页面顶部固定一条，回答「现在什么状态、下一步做什么」 */
.c-status {
    display: flex; align-items: center; gap: var(--s3);
    padding: 10px 14px; border-radius: var(--r);
    border: 1px solid var(--c-line); background: var(--c-surface);
    margin-bottom: var(--s5); font-size: var(--fs-sm);
}
.c-status .c-ic-lg { flex: none; }
.c-status b { font-weight: 600; margin-right: 6px; }
.c-status .c-grow { color: var(--c-text-2); }
.c-status .c-grow b { color: var(--c-text); }
.c-status .c-actions { display: flex; gap: var(--s2); flex: none; }
.c-status.is-ok { background: var(--c-ok-bg); border-color: var(--c-ok-line); }
.c-status.is-ok .c-ic-lg { color: var(--c-ok); }
.c-status.is-warn { background: var(--c-warn-bg); border-color: var(--c-warn-line); }
.c-status.is-warn .c-ic-lg { color: var(--c-warn); }
.c-status.is-err { background: var(--c-err-bg); border-color: var(--c-err-line); }
.c-status.is-err .c-ic-lg { color: var(--c-err); }
.c-status.is-info { background: var(--c-info-bg); border-color: var(--c-info-line); }
.c-status.is-info .c-ic-lg { color: var(--c-info); }

/* 横幅：页面级提示，三态 */
.c-banner {
    display: flex; align-items: center; gap: var(--s3);
    padding: 10px 14px; border-radius: var(--r); margin-bottom: var(--s4);
    font-size: var(--fs-sm); border: 1px solid transparent;
}
.c-banner .c-grow { color: var(--c-text); }
.c-banner.is-info { background: var(--c-info-bg); border-color: var(--c-info-line); }
.c-banner.is-warn { background: var(--c-warn-bg); border-color: var(--c-warn-line); }
.c-banner.is-err { background: var(--c-err-bg); border-color: var(--c-err-line); }
.c-banner .c-ic-lg { flex: none; }
.c-banner.is-info .c-ic-lg { color: var(--c-info); }
.c-banner.is-warn .c-ic-lg { color: var(--c-warn); }
.c-banner.is-err .c-ic-lg { color: var(--c-err); }
.c-banner .c-close { margin-left: auto; }

/* ---------- 5. 按钮 ---------- */
.c-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: var(--ctl-h); padding: 0 14px; border-radius: var(--r-sm);
    border: 1px solid var(--c-primary); background: var(--c-primary); color: #fff;
    font-size: var(--fs); font-weight: 500; white-space: nowrap; cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}
.c-btn:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); text-decoration: none; }
.c-btn:disabled, .c-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.c-btn-ghost { background: var(--c-surface); color: var(--c-text); border-color: var(--c-line-2); }
.c-btn-ghost:hover { background: var(--c-surface-2); border-color: var(--c-line-2); }
.c-btn-quiet { background: transparent; color: var(--c-text-2); border-color: transparent; }
.c-btn-quiet:hover { background: var(--c-surface-3); border-color: transparent; color: var(--c-text); }
.c-btn-danger { background: var(--c-surface); color: var(--c-err); border-color: var(--c-line-2); }
.c-btn-danger:hover { background: var(--c-err-bg); border-color: var(--c-err-line); }
.c-btn-danger.is-solid { background: var(--c-err); border-color: var(--c-err); color: #fff; }
.c-btn-sm { height: var(--ctl-h-sm); padding: 0 10px; font-size: var(--fs-sm); }
.c-btn-lg { height: var(--ctl-h-lg); padding: 0 20px; font-size: 15px; }
.c-btn-block { width: 100%; }
.c-btn-ic { width: var(--ctl-h); padding: 0; }
.c-btn-ic.c-btn-sm { width: var(--ctl-h-sm); }
.c-link-btn { background: none; border: 0; padding: 0; color: var(--c-primary); font-size: inherit; cursor: pointer; }
.c-link-btn:hover { text-decoration: underline; }
.c-kbd { display: inline-block; min-width: 18px; padding: 0 4px; border-radius: 4px; border: 1px solid var(--c-line-2); background: var(--c-surface-2); font-family: var(--mono); font-size: 11px; line-height: 16px; color: var(--c-text-2); text-align: center; }

/* ---------- 6. 卡片 / 统计卡 / 列表 / 表格 ---------- */
.c-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); box-shadow: var(--shadow); }
.c-card-head { display: flex; align-items: center; gap: var(--s3); padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
.c-card-head h2 { flex: 1; min-width: 0; }
.c-card-head .c-more { font-size: var(--fs-sm); color: var(--c-text-2); }
.c-card-head .c-more b { color: var(--c-primary); }
.c-card-body { padding: 16px; }
.c-card-body.is-flush { padding: 0; }
.c-card-body.is-tight { padding-top: 4px; padding-bottom: 4px; }   /* 时间线这类自带行距的内容 */
.c-card-body.is-top { padding-top: 12px; }
.c-card-foot { padding: 12px 16px; border-top: 1px solid var(--c-line); display: flex; align-items: center; gap: var(--s2); }

.c-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s5); }
.c-stat { display: block; padding: 14px 16px; border-radius: var(--r); background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--shadow); color: var(--c-text); position: relative; }
.c-stat:hover { text-decoration: none; border-color: var(--c-line-2); }
.c-stat .c-v { font-size: var(--fs-num); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.c-stat .c-l { margin-top: 4px; font-size: var(--fs-sm); color: var(--c-text-2); }
.c-stat .c-h { margin-top: 2px; font-size: var(--fs-xs); color: var(--c-text-3); }
.c-stat.is-urgent { border-left: 3px solid var(--c-err); }
.c-stat.is-urgent .c-v { color: var(--c-err); }
.c-stat.is-warn { border-left: 3px solid var(--c-warn); }
.c-stat.is-warn .c-v { color: var(--c-warn); }
.c-stat.is-zero .c-v { color: var(--c-text-3); }
.c-stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.c-stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.c-stats-in { margin-bottom: 0; }
.c-stats-in .c-stat { box-shadow: none; background: var(--c-surface-2); }
.c-card-gap { margin-bottom: var(--s4); }
@media (max-width: 1100px) { .c-stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .c-stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .c-stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .c-stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.c-list { list-style: none; margin: 0; padding: 0; }
.c-list > li { display: flex; align-items: center; gap: var(--s3); padding: 12px 16px; border-bottom: 1px solid var(--c-line); min-height: var(--row-h); }
.c-list > li:last-child { border-bottom: 0; }
.c-list .c-title { font-weight: 500; }
.c-list .c-sub { font-size: var(--fs-sm); color: var(--c-text-2); margin-top: 2px; }
.c-list .c-when { font-size: var(--fs-xs); color: var(--c-text-3); white-space: nowrap; }

.c-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.c-table th, .c-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.c-table th { font-weight: 500; color: var(--c-text-3); font-size: var(--fs-xs); background: var(--c-surface-2); white-space: nowrap; }
.c-table tr:last-child td { border-bottom: 0; }
.c-table tbody tr:hover td { background: var(--c-surface-2); }
.c-table .c-w-num { width: 72px; text-align: right; }
.c-table .c-w-when { width: 110px; white-space: nowrap; color: var(--c-text-3); }
.c-table .c-w-tag { width: 96px; white-space: nowrap; }
.c-table .c-w-act { width: 1%; white-space: nowrap; text-align: right; }
.c-table .c-w-check { width: 36px; }
.c-table-wrap { overflow-x: auto; }

.c-filters { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s4); }
.c-filters .c-select, .c-filters .c-input { width: auto; min-width: 140px; }
.c-pager { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s4); }
.c-table-rows tbody tr[data-href] { cursor: pointer; }
.c-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: var(--fs-sm); }
.c-kv dt { color: var(--c-text-3); }
.c-kv dd { margin: 0; color: var(--c-text); }

/* ---------- 7. 标签 / 状态词 ---------- */
.c-tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; line-height: 1; white-space: nowrap; background: var(--c-surface-3); color: var(--c-text-2); }
.c-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.c-tag.is-ok { background: var(--c-ok-bg); color: var(--c-ok); }
.c-tag.is-warn { background: var(--c-warn-bg); color: var(--c-warn); }
.c-tag.is-err { background: var(--c-err-bg); color: var(--c-err); }
.c-tag.is-info { background: var(--c-info-bg); color: var(--c-info); }
.c-tag.no-dot::before { display: none; }
.c-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--c-line-2); background: var(--c-surface); font-size: var(--fs-xs); color: var(--c-text-2); }

/* ---------- 8. 表单 ---------- */
.c-field { display: block; margin-bottom: var(--s4); }
.c-field:last-child { margin-bottom: 0; }
.c-field-label { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--c-text); }
.c-field-label .c-opt { font-weight: 400; color: var(--c-text-3); }
.c-field-label .c-req { color: var(--c-err); }
.c-field-label .c-counter { margin-left: auto; font-weight: 400; font-size: var(--fs-xs); color: var(--c-text-3); font-variant-numeric: tabular-nums; }
.c-field-label .c-counter.is-short { color: var(--c-warn); }
.c-field-label .c-counter.is-full { color: var(--c-err); }
.c-field-label .c-counter.is-ok { color: var(--c-ok); }
.c-hint { margin-top: 6px; font-size: var(--fs-xs); color: var(--c-text-3); line-height: 1.5; }
.c-hint a { color: var(--c-primary); }
.c-error { display: none; margin-top: 6px; font-size: var(--fs-xs); color: var(--c-err); align-items: flex-start; gap: 4px; line-height: 1.5; }
.c-field.is-invalid .c-error { display: flex; }
.c-field.is-invalid .c-input, .c-field.is-invalid .c-textarea, .c-field.is-invalid .c-select { border-color: var(--c-err); }
.c-field.is-invalid .c-input:focus, .c-field.is-invalid .c-textarea:focus { box-shadow: 0 0 0 3px rgba(208, 40, 31, .18); }

.c-input, .c-select, .c-textarea {
    display: block; width: 100%;
    height: var(--ctl-h); padding: 0 10px;
    border: 1px solid var(--c-line-2); border-radius: var(--r-sm);
    background: var(--c-surface); color: var(--c-text); font-size: var(--fs);
    transition: border-color .12s, box-shadow .12s;
}
.c-input::placeholder, .c-textarea::placeholder { color: var(--c-text-3); }
.c-input:focus, .c-select:focus, .c-textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--c-focus); }
.c-input:disabled, .c-textarea:disabled, .c-select:disabled { background: var(--c-surface-2); color: var(--c-text-2); cursor: not-allowed; }
.c-input[readonly] { background: var(--c-surface-2); }
.c-input.is-sm { height: var(--ctl-h-sm); font-size: var(--fs-sm); }
.c-textarea { height: auto; min-height: 96px; padding: 8px 10px; line-height: 1.55; resize: vertical; }
.c-select { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a919e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.c-input-group { display: flex; align-items: center; gap: var(--s2); }
.c-input-group .c-input { flex: 1; min-width: 0; }
.c-input-group .c-sep { color: var(--c-text-3); }
.c-input.is-time { width: 96px; text-align: center; font-variant-numeric: tabular-nums; }
.c-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s4); }
.c-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s3) var(--s4); }
.c-ocr { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--c-ok); }

/* 勾选 / 单选 */
.c-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs); cursor: pointer; min-height: 28px; }
.c-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--c-primary); }
.c-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 12px; }
.c-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }   /* 整表单锁定用原生 disabled，样式归零 */
.c-consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); color: var(--c-text-2); padding: 12px; border-radius: var(--r-sm); background: var(--c-surface-2); }
.c-consent input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--c-primary); flex: none; }

/* 分段控件（互斥选项，替代裸 radio） */
.c-seg { display: inline-flex; padding: 3px; border-radius: var(--r-sm); background: var(--c-surface-3); }
.c-seg label { position: relative; }
.c-seg input { position: absolute; opacity: 0; inset: 0; }
.c-seg span { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 5px; font-size: var(--fs-sm); color: var(--c-text-2); cursor: pointer; }
.c-seg input:checked + span { background: var(--c-surface); color: var(--c-text); font-weight: 500; box-shadow: var(--shadow); }
.c-seg input:focus-visible + span { box-shadow: var(--c-focus); }

/* 选项卡片（stepper 第一步这类要说明的互斥选项） */
.c-choice { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.c-choice label { position: relative; display: block; padding: 14px 16px 14px 44px; border: 1px solid var(--c-line-2); border-radius: var(--r); cursor: pointer; background: var(--c-surface); }
.c-choice input { position: absolute; left: 16px; top: 17px; width: 16px; height: 16px; margin: 0; accent-color: var(--c-primary); }
.c-choice b { display: block; font-weight: 600; }
.c-choice small { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--c-text-2); line-height: 1.5; }
.c-choice label:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }

/* 周几 chips */
.c-days { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.c-days label { position: relative; }
.c-days input { position: absolute; opacity: 0; inset: 0; }
.c-days span { display: inline-grid; place-items: center; width: 34px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--c-line-2); font-size: var(--fs-sm); color: var(--c-text-2); cursor: pointer; background: var(--c-surface); }
.c-days input:checked + span { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-primary-ink); font-weight: 600; }

/* 开关 */
.c-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs-sm); }
.c-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.c-switch i { width: 36px; height: 20px; border-radius: 999px; background: var(--c-line-2); position: relative; transition: background .15s; flex: none; }
.c-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.c-switch input:checked + i { background: var(--c-ok); }
.c-switch input:checked + i::after { left: 18px; }
.c-switch input:focus-visible + i { box-shadow: var(--c-focus); }

/* 上传位 */
.c-drop { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--c-line-2); border-radius: var(--r); background: var(--c-surface-2); cursor: pointer; }
.c-drop:hover { border-color: var(--c-primary); background: var(--c-primary-soft); }
.c-drop .c-ic-lg { width: 28px; height: 28px; color: var(--c-text-3); flex: none; }
.c-drop b { display: block; font-weight: 500; }
.c-drop small { display: block; font-size: var(--fs-xs); color: var(--c-text-3); margin-top: 2px; }
.c-drop input { display: none; }
.c-drop.is-done { border-style: solid; background: var(--c-surface); }
.c-thumb { width: 88px; height: 62px; border-radius: var(--r-sm); background: var(--c-surface-3); overflow: hidden; flex: none; display: grid; place-items: center; color: var(--c-text-3); font-size: var(--fs-xs); }
.c-thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-thumb { position: relative; }
.c-thumb.is-xs { width: 44px; height: 32px; border-radius: 4px; }   /* 列表行里的小缩略图 */
.c-thumb-del { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(20, 24, 33, .6); color: #fff; display: grid; place-items: center; padding: 0; }
.c-thumb-del:hover { background: var(--c-err); }
.c-doc { display: inline-flex; flex-direction: column; gap: 4px; width: 88px; color: var(--c-text-2); font-size: var(--fs-xs); }
.c-doc:hover { text-decoration: none; color: var(--c-primary); }
.c-doc .c-thumb b { font-size: 13px; color: var(--c-text-2); }
.c-doc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-slot-preview:empty { display: none; }
.c-hint-top { margin: -2px 0 8px; }
.c-ocr.is-edited { color: var(--c-warn); }
.c-ocr-state.is-ok .c-ic-lg { color: var(--c-ok); }
.c-ocr-state.is-err .c-ic-lg { color: var(--c-warn); }
.c-ocr-state .c-ic-lg { color: var(--c-primary); flex: none; }
.c-doc-slot { margin-bottom: var(--s5); }
.c-select.is-city { width: 150px; flex: none; }
.c-pick li { cursor: pointer; }
.c-pick li:hover { background: var(--c-surface-2); }
.c-pick li.is-picked { background: var(--c-primary-soft); }
.c-pick:empty { display: none; }
.c-rule { line-height: 1.7; }
.c-scene { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-sm); margin: 0 0 var(--s4); }
.c-scene b { font-size: 20px; letter-spacing: .18em; font-family: var(--mono); color: var(--c-primary); }
.c-scene span { color: var(--c-text-3); font-size: var(--fs-xs); }
.c-map { height: 280px; margin-top: 8px; border: 1px solid var(--c-line); border-radius: var(--r-sm); overflow: hidden; background: var(--c-surface-2); }
.c-map-fallback { padding: 28px 16px; text-align: center; color: var(--c-text-3); font-size: var(--fs-sm); }
.c-field-gap { margin-top: var(--s5); }
.c-row-add { margin-top: 10px; }
.c-anchors-gap { margin-top: var(--s4); }
.c-card-inner { padding: 12px; box-shadow: none; margin-bottom: 8px; }   /* 卡内的子卡（自定义板块行） */
.c-input.is-date { width: 150px; flex: none; }
.c-avatar-preview { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.c-slot-row { padding: 10px 12px; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-surface-2); }
.c-slot-row .c-rowline + .c-rowline { margin-top: 8px; }
.c-slot-row .c-select { flex: 1; min-width: 0; }
.c-section-body.is-flush { padding: 0; }
.c-pre { white-space: pre-wrap; }
.c-lead .c-reply { padding: 10px 12px; border-radius: var(--r-sm); background: var(--c-surface-2); font-size: var(--fs-sm); }
.c-lead .c-reply b { margin-right: 6px; }
.c-qr { margin-top: 12px; text-align: center; }
.c-qr img { width: 200px; height: 200px; margin: 0 auto 6px; }
.c-qr canvas { display: block; margin: 0 auto 6px; background: #fff; }

/* ---------- 17. 相册网格 + 灯箱 + 美化编辑器皮肤 ---------- */
.c-album-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: var(--s4); }
.c-album-grid:empty { display: none; }
.c-album-empty { grid-column: 1 / -1; }
.c-album-item { position: relative; border-radius: var(--r-sm); overflow: hidden; background: var(--c-surface-3); cursor: grab; user-select: none; touch-action: none; }
.c-album-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.c-album-item.is-dragging { opacity: .5; cursor: grabbing; }
.c-album-item.is-drop-target { outline: 3px solid var(--c-primary); outline-offset: -3px; }
.c-album-badge { position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(20, 24, 33, .72); }
.c-album-badge.is-cover { background: var(--c-primary); }
.c-album-badge.is-new { left: auto; right: 6px; background: var(--c-ok); }
.c-album-ops { position: absolute; bottom: 0; left: 0; right: 0; display: flex; background: rgba(20, 24, 33, .55); opacity: 0; transition: opacity .12s; }
.c-album-item:hover .c-album-ops, .c-album-item:focus-within .c-album-ops { opacity: 1; }
@media (hover: none) { .c-album-ops { opacity: 1; } }
.c-album-ops button { flex: 1; background: none; border: 0; color: #fff; font-size: 12px; padding: 6px 0; }
.c-album-ops button[data-op="left"], .c-album-ops button[data-op="right"] { flex: 0 0 28px; font-size: 16px; line-height: 1; }
.c-album-ops button:hover { background: rgba(255, 255, 255, .15); }
.c-album-ops button:disabled { opacity: .35; cursor: default; }
.c-drop-album { margin-top: 4px; }
.c-lightbox { position: fixed; inset: 0; z-index: var(--z-modal); background: rgba(10, 12, 18, .9); display: flex; align-items: center; justify-content: center; }
.c-lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 4px; }
.c-lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .16); color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; cursor: pointer; }
.c-lightbox button:hover { background: rgba(255, 255, 255, .3); }
.c-lightbox .c-lb-close { top: 14px; right: 14px; }
.c-lightbox .c-lb-prev { left: 14px; top: 50%; margin-top: -20px; }
.c-lightbox .c-lb-next { right: 14px; top: 50%; margin-top: -20px; }
.c-lightbox .c-lb-count { position: absolute; top: 24px; left: 18px; color: #fff; font-size: 13px; opacity: .8; }
@media (max-width: 860px) { .c-album-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .c-album-grid { grid-template-columns: repeat(2, 1fr); } }

/* 图片美化编辑器：DOM 由 merchant-image.js 生成，类名 m-imged-* 不改（§4 硬约束），这里只给皮肤 */
.m-imged-overlay { position: fixed; inset: 0; z-index: var(--z-modal); background: rgba(10, 12, 18, .78); display: flex; align-items: center; justify-content: center; padding: 16px; }
.m-imged-panel { background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); width: 100%; max-width: 760px; max-height: 94vh; display: flex; flex-direction: column; overflow: hidden; }
.m-imged-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--c-line); font-weight: 600; }
.m-imged-close { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--c-text-3); cursor: pointer; padding: 0 4px; }
.m-imged-stage { background: #14161c; display: flex; align-items: center; justify-content: center; padding: 12px; min-height: 200px; }
.m-imged-wrap { position: relative; display: inline-block; line-height: 0; }
.m-imged-wrap canvas { max-width: 100%; max-height: 56vh; display: block; width: auto; height: auto; }
.m-imged-crop { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(10, 12, 18, .45); cursor: move; touch-action: none; box-sizing: border-box; }
.m-imged-handle { position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 3px; touch-action: none; }
.m-imged-handle-nw { left: -8px; top: -8px; cursor: nwse-resize; }
.m-imged-handle-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.m-imged-handle-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.m-imged-handle-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.m-imged-tools { padding: 10px 16px 2px; border-bottom: 1px solid var(--c-line); }
.m-imged-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.m-imged-label { font-size: var(--fs-xs); color: var(--c-text-3); margin-left: 4px; }
.m-imged-chip { border: 1px solid var(--c-line-2); background: var(--c-surface); color: var(--c-text); border-radius: 999px; padding: 5px 14px; font-size: var(--fs-sm); cursor: pointer; }
.m-imged-chip.active { border-color: var(--c-primary); background: var(--c-primary-soft); color: var(--c-primary-ink); font-weight: 600; }
.m-imged-range { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 180px; }
.m-imged-range input[type="range"] { flex: 1; accent-color: var(--c-primary); margin: 0; }
.m-imged-range output { font-size: var(--fs-xs); color: var(--c-text-2); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.m-imged-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px; }
.m-imged-btn { border: 1px solid var(--c-line-2); background: var(--c-surface); color: var(--c-text); border-radius: var(--r-sm); padding: 8px 22px; font-size: var(--fs); cursor: pointer; }
.m-imged-btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.m-imged-btn:disabled { opacity: .6; cursor: default; }
@media (max-width: 720px) {
    .m-imged-overlay { padding: 0; align-items: stretch; }
    .m-imged-panel { max-width: none; max-height: none; border-radius: 0; }
    .m-imged-stage { flex: 1; }
}

/* 行式重复项（价目 / 课表 / 例外日）：一行一条，末尾删除 */
.c-rows { display: flex; flex-direction: column; gap: var(--s2); }
.c-rowline { display: flex; align-items: center; gap: var(--s2); }
.c-rowline .c-input { min-width: 0; }
.c-rowline .c-del { color: var(--c-text-3); }
.c-rowline .c-del:hover { color: var(--c-err); }
.c-list-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); }
.c-list-head .c-limit { margin-left: auto; font-size: var(--fs-xs); color: var(--c-text-3); font-variant-numeric: tabular-nums; }
.c-list-head .c-limit.is-full { color: var(--c-warn); }
.c-list-head .c-field-label { margin: 0; }
.c-section-title { margin: var(--s5) 0 var(--s3); font-size: var(--fs-sm); font-weight: 600; color: var(--c-text-2); }

/* ---------- 9. 分节长表单：section + 锚点栏 + 吸底动作条 ---------- */
.c-form-layout { display: grid; grid-template-columns: minmax(0, var(--form-max)) 200px; gap: var(--s6); align-items: start; }
.c-section { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: var(--s4); scroll-margin-top: calc(var(--topbar-h) + 16px); }
.c-section-head { display: flex; align-items: flex-start; gap: var(--s3); padding: 14px 16px; border-bottom: 1px solid var(--c-line); }
.c-section-head h2 { display: flex; align-items: center; gap: 8px; }
.c-section-head .c-desc { margin-top: 2px; font-size: var(--fs-xs); color: var(--c-text-3); }
.c-section-head .c-actions { margin-left: auto; display: flex; gap: var(--s2); }
.c-section-body { padding: 16px; }
.c-section.is-collapsed .c-section-body { display: none; }
.c-section-toggle { margin-left: auto; }

.c-anchors { position: sticky; top: calc(var(--topbar-h) + 24px); font-size: var(--fs-sm); }
.c-anchors .c-anchors-title { font-size: 11px; font-weight: 600; color: var(--c-text-3); letter-spacing: .04em; text-transform: uppercase; padding: 0 10px 6px; }
.c-anchors a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-left: 2px solid transparent; color: var(--c-text-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.c-anchors a:hover { color: var(--c-text); text-decoration: none; background: var(--c-surface-2); }
.c-anchors a.is-active { color: var(--c-primary-ink); border-left-color: var(--c-primary); font-weight: 500; }
.c-anchors .c-done { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--c-line-2); display: inline-grid; place-items: center; flex: none; }
.c-anchors .c-done.is-on { background: var(--c-ok); border-color: var(--c-ok); color: #fff; }
.c-anchors .c-done .c-ic { width: 9px; height: 9px; stroke-width: 3; }
.c-anchors .c-done.is-err { border-color: var(--c-err); background: var(--c-err); color: #fff; }

.c-actionbar {
    position: fixed; left: var(--sidebar-w); right: 0; bottom: 0; z-index: var(--z-bar);
    background: var(--c-surface); border-top: 1px solid var(--c-line); box-shadow: var(--shadow-bar);
    padding: 10px var(--s6) calc(10px + env(safe-area-inset-bottom, 0px));
}
.c-actionbar-inner { max-width: var(--content-max); margin: 0 auto; display: flex; align-items: center; gap: var(--s3); }
.c-content.is-form + .c-actionbar .c-actionbar-inner { max-width: calc(var(--form-max) + 200px + var(--s6)); }
.c-actionbar .c-state { font-size: var(--fs-sm); color: var(--c-text-2); }
.c-actionbar .c-state.is-dirty { color: var(--c-warn); }
.c-actionbar .c-actions { margin-left: auto; display: flex; gap: var(--s2); }

/* ---------- 10. 分步（stepper） ---------- */
.c-steps { display: flex; align-items: center; gap: 0; margin-bottom: var(--s5); counter-reset: step; }
.c-step { display: flex; align-items: center; gap: 8px; flex: 1; font-size: var(--fs-sm); color: var(--c-text-3); position: relative; }
.c-step::before { counter-increment: step; content: counter(step); width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--c-line-2); display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--c-surface); flex: none; }
.c-step::after { content: ""; flex: 1; height: 1px; background: var(--c-line-2); margin: 0 12px; }
.c-step:last-child::after { display: none; }
.c-step.is-active { color: var(--c-text); font-weight: 600; }
.c-step.is-active::before { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }
.c-step.is-done { color: var(--c-text-2); }
.c-step.is-done::before { content: "✓"; border-color: var(--c-ok); background: var(--c-ok); color: #fff; }
.c-step-pane { display: none; }
.c-step-pane.is-active { display: block; }
.c-step-foot { display: flex; align-items: center; gap: var(--s2); padding-top: var(--s4); margin-top: var(--s4); border-top: 1px solid var(--c-line); }
.c-step-foot .c-actions { margin-left: auto; display: flex; gap: var(--s2); }
.c-card > .c-step-foot { padding: 12px 16px; margin-top: 0; }   /* 卡片内的分步底栏与 card-foot 同规格 */

/* ---------- 11. 收件箱卡（预约 / 提问） ---------- */
.c-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--c-line); margin-bottom: var(--s4); overflow-x: auto; }
.c-tab { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--c-text-2); font-size: var(--fs); white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; }
.c-tab:hover { color: var(--c-text); text-decoration: none; }
.c-tab.is-active { color: var(--c-primary-ink); border-bottom-color: var(--c-primary); font-weight: 600; }
.c-tab .c-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--c-surface-3); color: var(--c-text-2); font-size: 11px; line-height: 18px; font-weight: 600; text-align: center; }
.c-tab.is-active .c-count { background: var(--c-primary-soft); color: var(--c-primary-ink); }
.c-tab .c-count.is-hot { background: var(--c-err); color: #fff; }

.c-inbox { display: flex; flex-direction: column; gap: var(--s3); }
.c-lead { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; display: grid; grid-template-columns: 40px 1fr auto; gap: 4px 12px; }
.c-lead.is-new { border-left: 3px solid var(--c-primary); }
.c-lead .c-face { grid-row: span 3; width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary-ink); display: grid; place-items: center; font-weight: 600; }
.c-lead .c-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.c-lead .c-who a { font-weight: 500; }
.c-lead .c-slot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--c-text); }
.c-lead .c-slot .c-ic { color: var(--c-text-3); }
.c-lead .c-msg { font-size: var(--fs-sm); color: var(--c-text-2); }
.c-lead .c-confirmed { grid-column: 2; color: var(--c-ok); }        /* 已确认的到店时间 / 时间待定 + 改时间 */
.c-lead .c-confirmed .c-ic { color: var(--c-ok); }
.c-lead .c-side { grid-row: span 3; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.c-lead .c-ttl { font-size: var(--fs-xs); color: var(--c-text-3); white-space: nowrap; }
.c-lead .c-ttl.is-urgent { color: var(--c-err); font-weight: 500; }
.c-lead .c-acts { display: flex; gap: var(--s2); }
.c-lead .c-follow { grid-column: 2 / -1; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--c-line); display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: var(--fs-sm); }
.c-lead .c-follow .c-note { color: var(--c-text-2); }
.c-lead .c-follow label span { white-space: nowrap; }
.c-outcome { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--c-surface-3); }
.c-outcome button { height: 24px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--c-text-2); font-size: var(--fs-xs); }
.c-outcome button.is-on { background: var(--c-surface); color: var(--c-text); font-weight: 600; box-shadow: var(--shadow); }
.c-lead .c-note-edit { flex-basis: 100%; margin-top: 6px; }
.c-lead .c-editor { grid-column: 2 / -1; margin-top: 8px; }        /* 卡内的回答 / 草稿编辑区 */
.c-lead .c-editor .c-field { margin-bottom: 10px; }
.c-lead .c-editor-actions { display: flex; justify-content: flex-end; gap: var(--s2); }
.c-lead .c-editor .c-error.is-shown { display: flex; margin-bottom: 10px; }

/* ---------- 12. 清单 / 时间线 / 空态 ---------- */
.c-checklist { list-style: none; margin: 0; padding: 0; }
.c-checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--c-line); font-size: var(--fs-sm); }
.c-checklist li:last-child { border-bottom: 0; }
.c-checklist.is-inset { padding: 4px 16px; }   /* 直接放在卡片里（没有 card-body）时的内边距 */
.c-checklist .c-done { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--c-line-2); display: grid; place-items: center; flex: none; }
.c-checklist .c-done.is-on { background: var(--c-ok); border-color: var(--c-ok); color: #fff; }
.c-checklist .c-done .c-ic { width: 11px; height: 11px; stroke-width: 3; }
.c-checklist li.is-on { color: var(--c-text-2); }
.c-checklist li.is-on a.c-grow { color: inherit; }   /* 场馆页板块：整行是入口，不像链接那样蓝 */
.c-checklist .c-go { margin-left: auto; font-size: var(--fs-xs); }

.c-timeline { list-style: none; margin: 0; padding: 0; }
.c-timeline li { display: grid; grid-template-columns: 44px 1fr; gap: 0 10px; padding: 9px 0; border-bottom: 1px solid var(--c-line); font-size: var(--fs-sm); }
.c-timeline li:last-child { border-bottom: 0; }
.c-timeline .c-when { font-size: var(--fs-xs); color: var(--c-text-3); line-height: 1.4; white-space: nowrap; }
.c-timeline .c-what { color: var(--c-text); }
.c-timeline .c-sub { color: var(--c-text-2); font-size: var(--fs-xs); margin-top: 2px; }
.c-timeline .c-tag { margin-right: 6px; height: 18px; padding: 0 6px; font-size: 11px; }
.c-timeline li.is-unread .c-what { font-weight: 600; }

.c-empty { padding: 32px 16px; text-align: center; color: var(--c-text-2); font-size: var(--fs-sm); }
.c-empty .c-ic-lg { width: 32px; height: 32px; color: var(--c-line-2); margin: 0 auto 8px; }
.c-empty b { display: block; color: var(--c-text); font-weight: 600; margin-bottom: 4px; }
.c-empty .c-btn { margin-top: 12px; }
.c-empty .c-actions { display: flex; gap: var(--s2); justify-content: center; margin-top: 12px; }
.c-empty .c-actions .c-btn { margin-top: 0; }

/* ---------- 13. Toast / 弹层 ---------- */
.c-toasts { position: fixed; top: calc(var(--topbar-h) + 12px); left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: min(480px, calc(100vw - 32px)); }
.c-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--c-text); color: #fff; font-size: var(--fs-sm); box-shadow: var(--shadow-pop); animation: c-toast-in .18s ease-out; }
.c-toast .c-ic-lg { flex: none; }
.c-toast.is-ok .c-ic-lg { color: #6ee7a0; }
.c-toast.is-err .c-ic-lg { color: #ff8a80; }
.c-toast.is-warn .c-ic-lg { color: #fcd34d; }
.c-toast a { color: #9ec1ff; }
@keyframes c-toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.c-modal { position: fixed; inset: 0; z-index: var(--z-modal); display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 24, 33, .45); }
.c-modal.is-open { display: flex; }
.c-dialog { width: 100%; max-width: 440px; background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 20px; }
.c-dialog h2 { font-size: 16px; margin-bottom: 8px; }
.c-dialog p { color: var(--c-text-2); font-size: var(--fs-sm); }
.c-dialog .c-field { margin-top: 12px; }
.c-dialog .c-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: 20px; }
.c-cert { max-width: 760px; width: 100%; text-align: center; }
.c-cert img { width: 100%; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.c-cert .c-actions { display: flex; justify-content: center; gap: var(--s2); margin-top: 12px; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1100px) {
    .c-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .c-form-layout { grid-template-columns: minmax(0, 1fr); }
    .c-anchors { display: none; }
}
@media (max-width: 860px) {
    :root { --content-max: 100%; }
    .c-menu-btn { display: inline-flex; }
    .c-sidebar {
        position: fixed; top: 0; bottom: 0; left: 0; height: 100vh; z-index: var(--z-drawer);
        transform: translateX(-100%); transition: transform .2s ease; box-shadow: none;
        padding-top: var(--s4);
    }
    .c-sidebar.is-open { transform: none; box-shadow: var(--shadow-pop); }
    .c-sidebar-scrim { display: block; position: fixed; inset: 0; z-index: calc(var(--z-drawer) - 1); background: rgba(20, 24, 33, .4); opacity: 0; pointer-events: none; transition: opacity .2s; }
    .c-sidebar-scrim.is-open { opacity: 1; pointer-events: auto; }
    .c-content { padding: var(--s4) var(--s4) 96px; }
    .c-actionbar { left: 0; padding-left: var(--s4); padding-right: var(--s4); }
    .c-page-head { flex-direction: column; gap: var(--s2); }
    .c-page-head .c-actions { width: 100%; }
    .c-topbar .is-text, .c-brand em { display: none; }
    .c-topbar { gap: var(--s1); padding: 0 var(--s2) 0 var(--s1); }
    .c-merchant-switch .c-role, .c-merchant-switch .c-name { display: none; }
    /* 列表行在手机上折成两行：标签 + 正文一行，时间 + 动作一行靠右 */
    .c-list > li { flex-wrap: wrap; }
    .c-list > li .c-grow { flex-basis: calc(100% - 72px); }
    .c-list > li > .c-btn:last-child { margin-left: auto; }
    .c-status { flex-wrap: wrap; }
    .c-status .c-actions { width: 100%; justify-content: flex-end; }
    .c-grid-2, .c-grid-3, .c-choice { grid-template-columns: 1fr; }
    .c-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .c-steps { gap: 0; }
    .c-step span { display: none; }
    .c-step.is-active span { display: inline; }
    .c-step::after { margin: 0 8px; }
    /* 收件箱卡在手机上竖排：主动作整行、电话可点 */
    .c-lead { grid-template-columns: 36px 1fr; }
    .c-lead .c-face { width: 36px; height: 36px; grid-row: span 3; }
    .c-lead .c-who, .c-lead .c-slot, .c-lead .c-msg { grid-column: 2; }
    .c-lead .c-side { grid-column: 1 / -1; grid-row: auto; flex-direction: row; align-items: center; justify-content: space-between; margin-top: 10px; text-align: left; }
    .c-lead .c-acts { flex: 1; justify-content: flex-end; }
    .c-lead .c-acts .c-btn { flex: 1; height: 40px; }
    .c-lead .c-follow { grid-column: 1 / -1; }
    .c-table-wrap { margin: 0 calc(-1 * var(--s4)); padding: 0 var(--s4); }
}
@media (max-width: 520px) {
    .c-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
    .c-stat { padding: 12px; }
    .c-stat .c-v { font-size: 22px; }
    .c-stat .c-h { display: none; }
    .c-check-grid { grid-template-columns: 1fr; }
}


/* ---------- 16. 页面布局变体（各页只加一个 class，不写页面专属 CSS） ---------- */
.c-content.is-narrow { max-width: 820px; }          /* stepper / 认证类窄页 */
.c-content.is-inbox { max-width: 860px; }           /* 收件箱 */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s4); align-items: start; }
.c-strip { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--c-text-2); padding: 10px 14px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); margin-bottom: var(--s4); }
.c-strip b { color: var(--c-text); font-size: 15px; }
.c-ocr-state { display: none; align-items: center; gap: 8px; font-size: var(--fs-sm); margin-top: 8px; }
.c-ocr-state.is-on { display: flex; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: 1fr; } }

/* ---------- 18. 认证卡（F 模式）/ 协议正文 / 行内提示 ---------- */
.c-auth { display: flex; justify-content: center; padding: 48px 16px 80px; }
.c-auth-card { width: 100%; max-width: 400px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 28px 28px 24px; }
.c-auth-card.is-wide { max-width: 640px; }
.c-auth-card.is-center { text-align: center; }
.c-auth-card h1 { font-size: 19px; margin-bottom: 16px; }
.c-auth-lede { font-size: var(--fs-sm); color: var(--c-text-2); margin: -8px 0 16px; line-height: 1.6; }
.c-auth-alt { font-size: var(--fs-xs); color: var(--c-text-2); margin-top: 14px; }
.c-auth-consent { margin-top: 10px; }
.c-auth .c-tabs { margin-bottom: 14px; }
.c-auth .c-list-boxed { border: 1px solid var(--c-line); border-radius: var(--r); margin-bottom: var(--s3); }
.c-tip { min-height: 18px; font-size: var(--fs-sm); margin: 0 0 8px; color: var(--c-text-2); }
.c-tip.is-err { color: var(--c-err); }
.c-tip.is-ok { color: var(--c-ok); }
.c-legal { max-width: 760px; margin: 0 auto; padding: 8px 0 60px; font-size: var(--fs); line-height: 1.75; }
.c-legal h1 { margin-bottom: 4px; }
.c-legal .c-legal-meta { color: var(--c-text-3); font-size: var(--fs-xs); margin: 0 0 18px; }
.c-legal h2 { font-size: 15px; font-weight: 700; margin: 22px 0 6px; }
.c-legal p { margin: 0 0 8px; }
.c-legal a { text-decoration: underline; }
@media (max-width: 520px) { .c-auth { padding: 20px 12px 60px; } .c-auth-card { padding: 20px 18px; } }

/* ---------- 19. 审核工单（管理侧两栏：左提交内容 / 右决定面板） ---------- */
.c-ticket { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s4); align-items: start; }
.c-ticket-main, .c-ticket-side { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.c-ticket-side { position: sticky; top: calc(var(--topbar-h) + var(--s4)); }
.c-ticket-nav { display: flex; align-items: center; gap: var(--s2); flex: none; }
.c-ticket-nav .c-pos { font-size: var(--fs-xs); color: var(--c-text-3); font-variant-numeric: tabular-nums; }
.c-card.is-warn { border-color: var(--c-warn-line); }
.c-card.is-err { border-color: var(--c-err-line); }
.c-card.is-info { border-color: var(--c-info-line); }
.c-card-head .c-tag { flex: none; }
.c-decide .c-btn { height: 40px; }
.c-decide .c-decide-row { display: flex; gap: var(--s2); margin-top: var(--s3); }
.c-decide .c-decide-row .c-btn { flex: 1; }
.c-decide .c-hint { margin-top: 8px; }
.c-kv.is-loose { gap: 10px 16px; }
.c-kv dd .c-tag { vertical-align: 1px; }
.c-diff { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.c-diff th, .c-diff td { padding: 8px 12px; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.c-diff th { font-size: var(--fs-xs); font-weight: 500; color: var(--c-text-3); }
.c-diff td.k { color: var(--c-text-3); white-space: nowrap; width: 110px; }
.c-diff tbody tr:last-child td { border-bottom: 0; }
.c-diff tr.is-changed { background: var(--c-warn-bg); }
.c-diff del { color: var(--c-text-3); }
.c-diff .c-pre { word-break: break-word; }
.c-photos { display: flex; flex-wrap: wrap; gap: var(--s2); }
.c-photo { position: relative; width: 120px; }
.c-photo img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: var(--r-sm); background: var(--c-surface-3); }
.c-photo span { position: absolute; top: 4px; left: 4px; padding: 0 6px; border-radius: 999px; font-size: 11px; line-height: 18px; color: #fff; background: rgba(20, 24, 33, .65); }
.c-photo.is-removed img { opacity: .4; }
.c-photo.is-removed span { background: var(--c-err); }
.c-photo.is-new span { background: var(--c-ok); }
.c-photo.is-amap-preview img { opacity: .55; }
/* 管理侧场馆编辑：板块编辑器（拖拽排序）与高德回填高亮 */
.c-block { padding: 12px; }
.c-block-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: 8px; }
.c-block-head .c-input { flex: 1; }
.c-drag { cursor: grab; color: var(--c-text-3); padding: 0 4px; user-select: none; }
.c-block.is-drag-over { outline: 2px dashed var(--c-primary); outline-offset: 2px; }
.c-input.is-filled { border-color: var(--c-ok); background: var(--c-ok-bg); transition: background .6s; }
.c-docs { display: flex; flex-wrap: wrap; gap: var(--s3); }
.c-docs .c-doc { width: 120px; }
.c-docs .c-thumb { width: 120px; height: 90px; }
.c-docs-group { margin-top: var(--s3); }
.c-docs-group:first-child { margin-top: 0; }
.c-docs-group h3 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 8px; }
.c-lv { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 500; font-style: normal; background: var(--c-surface-3); color: var(--c-text-2); }
.c-lv.is-strong { background: var(--c-ok-bg); color: var(--c-ok); }
.c-lv.is-weak { background: var(--c-warn-bg); color: var(--c-warn); }
.c-code { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--c-surface-3); font-family: var(--mono); letter-spacing: .1em; }
.c-hints { margin: 0; padding-left: 18px; font-size: var(--fs-sm); line-height: 1.7; }
.c-similar { list-style: none; margin: 0; padding: 0; }
.c-similar li { display: flex; align-items: flex-start; gap: var(--s2); padding: 8px 0; border-bottom: 1px solid var(--c-line); font-size: var(--fs-sm); }
.c-similar li:last-child { border-bottom: 0; }
.c-similar .c-why { flex: none; width: 64px; font-size: var(--fs-xs); color: var(--c-text-3); padding-top: 2px; }
.c-similar .c-grow a { margin-right: 6px; }
.c-similar .c-btn { flex: none; }
.c-keys { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin-top: 8px; }
.c-keys td { padding: 6px 0; border-bottom: 1px solid var(--c-line); }
.c-keys td:first-child { width: 96px; }
.c-keys tr:last-child td { border-bottom: 0; }
@media (max-width: 1100px) {
    .c-ticket { grid-template-columns: 1fr; }
    .c-ticket-side { position: static; }
}

/* ---------- 15. 打印（审核工单要打印时不带壳） ---------- */
@media print {
    .c-topbar, .c-sidebar, .c-actionbar, .c-anchors { display: none; }
    .c-content { padding: 0; max-width: none; }
}
