/*
 * Dibs —— 地推场次市场
 * 主色是荧光警示橙：地推现场的反光背心、路锥、摊位就是这个颜色。
 * 橙底上一律用深色字（像现场的安全标识），对比度也过 WCAG AA；白字压橙是不过的。
 * 数字（时间、人数、工时）用 Barlow Semi Condensed —— 源自公路标识牌的窄体字，
 * 场次表本质上是一张时刻表。中文正文用系统字体：手机上零加载、原生手感。
 */

:root {
  color-scheme: light;
  --ground: #eef0f3;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --ink: #15171c;
  --ink-2: #3a3f4a;
  --muted: #697080;
  --line: #e1e4ea;
  --line-2: #cdd2da;
  --accent: #ff6b2c;
  --accent-ink: #15171c;
  --accent-soft: #ffe6d9;
  --reflect: #d7dbe2;
  --ok: #0f7a4a;
  --ok-soft: #dcf2e6;
  --warn: #a8500a;
  --warn-soft: #fdefd9;
  --danger: #c8322a;
  --danger-soft: #fde7e5;
  --danger-ink: #ffffff;
  --scrim: rgba(12, 14, 18, .45);
  --av-s: 70%; --av-l: 90%; --av-fg: 28%;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: 16px;
  --gutter-l: max(var(--gutter), env(safe-area-inset-left, 0px));
  --gutter-r: max(var(--gutter), env(safe-area-inset-right, 0px));
  /* 手指能稳稳点中的最小尺寸（苹果 44pt / 安卓 48dp 取前者） */
  --tap: 44px;
  --appbar-h: 52px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "Barlow Semi Condensed", "DIN Alternate", "Roboto Condensed", -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0e1014; --surface: #171a20; --surface-2: #1e222a;
    --ink: #eef0f3; --ink-2: #c7ccd5; --muted: #9098a6; --line: #272c35; --line-2: #363c47;
    --accent: #ff7a3d; --accent-soft: #3a2317; --reflect: #4a505b;
    --ok: #3cc98a; --ok-soft: #13301f; --warn: #f0a546; --warn-soft: #33260f;
    --danger: #ff6b61; --danger-soft: #3a1b19; --danger-ink: #15171c;
    --scrim: rgba(0, 0, 0, .6);
    --av-s: 35%; --av-l: 24%; --av-fg: 85%;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0e1014; --surface: #171a20; --surface-2: #1e222a;
  --ink: #eef0f3; --ink-2: #c7ccd5; --muted: #9098a6; --line: #272c35; --line-2: #363c47;
  --accent: #ff7a3d; --accent-soft: #3a2317; --reflect: #4a505b;
  --ok: #3cc98a; --ok-soft: #13301f; --warn: #f0a546; --warn-soft: #33260f;
  --danger: #ff6b61; --danger-soft: #3a1b19; --danger-ink: #15171c;
  --scrim: rgba(0, 0, 0, .6);
  --av-s: 35%; --av-l: 24%; --av-fg: 85%;
}

/*
 * 必须有这一条，而且要 !important。
 * 浏览器默认的 [hidden]{display:none} 优先级极低，会被 .sheet-wrap{display:flex}、
 * .nav{display:flex} 这类样式压过去 —— 带 hidden 属性的弹层照样铺满全屏，
 * 变成一层透明遮罩吃掉所有点击。Artifact 平台会自动补这条规则，所以在那里看不出来；
 * 放到 Vercel 或本地预览就整页点不动（2026-09-27 线上真出过这个事故）。
 */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
/* 快速连点按钮时不触发「双击放大」，也去掉旧浏览器的点击延迟 */
button, a, label, select, [data-action] { touch-action: manipulation; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}
body[data-persona="public"] { padding-bottom: 32px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.sub { color: var(--muted); font-size: 13px; }

/* ── 顶栏 ──────────────────────────────────────────────────────── */
.appbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  min-height: calc(var(--appbar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter-r) 0 var(--gutter-l);
  background: var(--ground);
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--font-num); font-weight: 700; font-size: 21px; line-height: 1;
  letter-spacing: .03em; padding: 4px 8px 3px; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink);
}
.appbar-title {
  margin: 0; font-size: 17px; font-weight: 600; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar-back {
  display: grid; place-items: center; width: var(--tap); height: var(--tap); margin-left: -11px; flex: none;
  border: 0; background: none; border-radius: 10px; cursor: pointer;
}
.appbar-back:active { background: var(--line); }
/* 顶栏右侧的刷新、账号：推到最右 */
.appbar-actions { display: flex; align-items: center; gap: 0; margin: 0 -11px 0 auto; flex: none; }
.appbar-action {
  display: grid; place-items: center; width: var(--tap); height: var(--tap);
  border: 0; background: none; border-radius: 10px; color: var(--ink-2); cursor: pointer;
}
.appbar-action:active { background: var(--line); }
.appbar-action[disabled] { opacity: .45; }

/* ── 主内容：一列，兄弟元素统一用 gap 排距 ───────────────────────── */
.screen {
  max-width: 560px; margin: 0 auto;
  padding: 12px var(--gutter-r) 24px var(--gutter-l);
  display: flex; flex-direction: column; gap: 10px;
}

/* ── 底部标签栏 ─────────────────────────────────────────────────── */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
/* 安卓上键盘弹起时可视区域变矮，底部标签栏会被顶上来挡住正在填的输入框：填表时先藏起来 */
body.typing .nav { display: none; }
body.typing { padding-bottom: 32px; }
.nav button {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 0; background: none; color: var(--muted);
  padding: 8px 2px 7px; font-size: 11px; cursor: pointer;
}
.nav button[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav button[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; width: 26px; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--accent);
}

/* ── 卡片 ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
}
.card.dim { opacity: .55; }
.card-title { margin: 0; font-size: 17px; font-weight: 700; text-wrap: balance; }
.card-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px 10px;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.hint { flex-basis: 100%; color: var(--muted); font-size: 12px; }

/* 场次卡：上半整块可点进详情，下半是名额和主按钮 */
.shift { padding: 0; overflow: hidden; }
.shift-main {
  display: grid; grid-template-columns: 1fr auto;
  grid-template-areas: "time pill" "venue venue" "city city";
  width: 100%; padding: 13px 14px 0; border: 0; background: none;
  text-align: left; cursor: pointer; row-gap: 1px;
}
.shift-time { grid-area: time; font-size: 19px; font-weight: 600; line-height: 1.2; }
.shift-main .pill { grid-area: pill; align-self: start; }
.shift-venue { grid-area: venue; margin-top: 3px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.shift-city { grid-area: city; font-size: 13px; color: var(--muted); }
.shift .card-bottom { padding: 10px 14px 13px; }

/* 名额小圆点 —— 「占位」这个动作本身的样子 */
.slots { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.slots i {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.6px solid var(--line-2); background: transparent;
}
.slots i.on { background: var(--ink); border-color: var(--ink); }
.slots.short i:not(.on) { border-color: var(--danger); }
.slots b { margin-left: 4px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.slots.short b { color: var(--danger); }

.state { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.state.ok { color: var(--ok); }
.state.warn { color: var(--warn); }

.pill {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: 11px; line-height: 1.6; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 8px;
}
.pill.strong { color: var(--ink); border-color: var(--ink-2); }
.badge {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 7px;
  background: var(--surface-2); color: var(--ink-2);
}
.badge.danger { background: var(--danger-soft); color: var(--danger); }

/* ── 按钮 ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: var(--radius-sm); padding: 10px 18px;
  font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: scale(.97); }
.btn.quiet { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); font-weight: 500; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid currentColor; font-weight: 600; }
.btn.danger-fill { background: var(--danger); color: var(--danger-ink); }
.btn[disabled] {
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
  font-weight: 500; cursor: default; transform: none; filter: none;
}
.btn.block { display: flex; width: 100%; }
.btn.lg { padding: 14px 18px; font-size: 16px; }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.btn.spaced { margin-top: 6px; }

.chip {
  border: 1px solid var(--line-2); background: var(--surface);
  min-height: 40px; border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* ── 场次池 ────────────────────────────────────────────────────── */
.filters { display: flex; align-items: center; gap: 8px; }
.filters-count { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.daygroup { display: flex; flex-direction: column; gap: 10px; }
.daygroup-h {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--appbar-h)); z-index: 2;
  display: flex; align-items: baseline; gap: 8px;
  margin: 4px -2px 0; padding: 6px 2px;
  background: var(--ground); font-size: 15px; font-weight: 700;
}
.daygroup-h span { font-size: 12px; font-weight: 500; color: var(--muted); }
.section-title {
  display: flex; align-items: center; gap: 6px;
  margin: 10px 2px 0; font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.section-title.warn { color: var(--warn); }
.count-chip { font-size: 12px; font-weight: 600; color: var(--muted); }

/* ── 详情 ──────────────────────────────────────────────────────── */
.detail { display: flex; flex-direction: column; gap: 4px; }
.detail-when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.detail-when .num { font-size: 27px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.detail-venue { margin: 2px 0 0; font-size: 19px; font-weight: 700; text-wrap: balance; overflow-wrap: anywhere; }
.facts { margin: 10px 0 0; display: grid; gap: 7px; }
.card > .facts:first-child { margin-top: 0; }
.facts div { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.detail-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.detail-slots .hint { flex-basis: auto; }
.detail-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

/* 点位档案摘要行 */
.insight {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); text-align: left; font-size: 13px;
}
button.insight { cursor: pointer; }
.insight-k { font-weight: 700; white-space: nowrap; }
.insight-k::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px;
  border-radius: 2px; background: var(--accent); vertical-align: 1px;
}
.insight.muted .insight-k::before { background: var(--line-2); }
.insight-v { flex: 1; min-width: 0; color: var(--ink-2); }
.insight .chev { color: var(--muted); font-size: 18px; line-height: 1; }

/* ── 人 ────────────────────────────────────────────────────────── */
.avatar {
  flex: none; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 14px; font-weight: 700;
  background: hsl(var(--h) var(--av-s) var(--av-l));
  color: hsl(var(--h) 45% var(--av-fg));
}
.crew { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.crew li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.person {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.person:first-child { padding-top: 0; }
.person:last-child { padding-bottom: 0; border-bottom: 0; }
.person-name {
  flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  font-size: 14px; font-weight: 500; overflow-wrap: anywhere;
}
.person-name .sub { flex-basis: 100%; font-weight: 400; font-size: 12px; }
/* 按钮宁可让名字换行，也不要自己堆叠成两行 */
.person .actions { flex: none; flex-wrap: nowrap; }
.profile { display: flex; align-items: center; gap: 14px; }
.profile .avatar { width: 52px; height: 52px; font-size: 22px; }

.pending-row { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pending-row:first-child { padding-top: 0; }
.pending-row:last-child { padding-bottom: 0; border-bottom: 0; }
.pending-row .person { padding: 0; border: 0; }
.pending-actions { display: flex; align-items: flex-end; gap: 8px; }
.inline-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }

/* ── 表单 ──────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 500; color: var(--muted); }
/* 16px 起步：iOS 输入框字号小于 16px 会在聚焦时自动放大页面 */
.field input, .field select, .field textarea, .inline-field select {
  width: 100%; min-width: 0; padding: 10px 12px; font-size: 16px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
}
.filters select {
  padding: 8px 10px; font-size: 16px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
}
.field input:disabled { background: var(--surface-2); color: var(--muted); }
.field textarea { resize: vertical; min-height: 64px; line-height: 1.55; }
.code-input { font-family: var(--font-num); letter-spacing: .12em; text-transform: uppercase; }
/* 6 位验证码：大号等宽，一眼看清输到第几位 */
.field .otp-input { font-size: 26px; font-weight: 600; letter-spacing: .4em; text-align: center; padding-left: .4em; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > * { min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.form-error {
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--danger-soft); color: var(--danger); font-size: 13px;
}

.datepick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.datepick button {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 6px 0 5px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; line-height: 1.2;
}
.datepick button small { font-size: 11px; color: var(--muted); }
.datepick button.weekend small { color: var(--warn); font-weight: 700; }
/* 日期写成「10 Oct」；360 宽的手机上一格只有 40px，13px 才放得下还留余量 */
.datepick button .num { font-size: 13px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.datepick button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.datepick button[aria-pressed="true"] small { color: var(--accent-ink); }

/* ── 公开页：招募卡用反光背心的样子 ──────────────────────────────── */
.recruit {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.recruit-eyebrow {
  padding: 9px 18px; font-size: 13px; font-weight: 700; letter-spacing: .1em;
  background: var(--accent); color: var(--accent-ink);
  border-bottom: 7px solid var(--reflect);
}
.recruit-org {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 16px 18px 0; font-family: var(--font-num); font-size: 34px; font-weight: 700;
  line-height: 1.05; letter-spacing: .02em;
}
.recruit-org span { font-family: var(--font); font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.recruit-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 18px 0; }
.recruit-facts div { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.recruit-facts dt { font-size: 12px; color: var(--muted); }
.recruit-facts dd { display: flex; align-items: baseline; gap: 3px; margin: 2px 0 0; }
.recruit-facts b { font-size: 30px; font-weight: 700; line-height: 1.05; }
.recruit-facts small { font-size: 14px; color: var(--ink-2); }
.recruit-types { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 18px 0; }
.recruit-hide { margin: 12px 18px 16px; font-size: 12px; color: var(--muted); }

.steps { list-style: none; margin: 12px 0 14px; padding: 0; }
.steps li { position: relative; padding: 0 0 14px 28px; font-size: 14px; color: var(--muted); }
.steps li::before {
  content: ""; position: absolute; left: 4px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--line-2); background: var(--surface);
}
.steps li::after { content: ""; position: absolute; left: 10px; top: 21px; bottom: 1px; width: 2px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.current { color: var(--ink); font-weight: 600; }
.steps li.current::before { background: var(--accent-soft); border-color: var(--accent); }
.checklist { display: grid; gap: 4px; margin: 6px 0 12px; padding-left: 20px; font-size: 14px; }

/* ── 工时条 ────────────────────────────────────────────────────── */
.meter { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.meter-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.meter-row b { font-size: 27px; font-weight: 700; color: var(--ink); }
.meter-row small { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--muted); }
.meter-bar { height: 8px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.meter-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ok); transition: width .4s ease; }
.meter.near .meter-bar i { background: var(--accent); }
.meter.over .meter-bar i { background: var(--danger); }
.meter.over .meter-row b { color: var(--danger); }
.meter-note { margin-top: 6px; font-size: 12px; color: var(--danger); }

/* ── 日报 ────────────────────────────────────────────────── */
.report { display: flex; flex-direction: column; gap: 6px; }
.report-num { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.report-num b { font-size: 36px; font-weight: 700; line-height: 1; }
.report-num span { font-size: 14px; color: var(--ink-2); }
.report-num em { margin-left: 4px; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-style: normal; font-weight: 600; }
.report-num em.hit { background: var(--ok-soft); color: var(--ok); }
.report-num em.miss { background: var(--warn-soft); color: var(--warn); }
.report-note { margin: 0; font-size: 14px; line-height: 1.6; }
.report-by { font-size: 12px; color: var(--muted); }
.report-joins { font-size: 13px; color: var(--ink-2); }
.fb { padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); }
.fb-k { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
/* 组长写日报时常常一行一条，换行要保留 */
.fb-v { margin: 3px 0 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; }
.feedback { display: flex; flex-direction: column; gap: 14px; }
.fb-group { display: flex; flex-direction: column; gap: 6px; }
.fb-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; }
.fb-list li { display: grid; grid-template-columns: 5.2em 1fr; gap: 8px; font-size: 14px; line-height: 1.5; }
.fb-list li > span:last-child { white-space: pre-line; overflow-wrap: anywhere; }
.fb-date { color: var(--muted); font-size: 12px; padding-top: 2px; }

/* ── 点位档案 ──────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 10px 9px; border-radius: var(--radius-sm); background: var(--surface-2); }
.stat b { font-size: 24px; font-weight: 700; line-height: 1.1; }
.stat span { font-size: 11px; color: var(--muted); }
.history { list-style: none; margin: 0; padding: 0; }
.history li {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "date val" "time val";
  column-gap: 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.history li:first-child { padding-top: 0; }
.history li:last-child { padding-bottom: 0; border-bottom: 0; }
.hist-date { grid-area: date; color: var(--ink-2); }
.hist-time { grid-area: time; font-size: 12px; color: var(--muted); }
.hist-val { grid-area: val; text-align: right; min-width: 0; }
.hist-val b { font-size: 16px; }

/* ── 组长：待补日报列表 ────────────────────────────────────────── */
.list { padding: 0 14px; }
.list-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 0; border: 0; border-bottom: 1px solid var(--line);
  background: none; text-align: left; cursor: pointer;
}
.list-row:last-child { border-bottom: 0; }
.list-main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.list-main b { font-size: 14px; font-weight: 600; }
.list-cta { flex: none; font-size: 13px; font-weight: 700; color: var(--warn); }

/* ── 激活码 ────────────────────────────────────────────────────── */
.code-card { display: flex; flex-direction: column; gap: 10px; }
.code-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.code-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.code-value { font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: .1em; user-select: all; }
.linkbox {
  margin: 6px 0 10px; padding: 10px 12px; font-size: 13px; word-break: break-all; user-select: all;
  background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
}

/* ── 表格 ──────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
th, td {
  padding: 12px 8px; text-align: left; border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
/* 表头允许折行：英文表头比中文长，窄列里与其截成「Sign-…」，不如折成两行 */
th { white-space: normal; text-overflow: clip; line-height: 1.25; vertical-align: bottom; }
tbody tr { cursor: pointer; }
tbody tr:last-child td { border-bottom: 0; }
tr.past td { color: var(--muted); }
tr.short td { background: var(--danger-soft); color: var(--ink); }
tr.short td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
/* 点位名本来就会截断成省略号，少分一点给它；数字列要放得下英文表头的最长单词 */
.tbl-overview th:nth-child(1) { width: 17%; }
.tbl-overview th:nth-child(2) { width: 32%; }
.tbl-overview th:nth-child(3) { width: 15%; }
.tbl-overview th:nth-child(4) { width: 18%; }
.tbl-overview th:nth-child(5) { width: 18%; }
.tbl-venues th:nth-child(1) { width: 46%; }
.tbl-venues th:nth-child(2) { width: 20%; }
.tbl-venues th:nth-child(3) { width: 17%; }
.tbl-venues th:nth-child(4) { width: 17%; }

/* ── 零散文字 ──────────────────────────────────────────────────── */
.empty { padding: 28px 0; text-align: center; font-size: 14px; color: var(--muted); }
.empty-inline { margin: 0; font-size: 13px; color: var(--muted); }
.lead { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.hint-line { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.muted-center { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
/* 看起来像链接的按钮：次要操作（换邮箱、重新发送、新增点位） */
.link {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 4px 0; border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--warn); text-decoration: underline; text-underline-offset: 3px;
}
.link[disabled] { opacity: .5; }
.link-row { display: flex; justify-content: space-between; gap: 12px; }
.self-start { align-self: flex-start; }
/* ── 底部弹层（代替 confirm()） ──────────────────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--scrim); animation: fade .18s ease; }
.sheet {
  position: relative; width: 100%; max-width: 560px;
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px var(--gutter-r) calc(20px + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  background: var(--surface); border-radius: 18px 18px 0 0;
  animation: rise .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet h2 { margin: 0; font-size: 18px; }
.sheet p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.sheet-actions .btn { padding: 13px; font-size: 15px; }

.toast {
  position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px);
  padding: 11px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5;
  background: var(--ink); color: var(--surface);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  animation: toast-in .2s ease;
}
body[data-persona="public"] .toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }
@keyframes toast-in { from { transform: translate(-50%, 8px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── v1.1：时间段、汇总卡片、每周工时、每人工时表 ───────────────── */
.period { display: flex; flex-direction: column; gap: 8px; }
/* 分段按钮：一排平分，手机上也点得准 */
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
}
.segmented button {
  min-height: 38px; padding: 0 6px; border: 0; border-radius: 9px; background: none;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.period-step { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.period-label { font-family: var(--font-num); font-size: 17px; font-weight: 600; text-align: center; }
.period-arrow {
  display: grid; place-items: center; width: var(--tap); height: var(--tap); flex: none;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.period-arrow.next svg { transform: rotate(180deg); }
.period-custom { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; }
.period-custom .form-error { grid-column: 1 / -1; }
.scope-row { display: flex; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 11px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.tile b { font-size: 26px; font-weight: 700; line-height: 1.1; }
.tile span { font-size: 12px; font-weight: 600; color: var(--muted); }
.tile small { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.tile.warn b { color: var(--danger); }

.weekbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.weekbars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: baseline; font-size: 13px; }
.wb-label { color: var(--ink-2); }
.wb-val { font-size: 15px; font-weight: 600; }
.wb-bar { grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.wb-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.weekbars li.near .wb-bar i { background: var(--accent); }
.weekbars li.over .wb-bar i { background: var(--danger); }
.weekbars li.over .wb-val { color: var(--danger); }

.tbl-people th:nth-child(1) { width: 52%; }
.tbl-people th:nth-child(2), .tbl-people th:nth-child(3) { width: 24%; }
.tbl-people.with-max th:nth-child(1) { width: 40%; }
.tbl-people.with-max th:nth-child(2), .tbl-people.with-max th:nth-child(3), .tbl-people.with-max th:nth-child(4) { width: 20%; }
tbody tr.static { cursor: default; }
tr.over td { color: var(--danger); font-weight: 600; }

/* 日报的天气、点位档案里管理员的操作 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.report-weather { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.venue-admin { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ── 窄屏手机（360 以下，比如 iPhone SE、小屏安卓）───────────────── */
@media (max-width: 359px) {
  .wordmark { font-size: 17px; padding: 3px 6px 2px; }
  .appbar { gap: 8px; }
  .appbar-title { font-size: 16px; }
  th, td { padding-left: 5px; padding-right: 5px; }
  /* 「11 Oct」这种两位数日期在 320 宽下放不进 17%：日期列加宽，点位名列（本来就会省略）让一点 */
  .tbl-overview th:nth-child(1) { width: 20%; }
  .tbl-overview th:nth-child(2) { width: 29%; }
  .datepick { gap: 4px; }
}
