/* ============================================================
   AIOTAGRO 智慧猪场 · 站点样式
   视觉：现场暖土（陶土 + 深棕墨 + 骨白 + 橄榄）
   约束：不引用外部字体/图片/CDN；所有插图用内联 SVG。
   ============================================================ */

:root {
  --ink: #2b211a;
  --ink-soft: #4a3a2e;
  --muted: #7c6a58;
  --line: #e7dccb;
  --line-strong: #d5c5ae;
  --bg: #faf6ef;
  --bg-deep: #f2eadc;
  --card: #fffdf9;
  --brand: #b4552d;
  --brand-deep: #8f3f1d;
  --brand-soft: #f8e7dc;
  --olive: #6b7a4f;
  --olive-soft: #edefe2;
  --gold: #c9a227;
  --warn: #8a5a12;
  --warn-soft: #fbf0dc;
  --radius: 16px;
  --radius-sm: 9px;
  --shadow: 0 2px 4px rgba(43, 33, 26, 0.04), 0 16px 40px rgba(43, 33, 26, 0.07);
  --max: 1100px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC",
    "Noto Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brand-soft); color: var(--brand-deep); }

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

h1, h2, h3, h4 { line-height: 1.3; margin: 0; font-weight: 600; letter-spacing: 0; text-wrap: balance; }
h1 { font-family: var(--serif); font-size: clamp(36px, 4.9vw, 58px); line-height: 1.24; letter-spacing: 0.01em; font-weight: 600; }
h2 { font-family: var(--serif); font-size: clamp(26px, 3.2vw, 38px); line-height: 1.4; letter-spacing: 0.01em; }
h3 { font-size: 17.5px; line-height: 1.55; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, 0.88);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 600; letter-spacing: 0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { height: 32px; width: auto; flex: none; display: block; }
.brand-text { font-size: 15px; letter-spacing: 0.04em; }
.brand-text small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.1em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-soft); font-size: 14.5px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--brand-soft); color: var(--brand-deep); }
.nav a.active { color: var(--brand-deep); font-weight: 600; background: var(--brand-soft); }
.nav-sep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 8px; flex: none; }
.nav-login {
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 6px 14px !important; font-weight: 600; color: var(--ink) !important;
  background: var(--card);
}
.nav-login:hover { border-color: var(--muted); background: var(--card); }
.nav-login.active { border-color: var(--brand); color: var(--brand-deep) !important; }
.nav-cta {
  margin-left: 8px; padding: 7px 14px !important;
  background: var(--brand); color: #fff !important;
  border-radius: 8px; font-weight: 600;
}
.nav-cta:hover { background: var(--brand-deep); color: #fff !important; }

@media (max-width: 860px) {
  .header-inner { height: 60px; gap: 10px; min-width: 0; }
  .brand { flex: none; }
  .nav {
    gap: 0; min-width: 0; flex: 1 1 auto; justify-content: flex-end;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px 9px; font-size: 13px; white-space: nowrap; }
  .brand-text small { display: none; }
}
@media (max-width: 420px) {
  .nav-cta { display: none; }
  .nav-about { display: none; }
  .brand-mark { height: 26px; }
  .nav a { padding: 8px 7px; font-size: 13px; }
  .nav-sep { display: none; }
  .nav-login { padding: 6px 10px !important; margin-left: 4px; }
  .brand-text { font-size: 14px; }
}

/* ---------- hero ---------- */
.hero { padding: 76px 0 64px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% auto auto 46%; width: 560px; height: 560px;
  background: radial-gradient(closest-side, rgba(180, 85, 45, 0.09), transparent 72%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1fr 0.92fr; gap: 54px; align-items: center; position: relative; }
@media (max-width: 940px) {
  .hero { padding: 46px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
}

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-deep); background: var(--brand-soft); border: 1px solid #edd6c8; border-radius: 999px; padding: 5px 13px; }
.hero h1 { margin: 20px 0 20px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-lead { font-size: clamp(16.5px, 1.45vw, 18px); line-height: 1.86; color: var(--ink-soft); max-width: 31em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; }
.hero-facts li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.hero-facts li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); flex: none;
}

/* ---------- 猪历卡片 ---------- */
.pig-card {
  margin: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 20px 22px 18px; box-shadow: var(--shadow);
}
.pig-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pig-tag { font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; color: var(--brand-deep); background: var(--brand-soft); border-radius: 6px; padding: 3px 9px; }
.pig-meta { font-size: 12.5px; color: var(--muted); }
.pig-figure { display: block; width: 100%; height: auto; margin: 2px 0 0; }
.pig-events { list-style: none; margin: 6px 0 0; padding: 0; }
.pig-events li { position: relative; padding: 8px 0 8px 16px; border-top: 1px dashed var(--line); }
.pig-events li::before {
  content: ""; position: absolute; left: 0; top: 15px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--brand);
}
.pig-events .d { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; margin-right: 8px; font-variant-numeric: tabular-nums; }
.pig-events b { font-size: 14.5px; margin-right: 8px; }
.pig-events span { font-size: 13.5px; color: var(--muted); }
.pig-card figcaption { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 10px; font-size: 15px; font-weight: 600; border: 1px solid transparent; cursor: pointer; white-space: nowrap; flex: none; transition: transform .12s ease, background .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(180, 85, 45, .22); }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--ink); border-color: var(--muted); }
.btn-invert { background: #faf6ef; color: var(--brand-deep); }
.btn-invert:hover { background: #fff; color: var(--brand-deep); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-full { width: 100%; margin-top: 22px; }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ---------- sections ---------- */
.section { padding: 76px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 34em; margin-bottom: 34px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 16px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.split--center { align-items: center; }
.split-pigline { grid-template-columns: 0.85fr 1.15fr; }
@media (max-width: 860px) { .split, .split-pigline { grid-template-columns: 1fr; gap: 30px; } }
.sticky-copy h2 { margin: 18px 0 16px; }
.sticky-copy .muted { font-size: 15px; }
.aside-note {
  margin-top: 22px; padding: 14px 16px; font-size: 13.5px; color: var(--ink-soft);
  background: var(--bg-deep); border-left: 2px solid var(--brand); border-radius: 0 10px 10px 0;
}

/* ---------- 猪历时间轴 ---------- */
.pigline { list-style: none; margin: 0; padding: 0; position: relative; }
.pigline::before {
  content: ""; position: absolute; left: 80px; top: 14px; bottom: 20px;
  width: 2px; background: var(--line-strong);
}
.pigline li { position: relative; padding: 0 0 24px 108px; }
.pigline li:last-child { padding-bottom: 0; }
.pigline li::before {
  content: ""; position: absolute; left: 74px; top: 7px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--bg); border: 3px solid var(--brand); box-sizing: border-box;
}
.pigline .d { position: absolute; left: 0; top: 4px; width: 62px; text-align: right; font-size: 12.5px; color: var(--muted); letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.pigline b { display: block; font-size: 16px; line-height: 1.6; }
.pigline p { font-size: 14.5px; color: var(--muted); line-height: 1.75; margin-top: 2px; }
@media (max-width: 520px) {
  .pigline::before { left: 66px; }
  .pigline li { padding-left: 92px; }
  .pigline li::before { left: 60px; }
  .pigline .d { width: 50px; font-size: 11.5px; }
}

/* ---------- 深色带 ---------- */
.band { background: #2b211a; color: #f3ebdd; padding: 84px 0 74px; }
.band-head { max-width: 34em; }
.band-head h2 { color: #fbf4e9; margin: 18px 0 14px; }
.band-head p { color: #c9b9a5; font-size: 16px; }
.eyebrow-dark { background: transparent; border-color: rgba(232, 223, 208, .3); color: #e0cfb6; }
.band-points {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  border-top: 1px solid rgba(232, 223, 208, .16); padding-top: 34px;
}
.band-points b { font-family: var(--serif); font-size: 13px; letter-spacing: 0.14em; color: var(--gold); }
.band-points h3 { color: #f3ebdd; margin: 8px 0 6px; }
.band-points p { font-size: 15px; line-height: 1.85; color: #b9a894; }
@media (max-width: 780px) { .band-points { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- 插图 ---------- */
.fig { display: block; width: 100%; height: auto; }
.nb { white-space: nowrap; }
.fig text { font-family: var(--sans); }
.fig .f-title { font-family: var(--serif); font-size: 18px; font-weight: 600; fill: var(--ink); }
.fig .f-sub { font-size: 12px; fill: var(--muted); }
.fig .f-k { font-size: 11px; fill: var(--muted); letter-spacing: 0.06em; }
.fig .f-v { font-family: var(--serif); font-size: 26px; font-weight: 600; fill: var(--ink); }
.fig .f-u { font-size: 11.5px; fill: var(--brand); }
.fig .f-pill { font-size: 11px; fill: var(--brand-deep); }
.fig .f-week { font-size: 11.5px; fill: var(--muted); }
.fig .f-node { font-size: 14px; font-weight: 600; fill: #f3ebdd; }
.fig .f-node-sub { font-size: 11.5px; fill: #bfae9a; }

.flow { margin: 38px 0 44px; }
.fig-wrap { margin: 0; text-wrap: pretty; }
.fig-wrap figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); }
.fig-note { margin-top: 34px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.devices { margin: 4px auto 30px; max-width: 720px; }

/* ---------- 手机 mock ---------- */
.device {
  width: min(370px, 100%); margin-inline: auto; background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 28px;
  box-shadow: var(--shadow); padding: 14px;
}
.device-bar { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 12px; color: var(--muted); font-size: 12px; }
.device-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--olive); display: inline-block; }
.offline-banner { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; background: var(--warn-soft); border: 1px solid #eddbb8; color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.panel { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fffefb; }
.panel + .panel { margin-top: 10px; }
.panel-label { font-size: 11.5px; color: var(--muted); letter-spacing: .08em; }
.panel-value { font-size: 15px; font-weight: 600; margin-top: 2px; letter-spacing: .02em; }
.field-row { display: flex; gap: 10px; margin-top: 10px; }
.field { flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.field span { display: block; font-size: 11px; color: var(--muted); }
.field b { font-size: 14px; font-weight: 600; }
.device-submit {
  margin-top: 12px; height: 46px; border-radius: 10px; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 600;
}
.device-note { margin-top: 10px; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- 步骤 ---------- */
.steps { list-style: none; counter-reset: s; margin: 26px 0 0; padding: 0; display: grid; gap: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 14px; }
.steps li::before {
  content: "0" counter(s); font-family: var(--serif); font-size: 13px;
  letter-spacing: .06em; color: var(--brand); padding-top: 3px;
  grid-column: 1; grid-row: 1 / span 2;
}
.steps b { grid-column: 2; grid-row: 1; font-size: 16px; }
.steps p { grid-column: 2; grid-row: 2; font-size: 14.5px; color: var(--muted); margin-top: 3px; line-height: 1.8; }

/* ---------- 报表注脚 ---------- */
.report-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.report-notes div { border-left: 2px solid var(--line-strong); padding-left: 15px; }
.report-notes b { display: block; font-size: 15.5px; }
.report-notes span { font-size: 14px; color: var(--muted); line-height: 1.75; }
@media (max-width: 780px) { .report-notes { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 780px) { .metrics { grid-template-columns: 1fr; } }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.metric b { display: block; font-family: var(--serif); font-size: 32px; line-height: 1.2; color: var(--brand-deep); }
.metric span { display: block; font-size: 14px; color: var(--muted); margin-top: 6px; }
.metric em { font-style: normal; font-size: 11px; letter-spacing: .08em; color: var(--brand); background: var(--brand-soft); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 940px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.card h3 { display: flex; align-items: center; gap: 10px; }
.card p { color: var(--muted); font-size: 15.5px; line-height: 1.8; }
.icon {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft);
  display: grid; place-items: center; color: var(--brand-deep); flex: none;
}
.icon svg { width: 19px; height: 19px; }
.mini-list { margin: 2px 0 0; padding-left: 1.1em; color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.mini-list li + li { margin-top: 4px; }

/* ---------- tag ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; border-radius: 999px; padding: 2px 9px; border: 1px solid; white-space: nowrap; }
.tag-live { color: var(--brand-deep); background: var(--brand-soft); border-color: #edd6c8; }
.tag-wip { color: #8a5a12; background: #fbf0dc; border-color: #eddbb8; }
.tag-plan { color: var(--muted); background: var(--bg-deep); border-color: var(--line-strong); }
.card .tag { align-self: flex-start; margin-top: auto; }

/* ---------- split feature ---------- */
.rule-list { display: grid; gap: 16px; }
.rule { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.rule-num { font-family: var(--serif); color: var(--brand); font-size: 13px; padding-top: 2px; letter-spacing: .06em; }
.rule b { display: block; font-size: 15px; }
.rule p { color: var(--muted); font-size: 14.5px; margin-top: 3px; line-height: 1.75; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--bg-deep); }
tr:last-child td { border-bottom: 0; }

/* ---------- 试点 ---------- */
.section-pilot { padding-bottom: 84px; }
.pilot {
  background: var(--brand); color: #fff4ec; border-radius: 26px;
  padding: 52px 48px; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 48px;
  align-items: start;
}
.pilot h2 { color: #fff; margin: 18px 0 14px; }
.pilot p { color: #fbe3d6; font-size: 16px; max-width: 30em; line-height: 1.85; }
.eyebrow-light { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); color: #ffeee4; }
.pilot .hero-actions { margin-top: 28px; }
.pilot-steps { list-style: none; margin: 0; padding: 0; }
.pilot-steps li { display: grid; grid-template-columns: 82px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .24); }
.pilot-steps li:first-child { border-top: 0; padding-top: 0; }
.pilot-steps span { font-size: 12.5px; color: #f7d7c7; letter-spacing: 0.04em; padding-top: 3px; }
.pilot-steps b { display: block; font-size: 16px; color: #fff; }
.pilot-steps p { font-size: 14.5px; color: #fbe3d6; margin-top: 3px; max-width: none; line-height: 1.75; }
@media (max-width: 860px) {
  .pilot { grid-template-columns: 1fr; gap: 30px; padding: 36px 26px; }
}

/* ---------- cta（内页） ---------- */
.cta {
  background: var(--brand); color: #fff4ec; border-radius: 22px; padding: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.cta h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); }
.cta p { color: #fbe3d6; margin-top: 10px; max-width: 34em; }
.cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- prose ---------- */
.prose { max-width: 44em; }
.prose h2 { margin-bottom: 14px; }
.prose p + p { margin-top: 14px; }
.prose ul { margin: 14px 0 0; padding-left: 1.1em; color: var(--ink-soft); }
.prose li + li { margin-top: 6px; }

.timeline { display: grid; gap: 0; border-left: 1px solid var(--line-strong); margin-left: 6px; }
.tl-item { position: relative; padding: 0 0 28px 26px; }
.tl-item::before {
  content: ""; position: absolute; left: -5px; top: 8px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--bg);
}
.tl-date { font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.tl-item h3 { margin: 6px 0 6px; font-size: 17px; }
.tl-item p { color: var(--muted); font-size: 15px; }
.tl-item ul { margin: 8px 0 0; padding-left: 1.1em; color: var(--ink-soft); font-size: 14px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.kv { display: grid; gap: 16px; }
.kv div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; font-size: 15px; line-height: 1.75; }
.kv dt, .kv .k { color: var(--muted); }
.note { margin-top: 18px; padding: 12px 14px; background: var(--bg-deep); border: 1px dashed var(--line-strong); border-radius: 10px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.q-list { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; font-size: 15px; color: var(--ink-soft); line-height: 1.8; }
.q-list--muted { color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--card); padding: 46px 0 32px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: 12px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-bottom: 12px; }
.footer-links { display: grid; gap: 8px; font-size: 14.5px; }
.footer-links a { color: var(--ink-soft); }
.footer-links a:hover { color: var(--brand-deep); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ---------- misc ---------- */
.stack-sm > * + * { margin-top: 10px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- 登录 ---------- */
.auth-section {
  min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 56px 0 64px;
}
.auth-card {
  width: min(420px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 34px 32px; box-shadow: var(--shadow);
}
.auth-head { margin-bottom: 26px; }
.auth-head h1 { font-size: 26px; margin: 12px 0 8px; }
.form-row + .form-row { margin-top: 16px; }
.field-label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 46px; padding: 0 12px; font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 9px;
  font-family: inherit;
}
.input:focus { outline: 2px solid var(--brand); outline-offset: 1px; background: var(--card); }
.form-error {
  margin: 14px 0 0; padding: 9px 12px; border-radius: 8px; font-size: 13.5px;
  color: #9b2c2c; background: #fdf2f2; border: 1px solid #f3d6d6;
}
.auth-note { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--muted); }

/* ---------- 控制台 ---------- */
.console-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 28px;
}
.farm-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; min-height: 96px;
}
.farm-card h3 { margin-bottom: 8px; }

/* ---------- 控制台 ---------- */
.console { padding-top: 44px; padding-bottom: 84px; }
.console-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.console-title { font-size: clamp(26px, 3vw, 34px); margin: 12px 0 4px; }
.console-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.input-inline { width: auto; min-width: 180px; height: 42px; padding: 0 10px; }
.console-alert {
  margin-top: 18px; padding: 11px 14px; border-radius: 10px; font-size: 14px;
  color: #9b2c2c; background: #fdf2f2; border: 1px solid #f3d6d6;
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px;
}
.stat span { display: block; font-size: 13px; color: var(--muted); }
.stat b {
  font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.stat em { font-style: normal; font-size: 12px; color: var(--brand); margin-left: 5px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 30px 0 22px; }
.tab {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; padding: 10px 16px; font: inherit; font-size: 15px;
  color: var(--muted); cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand-deep); border-bottom-color: var(--brand); font-weight: 600; }

.panel-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.panel-card + .panel-card { margin-top: 18px; }
.panel-title { font-size: 17px; margin-bottom: 16px; }

.toolbar { display: flex; gap: 12px; margin-bottom: 16px; }
.input-grow { flex: 1 1 auto; min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 20px; }
.form-title { grid-column: 1 / -1; font-size: 16px; font-weight: 600; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.fld { display: block; }
.fld > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.req { color: var(--brand); font-style: normal; }
.fields { display: grid; gap: 12px; margin: 4px 0 18px; }
.form-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }

.events-layout { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
@media (max-width: 960px) { .events-layout { grid-template-columns: 1fr; } }

.table-empty { text-align: center; color: var(--muted); padding: 28px 16px !important; font-size: 14px; }
.nowrap { white-space: nowrap; }
.pill {
  display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px;
  background: var(--olive-soft); color: #4d5a37; border: 1px solid #dde2ce;
}
.pill-3, .pill-2 { background: var(--brand-soft); color: var(--brand-deep); border-color: #edd6c8; }
.pill-8, .pill-9, .pill-10 { background: #f0ece5; color: var(--muted); border-color: var(--line); }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.btn-mini {
  appearance: none; font: inherit; font-size: 13px; padding: 5px 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink-soft);
}
.btn-mini:hover:not(:disabled) { border-color: var(--muted); }
.btn-mini:disabled { opacity: .45; cursor: not-allowed; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
  display: grid; grid-template-columns: 96px 56px 108px 1fr; gap: 10px; align-items: baseline;
  padding: 11px 0; border-top: 1px dashed var(--line); font-size: 14px;
}
@media (max-width: 560px) {
  .feed li { grid-template-columns: 96px 1fr; row-gap: 2px; }
  .feed-sum { grid-column: 2; }
}
.feed li:first-child { border-top: 0; }
.feed-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed-sum { color: var(--muted); font-size: 13px; }

.empty { padding: 30px 20px; text-align: center; background: var(--bg-deep); border-radius: 12px; }
.empty b { display: block; font-size: 15px; margin-bottom: 4px; }
.empty p { color: var(--muted); font-size: 13.5px; }
.empty .btn { margin-top: 14px; }
.empty.small { padding: 20px; }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(16px);
  background: #2b211a; color: #faf6ef; font-size: 14px; padding: 11px 18px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; z-index: 80;
  max-width: min(520px, calc(100% - 32px));
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.warn { background: #8f3f1d; }

@media (max-width: 560px) {
  .console-actions { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .console-actions .input-inline { flex: 1 1 auto; min-width: 0; }
  .console-actions .btn { padding: 0 14px; }
  .stat b { font-size: 24px; }
}

.report-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 780px) { .report-stats { grid-template-columns: repeat(2, 1fr); } }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 8px; }
.chart-col { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.chart-val { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-bar { width: 100%; max-width: 44px; background: var(--brand); border-radius: 5px 5px 0 0; min-height: 3px; }
.chart-col.is-zero .chart-bar { background: var(--line-strong); }
.chart-date { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---------- 实景图 ---------- */
.shot-band { margin: 0; }
.shot-band img {
  display: block; width: 100%; height: min(58vh, 540px); object-fit: cover;
  object-position: 50% 62%;
}
.shot-band--short img { height: min(44vh, 400px); }
.shot-band--piglets img { object-position: 50% 82%; }
.shot-cap {
  width: min(var(--max), calc(100% - 48px)); margin: 14px auto 0;
  font-family: var(--serif); font-size: 17px; color: var(--ink-soft);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline;
}
.cap-note { font-family: var(--sans); font-size: 12.5px; color: var(--muted); }

.shot-card { margin: 0; }
.shot-card img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  object-position: 50% 74%;
  max-height: 560px;
  border-radius: 20px; border: 1px solid var(--line);
}
.shot-card figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .shot-band img { height: 300px; }
  .shot-cap { width: calc(100% - 32px); font-size: 16px; }
}

/* ---------- 快速录入（移动优先） ---------- */
.rec {
  min-height: 100vh; background: var(--bg);
  max-width: 520px; margin-inline: auto; padding-bottom: 96px;
  position: relative;
}
.rec-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: rgba(250, 246, 239, .94);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.rec-back {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 9px;
  color: var(--ink); background: var(--card); font-size: 16px; text-decoration: none;
}
.rec-farm { flex: 1 1 auto; font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-sync {
  flex: 0 0 auto; white-space: nowrap;
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); background: var(--card);
}
.rec-sync.is-ok { color: var(--olive); border-color: #cdd6b8; background: var(--olive-soft); }
.rec-sync.is-wait { color: var(--warn); border-color: #ecd9b4; background: var(--warn-soft); }
.rec-sync.is-off { color: #8a3b2a; border-color: #e6c3b6; background: #fbeee8; }
.rec-sync.is-busy { color: var(--brand-deep); border-color: #e3c3b0; background: var(--brand-soft); }

.rec-body { padding: 20px 16px 0; }
.rec-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.rec-input {
  width: 100%; height: 48px; padding: 0 14px; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px;
  font-family: inherit;
}
.rec-input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.rec-input-lg { height: 58px; font-size: 20px; letter-spacing: .06em; font-weight: 600; }

.rec-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink-soft);
  border-radius: 999px; padding: 9px 16px; font-size: 15px; font-family: inherit; cursor: pointer;
}
.chip.is-on {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
}

.rec-fields { display: grid; gap: 14px; }
.rec-field { display: block; }
.rec-field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

.rec-submit {
  width: 100%; height: 54px; margin-top: 24px; font-size: 17px; letter-spacing: .12em;
  border-radius: 12px;
}
.rec-note { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--muted); }

.rec-queue {
  margin-top: 26px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px;
}
.rec-queue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rec-queue-head b { font-size: 14px; }
.btn-mini { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.rec-queue-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.rec-queue-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.q-main { min-width: 0; }
.q-main b { display: block; font-size: 14.5px; letter-spacing: .04em; }
.q-meta { font-size: 12px; color: var(--muted); }
.q-wait { font-size: 12px; color: var(--warn); }
.q-err { font-size: 12px; color: #9b2c2c; }
.q-del {
  border: 0; background: none; color: var(--muted); font-size: 12px;
  text-decoration: underline; cursor: pointer; margin-left: 8px;
}

.rec-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; z-index: 60; max-width: 90vw;
}
.rec-toast.is-err { background: #8a3b2a; }


/* ---------- 无导航页面（登录/控制台/录入） ---------- */
body.is-bare { background: var(--bg); }
.auth-wrap { width: min(420px, 100%); }
.auth-home {
  display: inline-block; margin-bottom: 14px;
  font-size: 13px; color: var(--muted); text-decoration: none;
}
.auth-home:hover { color: var(--brand); }

/* 表格里的文字按钮（作废等） */
.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--muted); font-size: 13px; text-decoration: underline;
  font-family: inherit;
}
.link-btn:hover { color: #9b2c2c; }

.pill-late { background: #fdf2f2; color: #9b2c2c; border-color: #f3d6d6; }
.pill-today { background: #fbf0dc; color: #8a5a12; border-color: #eddbb8; }

/* ---------- 后台：左导航 + 内容区 ---------- */
.adm { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; background: var(--bg-deep); }
.adm-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 14px 16px; background: var(--card); border-right: 1px solid var(--line);
}
.adm-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.adm-logo { height: 26px; width: auto; flex: none; }
.adm-brand small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: .04em; }
.adm-farm { background: var(--bg-deep); border-radius: 10px; padding: 10px 12px; }
.adm-farm-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.adm-select { width: 100%; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); padding: 0; }
.adm-nav { display: flex; flex-direction: column; gap: 1px; }
.adm-group { font-size: 11px; color: var(--muted); letter-spacing: .1em; margin: 14px 0 4px 10px; }
.adm-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink-soft); text-decoration: none; font-size: 14px; }
.adm-nav a i {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center;
  border-radius: 6px; background: var(--bg-deep); color: var(--muted);
  font-style: normal; font-size: 11px; line-height: 1;
}
.adm-nav a:hover { background: var(--bg-deep); }
.adm-nav a.active { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.adm-nav a.active i { background: var(--card); color: var(--brand-deep); }
.adm-side-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.adm-logout { appearance: none; background: none; border: 0; font: inherit; font-size: 12.5px; color: var(--brand-deep); cursor: pointer; padding: 4px; }

.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 11px 24px; background: rgba(250,246,239,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.adm-crumb { flex: 1; font-size: 13.5px; color: var(--muted); }
.adm-top-actions { display: flex; gap: 8px; }
.adm-burger { display: none; appearance: none; background: var(--card); border: 1px solid var(--line-strong); border-radius: 8px; width: 34px; height: 34px; font-size: 15px; cursor: pointer; }
.adm-body { padding: 24px 24px 64px; width: 100%; max-width: 1240px; }
.adm-loading { padding: 60px 0; text-align: center; color: var(--muted); font-size: 14px; }
.adm-backdrop { position: fixed; inset: 0; background: rgba(43,33,26,.35); z-index: 55; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; }
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 5px; }
.page-head .page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm { height: 38px; padding: 0 15px; font-size: 13.5px; border-radius: 9px; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 14px; }
.kpi span { display: block; font-size: 12.5px; color: var(--muted); }
.kpi b { font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.35; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 11.5px; color: var(--brand); margin-left: 4px; }
.kpi.warn b { color: #9b2c2c; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { max-width: 280px; }
.detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }
.kv-list { display: grid; gap: 10px; }
.kv-list div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: 14px; line-height: 1.7; }
.kv-list span:first-child { color: var(--muted); }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; white-space: pre-wrap; word-break: break-all; color: var(--ink-soft);
}
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.badge.on { background: #eef4e4; border-color: #d8e3c2; color: #4d5a37; }
.badge.off { background: #f4efe7; border-color: var(--line-strong); color: var(--muted); }
.badge.late { background: #fdf2f2; border-color: #f3d6d6; color: #9b2c2c; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mono { font-variant-numeric: tabular-nums; }

@media (max-width: 1080px) { .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .adm { grid-template-columns: minmax(0, 1fr); }
  .adm-side {
    position: fixed; inset: 0 auto 0 0; width: 256px; height: 100dvh; z-index: 60;
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.18);
  }
  .adm-side.open { transform: none; }
  .adm-burger { display: inline-flex; align-items: center; justify-content: center; }
  .adm-body { padding: 18px 16px 56px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .adm-top { padding: 10px 16px; }
}

/* ---------- 登录页：左品牌 + 右表单 ---------- */
.login { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; background: var(--bg); }
.login-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 34px; color: #fff; }
.login-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.login-veil { position: absolute; inset: 0; background: linear-gradient(125deg, rgba(35,26,20,.86) 0%, rgba(35,26,20,.42) 58%, rgba(35,26,20,.66) 100%); }
.login-brand { position: relative; display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font-weight: 600; font-size: 14.5px; letter-spacing: .04em; }
.login-brand small { display: block; font-size: 11px; opacity: .78; font-weight: 400; letter-spacing: .06em; }
.login-quote { position: relative; }
.login-quote p { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.45; }
.login-quote span { display: block; margin-top: 12px; font-size: 13.5px; opacity: .82; }

.login-panel { display: grid; place-items: center; padding: 36px 24px; }
.login-card { width: min(384px, 100%); }
.login-back { font-size: 13px; color: var(--muted); text-decoration: none; }
.login-card h1 { font-family: var(--serif); font-size: 30px; line-height: 1.3; margin: 20px 0 6px; }
.login-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.login-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.login-tab {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; padding: 9px 12px; font: inherit; font-size: 14.5px; color: var(--muted); cursor: pointer;
}
.login-tab.is-active { color: var(--brand-deep); border-bottom-color: var(--brand); font-weight: 600; }
.qr-box {
  width: 220px; height: 220px; margin: 0 auto 14px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-loading { color: var(--muted); font-size: 13px; text-align: center; padding: 0 18px; line-height: 1.7; }
.qr-ok { font-size: 64px; color: var(--olive); }
.qr-hint { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.7; }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
}

/* ---------- 大屏（深色只读） ---------- */
.scr { min-height: 100vh; background: #0c1210; color: #e8efe9; padding: 28px 34px 20px; display: flex; flex-direction: column; gap: 20px; }
.scr-top { display: flex; align-items: center; justify-content: space-between; }
.scr-brand { display: flex; align-items: center; gap: 12px; }
.scr-brand b { display: block; font-family: var(--serif); font-size: 22px; letter-spacing: .04em; }
.scr-brand span { font-size: 12.5px; color: #7f9a86; }
.scr-conn { font-size: 12.5px; padding: 4px 12px; border-radius: 999px; border: 1px solid #24382c; color: #7f9a86; }
.scr-conn.on { color: #8fd19a; border-color: #2f5c3c; background: rgba(50,120,70,.16); }
.scr-conn.off { color: #e0a0a0; border-color: #5c2f2f; background: rgba(120,50,50,.16); }

.scr-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.scr-kpi { background: linear-gradient(160deg, #121b16, #0f1712); border: 1px solid #1f2f25; border-radius: 14px; padding: 16px 18px; }
.scr-kpi span { display: block; font-size: 12.5px; color: #7f9a86; }
.scr-kpi b { font-family: var(--serif); font-size: 40px; line-height: 1.15; color: #eaf4ea; font-variant-numeric: tabular-nums; }
.scr-kpi em { font-style: normal; font-size: 12px; color: #6f8f78; margin-left: 6px; }

.scr-grid { display: grid; grid-template-columns: 1.4fr 1fr .9fr; gap: 16px; flex: 1; min-height: 0; }
.scr-panel { background: #101a14; border: 1px solid #1f2f25; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; min-height: 0; }
.scr-panel h2 { font-size: 15px; font-weight: 600; color: #b9d3c0; margin-bottom: 14px; letter-spacing: .04em; }
.scr-count { color: #6f8f78; font-weight: 400; }
.scr-empty { color: #5d7a66; font-size: 13px; margin: auto; }

.scr-chart { display: flex; align-items: flex-end; gap: 12px; height: 190px; }
.scr-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.scr-bar span { font-size: 13px; color: #9fbda7; font-variant-numeric: tabular-nums; }
.scr-bar i { display: block; width: 100%; max-width: 46px; background: linear-gradient(180deg, #7ec98c, #3f7f52); border-radius: 6px 6px 0 0; }
.scr-bar em { font-style: normal; font-size: 11.5px; color: #5d7a66; }

.scr-todos { display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.scr-todo { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 12px; background: #0d1611; border: 1px solid #1c2b22; border-radius: 10px; }
.scr-todo b { font-size: 14px; color: #d8e8dc; }
.scr-todo span { font-size: 13px; color: #8fae97; }
.scr-todo em { font-style: normal; font-size: 12px; color: #8fae97; grid-row: 1 / span 2; align-self: center; }
.scr-todo em.late { color: #e5a3a3; }

.scr-devices { display: flex; align-items: center; justify-content: space-around; gap: 10px; flex: 1; }
.scr-dev-num b { font-family: var(--serif); font-size: 64px; color: #9fdcab; line-height: 1; }
.scr-dev-num span { font-size: 12.5px; color: #7f9a86; }
.scr-dev-num i { font-style: normal; color: #b9d3c0; }
.scr-ring { width: 132px; height: 132px; }
.scr-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #1c2b22; stroke-width: 10; }
.ring-fg { fill: none; stroke: #7ec98c; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.scr-offline { font-size: 12.5px; color: #6f8f78; text-align: center; }

.scr-foot { text-align: center; font-size: 12px; color: #4f6a58; letter-spacing: .06em; }
.scr-404 { min-height: 100vh; display: grid; place-items: center; background: #0c1210; color: #cfe0d4; text-align: center; }
.scr-404 a { color: #9fdcab; }

@media (max-width: 1100px) {
  .scr-kpis { grid-template-columns: repeat(3, 1fr); }
  .scr-grid { grid-template-columns: 1fr; }
}

/* ---------- AI 解读卡片 ---------- */
.ai-note { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--olive); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.ai-note.warn { border-left-color: #b4562f; background: #fdf7f2; }
.ai-note b { display: block; font-size: 14.5px; margin-bottom: 6px; }
.ai-note ul { margin: 0; padding-left: 18px; }
.ai-note li { font-size: 13.5px; color: var(--ink-soft); line-height: 1.75; }
.ai-src { display: inline-block; margin-top: 8px; font-size: 11.5px; color: var(--muted); }

.ai-say { display: flex; gap: 8px; margin-bottom: 14px; }
.ai-say .input { flex: 1; }

.pig-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 1px solid var(--line-strong); }
.pig-timeline li { position: relative; padding: 0 0 16px 16px; display: grid; grid-template-columns: 96px 90px 1fr; gap: 10px; align-items: baseline; }
.pig-timeline li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.pt-time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pt-sum { font-size: 13px; color: var(--ink-soft); }
@media (max-width: 640px) { .pig-timeline li { grid-template-columns: 1fr; gap: 2px; } }
