/* ==========================================================================
   天智 · iPhone 版界面
   与 Android 原生 App 1:1 —— 设计令牌取自 ui/theme/GateColors.kt · GateShape · GateType（不改数值）。 */

:root {
/* 颜色：GatePaletteLight */
  --ink: #f1f4f8;
  --ink-raised: #ffffff;
  --paper: #101f30;
  --paper-dim: #364a61;
  --clay: #6c7d92;
  --rule: #e1e7ef;
  --line-strong: #c9d4e1;
  --brand: #003893;
  --brand-soft: #edf2fa;
  --brand-deep: #002b70;
  --brand-bright: #0153cd;
  --navy: #0a1f33;
  --navy-soft: #123250;
  --on-navy: #f4f7fb;
  --film: #f6f8fb;
  --surface-alt: #f7f9fc;
  --moss: #157a55;
  --amber: #9a6a1f;
  --brick: #b3261e;
  --on-brand: #ffffff;

/* 形状：GateShape */
  --r-card: 16px;
  --r-card-lg: 20px;
  --r-btn: 12px;
  --r-field: 10px;
  --r-dock: 22px;
  --r-hair: 8px;
  --r-chip: 999px;

/* 间距：GateDimens */
  --pad: 20px;
  --card-pad: 16px;
  --gap: 12px;
  --btn-h: 52px;

  --shadow-card: 0 1px 2px rgba(10, 31, 51, .06), 0 2px 8px rgba(10, 31, 51, .05);
  --shadow-dock: 0 8px 24px rgba(10, 31, 51, .12), 0 2px 6px rgba(10, 31, 51, .06);
  --shadow-sheet: 0 -8px 32px rgba(10, 31, 51, .18);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #070f1a;
    --ink-raised: #0e1a29;
    --paper: #eef3f9;
    --paper-dim: #c0cddb;
    --clay: #8a9db3;
    --rule: #1f2f44;
    --line-strong: #33475e;
    --brand: #7fb0ff;
    --brand-soft: #12243a;
    --brand-deep: #0b2e5c;
    --brand-bright: #4c8dff;
    --navy: #0c1e33;
    --navy-soft: #14304e;
    --film: #0b1523;
    --surface-alt: #0b1523;
    --moss: #4fd1a0;
    --amber: #e0b36a;
    --brick: #f08a7a;
    --on-brand: #06121f;
    --shadow-card: none;
    --shadow-dock: 0 8px 24px rgba(0, 0, 0, .5);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 14px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4, p, ul, ol, dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
}

a {
  color: var(--brand);
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   骨架
   ========================================================================== */

.page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  background: var(--ink);
}

.view {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.view[hidden] {
  display: none !important;
}

/* 页面转场：有方向的轻推 + 淡入淡出。
   新页面在上层滑入，旧页面在原位轻微后退淡出，避免「贴图式」硬切。
   时长 160–260ms，位移不超过 9%，克制、贴近原生。 */
.view.is-leaving {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
  will-change: opacity, transform;
}

.view.view-enter,
.view.view-enter-same {
  position: relative;
  z-index: 2;
  animation: viewInSame .24s cubic-bezier(.05, .7, .1, 1) both;
}

.view.view-enter-fwd {
  position: relative;
  z-index: 2;
  animation: viewInFwd .26s cubic-bezier(.05, .7, .1, 1) both;
}

.view.view-enter-back {
  position: relative;
  z-index: 2;
  animation: viewInBack .26s cubic-bezier(.05, .7, .1, 1) both;
}

.view.is-leaving.view-leave-same { animation: viewOutSame .16s ease-in both; }
.view.is-leaving.view-leave-fwd { animation: viewOutFwd .2s cubic-bezier(.4, 0, .2, 1) both; }
.view.is-leaving.view-leave-back { animation: viewOutBack .2s cubic-bezier(.4, 0, .2, 1) both; }

@keyframes viewInSame {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes viewOutSame {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes viewInFwd {
  from { opacity: .4; transform: translateX(9%); }
  to { opacity: 1; transform: none; }
}

@keyframes viewOutFwd {
  from { opacity: 1; transform: none; }
  to { opacity: .35; transform: translateX(-5%); }
}

@keyframes viewInBack {
  from { opacity: .4; transform: translateX(-9%); }
  to { opacity: 1; transform: none; }
}

@keyframes viewOutBack {
  from { opacity: 1; transform: none; }
  to { opacity: .35; transform: translateX(5%); }
}

@media (prefers-reduced-motion: reduce) {
  .view.view-enter,
  .view.view-enter-same,
  .view.view-enter-fwd,
  .view.view-enter-back,
  .view.is-leaving {
    animation: none !important;
  }
}

.scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--pad);
  scrollbar-width: none;
}

.scroll::-webkit-scrollbar {
  display: none;
}

.scroll > * + * {
  margin-top: var(--gap);
}

/* ==========================================================================
   页头（ScreenHeader） */

.hdr {
  flex: none;
  padding: calc(var(--safe-top) + 10px) var(--pad) 12px;
  background: var(--ink);
}

/* 子页：没有品牌行，只有返回 + 标题 + 操作（对齐 App 的 ScreenHeader(onBack)） */
.hdr.is-sub {
  padding-top: calc(var(--safe-top) + 14px);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.hdr-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  position: relative;
}

.hdr-brand img {
  display: block;
  width: 72px;
  height: 20px;
  object-fit: contain;
}

.hdr-brand .spacer {
  flex: 1 1 auto;
}

.hdr-brand .pill {
  max-width: 44%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 阳光海天 Logo 点击刷新 ---------- */
.brand-hit {
  display: inline-flex;
  align-items: center;
  margin: -4px 0 -4px -2px;
  padding: 4px 6px 4px 2px;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.brand-hit:active {
  background: transparent;
}

.brand-hit__jelly {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform-origin: 20% 50%;
  will-change: transform;
}

.brand-mark {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 56, 147, .12);
}

.brand-mark__svg {
  display: block;
  width: 22px;
  height: 22px;
}

.brand-seg {
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform, filter;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  line-height: 1;
}

.brand-cn {
  display: inline-flex;
  gap: 1px;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 15px;
}

.brand-cn i {
  display: inline-block;
  font-style: normal;
  transform-origin: center bottom;
  will-change: transform, color, filter;
}

.brand-en {
  color: var(--clay);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .28em;
  line-height: 9px;
  text-indent: .08em;
  white-space: nowrap;
  text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
  .brand-cn { color: #d8e6ff; }
  .brand-en { color: rgba(196, 212, 232, .62); }
  .brand-mark { box-shadow: 0 0 0 1px rgba(127, 176, 255, .22); }
  .brand-seg[data-seg="0"],
  .brand-seg[data-seg="3"] { fill: #4c8dff; }
  .brand-seg[data-seg="1"],
  .brand-seg[data-seg="2"] { fill: #ff5a5f; }
}

.brand-hit.is-refreshing {
  pointer-events: none;
}

.brand-hit.is-refreshing .brand-en {
  color: var(--brand-bright);
  letter-spacing: .34em;
  transition: color .35s ease, letter-spacing .45s cubic-bezier(.22, 1, .36, 1);
}

/* ---------- 服务切换（右上角展开） ---------- */
.svc-switch {
  position: relative;
  flex: none;
  z-index: 20;
}

.svc-switch__btn {
  cursor: pointer;
  transition: transform .28s cubic-bezier(.22, 1.2, .36, 1), box-shadow .2s ease;
}

.svc-switch__btn::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 1px;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .72;
  transition: transform .28s cubic-bezier(.22, 1.2, .36, 1);
}

.svc-switch.is-open .svc-switch__btn {
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

.svc-switch.is-open .svc-switch__btn::after {
  transform: rotate(180deg);
}

.svc-switch__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 118px;
  padding: 5px;
  border-radius: 14px;
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: 0 12px 28px rgba(10, 31, 51, .16), 0 2px 6px rgba(10, 31, 51, .08);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform-origin: top right;
  transform: scale(.72) translateY(-8px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    transform .42s cubic-bezier(.22, 1.25, .36, 1),
    opacity .28s ease,
    visibility 0s linear .28s;
  will-change: transform, opacity;
}

.svc-switch.is-open .svc-switch__menu {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition:
    transform .42s cubic-bezier(.22, 1.25, .36, 1),
    opacity .28s ease,
    visibility 0s linear 0s;
}

.svc-switch__menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--paper);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  text-align: left;
  transition: background .15s ease, transform .2s cubic-bezier(.22, 1.2, .36, 1);
}

.svc-switch__menu button::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}

.svc-switch__menu button[aria-checked="true"] {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.svc-switch__menu button[aria-checked="true"]::before {
  background: var(--brand-bright);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-bright) 22%, transparent);
}

.svc-switch__menu button:active {
  transform: scale(.97);
}

@media (prefers-color-scheme: dark) {
  .svc-switch__menu {
    box-shadow: 0 14px 32px rgba(0, 0, 0, .45);
  }
  .svc-switch__menu button[aria-checked="true"] {
    color: var(--brand);
  }
}

.hdr-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hdr-back {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  color: var(--paper);
  transition: background .15s ease;
}

.hdr-back:active {
  background: var(--film);
}

.hdr-back svg {
  width: 18px;
  height: 18px;
}

.hdr-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.hdr-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0;
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hdr-sub {
  margin-top: 2px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  color: var(--paper);
}

.icon-btn:active {
  background: var(--film);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

/* 状态胶囊（ConnectionPill） */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: var(--r-chip);
  background: var(--moss-a10);
  border: 1px solid var(--moss-a18);
  color: var(--moss);
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill.is-warn {
  background: var(--amber-a10);
  border-color: var(--amber-a18);
  color: var(--amber);
}

.pill.is-bad {
  background: var(--brick-a10);
  border-color: var(--brick-a18);
  color: var(--brick);
}

.pill.is-busy {
  background: var(--brand-a10);
  border-color: var(--brand-a18);
  color: var(--brand);
}

/* ==========================================================================
   登录（值班台入口）

   品牌名「天智」做主信号；顶部一束冷蓝光晕做氛围；输入用实心底框方便手套操作；
   不做成浮卡片 / 发光海报。颜色一律走 :root 变量，兼容深色模式。
   ========================================================================== */

.license-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(56px + var(--safe-top)) 22px calc(28px + var(--safe-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ink);
}

.auth-aura {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(320px, 42vh);
  pointer-events: none;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand) 16%, transparent) 0%,
    color-mix(in srgb, var(--brand-soft) 70%, transparent) 42%,
    transparent 100%
  );
}

.auth-sheet {
  position: relative;
  width: min(392px, 100%);
  margin-bottom: auto;
}

.auth-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: authRise 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.auth-org {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.auth-mark {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

.auth-org span {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.12em;
  color: var(--clay);
}

.auth-title {
  margin: 22px 0 0;
  font-size: clamp(34px, 9vw, 40px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.18em;
  color: var(--paper);
}

.auth-role {
  margin: 10px 0 0;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  color: var(--paper-dim);
}

.auth-rule {
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 20px;
  border-radius: 2px;
  background: var(--brand);
}

.auth-who,
.auth-msg,
.auth-form,
.auth-submit,
.auth-secondary,
.auth-foot {
  animation: authRise 0.48s cubic-bezier(0.22, 0.61, 0.36, 1) 0.08s both;
}

@keyframes authRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-head,
  .auth-who,
  .auth-msg,
  .auth-form,
  .auth-submit,
  .auth-secondary,
  .auth-foot {
    animation: none;
  }
}

.auth-who {
  margin: 22px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--paper-dim);
}

.auth-msg {
  margin: 18px 0 0;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--brick) 22%, transparent);
  border-radius: var(--r-field);
  border-left: 3px solid var(--brick);
  background: color-mix(in srgb, var(--brick) 8%, transparent);
  font-size: 13px;
  line-height: 1.55;
  color: var(--brick);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 26px;
}

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

.auth-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--clay);
}

.license-gate .auth-field input,
.license-gate .auth-field input[type="text"],
.license-gate .auth-field input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 13px;
  border: 1px solid var(--rule);
  border-radius: var(--r-field);
  background: var(--surface-alt);
  color: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.license-gate .auth-field input:focus {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  background: var(--ink-raised);
  box-shadow: none;
}

.license-gate .auth-field input::placeholder {
  color: color-mix(in srgb, var(--clay) 75%, transparent);
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: 0;
  opacity: 1;
}

.auth-pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.license-gate .auth-pass-wrap input {
  padding-right: 64px;
}

.auth-pass-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--clay);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.auth-pass-toggle:active {
  color: var(--paper-dim);
}

.auth-submit {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 26px;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--brand-deep) 35%, transparent);
  border-radius: var(--r-btn);
  background: linear-gradient(135deg, var(--brand-bright), var(--brand) 48%, var(--brand-deep));
  color: var(--on-brand);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease;
}

.auth-submit:active {
  transform: scale(0.985);
}

.auth-submit[disabled] {
  border-color: var(--rule);
  background: var(--film);
  color: var(--clay);
  cursor: default;
  transform: none;
}

.auth-submit.is-loading {
  letter-spacing: 0.06em;
}

.auth-secondary {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--paper-dim);
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
}

.auth-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.auth-device {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--clay);
  word-break: break-all;
}

.auth-device code {
  font-family: var(--mono);
  color: var(--paper-dim);
}

.auth-help {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--clay);
}

/* ==========================================================================
   值班室公告（控制台下发） */

.announce-banner {
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(154, 106, 31, 0.28);
  background: rgba(154, 106, 31, 0.10);
  color: #8a5f1c;
  font-size: 13px;
  line-height: 1.55;
}

@media (prefers-color-scheme: dark) {
  .announce-banner {
    border-color: rgba(232, 190, 112, 0.28);
    background: rgba(232, 190, 112, 0.12);
    color: #e8be70;
  }
}

/* ==========================================================================
   今日完成度（HeroProgressCard） */

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card-lg);
  padding: 14px 16px 16px;
  color: var(--on-navy);
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(90, 150, 255, .38) 0%, rgba(90, 150, 255, 0) 58%),
    linear-gradient(135deg, #0b2440 0%, var(--navy) 46%, var(--navy-soft) 100%);
  background-size: 140% 140%, 100% 100%;
  animation: heroBgDrift 14s ease-in-out infinite alternate;
  box-shadow: 0 10px 28px rgba(10, 31, 51, .22), 0 2px 6px rgba(10, 31, 51, .12);
  margin-top: 4px;
  isolation: isolate;
}

@keyframes heroBgDrift {
  0% { background-position: 0% 40%, 0 0; }
  100% { background-position: 100% 60%, 0 0; }
}

/* 紧凑版：班次页完成度卡再收一档 */
.hero-card.is-compact {
  padding: 9px 12px 10px;
  border-radius: 16px;
  margin-top: 2px;
  box-shadow: 0 6px 18px rgba(10, 31, 51, .18), 0 1px 4px rgba(10, 31, 51, .1);
}

/* 光晕：右上角一团柔光，让深色块不显得死板 */
.hero-aura {
  position: absolute;
  top: -58%;
  right: -26%;
  width: 78%;
  height: 150%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 175, 255, .30) 0%, rgba(120, 175, 255, 0) 68%);
  pointer-events: none;
  filter: blur(2px);
  animation: heroAuraFloat 9s ease-in-out infinite alternate;
}

@keyframes heroAuraFloat {
  0% { transform: translate(0, 0) scale(1); opacity: .85; }
  100% { transform: translate(-8%, 6%) scale(1.08); opacity: 1; }
}

/* 浮动光斑：背景动感，接近动图 */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(14px);
  opacity: .55;
  will-change: transform, opacity;
}

.hero-orb-a {
  width: 56%;
  height: 70%;
  top: -28%;
  left: -18%;
  background: radial-gradient(circle, rgba(90, 170, 255, .55) 0%, rgba(90, 170, 255, 0) 70%);
  animation: heroOrbA 11s ease-in-out infinite;
}

.hero-orb-b {
  width: 42%;
  height: 52%;
  right: -12%;
  bottom: -22%;
  background: radial-gradient(circle, rgba(120, 210, 255, .42) 0%, rgba(120, 210, 255, 0) 72%);
  animation: heroOrbB 13s ease-in-out infinite;
}

.hero-orb-c {
  width: 28%;
  height: 36%;
  left: 38%;
  top: 42%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, 0) 70%);
  animation: heroOrbC 8.5s ease-in-out infinite alternate;
}

@keyframes heroOrbA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18%, 12%) scale(1.15); }
}

@keyframes heroOrbB {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: .45; }
  50% { transform: translate(-16%, -10%) scale(1.2); opacity: .7; }
}

@keyframes heroOrbC {
  0% { transform: translate(0, 0) scale(.9); opacity: .25; }
  100% { transform: translate(10%, -14%) scale(1.25); opacity: .55; }
}

/* 斜向扫光 */
.hero-sheen {
  position: absolute;
  inset: -40% -60%;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, .07) 48%,
    rgba(255, 255, 255, .16) 50%,
    rgba(255, 255, 255, .07) 52%,
    transparent 60%
  );
  animation: heroSheen 7.5s cubic-bezier(.4, 0, .2, 1) infinite;
  mix-blend-mode: soft-light;
}

@keyframes heroSheen {
  0% { transform: translateX(-30%) translateY(8%); }
  100% { transform: translateX(30%) translateY(-8%); }
}

/* 细网格：4% 白线，替代原来的斜纹，更接近「仪表盘」质感 */
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 34px);
  mask-image: linear-gradient(200deg, #000 0%, transparent 62%);
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 62%);
  animation: heroGridDrift 18s linear infinite;
}

@keyframes heroGridDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 34px 0, 0 34px; }
}

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

.hero-card > .hero-aura,
.hero-card > .hero-orb,
.hero-card > .hero-sheen,
.hero-card > .hero-grid {
  z-index: 0;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-card.is-compact .hero-top {
  gap: 6px;
}

.hero-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: var(--r-chip);
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: rgba(244, 247, 251, .88);
  font-size: 10px;
  font-weight: 600;
  line-height: 15px;
  letter-spacing: .4px;
}

.hero-card.is-compact .hero-live {
  padding: 2px 7px 2px 6px;
  font-size: 9px;
  line-height: 13px;
  gap: 5px;
}

.hero-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6ee7a8;
  box-shadow: 0 0 0 3px rgba(110, 231, 168, .18);
  animation: heroPulse 2.4s ease-in-out infinite;
}

.hero-card.is-compact .hero-live i {
  width: 4px;
  height: 4px;
  box-shadow: 0 0 0 2px rgba(110, 231, 168, .18);
}

@keyframes heroPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.82); }
}

.hero-date {
  margin-left: auto;
  color: rgba(244, 247, 251, .52);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 15px;
  letter-spacing: .3px;
}

.hero-card.is-compact .hero-date {
  font-size: 10px;
  line-height: 13px;
}

.hero-eyebrow {
  color: rgba(244, 247, 251, .62);
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: .2px;
}

.hero-main {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.hero-card.is-compact .hero-main {
  gap: 10px;
  margin-top: 6px;
}

.hero-left {
  flex: 1 1 auto;
  min-width: 0;
}

.hero-num {
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.hero-num strong {
  font-size: 34px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -1px;
}

.hero-card.is-compact .hero-num strong {
  font-size: 24px;
  line-height: 26px;
  letter-spacing: -.6px;
}

.hero-num span {
  padding-bottom: 4px;
  color: rgba(244, 247, 251, .55);
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
}

.hero-card.is-compact .hero-num span {
  padding-bottom: 2px;
  font-size: 12px;
  line-height: 16px;
}

.hero-tip {
  margin-top: 4px;
  color: rgba(244, 247, 251, .74);
  font-size: 12px;
  line-height: 18px;
}

.hero-card.is-compact .hero-tip {
  display: none;
}

.hero-bar {
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  overflow: hidden;
}

.hero-card.is-compact .hero-bar {
  height: 3px;
  margin-top: 7px;
}

.hero-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .92), #fff);
  transition: width .35s ease;
}

.hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  color: rgba(244, 247, 251, .6);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 15px;
}

.hero-card.is-compact .hero-foot {
  margin-top: 6px;
  font-size: 10px;
  line-height: 13px;
}

.hero-foot span:last-child {
  color: rgba(244, 247, 251, .48);
}

.hero-divider {
  height: 1px;
  margin: 12px 0 10px;
  background: rgba(255, 255, 255, .1);
}

.hero-card.is-compact .hero-divider {
  margin: 8px 0 7px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-card,
  .hero-aura,
  .hero-orb,
  .hero-sheen,
  .hero-grid {
    animation: none !important;
  }
}

.hero-tags {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(244, 247, 251, .66);
  font-size: 12px;
  line-height: 18px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-tags svg {
  width: 14px;
  height: 14px;
  color: rgba(244, 247, 251, .55);
  flex: none;
}

.hero-tags em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
}

.ring {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
}

.hero-card.is-compact .ring {
  width: 48px;
  height: 48px;
}

.ring svg {
  display: block;
  width: 64px;
  height: 64px;
  transform: rotate(-90deg);
}

.hero-card.is-compact .ring svg {
  width: 48px;
  height: 48px;
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, .15);
  stroke-width: 8;
}

.hero-card.is-compact .ring-track {
  stroke-width: 7;
}

.ring-arc {
  fill: none;
  stroke: #fff;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset .35s ease;
}

.hero-card.is-compact .ring-arc {
  stroke-width: 7;
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.ring-center strong {
  font-size: 14px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.hero-card.is-compact .ring-center strong {
  font-size: 11px;
  line-height: 12px;
}

.ring-center span {
  color: rgba(244, 247, 251, .62);
  font-size: 10px;
  line-height: 14px;
}

.hero-card.is-compact .ring-center span {
  font-size: 8px;
  line-height: 10px;
}

.hero-card.is-compact .hero-timeline {
  margin: 0 0 4px;
}

/* ==========================================================================
   卡片 / 状态条（AppCard） */

.card {
  position: relative;
  border-radius: var(--r-card);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-card);
  padding: var(--card-pad);
  overflow: hidden;
}

.card.has-accent::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--accent, var(--brand));
}

.card.tint-warn {
  --accent: var(--amber);
}

.card.tint-brand {
  --accent: var(--brand);
}

.card.tint-bad {
  --accent: var(--brick);
}

.card.flat {
  box-shadow: none;
}

/* 待补传 */
.missing-card {
  padding: 14px;
}

.missing-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.missing-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--amber-a12);
  border: 1px solid var(--amber-a10);
  color: var(--amber);
}

.missing-badge svg {
  width: 18px;
  height: 18px;
}

.missing-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.missing-copy strong {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: var(--paper);
}

.missing-copy span {
  display: block;
  margin-top: 3px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.missing-go {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--amber-a10);
  color: var(--amber);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.missing-go svg {
  width: 14px;
  height: 14px;
}

.missing-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.missing-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-hair);
  background: var(--film);
  text-align: left;
}

.missing-item strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--paper-dim);
}

.missing-item em {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
}

/* ==========================================================================
   分区标题（SectionLabel） */

.sec-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 2px 9px;
}

.sec-label i {
  flex: none;
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--brand);
}

.sec-label strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: .4px;
  color: var(--paper-dim);
}

.sec-label .trail {
  margin-left: auto;
  color: var(--clay);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 15px;
}

.sec-label .act {
  margin-left: auto;
  padding: 2px 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
}

/* ==========================================================================
   班次卡片（SlotCard） */

.task-list {
  display: grid;
  gap: 10px;
}

.slot-card {
  position: relative;
  border-radius: var(--r-card);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-card);
  padding: 15px;
  overflow: hidden;
}

.slot-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--phase, var(--clay));
}

.slot-card.is-live {
  background: var(--mix-soft-raised-55);
  box-shadow: 0 6px 18px rgba(0, 56, 147, .10), 0 1px 2px rgba(10, 31, 51, .05);
}

/* 当前班次左侧色条加粗一点，形成「现在就这一段」的视觉锚点 */
.slot-card.is-live::before {
  width: 4px;
}

/* 已完成整体降一档饱和度，扫一眼就知道这段不用管了 */
.slot-card.is-done .slot-time {
  color: var(--paper-dim);
}

.slot-card.is-done {
  --phase: var(--moss);
}

.slot-card.is-live {
  --phase: var(--brand);
}

.slot-card.is-past {
  --phase: var(--brick);
}

.slot-card.is-idle {
  --phase: var(--clay);
}

.slot-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slot-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.slot-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  line-height: 19px;
  color: var(--paper);
}

.slot-now {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 500;
  line-height: 13px;
}

.slot-desc {
  margin-top: 5px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
}

.slot-side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.slot-count {
  color: var(--clay);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 15px;
}

/* 状态胶囊（StatusChip） */
.chip-status {
  --tone-a10: rgba(108, 125, 146, .10);
  --tone-a16: rgba(108, 125, 146, .16);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--r-chip);
  background: var(--tone-a10);
  border: 1px solid var(--tone-a16);
  color: var(--tone);
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
}

.chip-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.tone-moss { --tone: var(--moss); --tone-a10: rgba(21, 122, 85, .10); --tone-a16: rgba(21, 122, 85, .16); }
.tone-brand { --tone: var(--brand); --tone-a10: rgba(0, 56, 147, .10); --tone-a16: rgba(0, 56, 147, .16); }
.tone-brick { --tone: var(--brick); --tone-a10: rgba(179, 38, 30, .10); --tone-a16: rgba(179, 38, 30, .16); }
.tone-amber { --tone: var(--amber); --tone-a10: rgba(154, 106, 31, .10); --tone-a16: rgba(154, 106, 31, .16); }
.tone-clay { --tone: var(--clay); --tone-a10: rgba(108, 125, 146, .10); --tone-a16: rgba(108, 125, 146, .16); }

/* 当前班次剩余时间 */
.slot-timer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  padding: 8px 10px;
  border-radius: var(--r-hair);
  background: var(--ink-raised-a72);
  color: var(--amber);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.slot-timer.is-done {
  color: var(--moss);
}

.slot-timer svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.rule-line {
  height: 1px;
  background: var(--rule);
  margin: 11px 0 0;
}

/* 任务行（TaskRow） */
.task-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 0;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}

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

.task-row.is-locked {
  opacity: .85;
}

.task-row:disabled {
  cursor: default;
  pointer-events: none;
}

.task-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--film);
}

.task-check.is-done {
  background: var(--moss-a12);
  color: var(--moss);
}

.task-check i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.task-check svg {
  width: 13px;
  height: 13px;
}

.task-name {
  flex: 1 1 auto;
  min-width: 0;
}

.task-name strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 21px;
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row.is-locked .task-name strong {
  color: var(--paper-dim);
}

.task-name span {
  display: block;
  margin-top: 2px;
  color: var(--clay);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 15px;
}

.task-go {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 5px 9px;
  border-radius: var(--r-hair);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}

.task-go.is-muted {
  background: var(--film);
  color: var(--paper-dim);
}

.task-go svg {
  width: 12px;
  height: 12px;
}

.task-idle {
  color: var(--clay);
  font-size: 10px;
  line-height: 14px;
}

/* 班次时间轴：10:00 一路走到「现在」，每次进入/刷新重新跑一遍 */
.hero-timeline {
  margin: 0 0 12px;
}

.hero-timeline:empty {
  display: none;
}

.tl-track {
  position: relative;
  display: block;
  height: 12px;
}

.tl-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}

.tl-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .55), #fff);
  transition: width .9s cubic-bezier(.05, .7, .1, 1);
}

.tl-mark {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .34);
}

.tl-now {
  position: absolute;
  top: 50%;
  left: 0;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .18);
  transition: left .9s cubic-bezier(.05, .7, .1, 1);
}

.tl-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.tl-caption em {
  color: rgba(244, 247, 251, .55);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  line-height: 14px;
}

.tl-caption-live {
  color: rgba(244, 247, 251, .88) !important;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .tl-fill, .tl-now { transition: none; }
}
/* ==========================================================================
   下一步（NextActionCard）：一屏之内最该做的那件事 */

.next-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: var(--r-card);
  border: 1px solid var(--mix-brand-rule-26, var(--rule));
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--ink-raised) 78%);
  box-shadow: var(--shadow-card);
  text-align: left;
  transition: transform .12s cubic-bezier(.2, 0, .2, 1);
  animation: nextIn .28s cubic-bezier(.05, .7, .1, 1) both;
}

@keyframes nextIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .next-card { animation: none; }
}

.next-card:active {
  transform: scale(.985);
}

.next-card.is-warn {
  border-color: rgba(154, 106, 31, .3);
  background: linear-gradient(180deg, rgba(154, 106, 31, .12) 0%, var(--ink-raised) 78%);
}

.next-card.is-done {
  border-color: rgba(21, 122, 85, .26);
  background: linear-gradient(180deg, rgba(21, 122, 85, .10) 0%, var(--ink-raised) 78%);
}

.next-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  color: var(--on-brand);
}

.next-badge svg {
  width: 19px;
  height: 19px;
}

.next-card.is-warn .next-badge {
  background: var(--amber);
  color: #fff;
}

.next-card.is-done .next-badge {
  background: var(--moss);
  color: #fff;
}

.next-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.next-copy strong {
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-copy span {
  color: var(--clay);
  font-size: 12px;
  line-height: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-go {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 9px;
  border-radius: 9px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.next-go svg {
  width: 13px;
  height: 13px;
}

.next-card.is-warn .next-go {
  background: var(--amber);
  color: #fff;
}

.next-card.is-done .next-go {
  background: var(--film);
  color: var(--moss);
}

.next-card.is-done .next-go svg {
  display: none;
}

/* ==========================================================================
   折叠组：其余时段收起，点标题展开 */

.collapsed-slots {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  border: 1px solid var(--rule);
  background: var(--ink-raised);
  box-shadow: var(--shadow-card);
  text-align: left;
  transition: transform .12s cubic-bezier(.2, 0, .2, 1);
}

.collapsed-slots:active {
  transform: scale(.985);
}

.collapsed-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.collapsed-copy strong {
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.collapsed-copy span {
  color: var(--clay);
  font-size: 12px;
  line-height: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collapsed-copy span.is-warn {
  color: var(--amber);
}

.collapsed-chevron {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--clay);
  transition: transform .2s cubic-bezier(.05, .7, .1, 1);
}

.collapsed-slots.is-open .collapsed-chevron {
  transform: rotate(180deg);
}

/* 记录规则说明（FooterNote） */
.rule-note {
  display: flex;
  gap: 10px;
  padding: 4px 2px 26px;
}

.rule-note i {
  flex: none;
  width: 2px;
  height: 30px;
  margin-top: 2px;
  background: var(--rule);
}

.rule-note strong {
  display: block;
  color: var(--clay);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 1.6px;
}

.rule-note p {
  margin-top: 4px;
  color: var(--clay);
  font-size: 12px;
  line-height: 19px;
}

/* ==========================================================================
   表单
   ========================================================================== */

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field > span {
  color: var(--clay);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.field em {
  color: var(--brick);
  font-style: normal;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="datetime-local"],
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-field);
  background: var(--ink-raised);
  color: var(--paper);
  font-size: 16px;
  line-height: 22px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-a14);
}

input::placeholder,
textarea::placeholder {
  color: var(--clay);
  opacity: .75;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--r-btn);
  background: var(--film);
  border: 1px solid var(--rule);
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  line-height: 21px;
  transition: transform .12s ease, background .15s ease;
}

.btn:active {
  transform: scale(.985);
  background: var(--surface-alt);
}

.btn:disabled,
.btn[disabled] {
  opacity: 1;
  transform: none;
  background: var(--film);
  border-color: var(--rule);
  color: var(--clay);
  box-shadow: none;
}

/* 禁用的主按钮不要继续显示渐变蓝，否则看起来像「没文字的蓝块」 */
.btn.primary:disabled,
.btn.mini.primary:disabled {
  background: var(--film);
  border-color: var(--rule);
  color: var(--clay);
  box-shadow: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand-bright) 0%, var(--brand) 55%, var(--brand-deep) 100%);
  border-color: transparent;
  color: var(--on-brand);
  font-weight: 600;
  box-shadow: 0 4px 12px var(--brand-a24);
}

.btn.primary:active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
}

.btn.ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--paper-dim);
}

.btn.danger {
  background: var(--brick-a8);
  border-color: var(--brick-a20);
  color: var(--brick);
}

.btn.mini {
  min-height: 34px;
  padding: 0 11px;
  border-radius: var(--r-hair);
  font-size: 12px;
  font-weight: 500;
}

.btn.mini.primary {
  color: var(--on-brand);
}

.btn.block {
  width: 100%;
}

.btn.is-loading {
  pointer-events: none;
  opacity: .8;
}

.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

.linkish {
  padding: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  background: none;
  border: 0;
}

.status {
  margin-top: 8px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
}

.status.ok { color: var(--moss); }
.status.err { color: var(--brick); }
.status.busy { color: var(--amber); }

.preview {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.preview::-webkit-scrollbar { display: none; }

.preview img {
  flex: none;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--r-hair);
  border: 1px solid var(--rule);
}

/* ==========================================================================
   底部 Dock（AppBottomNav） */

.dock-wrap {
  flex: none;
  padding: 6px 12px calc(var(--safe-bottom) + 8px);
  background: var(--ink);
}

.dock {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px;
  border-radius: var(--r-dock);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-dock);
}

.dock-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px 0;
  border-radius: 16px;
  transition: transform .12s cubic-bezier(.2, 0, .2, 1);
}

.dock-item:active {
  transform: scale(.94);
}

.dock-item i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 28px;
  border-radius: 9px;
  color: var(--clay);
  transition: background .15s ease, color .15s ease;
}

.dock-item i svg {
  width: 20px;
  height: 20px;
}

.dock-item span {
  margin-top: 3px;
  color: var(--clay);
  font-size: 10px;
  line-height: 14px;
  letter-spacing: .2px;
  transition: color .18s ease;
}

.dock-item.is-active i {
  background: var(--brand-soft);
  color: var(--brand);
}

.dock-item.is-active i svg {
  animation: dockPop .26s cubic-bezier(.05, .7, .1, 1);
}

@keyframes dockPop {
  from { transform: scale(.86); }
  to { transform: none; }
}

.dock-item.is-active span {
  color: var(--brand);
  font-weight: 600;
}

.dock-scan {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 0;
  border-radius: 16px;
}

.dock-scan i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-bright) 0%, var(--brand) 55%, var(--brand-deep) 100%);
  border: 3px solid var(--ink-raised);
  color: var(--on-brand);
  box-shadow: 0 6px 16px var(--brand-a38);
  transition: transform .14s ease;
}

.dock-scan:active i {
  transform: scale(.94);
}

.dock-scan i svg {
  width: 21px;
  height: 21px;
}

.dock-scan span {
  margin-top: 3px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
}

/* ==========================================================================
   工具页：分区模块 + 方形图标网格
   顶部信息栏 → 横幅 → 多个带标题板块（每行 4 个方形图标按钮） */

.tools-scroll {
  padding-bottom: 8px;
}

.tools-scroll > * + * {
  margin-top: 0;
}

/* 顶部信息栏 ------------------------------------------------------------- */

.tools-info {
  position: relative;
  overflow: hidden;
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: var(--r-card-lg);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-card);
}

.tools-info::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
}

.tools-info-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tools-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: var(--r-chip);
  background: var(--moss-a10);
  color: var(--moss);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
}

.tools-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(21, 122, 85, .12);
}

.tools-live.is-warn {
  background: var(--amber-a12);
  color: var(--amber);
}

.tools-live.is-warn i {
  box-shadow: 0 0 0 3px rgba(154, 106, 31, .14);
}

.tools-live.is-bad {
  background: var(--brick-a10);
  color: var(--brick);
}

.tools-live.is-bad i {
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .12);
}

.tools-info-date {
  margin-left: auto;
  color: var(--clay);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 15px;
}

.tools-info-title {
  margin-top: 10px;
  color: var(--paper);
  font-size: 17px;
  font-weight: 600;
  line-height: 23px;
  letter-spacing: -.1px;
}

.tools-info-meta {
  margin-top: 3px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 横幅区 ---------------------------------------------------------------- */

.tools-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: var(--gap);
  padding: 16px 18px;
  border-radius: var(--r-card-lg);
  overflow: hidden;
  text-align: left;
  color: var(--on-navy);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  box-shadow: 0 6px 18px rgba(10, 31, 51, .16);
  transition: transform .14s ease;
}

.tools-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, .05) 0 1px,
    transparent 1px 26px
  );
}

.tools-banner:active {
  transform: scale(.99);
}

.tools-banner-copy {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
}

.tools-banner-eyebrow {
  display: block;
  color: rgba(244, 247, 251, .62);
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: .3px;
}

.tools-banner-copy strong {
  display: block;
  margin-top: 4px;
  color: var(--on-navy);
  font-size: 17px;
  font-weight: 600;
  line-height: 23px;
}

.tools-banner-copy span:last-child {
  display: block;
  margin-top: 4px;
  color: rgba(244, 247, 251, .72);
  font-size: 12px;
  line-height: 18px;
}

.tools-banner-icon {
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  color: var(--on-navy);
}

.tools-banner-icon svg {
  width: 22px;
  height: 22px;
}

/* 板块标题 -------------------------------------------------------------- */

.tools-section {
  margin-top: 22px;
}

.tools-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 2px 10px;
}

.tools-section-head strong {
  position: relative;
  padding-left: 10px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: .2px;
}

.tools-section-head strong::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: var(--brand);
}

.tools-section-head span {
  margin-left: auto;
  color: var(--clay);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 15px;
}

/* 方形图标网格：标准一行 4 个 -------------------------------------------- */

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: var(--r-card);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-card);
}

.tool-tile {
  flex: 0 0 calc((100% - 18px) / 4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  border-radius: var(--r-btn);
  color: var(--paper);
  text-align: center;
  transition: background .15s ease, transform .12s ease;
}

.tool-tile:active {
  background: var(--film);
  transform: scale(.97);
}

.tool-tile-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-a10);
  color: var(--brand);
}

.tool-tile-icon svg {
  width: 22px;
  height: 22px;
}

.tool-tile-icon.is-amber {
  background: var(--amber-a12);
  border-color: var(--amber-a10);
  color: var(--amber);
}

.tool-tile-icon.is-moss {
  background: var(--moss-a12);
  border-color: var(--moss-a10);
  color: var(--moss);
}

.tool-tile-icon.is-sky {
  background: var(--brand-a12);
  border-color: var(--brand-a10);
  color: var(--brand);
}

.tool-tile-text {
  color: var(--paper-dim);
  font-size: 12px;
  font-weight: 500;
  line-height: 17px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

/* 板块内的卡片（反馈 / 更新 / 安装） */
.tools-card-title {
  display: block;
  margin-bottom: 6px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.tools-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r-card);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  color: var(--clay);
  font-size: 12px;
  line-height: 19px;
}

.tools-section > .card + .card,
.tools-section > .card + .btn,
.tools-section > .btn + .card {
  margin-top: 10px;
}

/* 窄屏（iPhone SE 等）：图标略收，仍保持一行 4 个 */
@media (max-width: 340px) {
  .tools-grid {
    gap: 4px;
    padding: 12px 6px;
  }

  .tool-tile {
    gap: 6px;
    padding: 6px 0;
  }

  .tool-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .tool-tile-icon svg {
    width: 20px;
    height: 20px;
  }

  .tool-tile-text {
    font-size: 11px;
    line-height: 15px;
  }
}

/* ==========================================================================
   特殊情况卡片
   ========================================================================== */

.special-list {
  display: grid;
  gap: 10px;
}

.special-card {
  border-radius: var(--r-card);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-card);
  padding: 14px;
}

.special-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.special-title {
  flex: 1 1 auto;
  min-width: 0;
}

.special-title h4 {
  font-size: 15px;
  font-weight: 600;
  line-height: 21px;
  color: var(--paper);
}

.special-meta {
  margin-top: 3px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
}

.special-note {
  margin-top: 6px;
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 18px;
}

.special-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.special-thumbs::-webkit-scrollbar { display: none; }

.special-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

/* ==========================================================================
   缩略图 */

.thumb {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-hair);
  border: 1px solid var(--rule);
  background: var(--film);
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.gallery .thumb {
  width: auto;
  height: auto;
  aspect-ratio: 1;
}

/* ==========================================================================
   列表 / 记录
   ========================================================================== */

.record-list {
  display: grid;
  gap: 10px;
}

.record-card {
  padding: 14px;
  border-radius: var(--r-card);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-card);
}

.record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.record-title {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: .2px;
  color: var(--paper);
}

.tag {
  flex: none;
  padding: 3px 8px;
  border-radius: var(--r-chip);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  white-space: nowrap;
}

.tag.warn {
  background: var(--amber-a12);
  border: 1px solid var(--amber-a16);
  color: var(--amber);
}

.tag.ok {
  background: var(--film);
  border: 1px solid var(--rule);
  color: var(--clay);
}

.tag.brand {
  background: var(--brand-soft);
  border: 1px solid var(--brand-a16);
  color: var(--brand);
}

.record-meta {
  margin-top: 4px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* 筛选胶囊 */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip-row.tight { margin-top: 0; }

.chip {
  padding: 6px 12px;
  border-radius: var(--r-chip);
  border: 1px solid var(--rule);
  background: var(--ink-raised);
  color: var(--clay);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.chip:active {
  background: var(--film);
}

.chip.is-active {
  border-color: var(--mix-brand-rule-26);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

/* 日期选择 */
.date-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.date-chip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 10px;
  border-radius: var(--r-hair);
  border: 1px solid var(--rule);
  background: var(--ink-raised);
  text-align: left;
}

.date-chip strong {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  color: var(--paper);
}

.date-chip span {
  color: var(--clay);
  font-size: 10px;
  line-height: 14px;
}

.date-chip em {
  margin-top: 2px;
  color: var(--clay);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  line-height: 14px;
}

.date-chip.is-active {
  border-color: var(--mix-brand-rule-30);
  background: var(--brand-soft);
}

.date-chip.is-active strong,
.date-chip.is-active em {
  color: var(--brand);
}

/* 指标 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.stat-cell {
  padding: 10px 11px;
  border-radius: var(--r-hair);
  background: var(--film);
  border: 1px solid var(--rule);
}

.stat-cell span {
  display: block;
  color: var(--clay);
  font-size: 10px;
  line-height: 14px;
}

.stat-cell strong {
  display: block;
  margin-top: 3px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: -.3px;
}

.stat-cell strong em {
  margin-left: 2px;
  color: var(--clay);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

.stat-cell small {
  display: block;
  margin-top: 2px;
  color: var(--clay);
  font-size: 10px;
  line-height: 14px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--clay);
  font-family: var(--mono);
  font-size: 11px;
}

.indicator-list {
  margin-top: 8px;
}

.indicator-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.indicator-row:last-child {
  border-bottom: 0;
}

.indicator-main strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: var(--paper);
}

.indicator-main span {
  display: block;
  margin-top: 2px;
  color: var(--clay);
  font-size: 10px;
  line-height: 14px;
}

.indicator-num {
  text-align: right;
}

.indicator-num strong {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  line-height: 19px;
  color: var(--paper);
}

.indicator-num strong em {
  margin-left: 1px;
  color: var(--clay);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 500;
}

.indicator-num span {
  display: block;
  margin-top: 1px;
  color: var(--clay);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 14px;
}

.indicator-growth {
  min-width: 54px;
  text-align: right;
  color: var(--clay);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 16px;
}

.indicator-growth.up { color: var(--moss); }
.indicator-growth.down { color: var(--brick); }

.empty {
  padding: 18px 4px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

/* 历史记录详情 */
.history-slot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.history-slot:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.history-slot-head {
  display: block;
}

.history-slot-head strong {
  display: block;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  color: var(--paper);
}

.history-slot-head span {
  display: block;
  margin-top: 2px;
  color: var(--clay);
  font-size: 11px;
  line-height: 16px;
  text-align: left;
}

.history-cat {
  margin-top: 10px;
}

.history-cat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.history-cat-head strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: var(--paper-dim);
}

.history-cat-head span {
  color: var(--clay);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 16px;
}

.history-meta {
  margin-bottom: 5px;
  color: var(--clay);
  font-size: 11px;
  line-height: 16px;
}

.thumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 车辆订单摘要 */
.order-mini {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--r-hair);
  background: var(--film);
  border: 1px solid var(--rule);
}

.order-mini div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
  font-size: 10.5px;
  line-height: 15px;
}

.order-mini span {
  color: var(--clay);
  font-family: var(--mono);
}

.order-mini strong {
  color: var(--paper);
  font-family: var(--mono);
  font-weight: 600;
  white-space: nowrap;
}

/* ==========================================================================
   空状态（EmptyState） */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 0;
  text-align: center;
}

.empty-state i {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}

.empty-state i svg {
  width: 23px;
  height: 23px;
}

.empty-state strong {
  margin-top: 12px;
  color: var(--paper-dim);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.empty-state span {
  margin-top: 4px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
}

/* ==========================================================================
   弹层（上传 / 扫车牌 / 明细）
   层级约定（由高到低）：
   强制更新/提醒 800 > 全局加载 700 > 大图 600 > 底部弹层 500 > 明细浮层 450 > 扫车牌 400 > 普通页面 1
   弹层必须高于扫车牌页（400），否则在相机页里打开会被盖住看不见。 */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(10, 31, 51, .5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.sheet[hidden] {
  display: none !important;
}

.sheet-card {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 18px var(--pad) calc(var(--safe-bottom) + 18px);
  border-radius: 20px 20px 0 0;
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  border-bottom: 0;
  box-shadow: var(--shadow-sheet);
  animation: sheetUp .22s ease-out;
  scrollbar-width: none;
}

.sheet-card::-webkit-scrollbar { display: none; }

@keyframes sheetUp {
  from { transform: translateY(14px); opacity: .6; }
  to { transform: none; opacity: 1; }
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.sheet-head > div {
  flex: 1 1 auto;
  min-width: 0;
}

.sheet-slot {
  color: var(--clay);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.sheet-head h2 {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: var(--paper);
}

.sheet-body {
  padding-top: 12px;
}

.sheet-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--film);
  color: var(--clay);
  font-size: 18px;
  line-height: 1;
}

.dialog-gallery {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.row h3 {
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: var(--paper-dim);
}

.row.tight { margin-bottom: 6px; }

/* 大图 */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: calc(var(--safe-top) + 24px) 12px calc(var(--safe-bottom) + 24px);
  background: rgba(5, 10, 18, .95);
}

.photo-viewer[hidden] {
  display: none !important;
}

.photo-viewer img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--r-hair);
}

.photo-viewer-close {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.photo-viewer-caption {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

/* 明细浮层 */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: flex-end;
  background: rgba(10, 31, 51, .5);
}

.detail-panel {
  width: min(560px, 100%);
  max-height: 84vh;
  margin: 0 auto;
  overflow-y: auto;
  padding: 18px var(--pad) calc(var(--safe-bottom) + 18px);
  border-radius: 20px 20px 0 0;
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  scrollbar-width: none;
}

.detail-panel::-webkit-scrollbar { display: none; }

.detail-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.detail-panel-head h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.detail-head strong {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  line-height: 22px;
}

.detail-head span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.detail-sub {
  margin: 14px 0 4px;
  color: var(--paper-dim);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.detail-list {
  margin-top: 10px;
}

.detail-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}

.detail-list li:last-child {
  border-bottom: 0;
}

.detail-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.detail-row-top strong {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.detail-row-top span {
  color: var(--clay);
  font-size: 11px;
  line-height: 15px;
}

.detail-list p {
  margin-top: 2px;
  color: var(--clay);
  font-size: 11px;
  line-height: 16px;
}

/* ==========================================================================
   全局遮罩 / 骨架
   ========================================================================== */

.global-loader {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  background: rgba(10, 31, 51, .38);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.global-loader[hidden] {
  display: none !important;
}

.global-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 132px;
  padding: 18px 20px;
  border-radius: var(--r-card);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-dock);
}

.global-loader-card p {
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 18px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--brand-a22);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.spinner.lg {
  width: 26px;
  height: 26px;
  border-width: 2.5px;
}

.skeleton-card {
  height: 132px;
  border-radius: var(--r-card);
  background: linear-gradient(100deg, var(--film) 30%, var(--ink) 50%, var(--film) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.2s linear infinite;
  border: 1px solid var(--rule);
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -20% 0; }
}

.task-list.is-loading {
  gap: 10px;
}

/* 下拉刷新提示 */
.pull-hint {
  position: fixed;
  top: calc(var(--safe-top) + 6px);
  left: 50%;
  z-index: 150;
  transform: translate(-50%, -28px);
  padding: 6px 12px;
  border-radius: var(--r-chip);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  color: var(--clay);
  font-size: 11px;
  line-height: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: var(--shadow-card);
}

.pull-hint.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pull-hint.is-ready {
  color: var(--brand);
  border-color: var(--mix-brand-rule-26);
}

/* 强制更新 / 提醒遮罩 */
.force-update-mask {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(10, 31, 51, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.force-update-mask[hidden] {
  display: none !important;
}

.force-update-card {
  width: min(400px, 100%);
  padding: 20px;
  border-radius: var(--r-card-lg);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-dock);
}

.force-update-card .eyebrow {
  color: var(--clay);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 1.6px;
}

.force-update-card h2 {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: var(--paper);
}

.force-update-card .hint {
  margin-top: 8px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
}

.force-update-card .btn {
  margin-top: 16px;
  width: 100%;
}

.remind-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  max-height: 40vh;
  overflow-y: auto;
}

.remind-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--r-hair);
  background: var(--film);
}

.remind-list strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--paper-dim);
}

.remind-list span {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
}

/* ==========================================================================
   任务提醒浮层（2026-11 改版）
   目标：一眼看出「哪一班 / 还剩多久 / 还缺哪几项」，
   并且把「关闭」降级成最弱的文字按钮，减少现场误触。
   ========================================================================== */

.remind-mask {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--safe-top)) 14px calc(16px + var(--safe-bottom));
  background: rgba(8, 20, 34, .58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: remind-mask-in .18s ease-out both;
}

.remind-mask[hidden] {
  display: none !important;
}

@keyframes remind-mask-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.remind-card {
  width: min(420px, 100%);
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 18px 14px;
  border-radius: 22px;
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: 0 24px 64px rgba(8, 20, 34, .42), 0 2px 8px rgba(8, 20, 34, .18);
  animation: remind-card-in .26s cubic-bezier(.22, .9, .3, 1) both;
}

@keyframes remind-card-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* 顶部：类型胶囊 + 日期 */
.remind-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.remind-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: var(--r-chip);
  background: var(--amber-a12);
  border: 1px solid var(--amber-a18);
}

.remind-pill em {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--amber);
}

.remind-ping {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}

.remind-ping::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--amber);
  opacity: .5;
  animation: remind-ping 1.8s ease-out infinite;
}

@keyframes remind-ping {
  0% { transform: scale(.6); opacity: .6; }
  70% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

.remind-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--clay);
  letter-spacing: .2px;
}

.remind-card h2 {
  margin-top: 14px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.32;
  color: var(--paper);
  letter-spacing: -0.2px;
}

.remind-card .hint {
  margin-top: 7px;
  color: var(--clay);
  font-size: 12.5px;
  line-height: 1.6;
}

/* 倒计时块 */
.remind-count {
  margin-top: 14px;
  padding: 13px 14px 11px;
  border-radius: 16px;
  background: var(--film);
  border: 1px solid var(--rule);
}

.remind-count[hidden] {
  display: none !important;
}

.remind-count-main {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.remind-count-main strong {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: var(--paper);
  letter-spacing: -1px;
}

.remind-count-main span {
  font-size: 12.5px;
  color: var(--paper-dim);
}

.remind-count-main em {
  margin-left: auto;
  font-style: normal;
  padding: 3px 8px;
  border-radius: var(--r-chip);
  background: var(--amber-a12);
  color: var(--amber);
  font-size: 10.5px;
  font-weight: 700;
}

.remind-count.is-overdue .remind-count-main strong {
  color: var(--brick);
}

.remind-count.is-overdue .remind-count-main em {
  background: var(--brick-a10);
  color: var(--brick);
}

.remind-bar {
  margin-top: 10px;
  height: 4px;
  border-radius: var(--r-chip);
  background: var(--rule);
  overflow: hidden;
}

.remind-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-bright), var(--brand));
  transition: width .45s ease;
}

.remind-count.is-overdue .remind-bar i {
  background: var(--brick);
}

.remind-count-note {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--clay);
}

/* 缺项清单 */
.remind-section {
  margin-top: 14px;
}

.remind-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.remind-section-head strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: .2px;
}

.remind-section-head span {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--clay);
}

.remind-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  max-height: 34vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.remind-list:empty {
  display: none;
}

.remind-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--film);
  border: 1px solid var(--rule);
}

.remind-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}

.remind-list strong {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--paper-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remind-list span {
  flex: none;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.remind-list li.is-empty {
  border-style: dashed;
  color: var(--clay);
  font-size: 12px;
}

.remind-list li.is-empty::before {
  background: var(--line-strong);
}

.remind-foot {
  margin-top: 7px;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--clay);
}

.remind-foot[hidden] {
  display: none !important;
}

/* 操作区 */
.remind-actions {
  margin-top: 16px;
}

.remind-actions .btn.block {
  width: 100%;
  min-height: 50px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
}

.remind-snooze-label {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--clay);
}

.remind-snooze {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 7px;
}

.remind-snooze .btn {
  min-height: 44px;
  padding: 0 6px;
  font-size: 12.5px;
  border-radius: 12px;
  background: var(--ink-raised);
}

.remind-snooze .btn.is-strong {
  border-color: var(--line-strong);
  font-weight: 700;
}

/* 关闭按钮：故意做成最弱的样式，避免手一滑就关掉 */
.remind-close {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 11px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--clay);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.remind-close:active {
  background: var(--film);
  color: var(--paper-dim);
}

.remind-close-hint {
  margin-top: 2px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--clay);
  opacity: .85;
}

@media (prefers-reduced-motion: reduce) {
  .remind-mask,
  .remind-card,
  .remind-ping::after {
    animation: none;
  }

  .remind-bar i {
    transition: none;
  }
}

/* ==========================================================================
   文件互传
   ========================================================================== */

.share-pending {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.share-pending li {
  padding: 9px 11px;
  border-radius: var(--r-hair);
  background: var(--film);
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 18px;
}

.share-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.share-item {
  padding: 13px 14px;
  border-radius: var(--r-card);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
}

.share-item-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--paper);
  word-break: break-all;
}

.share-item-meta {
  margin-top: 3px;
  color: var(--clay);
  font-size: 11px;
  line-height: 16px;
}

.share-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.share-count {
  color: var(--clay);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

/* 云盘式工具条 / 面包屑 / 多选 / 预览 */
.share-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 8px;
}

.share-toolbar input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-hair);
  background: var(--ink-raised);
  color: var(--paper);
  font-size: 13px;
  line-height: 18px;
}

.share-toolbar select {
  max-width: 44%;
  padding: 8px 6px;
  border: 1px solid var(--rule);
  border-radius: var(--r-hair);
  background: var(--ink-raised);
  color: var(--paper);
  font-size: 12px;
}

.share-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 0 12px 8px;
}

.share-crumb {
  padding: 4px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 18px;
}

.share-crumb.is-active {
  background: var(--film);
  color: var(--paper);
  font-weight: 600;
}

.share-crumb-sep {
  color: var(--clay);
  font-size: 11px;
}

.share-batch {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--ink-raised);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.share-batch > span {
  flex: 1;
  min-width: 64px;
  color: var(--paper-dim);
  font-size: 12px;
}

.share-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.share-item.is-selected {
  border-color: var(--accent);
}

.share-check {
  padding-top: 2px;
}

.share-check input {
  width: 18px;
  height: 18px;
}

.share-item-main {
  flex: 1;
  min-width: 0;
}

.share-item-actions {
  flex-wrap: wrap;
}

.share-folders {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.share-folder {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--ink-raised);
}

.share-folder-open {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-size: 14px;
  text-align: left;
}

.share-folder-open span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-folder-icon {
  font-size: 17px;
}

.share-preview {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  background: rgba(4, 8, 14, 0.94);
}

.share-preview-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #0b1220;
}

.share-preview-panel header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8eefc;
}

.share-preview-panel header span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.share-preview-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 8px;
}

.share-preview-body img,
.share-preview-body video {
  max-width: 100%;
  max-height: 100%;
}

.share-preview-body audio {
  width: 100%;
}

.share-preview-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.share-preview-body pre {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: auto;
  padding: 12px;
  color: #dbe4f5;
  font: 12px/1.65 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
}

.share-preview-body .empty {
  color: #9fb0cc;
  font-size: 13px;
}

/* ==========================================================================
   iOS 安装提示
   ========================================================================== */

.pwa-ios-tip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-top) + 10px) 16px 10px;
  background: var(--navy);
  color: var(--on-navy);
}

.pwa-ios-tip[hidden] {
  display: none !important;
}

.pwa-ios-tip > div {
  flex: 1 1 auto;
  min-width: 0;
}

.pwa-ios-tip strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.pwa-ios-tip span {
  display: block;
  margin-top: 2px;
  color: rgba(244, 247, 251, .78);
  font-size: 11px;
  line-height: 16px;
}

.pwa-ios-tip button {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

/* ==========================================================================
   工具页：连接信息 / 页脚
   ========================================================================== */

.kv {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.kv div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
  line-height: 18px;
}

.kv div:last-child {
  border-bottom: 0;
}

.kv span {
  color: var(--clay);
  flex: none;
}

.kv strong {
  color: var(--paper);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.folder {
  margin-top: 8px;
  color: var(--clay);
  font-size: 11px;
  line-height: 17px;
  word-break: break-all;
}

.urls {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-height: 210px;
  overflow-y: auto;
  scrollbar-width: none;
}

.urls::-webkit-scrollbar { display: none; }

.urls a {
  padding: 9px 11px;
  border-radius: var(--r-hair);
  background: var(--film);
  border: 1px solid var(--rule);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 16px;
  word-break: break-all;
}

.tunnel {
  margin-top: 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.tunnel.ready {
  color: var(--clay);
}

.qr {
  display: block;
  width: min(174px, 56vw);
  margin-top: 12px;
  padding: 8px;
  border-radius: var(--r-hair);
  background: #fff;
  border: 1px solid var(--rule);
}

.brand-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.brand-footer img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.brand-footer strong {
  display: block;
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
}

.brand-footer span {
  display: block;
  margin-top: 2px;
  color: var(--clay);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 12px;
  letter-spacing: .8px;
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 12px 0 26px;
  border-top: 1px solid var(--rule);
  font-size: 11px;
}

.site-links a {
  color: var(--clay);
}

.ios-install-steps {
  margin-top: 8px;
  padding-left: 18px;
  list-style: decimal;
  color: var(--clay);
  font-size: 12px;
  line-height: 19px;
}

.ios-install-steps strong {
  color: var(--brand);
  font-weight: 600;
}

/* ==========================================================================
   扫车牌 · 全屏相机（对齐 App PlateCameraScreen） */

.scan-page {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: block;
  background: #05080d;
  color: #fff;
  overflow: hidden;
}

.scan-page[hidden] {
  display: none !important;
}

.scan-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #05080d;
}

/* 老内核（Chrome 90 等 WebView）里 <video> 常常不参与合成、显示黑屏，
   这里把视频帧画进 canvas 显示，video 本身只负责取帧。 */
.scan-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #05080d;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.scan-shot.is-on {
  opacity: 1;
}

.scan-shot.is-on + .scan-shade ~ .scan-video {
  opacity: 0;
}

/* 上下渐变压暗，让取景框与文字浮出来 */
.scan-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .12) 22%, transparent 38%),
    linear-gradient(0deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .35) 24%, transparent 46%);
}

/* ---- 顶部栏 ---- */

.scan-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-top) + 8px) 14px 6px;
}

.scan-circle {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.scan-circle:active {
  background: rgba(255, 255, 255, .26);
}

.scan-circle svg {
  width: 18px;
  height: 18px;
}

.scan-circle.is-on {
  background: rgba(1, 83, 205, .55);
  border-color: rgba(126, 176, 255, .6);
  color: #fff;
}

.scan-title {
  flex: 1 1 auto;
  min-width: 0;
}

.scan-title strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: #fff;
}

.scan-title span {
  display: block;
  margin-top: 1px;
  color: rgba(255, 255, 255, .75);
  font-size: 11px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-today-badge {
  flex: none;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--brick);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

/* ==========================================================================
   扫牌结果抽屉（2026-11 重构）
   位置从「顶部横幅」改成「底部抽屉」：取景框在屏幕上方，
   结果从底部升起，相机画面全程露着，不和取景框抢视线。
   视觉上砍掉英文眉标、彩色描边、发光、毛玻璃和九级字号。
   ========================================================================== */

.scan-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 9px 22px calc(var(--safe-bottom) + 18px);
  border-radius: 26px 26px 0 0;
  background: var(--ink-raised);
  box-shadow: 0 -14px 44px rgba(4, 12, 22, .34);
  color: var(--paper);
  animation: sheetUp .3s cubic-bezier(.22, .68, .36, 1);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}

.scan-sheet[hidden] {
  display: none !important;
}

/* 拖动条 + 收起提示 */
.scan-sheet-handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 15px;
  border-radius: 2px;
  background: var(--rule);
}

.scan-sheet-collapse {
  position: absolute;
  top: 6px;
  right: 22px;
  color: var(--clay);
  font-size: 10px;
  line-height: 14px;
  pointer-events: none;
}

/* ---- 车牌 + 状态 ---- */

.scan-sheet-id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scan-plate {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border-radius: 5px;
  background: linear-gradient(180deg, #1f63be 0%, #12488f 100%);
  border: 1.5px solid rgba(255, 255, 255, .62);
  box-shadow: 0 2px 7px rgba(18, 72, 143, .28);
  color: #fff;
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1.6px;
  white-space: nowrap;
}

.scan-plate.is-green {
  background: linear-gradient(180deg, #eaf7ef 0%, #7fd0a2 48%, #2f9c66 100%);
  border-color: rgba(255, 255, 255, .68);
  color: #0b2a1c;
  box-shadow: 0 2px 7px rgba(47, 156, 102, .26);
}

.scan-plate.is-yellow {
  background: linear-gradient(180deg, #f4c950 0%, #dca424 100%);
  border-color: rgba(255, 255, 255, .5);
  color: #241a04;
  box-shadow: 0 2px 7px rgba(220, 164, 36, .28);
}

.scan-plate.is-black {
  background: linear-gradient(180deg, #3a3a3a 0%, #141414 100%);
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
}

.scan-plate.is-white {
  background: linear-gradient(180deg, #f4f4f4 0%, #d6d6d6 100%);
  border-color: rgba(255, 255, 255, .5);
  color: #1a1a1a;
}

/* 没查到车辆时不知道车牌底色，用中性灰，不冒充蓝牌 */
.scan-plate.is-unknown {
  background: linear-gradient(180deg, #7b8797 0%, #57616e 100%);
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
  box-shadow: 0 2px 7px rgba(31, 44, 58, .22);
}

.scan-plate.is-small {
  height: 38px;
  padding: 0 10px;
  font-size: 20px;
  letter-spacing: 1.3px;
}

.scan-sheet-state {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--moss);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.scan-sheet-state i {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.scan-sheet-state.is-out { color: var(--clay); }
.scan-sheet-state.is-warn { color: var(--amber); }
.scan-sheet-state.is-busy { color: var(--clay); }

/* 正确率（对齐 App 2.11）：放在页脚，不塞进「车牌 + 状态 + 金额」那一行 ——
   那一行在 360 宽的屏上本来就满，加一个标签就会把金额挤成竖排。 */
.scan-acc {
  flex: none;
  padding: 0 7px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--clay);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

/* ---- 金额：和车牌同一行、右对齐（对齐 App 结果卡） ---- */

.scan-sheet-money {
  margin-left: auto;
  flex: none;
  text-align: right;
}

.scan-sheet-lb {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--clay);
  font-size: 11px;
  line-height: 15px;
}

.scan-sheet-lb b {
  color: var(--brick);
  font-weight: 600;
}

.scan-sheet-lb b.is-ok {
  color: var(--moss);
}

.scan-sheet-lb b.is-warn {
  color: var(--amber);
}

.scan-sheet-num {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  margin-top: 1px;
  color: var(--brick);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: -1.6px;
  line-height: 1.02;
}

.scan-sheet-num sup {
  align-self: flex-start;
  margin-top: 7px;
  margin-right: 1px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.scan-sheet-num strong {
  font-size: 34px;
  font-weight: 700;
}

.scan-sheet-num em {
  padding-bottom: 2px;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -.6px;
}

.scan-sheet-clear {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--moss);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.3px;
  line-height: 28px;
}

.scan-sheet-clear svg {
  flex: none;
  width: 19px;
  height: 19px;
}

.scan-sheet-empty {
  color: var(--paper);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.3px;
  line-height: 26px;
}

/* ---- 事实行（异步补进出场，原地替换） ---- */

.scan-gate {
  margin-top: 16px;
  color: var(--paper-dim);
  font-size: 13px;
  line-height: 21px;
}

.scan-gate.is-in,
.scan-gate.is-out,
.scan-gate.is-none {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.scan-gate-loading {
  color: var(--clay);
  font-size: 13px;
  line-height: 21px;
}

.scan-gate-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  line-height: 21px;
}

.scan-gate-head span {
  color: var(--clay);
  font-weight: 400;
}

.scan-gate-dot {
  display: none;
}

.scan-gate-dur {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 0;
}

.scan-gate-dur em {
  color: var(--paper);
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}

.scan-gate-dur b {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.scan-gate-sub {
  color: var(--clay);
  font-size: 13px;
  line-height: 21px;
}

.scan-gate-monthly {
  margin: 3px 0 0;
  color: var(--clay);
  font-size: 13px;
  line-height: 20px;
}

.scan-gate-monthly.is-monthly {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--clay);
}

.scan-gate-monthly.is-expired {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--amber);
}

.scan-gate-monthly.is-temp {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--clay);
}

.scan-gate-note {
  color: var(--amber);
  font-size: 12px;
  line-height: 18px;
  opacity: 1;
}

.scan-gate-note.is-warn {
  color: var(--amber);
  font-size: 13px;
  line-height: 21px;
}

.scan-gate-note.is-faint {
  color: var(--clay);
  font-size: 13px;
  line-height: 21px;
}

.scan-gate-list {
  display: none;
}

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

.scan-notice-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 52px;
  margin-top: 18px;
  padding: 0 16px;
  border-radius: 13px;
  background: linear-gradient(180deg, #0a4aa8 0%, #003893 55%, #002b70 100%);
  box-shadow: 0 4px 12px rgba(0, 43, 112, .26);
  color: #fff;
  text-align: left;
}

.scan-notice-btn:active {
  filter: brightness(1.08);
}

.scan-notice-btn svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.scan-notice-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.scan-notice-copy strong {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: .4px;
}

.scan-notice-copy em {
  display: none;
}

.scan-notice-go {
  flex: none;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  line-height: 18px;
}

/* 无欠费 / 未登记时的白底描边按钮 */
.scan-notice-btn.is-lite {
  background: var(--ink-raised);
  border: 1.5px solid var(--line-strong);
  box-shadow: none;
  color: var(--brand);
}

.scan-notice-btn.is-lite .scan-notice-copy strong,
.scan-notice-btn.is-lite .scan-notice-go {
  color: var(--brand);
}

.scan-notice-btn.is-lite .scan-notice-go {
  opacity: .7;
}

.scan-notice-btn.is-done {
  background: var(--moss);
  box-shadow: 0 4px 12px rgba(21, 122, 85, .26);
}

.scan-notice-btn.is-pending {
  background: #c06a28;
  box-shadow: 0 4px 12px rgba(192, 106, 40, .26);
}

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

.scan-sheet-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
}

.scan-sheet-foot .r {
  margin-left: auto;
  color: var(--clay);
  font-size: 11.5px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-sheet-foot .r a,
.scan-sheet-foot .r button {
  padding: 0;
  color: var(--clay);
  font-size: 11.5px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 车牌有误：跟页脚灰字同档，下划线提示可点，不抢主按钮 */
.scan-wrong {
  margin-left: 8px;
  padding: 0 0 1px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  color: var(--clay);
  font-size: 11.5px;
  line-height: 16px;
}

.scan-wrong.is-done {
  border-bottom: 0;
  color: var(--moss);
}

.scan-detail-link {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
}

/* 抽屉打开时底部工具条让位 */
.scan-page.is-result .scan-bottom {
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.scan-page .scan-bottom {
  transition: opacity .2s ease;
}

.scan-logged {
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
}

.scan-empty-note {
  color: var(--clay);
  font-size: 13px;
  line-height: 21px;
}

.scan-banner-divider {
  display: none;
}

.scan-today-tag {
  flex: none;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 3px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 15px;
}

/* ---- 连扫多辆的分页条 ---- */

.scan-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--clay);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
}

.scan-pager-ticks {
  display: flex;
  gap: 4px;
}

.scan-pager-ticks i {
  display: block;
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: var(--rule);
}

.scan-pager-ticks i.is-on {
  width: 18px;
  background: var(--brand);
}

.scan-pager-nav {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.scan-pager-nav button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
}

/* ---- 取景框 ---- */

/* 取景框放在屏幕上方：扫牌时视线起点就是取景框，
   结果抽屉从底部升起也压不到它。 */
.scan-frame {
  position: absolute;
  /* 与 App 对齐：框顶在屏高 24%，高度也取屏高 24%（上下限 150~232px），
     举着手机对车牌时基本不用再压手腕。 */
  top: 24vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 92%;
  max-width: 460px;
  height: clamp(150px, 24vh, 232px);
  border: 2px solid rgba(255, 255, 255, .65);
  border-radius: 18px;
  transition: border-color .18s ease;
}

.scan-frame.is-hit {
  border-color: var(--brand-bright);
}

.scan-frame.is-off {
  display: none;
}

/* 相机不可用（微信内置浏览器 / 权限被拒）的兜底卡片 */
.scan-fallback {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 70px) 20px calc(var(--safe-bottom) + 120px);
}

.scan-fallback[hidden] {
  display: none !important;
}

.scan-fallback-card {
  width: 100%;
  max-width: 340px;
  padding: 20px 18px;
  border-radius: var(--r-card-lg);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .36);
  text-align: center;
  color: var(--paper);
}

.scan-fallback-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--amber-a14);
  color: var(--amber);
}

.scan-fallback-icon svg {
  width: 22px;
  height: 22px;
}

.scan-fallback-title {
  margin-top: 12px;
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
  line-height: 21px;
}

.scan-fallback-text {
  margin-top: 6px;
  color: var(--clay);
  font-size: 12px;
  line-height: 19px;
}

.scan-fallback-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.scan-fallback-actions .btn.mini {
  min-height: 40px;
  font-size: 12.5px;
}

.scan-fallback-note {
  margin-top: 10px;
  color: var(--clay);
  font-size: 11px;
  line-height: 17px;
}

/* 贴单弹层：拍照 / 相册 / 保存 */
.scan-notice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.scan-notice-actions .btn {
  min-height: 44px;
  font-size: 14px;
}

.scan-launch-tip {
  margin-top: 8px;
  color: var(--clay);
  font-size: 11px;
  line-height: 17px;
}

.scan-watermark-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 18px;
}

.scan-watermark-toggle input {
  flex: none;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

/* 提示语在框**下方**，不再压在框里：原来那行字正好盖住车牌本身。 */
.scan-hint {
  position: absolute;
  top: calc(24vh + clamp(150px, 24vh, 232px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 86%;
  margin: 0;
  color: rgba(255, 255, 255, .92);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  text-shadow: 0 1px 7px rgba(0, 0, 0, .78);
}

.scan-error {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(var(--safe-bottom) + 132px);
  z-index: 3;
  margin: 0;
  color: var(--amber);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.scan-error[hidden] {
  display: none !important;
}

/* ---- 底部 ---- */

.scan-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 14px 16px calc(var(--safe-bottom) + 14px);
  background: linear-gradient(0deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .45) 60%, transparent 100%);
}

.scan-history {
  margin-bottom: 10px;
}

.scan-history[hidden] {
  display: none !important;
}

.scan-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, .7);
  font-size: 10px;
  line-height: 14px;
}

.scan-history-head span:last-child {
  color: rgba(255, 255, 255, .5);
}

.scan-history-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.scan-history-list::-webkit-scrollbar {
  display: none;
}

.scan-chip {
  --chip-tone-a50: rgba(255, 255, 255, .5);
  flex: none;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .5);
  border: 1px solid var(--chip-tone-a50);
  color: var(--chip-tone);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.scan-chip em {
  font-style: normal;
  font-weight: 400;
}

.scan-chip.tone-brick { --chip-tone: #ff8a8a; --chip-tone-a50: rgba(255, 138, 138, .5); }
.scan-chip.tone-moss { --chip-tone: #6ee0b0; --chip-tone-a50: rgba(110, 224, 176, .5); }
.scan-chip.tone-amber { --chip-tone: #e8c27a; --chip-tone-a50: rgba(232, 194, 122, .5); }

.scan-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scan-ghost {
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.scan-ghost:active {
  background: rgba(255, 255, 255, .24);
}

.scan-ghost.is-danger {
  background: rgba(179, 38, 30, .85);
}

.scan-busy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .35);
  color: rgba(255, 255, 255, .85);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

.scan-busy-icon {
  width: 14px;
  height: 14px;
  color: var(--brand-bright);
}

.scan-busy.is-busy .scan-busy-icon {
  animation: scanPulse 1s ease-in-out infinite;
}

@keyframes scanPulse {
  0%, 100% { opacity: .35; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* ---- 手动输入 / 台账 ---- */

.scan-plate-input {
  font-family: var(--mono) !important;
  font-size: 20px !important;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scan-ledger {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-height: 46vh;
  overflow-y: auto;
  scrollbar-width: none;
}

.scan-ledger::-webkit-scrollbar {
  display: none;
}

.scan-ledger-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 8px 12px;
  border-radius: 10px;
  background: var(--ink);
  border: 1px solid var(--rule);
}

.scan-ledger-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 0;
  text-align: left;
}

.scan-ledger-main strong {
  display: block;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 23px;
  color: var(--paper);
}

.scan-ledger-main span {
  display: block;
  margin-top: 2px;
  color: var(--moss);
  font-size: 11px;
  line-height: 16px;
}

.scan-ledger-main em {
  display: block;
  color: var(--clay);
  font-size: 11px;
  font-style: normal;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-ledger-amount {
  flex: none;
  padding-right: 4px;
  color: var(--brick);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* 车主缴费状态：已缴费 / 未缴 N 笔 / 待核对 */
.scan-ledger-pay {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
}

.scan-ledger-pay.is-paid {
  color: #4b6b4b;
}

.scan-ledger-pay.is-owing {
  color: #a6641f;
}

.scan-ledger-del {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--brick);
}

.scan-ledger-del svg {
  width: 20px;
  height: 20px;
}


@media (max-width: 360px) {
  :root { --pad: 16px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .indicator-row { grid-template-columns: minmax(0, 1fr) auto; }
  .indicator-growth { grid-column: 2; min-width: 0; }
}

/* ==========================================================================
   iOS 16.1 及更早版本不支持 color-mix()，这里给出等效兜底，
   避免状态胶囊 / 卡片边框变成透明或纯色块。
   ========================================================================== */

@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .pill { border-color: var(--rule); background: rgba(21, 122, 85, .10); }
  .pill.is-warn { border-color: #e5d6b9; background: rgba(154, 106, 31, .10); }
  .pill.is-bad { border-color: #f0c9c5; background: rgba(179, 38, 30, .10); }
  .pill.is-busy { border-color: var(--line-strong); background: rgba(0, 56, 147, .08); }

  .chip-status { border-color: var(--rule); background: rgba(16, 31, 48, .05); }
  .missing-badge { border-color: #eddfc4; background: #fbf6ec; }
  .tool-tile-icon { border-color: var(--rule); }
  .tool-tile-icon.is-amber { border-color: #eddfc4; }
  .tool-tile-icon.is-moss { border-color: #cbe6d9; }

  .tag.warn { border-color: #e5d6b9; background: #fbf6ec; }
  .tag.brand { border-color: var(--line-strong); }
  .tag.ok { border-color: var(--rule); }

  .slot-card.is-live { background: #eef3fb; }
  .task-check.is-done { background: #e6f2ec; }
  .date-chip.is-active { border-color: var(--line-strong); }

  .scan-chip { border-color: rgba(255, 255, 255, .38); }
  .scan-sheet { border-color: var(--rule); }
  .scan-today-tag { background: rgba(0, 56, 147, .14); }
  .slot-timer { background: rgba(255, 255, 255, .72); }
}

/* 空内容的状态胶囊不占位（如历史记录张数未加载时） */
.pill:empty,
.chip-status:empty {
  display: none;
}

/* 小屏（iPhone SE / 8 等）：收紧扫车牌页，避免结果卡压住取景框 */
@media (max-height: 700px) {
  .scan-sheet {
    padding: 8px 18px calc(var(--safe-bottom) + 14px);
  }

  .scan-sheet-handle {
    margin-bottom: 11px;
  }

  .scan-plate {
    height: 38px;
    padding: 0 10px;
    font-size: 20px;
    letter-spacing: 1.3px;
  }

  .scan-sheet-num strong {
    font-size: 30px;
  }

  .scan-sheet-num em {
    font-size: 18px;
  }

  .scan-sheet-clear,
  .scan-sheet-empty {
    font-size: 19px;
    line-height: 26px;
  }

  .scan-gate {
    margin-top: 11px;
  }

  .scan-notice-btn {
    height: 46px;
    margin-top: 13px;
  }

  .scan-sheet-foot {
    margin-top: 9px;
  }

  .scan-frame {
    top: 22vh;
    height: clamp(132px, 22vh, 200px);
  }

  .scan-hint {
    top: calc(22vh + clamp(132px, 22vh, 200px) + 9px);
  }

  .scan-history {
    margin-bottom: 6px;
  }
}

@media (max-width: 380px) {
  .hdr.is-sub .pill {
    max-width: 96px;
    overflow: hidden;
    white-space: nowrap;
  }
}

/* ==========================================================================
   每日发送（车流 / 月租欠费）
   ========================================================================== */

input[type="number"],
input[type="date"] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-field);
  background: var(--ink-raised);
  color: var(--paper);
  font-size: 16px;
  line-height: 22px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
}

input[type="number"]:focus,
input[type="date"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-a14);
}

.send-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
}

.send-form .field {
  margin-bottom: 8px;
}

.send-form .field.span-2 {
  grid-column: 1 / -1;
}

.send-preview {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--r-card);
  border: 1px solid var(--rule);
  background: var(--ink-raised);
  box-shadow: var(--shadow-card);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 22px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  -webkit-user-select: text;
  user-select: text;
}

.send-preview.is-empty {
  color: var(--clay);
  font-family: var(--font);
}

.send-source {
  padding: 8px 4px 0;
  color: var(--clay);
  font-size: 12px;
  line-height: 18px;
}

@media (max-width: 380px) {
  .send-form {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------- 扫车牌反馈设置 */

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

.feedback-sound {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.feedback-sound.is-on {
  border-color: var(--brand);
  background: var(--surface-alt);
}

.feedback-sound-dot {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
}

.feedback-sound.is-on .feedback-sound-dot {
  border-color: var(--brand);
}

.feedback-sound.is-on .feedback-sound-dot i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.feedback-sound-copy {
  flex: 1;
  min-width: 0;
}

.feedback-sound-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.feedback-sound-copy span {
  display: block;
  margin-top: 2px;
  color: var(--clay);
  font-size: 11px;
  line-height: 15px;
}

.feedback-sound-tag {
  display: none;
}

.feedback-switch {
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-alt);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.feedback-switch i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--clay);
  transition: transform 0.16s ease, background 0.16s ease;
}

.feedback-switch.is-on {
  border-color: var(--brand);
  background: var(--brand);
}

.feedback-switch.is-on i {
  background: #fff;
  transform: translateX(20px);
}
/* 兼容 Chrome 90 等老内核：把 color-mix() 预编译成固定颜色 */
:root {
  --amber-a10: rgba(154, 106, 31, 0.10);
  --amber-a12: rgba(154, 106, 31, 0.12);
  --amber-a14: rgba(154, 106, 31, 0.14);
  --amber-a16: rgba(154, 106, 31, 0.16);
  --amber-a18: rgba(154, 106, 31, 0.18);
  --brand-a12: rgba(0, 56, 147, 0.12);
  --brand-a10: rgba(0, 56, 147, 0.10);
  --brand-a14: rgba(0, 56, 147, 0.14);
  --brand-a16: rgba(0, 56, 147, 0.16);
  --brand-a18: rgba(0, 56, 147, 0.18);
  --brand-a22: rgba(0, 56, 147, 0.22);
  --brand-a24: rgba(0, 56, 147, 0.24);
  --brand-a38: rgba(0, 56, 147, 0.38);
  --brick-a8: rgba(179, 38, 30, 0.08);
  --brick-a10: rgba(179, 38, 30, 0.10);
  --brick-a18: rgba(179, 38, 30, 0.18);
  --brick-a20: rgba(179, 38, 30, 0.20);
  --ink-raised-a72: rgba(255, 255, 255, 0.72);
  --moss-a10: rgba(21, 122, 85, 0.10);
  --moss-a12: rgba(21, 122, 85, 0.12);
  --moss-a18: rgba(21, 122, 85, 0.18);
  --on-brand-a78: rgba(255, 255, 255, 0.78);
  --mix-brand-rule-26: #a6bad7;
  --mix-brand-rule-30: #9eb2d3;
  --mix-soft-raised-55: #f5f8fc;
}

@media (prefers-color-scheme: dark) {
  :root {
    --amber-a10: rgba(224, 179, 106, 0.10);
    --amber-a12: rgba(224, 179, 106, 0.12);
    --amber-a14: rgba(224, 179, 106, 0.14);
    --amber-a16: rgba(224, 179, 106, 0.16);
    --amber-a18: rgba(224, 179, 106, 0.18);
    --brand-a12: rgba(127, 176, 255, 0.12);
    --brand-a10: rgba(127, 176, 255, 0.10);
    --brand-a14: rgba(127, 176, 255, 0.14);
    --brand-a16: rgba(127, 176, 255, 0.16);
    --brand-a18: rgba(127, 176, 255, 0.18);
    --brand-a22: rgba(127, 176, 255, 0.22);
    --brand-a24: rgba(127, 176, 255, 0.24);
    --brand-a38: rgba(127, 176, 255, 0.38);
    --brick-a8: rgba(240, 138, 122, 0.08);
    --brick-a10: rgba(240, 138, 122, 0.10);
    --brick-a18: rgba(240, 138, 122, 0.18);
    --brick-a20: rgba(240, 138, 122, 0.20);
    --ink-raised-a72: rgba(14, 26, 41, 0.72);
    --moss-a10: rgba(79, 209, 160, 0.10);
    --moss-a12: rgba(79, 209, 160, 0.12);
    --moss-a18: rgba(79, 209, 160, 0.18);
    --on-brand-a78: rgba(6, 18, 31, 0.78);
    --mix-brand-rule-26: #385175;
    --mix-brand-rule-30: #3c567c;
    --mix-soft-raised-55: #102032;
  }
}

.scan-link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

/* ==================== 车辆进出场记录 ==================== */

.carlog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.carlog-item {
  position: relative;
  border-radius: var(--r-card);
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.carlog-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.carlog-plate {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--ink);
}

.carlog-badge {
  font-size: 11px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

.carlog-badge.is-in {
  background: color-mix(in srgb, var(--amber) 16%, transparent);
  color: var(--amber);
}

.carlog-badge.is-out {
  background: color-mix(in srgb, var(--clay) 18%, transparent);
  color: var(--clay);
}

.carlog-badge.is-type {
  background: color-mix(in srgb, var(--moss) 14%, transparent);
  color: var(--moss);
}

.carlog-times {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  font-size: 12.5px;
  color: var(--clay);
}

.carlog-times b {
  font-weight: 500;
  color: var(--clay);
  font-size: 11.5px;
}

.carlog-times span {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-size: 12.5px;
}

.carlog-route {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink);
  flex-wrap: wrap;
}

.carlog-route .arrow {
  color: var(--clay);
  font-size: 11px;
}

.carlog-fee {
  font-size: 12px;
  color: var(--clay);
  margin-left: auto;
  white-space: nowrap;
}

.carlog-more {
  width: 100%;
  margin: 4px 0 8px;
}

.carlog-sync-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  background: var(--clay);
}

.carlog-sync-dot.is-live {
  background: var(--moss);
  animation: carlogPulse 2s ease-in-out infinite;
}

@keyframes carlogPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
  .carlog-sync-dot.is-live { animation: none; }
}
/* ==========================================================================
   逃费视频 · 复核工作台
   结构：统计 → 搜索/筛选 → 复核状态 → 片段列表 → 打包/自动检测
   播放与判定收进底部抽屉，列表始终是第一屏主角。
   ========================================================================== */

.ev-view {
  --ev-card: var(--ink-raised);
  --ev-line: var(--rule);
}

.ev-scroll {
  padding-bottom: 14px;
}

/* 页头状态：不再套全局 .status（那会把 hdr-sub 的字号覆盖掉） */
.ev-status.is-ok { color: var(--moss); }
.ev-status.is-err { color: var(--brick); }
.ev-status.is-busy { color: var(--amber); }

/* ---------- 顶部三项统计 ---------- */

.ev-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.ev-kpi {
  min-width: 0;
  padding: 11px 12px 9px;
  border-radius: 14px;
  background: var(--ev-card);
  border: 1px solid var(--ev-line);
  box-shadow: var(--shadow-card);
}

.ev-kpi > span {
  display: block;
  font-size: 10.5px;
  line-height: 15px;
  letter-spacing: .08em;
  color: var(--clay);
}

.ev-kpi strong {
  display: inline-block;
  margin-top: 2px;
  font-size: 21px;
  line-height: 25px;
  font-weight: 700;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.ev-kpi em {
  margin-left: 2px;
  font-style: normal;
  font-size: 10.5px;
  color: var(--clay);
}

.ev-kpi.is-warn strong { color: var(--amber); }
.ev-kpi.is-warn.is-clear strong { color: var(--moss); }
.ev-kpi.is-money strong {
  font-size: 19px;
  color: var(--brick);
}

/* ---------- 搜索 / 筛选 / 排序 ---------- */

.ev-toolbar {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.ev-search {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 8px 0 12px;
  border-radius: 13px;
  background: var(--ev-card);
  border: 1px solid var(--ev-line);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.ev-search:focus-within {
  border-color: rgba(0, 56, 147, .34);
  box-shadow: 0 0 0 3px rgba(0, 56, 147, .07);
}

.ev-search-icon {
  flex: none;
  width: 17px;
  height: 17px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C7D92' stroke-width='1.8'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16.5 16.5L21 21'/%3E%3C/svg%3E") center / 17px no-repeat;
}

.ev-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--paper);
}

.ev-search input::-webkit-search-cancel-button { display: none; }

.ev-search-clear {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--film);
  color: var(--clay);
  font-size: 15px;
  line-height: 1;
}

.ev-tool-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 12px;
  border-radius: 13px;
  background: var(--ev-card);
  border: 1px solid var(--ev-line);
  color: var(--paper-dim);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ev-tool-btn svg {
  width: 16px;
  height: 16px;
  opacity: .8;
}

.ev-tool-btn.is-on {
  border-color: rgba(0, 56, 147, .28);
  background: var(--brand-soft);
  color: var(--brand);
}

.ev-tool-btn em {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* ---------- 生效条件 ---------- */

.ev-active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 11px;
  background: var(--brand-soft);
  border: 1px solid rgba(0, 56, 147, .12);
  color: var(--brand);
  font-size: 11.5px;
  line-height: 16px;
}

.ev-af-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ev-af-clear {
  flex: none;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 650;
}

/* ---------- 复核状态 ---------- */

.ev-review-strip {
  margin-top: 2px;
}

.ev-review-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.ev-review-tabs::-webkit-scrollbar { height: 0; }

.ev-review-tabs .chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ev-review-tabs .chip b {
  font-weight: 650;
  font-size: 10.5px;
  opacity: .72;
  font-variant-numeric: tabular-nums;
}

.ev-review-tabs .chip.is-active b { opacity: .92; }

/* ---------- 列表头 ---------- */

.ev-listhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.ev-listhead-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.ev-listhead-title strong {
  font-size: 13px;
  letter-spacing: .02em;
}

.ev-listhead-title span {
  font-size: 11px;
  color: var(--clay);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-listhead-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.ev-linkbtn {
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ev-linkbtn:active { background: var(--brand-soft); }

.ev-linkbtn.is-strong {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
}

.ev-linkbtn.is-strong.is-on {
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(0, 56, 147, .24);
}

/* ---------- 片段列表 ---------- */

.ev-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ev-card {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 76px;
  border-radius: 15px;
  background: var(--ev-card);
  border: 1px solid var(--ev-line);
  overflow: hidden;
  /* 长按是多选手势：不许弹系统菜单、不许选中文字，否则按到 420ms 就被截胡 */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}

.ev-card:active { transform: scale(.993); }

.ev-card.is-active {
  border-color: rgba(0, 56, 147, .38);
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.ev-card-hit {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 8px 10px 11px;
  text-align: left;
  /* 只放行纵向滚动：横向手势与双指缩放不参与，点击不用等 300ms */
  touch-action: pan-y;
}

.ev-card.is-active .ev-card-hit { padding-left: 14px; }

.ev-thumb {
  position: relative;
  flex: none;
  width: 92px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #0a1f33 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234C8DFF' stroke-width='1.6'%3E%3Cpath d='M15 10l4.5-2.5v9L15 14M5 7.5h9.5A1.5 1.5 0 0 1 16 9v6a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 15V9A1.5 1.5 0 0 1 5 7.5z'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.ev-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 长按别把缩略图拖起来，手势要留给卡片 */
  pointer-events: none;
  -webkit-user-drag: none;
}

/* 快照缺失（老记录 / 接口没图）时退回底色 + 摄像机图标，别显示破图 */
.ev-thumb.is-empty img { display: none; }

.ev-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 16, 28, 0) 45%, rgba(6, 16, 28, .55) 100%);
  pointer-events: none;
}

.ev-thumb-dur {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 1;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(6, 16, 28, .72);
  color: #fff;
  font-size: 9.5px;
  line-height: 15px;
  font-variant-numeric: tabular-nums;
}

.ev-thumb-gap {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 1;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(179, 38, 30, .86);
  color: #fff;
  font-size: 9.5px;
  line-height: 15px;
}

.ev-card-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ev-card-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.ev-plate {
  min-width: 0;
  flex: 0 1 auto;
  font-size: 14.5px;
  line-height: 19px;
  font-weight: 700;
  letter-spacing: .045em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-card.is-active .ev-plate { color: var(--brand-deep); }

.ev-amount {
  flex: none;
  margin-left: auto;
  font-size: 14.5px;
  line-height: 19px;
  font-weight: 700;
  color: var(--brick);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ev-amount.is-none {
  color: var(--clay);
  font-weight: 600;
  font-size: 11px;
}

.ev-card-sub {
  font-size: 11.5px;
  line-height: 16px;
  color: var(--clay);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-card-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-height: 16px;
}

.ev-tag {
  padding: 0 6px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 15px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.ev-tag.is-todo {
  color: var(--clay);
  background: rgba(108, 125, 146, .1);
  border-color: rgba(108, 125, 146, .18);
}

.ev-tag.is-ok {
  color: var(--moss);
  background: rgba(21, 122, 85, .1);
  border-color: rgba(21, 122, 85, .22);
}

.ev-tag.is-bad {
  color: var(--brick);
  background: rgba(179, 38, 30, .1);
  border-color: rgba(179, 38, 30, .22);
}

.ev-tag.is-unsure {
  color: var(--amber);
  background: rgba(154, 106, 31, .12);
  border-color: rgba(154, 106, 31, .24);
}

.ev-tag.is-gap {
  color: var(--brick);
  background: rgba(179, 38, 30, .08);
  border-color: rgba(179, 38, 30, .18);
}

.ev-tag.is-old,
.ev-tag.is-noamount {
  color: var(--clay);
  background: rgba(108, 125, 146, .08);
  border-color: rgba(108, 125, 146, .16);
}

.ev-tag.is-cam {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: rgba(0, 56, 147, .18);
}

.ev-card-dl {
  flex: none;
  width: 44px;
  display: grid;
  place-items: center;
  color: var(--clay);
  border-left: 1px solid var(--ev-line);
}

.ev-card-dl:active { background: var(--film); }

.ev-card-dl svg {
  width: 17px;
  height: 17px;
}

.ev-pick-tick {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .9);
  background: rgba(6, 16, 28, .38);
  display: none;
}

.ev-list.is-picking .ev-pick-tick { display: block; }

.ev-pick-tick.is-on {
  background: var(--brand);
  border-color: #fff;
}

.ev-pick-tick.is-on::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: 1.5px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(42deg);
}

.ev-card.is-picked {
  border-color: rgba(0, 56, 147, .4);
}

.ev-card.is-picked .ev-card-hit {
  background: rgba(0, 56, 147, .035);
}

/* ---------- 空态 ---------- */

.ev-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 34px 18px;
  text-align: center;
  color: var(--clay);
}

.ev-empty[hidden] { display: none !important; }

.ev-empty-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--film) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C7D92' stroke-width='1.6'%3E%3Cpath d='M15 10l4.5-2.5v9L15 14M5 7.5h9.5A1.5 1.5 0 0 1 16 9v6a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 15V9A1.5 1.5 0 0 1 5 7.5z'/%3E%3C/svg%3E") center / 22px no-repeat;
}

.ev-empty strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--paper-dim);
}

.ev-empty span:last-child {
  font-size: 11.5px;
  line-height: 17px;
}

.ev-pager { margin-top: 2px; }

/* ---------- 按筛选打包 ---------- */

.ev-export {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ev-card);
  border: 1px solid var(--ev-line);
}

.ev-export-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003893' stroke-width='1.7'%3E%3Cpath d='M12 4v10'/%3E%3Cpath d='M8 10.5L12 14.5l4-4'/%3E%3Cpath d='M5 18.5h14'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.ev-export-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ev-export-copy strong {
  font-size: 12.5px;
  font-weight: 650;
}

.ev-export-copy span {
  font-size: 11px;
  line-height: 15px;
  color: var(--clay);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ev-solid-btn {
  flex: none;
  height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
}

.ev-solid-btn:active { transform: scale(.97); }

.ev-solid-btn:disabled {
  opacity: .42;
  transform: none;
}

.ev-ghost-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid var(--ev-line);
  background: transparent;
  color: var(--paper-dim);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 自动检测 ---------- */

.ev-auto {
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--ev-card);
  border: 1px solid var(--ev-line);
  display: grid;
  gap: 6px;
}

.ev-auto-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ev-auto-head strong { font-size: 12.5px; }

.ev-auto-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 3px rgba(21, 122, 85, .12);
}

.ev-auto-dot.is-off {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(154, 106, 31, .14);
}

.ev-auto-time {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
}

.ev-auto-hint {
  font-size: 11px;
  line-height: 17px;
  color: var(--clay);
}

.ev-auto .ev-ghost-btn {
  justify-self: start;
  height: 32px;
  margin-top: 2px;
  font-size: 11.5px;
}

/* ---------- 选择模式底部条 ---------- */

.ev-pickbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px var(--pad) calc(var(--safe-bottom) + 9px);
  background: var(--ink-raised);
  border-top: 1px solid var(--rule);
  box-shadow: 0 -6px 20px rgba(10, 31, 51, .08);
  animation: evPickIn .18s ease both;
}

.ev-pickbar[hidden] { display: none !important; }

@keyframes evPickIn {
  from { transform: translateY(10px); opacity: .4; }
  to { transform: none; opacity: 1; }
}

.ev-pickbar-info {
  flex: 1 1 auto;
  min-width: 0;
}

.ev-pickbar-info strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-pickbar-sub {
  display: flex;
  gap: 12px;
  margin-top: 1px;
}

.ev-pickbar-sub button {
  padding: 0;
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
}

/* ---------- 弹层骨架 ---------- */

.ev-sheet {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ev-sheet[hidden] { display: none !important; }

.ev-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 15, 26, .52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: evFade .18s ease both;
}

@keyframes evFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ev-sheet-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 0 0;
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  border-bottom: 0;
  box-shadow: var(--shadow-sheet);
  animation: evSheetUp .24s cubic-bezier(.22, .68, .36, 1) both;
}

@keyframes evSheetUp {
  from { transform: translateY(26px); opacity: .55; }
  to { transform: none; opacity: 1; }
}

.ev-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--rule);
}

.ev-sheet-head strong { font-size: 16px; }

.ev-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 18px 4px;
  scrollbar-width: none;
}

.ev-sheet-body::-webkit-scrollbar { display: none; }

.ev-filter-group {
  padding: 13px 0;
  border-bottom: 1px dashed var(--rule);
}

.ev-filter-group:last-child { border-bottom: 0; }

.ev-filter-group h4 {
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .05em;
  color: var(--clay);
}

/* 日期可能攒到二三十天，横着滑一行就够，别把整个面板顶下去 */
.ev-day-row {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.ev-day-row::-webkit-scrollbar { display: none; }

.ev-day-row .chip { flex: none; }

.ev-sheet-foot {
  display: flex;
  gap: 10px;
  padding: 12px 18px calc(var(--safe-bottom) + 14px);
  border-top: 1px solid var(--rule);
}

.ev-sheet-foot > * { flex: 1 1 0; }

/* ---------- 播放抽屉 ---------- */

.ev-drawer-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 8px 18px calc(var(--safe-bottom) + 16px);
  border-radius: 22px 22px 0 0;
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  border-bottom: 0;
  box-shadow: var(--shadow-sheet);
  animation: evSheetUp .24s cubic-bezier(.22, .68, .36, 1) both;
  scrollbar-width: none;
}

.ev-drawer-card::-webkit-scrollbar { display: none; }

.ev-drawer-grip {
  display: block;
  width: 38px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: var(--line-strong);
  opacity: .7;
}

.ev-drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
}

.ev-drawer-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ev-drawer-index {
  font-size: 10px;
  line-height: 14px;
  letter-spacing: .1em;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
}

.ev-drawer-title strong {
  font-size: 18px;
  line-height: 24px;
  letter-spacing: .05em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-drawer-amount {
  margin-left: auto;
  flex: none;
  font-style: normal;
  font-size: 17px;
  font-weight: 700;
  color: var(--brick);
  font-variant-numeric: tabular-nums;
}

.ev-drawer-close {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--film);
  color: var(--clay);
}

.ev-drawer-close svg { width: 16px; height: 16px; }

.ev-drawer-stage {
  position: relative;
  border-radius: 13px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.ev-player {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* 双机位切换：只有这单真有「功能抓拍」时才显示 */
.ev-cam-switch {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding: 3px;
  border-radius: 11px;
  background: var(--film);
  border: 1px solid var(--rule);
}

.ev-cam-switch[hidden] { display: none !important; }

.ev-cam-btn {
  flex: 1 1 0;
  height: 30px;
  border-radius: 8px;
  color: var(--clay);
  font-size: 11.5px;
  font-weight: 600;
}

.ev-cam-btn.is-active {
  background: var(--ink-raised);
  color: var(--brand);
  box-shadow: 0 1px 3px rgba(10, 31, 51, .14);
}

.ev-drawer-meta {
  margin: 7px 2px 0;
  font-size: 11.5px;
  line-height: 17px;
  color: var(--clay);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-drawer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.ev-nav-btn {
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--rule);
  background: var(--film);
  color: var(--paper-dim);
  font-size: 12.5px;
  font-weight: 600;
}

.ev-nav-btn:disabled {
  opacity: .34;
  cursor: default;
}

/* ---------- 复核台 ---------- */

.ev-review-desk {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 13px 14px 14px;
  border-radius: 16px;
  background: var(--film);
  border: 1px solid var(--rule);
}

.ev-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ev-review-title {
  font-size: 13px;
  font-weight: 650;
}

.ev-review-saved {
  font-size: 11px;
  color: var(--clay);
}

.ev-review-saved.is-err { color: var(--brick); }

.ev-review-btns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ev-verdict {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--ink-raised);
  color: var(--paper-dim);
  font-size: 13px;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}

.ev-verdict:active { transform: scale(.975); }

.ev-verdict i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--film);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.ev-verdict.is-ok.is-active {
  background: var(--moss);
  border-color: var(--moss);
  color: #fff;
}

.ev-verdict.is-ok.is-active i {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.ev-verdict.is-bad.is-active {
  background: var(--brick);
  border-color: var(--brick);
  color: #fff;
}

.ev-verdict.is-bad.is-active i {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.ev-verdict.is-unsure.is-active {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
}

.ev-verdict.is-unsure.is-active i {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.ev-review-note,
.ev-review-name {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 9px 11px;
  background: var(--ink-raised);
  color: var(--paper);
  font-size: 13px;
  outline: 0;
}

.ev-review-note:focus,
.ev-review-name:focus {
  border-color: rgba(0, 56, 147, .34);
  box-shadow: 0 0 0 3px rgba(0, 56, 147, .06);
}

.ev-review-note::placeholder,
.ev-review-name::placeholder { color: var(--clay); opacity: .8; }

.ev-review-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ev-review-desk .ev-review-name {
  width: 112px;
  flex: none;
  font-size: 12px;
  padding: 7px 10px;
}

.ev-verdict-clear {
  flex: none;
  padding: 2px 0;
  color: var(--clay);
  font-size: 11.5px;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ev-review-next {
  flex: none;
  margin-left: auto;
  font-size: 10.5px;
  color: var(--clay);
  white-space: nowrap;
}

/* ---------- 兼容旧类名（车辆详情弹层仍会用到） ---------- */

.video-player {
  width: 100%;
  margin-top: 12px;
  border-radius: 10px;
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.video-list { margin-top: 10px; }

.video-item {
  cursor: pointer;
  transition: background .15s ease;
}

.video-item.is-active {
  background: rgba(255, 176, 32, .12);
  border-radius: 8px;
}

/* ---------- 窄屏收敛 ---------- */

@media (max-width: 380px) {
  .ev-thumb {
    width: 78px;
    height: 48px;
  }
  .ev-card-hit { gap: 9px; padding-left: 9px; }
  .ev-plate { font-size: 14px; }
  .ev-review-next { display: none; }
  /* 360 宽的手机放不下「时间 · 出口 · 体积」，体积最不重要，先收起来 */
  .ev-sub-size { display: none; }
}

/* ---------- 宽屏：列表两列，抽屉贴右侧 ---------- */

@media (min-width: 1000px) {
  /* 桌面端不要把 3 项统计拉成一米宽：正文收进 1180px 居中 */
  .ev-scroll {
    padding-left: max(18px, calc((100vw - 1180px) / 2));
    padding-right: max(18px, calc((100vw - 1180px) / 2));
  }

  .ev-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 8px;
  }

  .ev-sheet { align-items: center; }

  .ev-sheet-card {
    width: min(560px, 78vw);
    max-height: 84vh;
    border-radius: 20px;
    border-bottom: 1px solid var(--rule);
  }

  .ev-sheet-foot { padding-bottom: 16px; }

  .ev-drawer {
    justify-content: flex-end;
    align-items: flex-start;
    padding: 18px;
  }

  .ev-drawer-card {
    width: min(500px, 46vw);
    max-height: 100%;
    border-radius: 20px;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 16px;
  }

  .ev-drawer-grip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ev-sheet-backdrop,
  .ev-sheet-card,
  .ev-drawer-card,
  .ev-pickbar {
    animation: none !important;
  }
}

/* 待上传列表：每个文件自己的进度（PWA） */
.share-pending .sp-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.share-pending .sp-state {
  flex: none;
  opacity: .75;
  font-variant-numeric: tabular-nums;
}
.share-pending .sp-track {
  display: block;
  height: 4px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.share-pending .sp-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width .2s ease;
}
.share-pending .sp-track.err i { background: var(--brick); width: 100%; }
.share-pending li.err .sp-state { color: var(--brick); opacity: 1; }

/* ==========================================================================
   平台账号闸门（2026-11-24 起）

   每个登录账号各自绑定一套平台账号（阳光停车场 SaaS + 阳光海天 Spider 报表）。
   没绑定之前**没有数据**，也绝不默认任何车场（尤其阳江东汇城）。
   视觉沿用登录门：满屏浅色底 + 实心按钮；圆角 8 / 12 / 16；不用渐变、不发光。
   颜色/形状只取 :root 里的现有令牌（--ink / --ink-raised / --rule / --paper /
   --clay / --brand / --brand-soft / --moss / --brick / --amber / --r-*）。
   ========================================================================== */

.platform-gate {
  /* 压在任务界面（dock z=20）、抽屉（500/520/600）、扫牌页（400）、加载遮罩（700）之上；
     发版强更蒙层（800）仍然在最上面，保证「必须更新」时谁也挡不住。 */
  z-index: 780;
}

.platform-sheet {
  width: min(420px, 100%);
}

.platform-who {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--clay);
}

.platform-form {
  gap: 14px;
  margin-top: 18px;
}

/* 登录门里的主按钮带品牌渐变；这里按「浅色商务、无渐变不发光」的规矩改成实心品牌色 */
.platform-gate .auth-submit {
  margin-top: 18px;
  border: 1px solid var(--brand);
  border-radius: var(--r-btn);
  background: var(--brand);
  color: var(--on-brand);
}

.platform-gate .auth-submit[disabled],
.platform-gate .auth-submit[disabled]:active {
  border-color: var(--rule);
  background: var(--film);
  color: var(--clay);
  transform: none;
}

.platform-gate .auth-secondary {
  margin-top: 8px;
  border-radius: var(--r-btn);
}

.platform-projects {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--ink-raised);
}

.platform-gate select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r-field);
  background: var(--surface-alt);
  color: var(--paper);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  outline: none;
}

.platform-gate select:focus {
  border-color: var(--brand);
}

.platform-hint {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--clay);
}

.platform-projects .platform-hint {
  margin: 0;
}

/* 进度：一条实心进度条 + 每一步的真实 message（周报那一步要导 8 张报表，4~6 分钟） */
.platform-progress {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--ink-raised);
}

.platform-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.platform-progress-head span {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--paper-dim);
}

.platform-progress-head strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
}

.platform-progress-track {
  height: 6px;
  margin-top: 10px;
  border-radius: var(--r-chip);
  background: var(--rule);
  overflow: hidden;
}

.platform-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: var(--r-chip);
  background: var(--brand);
  transition: width 0.3s ease;
}

.platform-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.platform-steps li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.55;
  color: var(--clay);
}

.platform-steps li > i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
}

.platform-steps li.is-running > i { border-color: var(--brand); background: var(--brand); }
.platform-steps li.is-done > i { border-color: var(--moss); background: var(--moss); }
.platform-steps li.is-error > i { border-color: var(--brick); background: var(--brick); }
.platform-steps li.is-error { color: var(--brick); }
.platform-steps li.is-done .platform-step-label { color: var(--paper-dim); }

.platform-step-label {
  font-weight: 600;
  color: var(--paper-dim);
}

.platform-step-msg {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--clay);
  word-break: break-word;
}

/* 车场本地库没开通（409 TENANT_DATA_NOT_READY）的空态条：
   宁可说「还没开通」，也不显示 0 或上一次的旧数据。 */
.tenant-notice {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(10px + var(--safe-top));
  z-index: 300;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 10px 12px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--ink-raised);
  box-shadow: var(--shadow-card);
}

.tenant-notice-bar {
  flex: 0 0 auto;
  width: 4px;
  align-self: stretch;
  border-radius: var(--r-hair);
  background: var(--amber);
}

.tenant-notice strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--paper);
}

.tenant-notice span {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--clay);
}

.tenant-notice button {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0 4px;
  border: 0;
  border-radius: var(--r-hair);
  background: transparent;
  color: var(--clay);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* 平台账号 · 新手指引（2026-11-24 现场要求）
   默认收起；第一次来的人展开就能照着做，不占用表单的注意力。 */
.platform-guide {
  margin: 10px 0 2px;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--ink-raised);
  overflow: hidden;
}

.platform-guide > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
}

.platform-guide > summary::-webkit-details-marker { display: none; }

.platform-guide > summary::after {
  content: "展开";
  margin-left: 10px;
  font-size: 11px;
  font-weight: 400;
  color: var(--clay);
}

.platform-guide[open] > summary { border-bottom: 1px solid var(--rule); }
.platform-guide[open] > summary::after { content: "收起"; }

.platform-guide-lead {
  margin: 10px 12px 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--clay);
}

.platform-guide-steps {
  margin: 10px 12px 0;
  padding-left: 18px;
}

.platform-guide-steps li {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--paper);
}

.platform-guide-steps li strong { font-weight: 600; }

.platform-guide-steps li span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--paper-dim);
}

.platform-guide-faq {
  margin: 10px 12px 0;
}

.platform-guide-faq dt {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--paper);
}

.platform-guide-faq dd {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--paper-dim);
}

.platform-guide-note {
  margin: 10px 0 0;
  padding: 0 12px 12px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--amber);
}
