@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --ink: #15241f;
  --muted: #5f726b;
  --line: rgba(21, 36, 31, 0.1);
  --panel: rgba(255, 255, 255, 0.88);
  --sea: #0c6e5c;
  --sea-deep: #085445;
  --sand: #e9f3ef;
  --warn: #9a5b12;
  --bad: #a61f1a;
  --ok: #0c6e5c;
  --shadow: 0 14px 36px rgba(21, 36, 31, 0.08);
  --radius: 16px;
  --font: "DM Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --sidebar-w: 220px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(820px 360px at 0% -10%, #c7e6db 0%, transparent 55%),
    radial-gradient(640px 300px at 100% 0%, #d5e2ef 0%, transparent 50%),
    linear-gradient(170deg, #f4f8f6 0%, #eef3f0 100%);
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(12, 110, 92, 0.12);
}

/* —— Shell / Sidebar —— */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  background: rgba(16, 32, 28, 0.96);
  color: #d7e8e2;
  border-right: 1px solid rgba(255,255,255,0.06);
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 8px;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #1aa88a, #0c6e5c);
  color: #fff; font-weight: 700; letter-spacing: -.04em;
  box-shadow: 0 8px 18px rgba(12,110,92,.35);
}
.brand h1 {
  margin: 0; font-size: 1.05rem; letter-spacing: -.03em; color: #fff;
}
.brand p {
  margin: 2px 0 0; font-size: .72rem; color: #7f9a91;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  border: 0; border-radius: 11px;
  padding: 10px 12px;
  background: transparent; color: #b7cdc5;
  font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, transform .12s ease;
}
.nav-item:hover {
  background: rgba(255,255,255,.06); color: #fff; transform: none;
}
.nav-item.active {
  background: rgba(26, 168, 138, 0.22);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(125, 222, 196, 0.22);
}
.nav-ico {
  width: 1.4em; text-align: center;
  font-family: var(--mono); font-size: .85rem; opacity: .85;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar .status-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: #9eb5ad; font-size: .8rem;
}
.sidebar-logout {
  width: 100%;
  color: #c5d7d0 !important;
  border-color: rgba(255,255,255,.12) !important;
  background: transparent !important;
}
.sidebar-logout:hover {
  background: rgba(255,255,255,.06) !important;
  color: #fff !important;
  transform: none;
}
.sidebar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.sidebar .dot.ok { background: #7ddec4; }
.sidebar .dot.bad { background: #ff9c96; }
.sidebar .dot.run { background: #6eb6ff; box-shadow: 0 0 0 4px rgba(110,182,255,.15); }

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 36px;
  gap: 14px;
}

.workspace-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.workspace-title {
  display: flex; align-items: flex-start; gap: 10px; min-width: 180px;
}
.workspace-title h2 {
  margin: 0; font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  letter-spacing: -.04em; line-height: 1.1;
}
.panel-desc {
  margin: 4px 0 0; color: var(--muted); font-size: .86rem;
}
.nav-toggle {
  display: none;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); font-size: 1.1rem; cursor: pointer;
  padding: 0;
}
.nav-toggle:hover { background: #fff; transform: none; }

.strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 120px));
  gap: 8px;
}
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 11px; box-shadow: var(--shadow);
}
.stat .k { display: block; font-size: .68rem; color: var(--muted); font-weight: 500; }
.stat .v {
  display: block; margin-top: 2px; font-size: .95rem; font-weight: 700; letter-spacing: -.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.panels { min-width: 0; }
.panel { display: none; }
.panel.active { display: block; animation: panelIn .18s ease; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.nav-backdrop {
  position: fixed; inset: 0; z-index: 25;
  background: rgba(10, 22, 18, 0.4); backdrop-filter: blur(2px);
}
.nav-backdrop[hidden] { display: none !important; }

/* 桌面/手机显隐开关（默认桌面） */
.mobile-only { display: none !important; }
.desktop-only { display: block; }
.m-tabbar { display: none; }

/* —— 登录页 —— */
.login-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    calc(20px + env(safe-area-inset-top, 0px))
    16px
    calc(20px + env(safe-area-inset-bottom, 0px));
}
.login-shell { width: min(420px, 100%); }
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px 20px 18px;
}
.login-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.login-brand .brand-mark {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #1aa88a, #0c6e5c);
  color: #fff; font-weight: 700; letter-spacing: -.04em;
  box-shadow: 0 10px 22px rgba(12,110,92,.32);
}
.login-brand h1 {
  margin: 0; font-size: 1.25rem; letter-spacing: -.03em;
}
.login-brand p {
  margin: 3px 0 0; color: var(--muted); font-size: .8rem;
}
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
  font-size: 1rem;
}
.login-msg {
  margin: 0; min-height: 1.2em;
  font-size: .84rem; color: var(--muted);
  font-family: var(--mono);
}
.login-msg.ok { color: var(--ok); }
.login-msg.bad { color: var(--bad); }
.login-foot-block {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
}
.login-foot {
  margin: 0;
  color: var(--muted); font-size: .76rem; line-height: 1.45;
}

/* —— Cards / forms —— */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 16px 14px;
}
.card-fill {
  display: flex; flex-direction: column;
  min-height: calc(100vh - 150px);
}
.fleet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -4px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.fleet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.fleet-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.55);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: .86rem;
  cursor: pointer;
  text-align: left;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.fleet-tab em {
  font-style: normal;
  font-weight: 500;
  font-size: .7rem;
  color: var(--muted);
  font-family: var(--mono);
}
.fleet-tab:hover { border-color: rgba(12,110,92,.35); background: #fff; }
.fleet-tab.active {
  background: var(--sea);
  border-color: var(--sea);
  color: #fff;
}
.fleet-tab.active em { color: rgba(255,255,255,.78); }
.fleet-bar-actions { display: flex; gap: 6px; flex-shrink: 0; }
.fleet-bar-actions .bad { color: var(--bad); }

.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.card-head h3 { margin: 0; font-size: 1rem; letter-spacing: -.02em; }
.head-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}
.sub-inline { color: var(--muted); font-size: .8rem; }
.sub { color: var(--muted); font-size: .86rem; }

/* 任务控制分区 */
.mission-config { display: flex; flex-direction: column; gap: 0; }
.fields.stack { margin-top: 10px; }
.mission-preview { margin-top: 4px; }
.stock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}
.stock-bar-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.stock-bar .section-label { margin: 0; }
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--mono);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}
.stock-pill.ok {
  color: var(--ok);
  border-color: rgba(12,110,92,.28);
  background: rgba(12,110,92,.08);
}
.stock-pill.bad {
  color: var(--bad);
  border-color: rgba(166,31,26,.25);
  background: #fff8f7;
}
.stock-pill.dim { opacity: .55; font-weight: 600; }
.stock-pill.warn {
  color: var(--warn);
  border-color: rgba(154,91,18,.28);
  background: #fffaf2;
}
.section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.mission-life,
.mission-run {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.mission-life .actions.primary,
.mission-run .actions.secondary { margin-top: 8px; }
.mission-job {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mission-job .job { margin-top: 0; }
.mission-job .mode-hint { margin: 0; line-height: 1.4; }
.fold-note { margin: 8px 0 4px; }

/* 收货地址 */
.addr-samples {
  border: 1px solid var(--line);
  background: #f7faf8;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: .82rem;
  line-height: 1.45;
  max-height: 220px;
  overflow: auto;
  color: var(--ink);
}
.addr-sample-row + .addr-sample-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
#panel-address select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  font: inherit;
}
#panel-address textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  resize: vertical;
  font: inherit;
  background: #fff;
}
#panel-address textarea.mono { font-family: var(--mono); font-size: .82rem; }

/* mac 组合表 */
.mac-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.coupon-allow {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.coupon-allow[hidden] { display: none !important; }
.coupon-allow-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 8px;
}
.coupon-allow-head .section-label { margin: 0; margin-right: auto; }
.coupon-allow-head .sub-inline { color: var(--muted); font-size: .78rem; }
.coupon-allow-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.coupon-allow-list .empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-size: .84rem;
}
.coupon-allow-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: .84rem;
  cursor: pointer;
  margin: 0;
}
.coupon-allow-item:last-child { border-bottom: 0; }
.coupon-allow-item:hover { background: rgba(12, 110, 92, .04); }
.coupon-allow-item.on {
  background: rgba(12, 110, 92, .07);
}
.coupon-allow-item.off {
  opacity: .48;
}
.coupon-allow-item input {
  width: 15px;
  height: 15px;
  margin: 0;
  flex: none;
}
.coupon-allow-item .nm {
  min-width: 0;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coupon-allow-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: flex-end;
  max-width: 46%;
}
.coupon-allow-tags .tag {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.4;
  background: rgba(21, 36, 31, .06);
  color: var(--muted);
  white-space: nowrap;
}
.coupon-allow-tags .tag.ok {
  background: rgba(12, 110, 92, .12);
  color: var(--sea-deep);
}
.coupon-allow-tags .tag.bad {
  background: rgba(166, 31, 26, .08);
  color: var(--bad);
}
.coupon-allow-hint { margin: 8px 0 0; }
.mac-note { margin: 0; }
.mac-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-top: 8px;
}
.mac-intro .job { margin-top: 8px; }
.mac-list .section-label { margin-bottom: 8px; }
.mac-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mac-card-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mac-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mac-ops button {
  padding: 2px 8px;
  font-size: .72rem;
}
.mac-cards {
  flex-direction: column;
  gap: 8px;
}
.mac-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mac-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.mac-card-goods {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: -.02em;
}
.mac-card-amt {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.mac-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: .78rem;
  color: var(--muted);
}
.mac-card-row b {
  color: var(--ink);
  font-weight: 650;
  font-family: var(--mono);
}
.mac-card-mac {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.35;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(21, 36, 31, .04);
}
.mac-cards .empty {
  text-align: center;
  padding: 28px 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-size: .86rem;
}

.goods-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 720px) {
  .goods-preview { grid-template-columns: 1fr; }
}
.preview-card {
  display: flex; gap: 12px; align-items: stretch;
  border: 1px solid var(--line); background: #fff;
  border-radius: 14px; padding: 10px 12px;
  min-height: 84px;
}
.preview-card.off { opacity: .45; }
.preview-card.err { border-color: rgba(166,31,26,.28); background: #fff8f7; }
.preview-img.wrap {
  width: 64px; height: 64px; flex: 0 0 64px;
  border-radius: 10px; overflow: hidden;
  background: rgba(21,36,31,.05);
  display: grid; place-items: center;
}
.preview-img.wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.preview-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.preview-k { font-size: .68rem; color: var(--muted); font-weight: 600; }
.preview-name {
  font-size: .9rem; font-weight: 650; letter-spacing: -.02em;
  line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.preview-meta {
  margin-top: auto; font-size: .75rem; color: var(--muted); font-family: var(--mono);
}
.preview-meta .ok { color: var(--ok); font-weight: 650; }
.preview-meta .bad { color: var(--bad); font-weight: 650; }

.fields { display: flex; flex-wrap: wrap; gap: 10px; }
.fields.compact { margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.field.grow { flex: 1 1 180px; }
.field.narrow { flex: 0 0 110px; }
.field span { font-size: .74rem; color: var(--muted); font-weight: 500; }
.field .hint {
  font-style: normal; font-size: .76rem; color: var(--muted); min-height: 1.1em;
}
.chk {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .84rem; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none;
}
.chk input { width: auto; margin: 0; }
.field.disabled input { opacity: .45; background: rgba(21,36,31,.04); }
.field.cached input {
  opacity: 1;
  background: rgba(12,110,92,.06);
  border-color: rgba(12,110,92,.35);
  cursor: not-allowed;
}
.field .hint.ok { color: var(--sea); }
.field .hint.warn { color: #b58100; }

input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 9px 11px; font: inherit; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(12,110,92,.45); box-shadow: 0 0 0 3px rgba(12,110,92,.11);
}
.mono { font-family: var(--mono); font-size: .82rem; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.actions.primary { margin-top: 14px; }
.actions.secondary { margin-top: 8px; }
button {
  border: 0; border-radius: 11px; padding: 10px 14px; font: inherit; font-weight: 600;
  background: var(--sea); color: #fff; cursor: pointer;
  transition: transform .12s ease, background .12s ease, opacity .12s ease;
}
button:hover { background: var(--sea-deep); transform: translateY(-1px); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
button.ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
button.ghost:hover { background: rgba(21,36,31,.04); }
button.bad { color: var(--bad); border-color: rgba(166,31,26,.28); }
button.bad:not(.ghost) { background: var(--bad); color: #fff; border: 0; }
button.sm { padding: 7px 11px; font-size: .84rem; border-radius: 9px; }

.job {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: var(--sand); color: var(--muted); font-size: .82rem; font-family: var(--mono);
  border: 1px solid transparent;
  line-height: 1.4;
  font-weight: 500;
}
.job.soft { background: rgba(21,36,31,.04); }
.coupon-sync-progress {
  margin: 0.45rem 0 0.65rem;
  display: grid;
  gap: 0.35rem;
}
.coupon-sync-progress[hidden] { display: none !important; }
.coupon-sync-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(21, 36, 31, 0.08);
  overflow: hidden;
}
.coupon-sync-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6f5e, #4aa38a);
  transition: width 0.25s ease;
}
.job.run {
  background: rgba(12,110,92,.08);
  color: var(--sea-deep);
  border-color: rgba(12,110,92,.22);
  font-weight: 650;
}
.job.ok {
  background: rgba(12,110,92,.1);
  color: var(--ok);
  border-color: rgba(12,110,92,.28);
}
.job.bad {
  background: #fff8f7;
  color: var(--bad);
  border-color: rgba(166,31,26,.22);
  font-weight: 650;
}
.job.warn {
  background: rgba(245,180,40,.12);
  color: #8a5a00;
  border-color: rgba(184,120,0,.28);
  font-weight: 650;
}

.fold { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.fold summary {
  cursor: pointer; color: var(--muted); font-size: .86rem; font-weight: 600; user-select: none;
}
.fold summary:hover { color: var(--ink); }
.link {
  color: var(--sea-deep); text-decoration: none; font-size: .82rem; font-weight: 600;
  padding: 6px 8px;
}
.link:hover { text-decoration: underline; }

.panel-note { margin: 0 0 12px; }
.scan-meta-row { margin: -2px 0 10px; }
.fold-actions { margin-top: 10px; }
.event-filter-field { min-width: 110px; margin: 0; }
.event-filter-field span { display: none; }

.acct-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.acct-section:first-of-type,
.acct-import-block {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.acct-ops-block .job { margin-top: 10px; }
.acct-ops-block .acct-toolbar { margin-top: 10px; }
.coupon-result {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(12,110,92,.22);
  border-radius: 12px;
  background: rgba(12,110,92,.05);
  font-size: .82rem;
  line-height: 1.45;
}
.coupon-result[hidden] { display: none !important; }
.coupon-result .cr-title {
  font-weight: 700; font-size: .84rem; margin-bottom: 6px; color: var(--sea-deep);
}
.coupon-result .cr-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px;
}
.coupon-result .cr-chip {
  font-family: var(--mono); font-size: .72rem;
  padding: 3px 8px; border-radius: 999px;
  background: #fff; border: 1px solid rgba(12,110,92,.18); color: var(--ink);
}
.coupon-result .cr-lines {
  max-height: 160px; overflow: auto;
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
}
.coupon-result .cr-lines .ok { color: var(--ok); }
.coupon-result .cr-lines .bad { color: var(--bad); }
.tag.coupon { background: rgba(12,110,92,.1); color: var(--sea-deep); }
.acct-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.acct-list-block .section-label { margin-bottom: 8px; }
.acct-batch-bar { margin-top: 8px; }

.settings-block + .settings-block,
.settings-block + .fold {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.settings-password .section-label { margin-bottom: 10px; }

.stats-block-title {
  font-size: .72rem; color: var(--muted); margin-bottom: 6px; font-weight: 600;
}
.stats-round .k { color: var(--muted); font-size: .72rem; }
.stats-round .d {
  margin-top: 4px; color: var(--muted); font-size: .78rem; font-family: var(--mono);
}
.stats-empty-soft { padding: 4px 0; }

.coupon-rush-stats {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 110, 92, 0.04);
}
.coupon-rush-stats .crs-summary {
  font-size: .82rem;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 8px;
}
.coupon-rush-stats .crs-guns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
}
.coupon-rush-stats .crs-gun {
  font-size: .74rem;
  font-family: var(--mono);
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(12, 110, 92, 0.12);
}
.coupon-rush-stats .crs-gun.done { border-color: rgba(12, 110, 92, 0.35); }
.coupon-rush-stats .crs-gun.warn { border-color: rgba(180, 90, 20, 0.35); }
.gun-card .claim-bar {
  margin: 4px 0 8px;
  font-size: .78rem;
  color: var(--sea-deep);
  font-family: var(--mono);
}

.gun-board {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px;
  margin-top: 8px;
}
.gun-card {
  border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 12px 10px;
}
.gun-card.off { opacity: .55; }
.gun-card .title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 6px;
}
.gun-card .name { font-weight: 700; font-size: .95rem; }
.gun-card .ip { font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.gun-card .meta { font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.phones { display: flex; flex-wrap: wrap; gap: 5px; }
.phone {
  font-family: var(--mono); font-size: .72rem;
  padding: 3px 7px; border-radius: 999px;
  background: var(--sand); color: var(--sea-deep); border: 1px solid rgba(12,110,92,.12);
}
.phone.dim { background: rgba(21,36,31,.05); color: var(--muted); border-color: transparent; }

.scan-board {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px;
  margin-top: 8px;
}
.scan-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 11px;
}
.scan-chip .t { font-weight: 650; font-size: .88rem; }
.scan-chip .d { margin-top: 3px; font-size: .75rem; color: var(--muted); font-family: var(--mono); }
.scan-chip.bad { border-color: rgba(166,31,26,.25); background: #fff8f7; }
.scan-chip.warn { border-color: rgba(154,91,18,.25); background: #fffaf2; }
.scan-chip.ok { border-color: rgba(12,110,92,.25); }
.scan-chip.off { opacity: .55; background: rgba(21,36,31,.03); }
.run-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
}
.run-pill.on { color: var(--ok); border-color: rgba(12,110,92,.28); background: rgba(12,110,92,.06); }
.run-pill.off { color: var(--bad); border-color: rgba(166,31,26,.25); background: rgba(166,31,26,.06); }
.run-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.empty { color: var(--muted); font-size: .88rem; padding: 18px 4px; }

.stats-board { display: flex; flex-direction: column; gap: 12px; }
.stats-hero {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
@media (max-width: 720px) { .stats-hero { grid-template-columns: 1fr 1fr; } }
.stats-hero .box {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.stats-hero .box .k { font-size: .72rem; color: var(--muted); }
.stats-hero .box .v { margin-top: 3px; font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.stats-hero .box .v.ok { color: var(--ok); }
.stats-hero .box .v.bad { color: var(--bad); }
.stats-round {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: .86rem;
}
.stats-round .big { font-weight: 700; font-size: 1.05rem; margin-top: 2px; }
.stats-guns {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px;
}
.stats-gun {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px;
}
.stats-gun .t { font-weight: 650; font-size: .88rem; }
.stats-gun .d { margin-top: 3px; font-size: .75rem; color: var(--muted); font-family: var(--mono); }
.fail-bars { display: flex; flex-direction: column; gap: 6px; }
.fail-row {
  display: grid; grid-template-columns: 110px 1fr 36px; gap: 8px; align-items: center;
  font-size: .8rem;
}
.fail-row .name {
  font-family: var(--mono); color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fail-row .bar {
  height: 8px; border-radius: 999px; background: rgba(21,36,31,.06); overflow: hidden;
}
.fail-row .bar > i {
  display: block; height: 100%; width: var(--w, 0%);
  background: rgba(166,31,26,.55); border-radius: 999px;
}
.fail-row .n { text-align: right; font-family: var(--mono); font-weight: 600; }
.ok-list {
  display: flex; flex-wrap: wrap; gap: 5px; max-height: 72px; overflow: auto;
}
.ok-list .phone { cursor: default; }

.log {
  flex: 1; min-height: 320px; overflow: auto; border-radius: 12px;
  background: #10201c; color: #d7e8e2; padding: 12px 14px;
  font-family: var(--mono); font-size: .76rem; line-height: 1.45;
}
.log.fill { min-height: 0; flex: 1; }
.log .ok { color: #7ddec4; }
.log .bad { color: #ff9c96; }
.log .warn { color: #ffd089; }
.log .dim { color: #7f9a91; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600;
  background: rgba(12,110,92,.12); color: var(--sea-deep);
}
.tag.ok { background: rgba(12,110,92,.14); color: var(--sea-deep); }
.tag.bad { background: rgba(166,31,26,.12); color: var(--bad); }
.tag.warn { background: rgba(154,91,18,.14); color: var(--warn); }
.tag.dim { background: rgba(90,110,100,.10); color: var(--muted); }

.modal-mask {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(10, 22, 18, 0.42); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal-mask[hidden] { display: none !important; }
.modal {
  width: min(520px, 100%); max-height: min(80vh, 640px); overflow: auto;
  background: #f7fbf9; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 18px 18px 14px;
}
.modal h3 { margin: 0 0 4px; font-size: 1.15rem; }
.modal .sub { margin: 0; color: var(--muted); font-size: .88rem; }
.gift-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; }
.gift-item {
  text-align: left; width: 100%; border: 1px solid var(--line); background: #fff;
  border-radius: 12px; padding: 12px 14px; color: var(--ink); font-weight: 500;
}
.gift-item:hover { border-color: rgba(12,110,92,.45); background: var(--sand); }
.gift-item .gid { font-family: var(--mono); font-size: .82rem; color: var(--sea-deep); }
.gift-item .meta { margin-top: 4px; font-size: .8rem; color: var(--muted); font-weight: 400; }
.gift-item.on { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(12,110,92,.12); }
.gift-item.hist { border-style: dashed; background: rgba(21,36,31,.02); }
.gift-item .tag-hist {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  font-size: .68rem; font-weight: 600; color: #8a5a00; background: rgba(245,180,40,.18);
  vertical-align: 1px;
}
.tag-real {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  font-size: .68rem; font-weight: 600; color: #0c6e5c; background: rgba(12,110,92,.12);
}
.center-coupon-block { margin-top: 10px; }
.cpn-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center;
  margin: 10px 0 6px;
}
.cpn-search {
  flex: 1 1 200px; min-width: 160px; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 11px; font: inherit; background: #fff; color: var(--ink);
}
.cpn-search:focus { outline: none; border-color: rgba(12,110,92,.55); }
.cpn-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.cpn-chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 5px 11px; font-size: .8rem; font-weight: 600; cursor: pointer;
}
.cpn-chip:hover { border-color: rgba(12,110,92,.35); color: var(--ink); }
.cpn-chip.on { border-color: var(--sea); background: rgba(12,110,92,.1); color: var(--sea-deep); }
.cpn-toolbar-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.center-coupon-list {
  margin-top: 8px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; max-height: min(58vh, 520px); overflow: auto;
}
.cpn-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cpn-table th {
  position: sticky; top: 0; z-index: 1; background: #f7f6f2; color: var(--muted);
  font-weight: 600; font-size: .76rem; text-align: left; padding: 9px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.cpn-table td { padding: 9px 10px; border-bottom: 1px solid rgba(21,36,31,.06); vertical-align: middle; }
.cpn-table tr:last-child td { border-bottom: 0; }
.cpn-table tr:hover td { background: rgba(12,110,92,.04); }
.cpn-table tr.sel td { background: rgba(12,110,92,.09); }
.cpn-table tr.gone td { opacity: .55; }
.cpn-name { font-weight: 600; color: var(--ink); line-height: 1.35; max-width: 42vw; }
.cpn-amt { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--sea-deep); white-space: nowrap; }
.cpn-thr, .cpn-st { color: var(--muted); white-space: nowrap; font-size: .82rem; }
.cpn-st.ok { color: #0c6e5c; font-weight: 600; }
.cpn-st.bad { color: #a33; }
.cpn-empty { padding: 28px 16px; text-align: center; color: var(--muted); }
@media (max-width: 900px) {
  .cpn-name { max-width: 56vw; }
  .cpn-table .hide-m { display: none; }
  .center-coupon-list { max-height: 50vh; }
}

.file-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px;
  font-size: .84rem; font-weight: 600; background: #fff; color: var(--ink); cursor: pointer;
}
.file-btn:hover { background: rgba(21,36,31,.04); }

.acct-import { margin-top: 2px; }
.acct-paste {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; font: inherit; font-family: var(--mono); font-size: .78rem;
  resize: vertical; min-height: 72px; background: #fff; color: var(--ink);
}
.acct-paste:focus {
  outline: none; border-color: rgba(12,110,92,.45); box-shadow: 0 0 0 3px rgba(12,110,92,.11);
}
.acct-import-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center;
}
.acct-add {
  display: grid; grid-template-columns: 140px 1fr auto; gap: 8px; margin-top: 10px;
}
@media (max-width: 720px) { .acct-add { grid-template-columns: 1fr; } }
.acct-batch-bar {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: space-between;
}
.acct-batch-bar #acctSelMeta {
  font-weight: 650;
  color: var(--sea-deep);
  min-width: 56px;
}
.acct-batch-main {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.acct-more { margin-top: 12px; }
.acct-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; align-items: end;
}
.acct-table-wrap {
  margin-top: 10px; max-height: 420px; overflow: auto;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.acct-table-wrap.tall { max-height: min(62vh, 640px); }
.acct-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 10px;
}
.acct-table {
  width: 100%; border-collapse: collapse; font-size: .82rem;
}
.acct-table th, .acct-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle;
}
.acct-table th {
  position: sticky; top: 0; background: #f3f7f5; color: var(--muted);
  font-size: .72rem; font-weight: 600; z-index: 1;
}
.acct-table tr.off { opacity: .5; }
.acct-table .tok { font-family: var(--mono); font-size: .74rem; color: var(--muted); word-break: break-all; max-width: 220px; }
.tok-copy { cursor: pointer; user-select: none; }
.tok-copy:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.tok-copy:active { opacity: .7; }
.acct-table input[type="checkbox"] { width: auto; margin: 0; }
.acct-table .note-inp {
  width: 100%; min-width: 80px; border: 1px solid transparent; background: transparent;
  border-radius: 6px; padding: 4px 6px; font: inherit; font-size: .78rem;
}
.acct-table .note-inp:focus { border-color: var(--line); background: #fff; }

/* —— 手机端 —— */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform .22s ease;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 35;
    box-shadow: 12px 0 40px rgba(0,0,0,.28);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-toggle { display: grid; place-items: center; flex: 0 0 auto; }
  .nav-backdrop { z-index: 32; }

  .workspace {
    padding:
      calc(10px + env(safe-area-inset-top, 0px))
      12px
      calc(78px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }
  .workspace-top {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: -10px -12px 0;
    padding: 10px 12px 10px;
    background: rgba(244, 248, 246, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    align-items: stretch;
    gap: 10px;
  }
  .workspace-title { min-width: 0; flex: 1; align-items: center; }
  .workspace-title h2 { font-size: 1.2rem; }
  .panel-desc { display: none; }

  .strip {
    display: flex;
    width: 100%;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1px;
  }
  .strip::-webkit-scrollbar { display: none; }
  .strip .stat {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 7px 10px;
    box-shadow: none;
  }
  .stat .k { font-size: .64rem; }
  .stat .v { font-size: .86rem; }

  .m-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 28;
    background: rgba(16, 32, 28, 0.96);
    color: #9eb5ad;
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    backdrop-filter: blur(12px);
  }
  .m-tab {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    border: 0; background: transparent; color: inherit;
    padding: 6px 2px; border-radius: 10px;
    font-size: .66rem; font-weight: 650; letter-spacing: -.01em;
    min-height: 48px; justify-content: center;
  }
  .m-tab:hover { background: transparent; transform: none; color: #fff; }
  .m-tab.active { color: #7ddec4; background: rgba(26,168,138,.14); }
  .m-tab-ico {
    font-family: var(--mono); font-size: .95rem; line-height: 1; opacity: .9;
  }

  .mobile-only { display: block !important; }
  .desktop-only { display: none !important; }

  .card { padding: 14px 12px 12px; border-radius: 14px; }
  .card-fill { min-height: calc(100dvh - 200px); }
  .card-head {
    flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 10px;
  }
  .card-head h3 { font-size: .95rem; }
  .head-actions {
    justify-content: flex-start;
    gap: 6px;
  }
  .head-actions .sub-inline {
    width: 100%;
    order: -1;
  }

  .fields { gap: 8px; }
  .field { min-width: 0; width: 100%; }
  .field.grow, .field.narrow { flex: 1 1 100%; }
  .coupon-allow-item {
    grid-template-columns: 18px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 6px 10px;
  }
  .coupon-allow-item .nm { grid-column: 2; white-space: normal; }
  .coupon-allow-tags {
    grid-column: 2;
    max-width: none;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  input, select, textarea {
    padding: 11px 12px;
    font-size: 16px; /* 避免 iOS 聚焦放大 */
    border-radius: 12px;
  }
  button {
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 12px;
  }
  button.sm { min-height: 40px; padding: 9px 12px; }
  button:hover { transform: none; }

  .mission-life,
  .mission-run {
    margin-top: 12px;
    padding-top: 10px;
  }
  .mission-preview .goods-preview {
    margin-top: 10px;
    gap: 8px;
  }
  .mission-job { margin-top: 12px; gap: 5px; }
  .stock-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .stock-bar #btnRefreshStock { width: 100%; }

  .mac-cards {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
  }
  .mac-intro { margin-bottom: 10px; }
  .panel-note { margin-bottom: 10px; font-size: .8rem; }
  .event-filter-field { min-width: 96px; }
  .event-filter-field span { display: block; }
  .acct-section { margin-top: 10px; padding-top: 10px; }
  .settings-password .fields { gap: 8px; }

  .actions.primary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .actions.primary button { width: 100%; }
  .actions.secondary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .actions.secondary button { width: 100%; justify-content: center; }

  .job {
    font-size: .78rem;
    word-break: break-word;
    line-height: 1.4;
  }

  .gun-board { grid-template-columns: 1fr; }
  .scan-board { grid-template-columns: 1fr 1fr; }
  .stats-guns { grid-template-columns: 1fr; }
  .fail-row { grid-template-columns: 84px 1fr 28px; gap: 6px; font-size: .74rem; }

  .log {
    min-height: 240px;
    font-size: .72rem;
    padding: 10px 11px;
  }

  .modal-mask {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    width: 100%;
    max-height: min(88dvh, 720px);
    border-radius: 18px 18px 0 0;
    padding:
      16px 14px
      calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .acct-batch-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }
  .acct-batch-main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .acct-batch-main button, .acct-batch-main .file-btn { width: 100%; }
  .acct-toolbar { gap: 8px; }
  .acct-toolbar .field.narrow { flex: 1 1 calc(50% - 4px); }
  .acct-toolbar .field.grow { flex: 1 1 100%; }
  .acct-pager {
    justify-content: space-between;
    position: sticky;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    background: rgba(244,248,246,.94);
    backdrop-filter: blur(8px);
    padding: 8px 0;
    margin-top: 8px;
    z-index: 5;
  }

  .acct-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
  }
  .acct-card {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .acct-card.off { opacity: .55; background: #f7f9f8; }
  .acct-card-top {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
  }
  .acct-card-top .left {
    display: flex; align-items: center; gap: 8px; min-width: 0;
  }
  .acct-card-mobile {
    font-family: var(--mono); font-weight: 700; font-size: .92rem;
    letter-spacing: -.02em;
  }
  .acct-card-tok {
    font-family: var(--mono); font-size: .72rem; color: var(--muted);
    word-break: break-all; line-height: 1.35;
  }
  .acct-card-tok.tok-copy { padding: 4px 0; }
  .acct-card-note {
    width: 100%; border: 1px solid var(--line); border-radius: 10px;
    padding: 9px 10px; font: inherit; font-size: 15px; background: #fafcfb;
  }
  .acct-card-actions {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
  }
  .acct-card-actions .chk { font-size: .8rem; }
  .acct-cards .empty {
    text-align: center; padding: 28px 12px;
    border: 1px dashed var(--line); border-radius: 14px; background: #fff;
  }

  .preview-card { padding: 10px; }
  .preview-img.wrap { width: 56px; height: 56px; flex-basis: 56px; }
}

@media (max-width: 720px) {
  .goods-preview { grid-template-columns: 1fr; }
  .stats-hero { grid-template-columns: 1fr 1fr; }
  .acct-add { grid-template-columns: 1fr; }
  .scan-board { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .strip .stat { min-width: 84px; }
  .actions.secondary { grid-template-columns: 1fr; }
  .m-tab { font-size: .62rem; }
}

/* 横屏手机：压缩底栏与顶栏占用 */
@media (max-width: 900px) and (max-height: 480px) and (orientation: landscape) {
  .m-tabbar { padding-top: 2px; padding-bottom: calc(2px + env(safe-area-inset-bottom, 0px)); }
  .m-tab { min-height: 40px; gap: 0; }
  .m-tab span:not(.m-tab-ico) { display: none; }
  .workspace {
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  }
}
