/* 线上农场 · 端侧统一设计系统（V14）
 * 一套 token，三套皮肤：--skin-client（暖白）/ --skin-ops（深墨）/ --skin-screen（大屏）
 * 只依赖原生 CSS，不引框架；改完即生效。
 */
:root {
  --ink: #0e1a16;
  --ink-2: #16241f;
  --paper: #fffdf8;
  --cream: #f6f1e6;
  --line: #e6dfd0;
  --dim: #8b8577;
  --text: #1d2b25;
  --green: #1f6b4a;
  --green-2: #2f8f63;
  --gold: #b8873b;
  --red: #c0392b;
  --blue: #2b6cb0;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(20, 32, 26, .08);
  --shadow-lg: 0 22px 60px rgba(16, 28, 22, .16);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Consolas, monospace;
}
:root[data-skin="ops"] {
  --ink: #0b1220; --ink-2: #101a2c; --paper: #0f1726; --cream: #131f33;
  --line: #21324c; --dim: #7f90a8; --text: #e8eef7;
  --green: #34d399; --green-2: #10b981; --gold: #f5c46b; --red: #f87171; --blue: #60a5fa;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, .5);
}
:root[data-skin="screen"] {
  --ink: #04090d; --ink-2: #071219; --paper: #071219; --cream: #0a1a22;
  --line: #12303c; --dim: #5f8496; --text: #d8f3ff;
  --green: #37f5a6; --green-2: #16d3a0; --gold: #ffd166; --red: #ff6b6b; --blue: #4cc9f0;
  --shadow: none; --shadow-lg: none;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); background: var(--cream); color: var(--text);
  font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
b, strong { font-weight: 700; }
small { font-size: 11.5px; color: var(--dim); }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.2px; }

/* ---------------- 基础控件 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font-size: 13.5px; font-family: var(--font);
  cursor: pointer; transition: .18s; white-space: nowrap;
}
:root[data-skin="ops"] .btn, :root[data-skin="screen"] .btn { background: var(--ink-2); }
.btn:hover { border-color: var(--green-2); color: var(--green); }
.btn:active { transform: scale(.975); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #221a08; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--dim); }
.btn-ghost:hover { color: var(--green); background: rgba(47, 143, 99, .08); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn-danger { border-color: var(--red); color: var(--red); background: transparent; }
.w-full { width: 100%; }
input, select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--text); font-family: var(--font); font-size: 13.5px; outline: none; transition: .18s;
}
:root[data-skin="ops"] input, :root[data-skin="ops"] select, :root[data-skin="ops"] textarea,
:root[data-skin="screen"] input, :root[data-skin="screen"] select {
  background: var(--ink); border-color: var(--line); color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(47, 143, 99, .12); }
textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
label { display: block; font-size: 12.5px; color: var(--dim); margin: 12px 0 6px; }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pill.ok { background: rgba(31, 107, 74, .12); color: var(--green); }
.pill.warn { background: rgba(184, 135, 59, .16); color: var(--gold); }
.pill.bad { background: rgba(192, 57, 43, .12); color: var(--red); }
.pill.info { background: rgba(43, 108, 176, .12); color: var(--blue); }
.pill.mute { background: rgba(139, 133, 119, .14); color: var(--dim); }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-h h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.panel-b { padding: 16px 18px; }
.panel-b.flush { padding: 0; }
.more { color: var(--dim); font-size: 12.5px; cursor: pointer; }
.more:hover { color: var(--green); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .4px; color: var(--dim);
     text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(47, 143, 99, .04); }

.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi .lab { font-size: 12px; color: var(--dim); }
.kpi .val { font-size: 26px; font-weight: 700; letter-spacing: -.6px; margin: 4px 0 2px; }
.kpi .sub { font-size: 11.5px; color: var(--dim); }

.empty { padding: 40px 18px; text-align: center; color: var(--dim); font-size: 13px; }
.skeleton { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--line), var(--cream), var(--line)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* ---------------- 弹层 ---------------- */
.modal-mask { position: fixed; inset: 0; background: rgba(8, 16, 12, .5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 18px; animation: fade .18s; }
.modal { width: 560px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; background: var(--paper); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: up .22s; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-h h3 { margin: 0; font-size: 16px; }
.modal-h .close { border: 0; background: transparent; font-size: 16px; color: var(--dim); cursor: pointer; }
.modal-b { padding: 18px 20px; overflow: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--cream); }
@keyframes fade { from { opacity: 0 } }
@keyframes up { from { transform: translateY(14px); opacity: 0 } }
:root[data-skin="client"] .modal-mask { align-items: flex-end; padding: 0; }
:root[data-skin="client"] .modal { width: 100%; border-radius: 20px 20px 0 0; max-height: 90vh; }

.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast > div { background: #14231c; color: #eaf6ef; padding: 10px 18px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow-lg); }
.toast > div.err { background: #3a1512; color: #ffd9d4; }

/* ---------------- 布局 ---------------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: grid; gap: 10px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

.shell { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; padding: 4px 10px 18px; line-height: 1.25; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--green); color: #fff; font-size: 17px; }
.navlabel { font-size: 10.5px; letter-spacing: 1.4px; color: var(--dim); padding: 8px 10px; }
.navitem { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--text); font-size: 13.5px; }
.navitem:hover { background: rgba(47, 143, 99, .08); }
.navitem.active { background: var(--green); color: #fff; }
.navitem.active .ico { opacity: 1; }
.navitem .ico { width: 18px; text-align: center; opacity: .65; }
.side-foot { margin-top: auto; font-size: 11px; color: var(--dim); padding: 12px 10px; line-height: 1.7; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 700; }
.content { padding: 22px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 21px; letter-spacing: -.4px; }
.page-head p { margin: 5px 0 0; color: var(--dim); font-size: 13px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 登录 ---------------- */
.auth { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 100vh; background: var(--ink); color: #eef6f1; }
.auth-left { padding: 56px 52px; display: flex; flex-direction: column; justify-content: space-between; background:
  radial-gradient(900px 500px at 12% 8%, rgba(47, 143, 99, .22), transparent 60%),
  radial-gradient(700px 420px at 88% 92%, rgba(184, 135, 59, .16), transparent 62%); }
.auth .brand { font-size: 18px; padding: 0; }
.auth .brand .logo { width: 44px; height: 44px; font-size: 22px; }
.hero h1 { font-size: 40px; line-height: 1.15; letter-spacing: -1.4px; margin: 36px 0 16px; color: #fff; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero p { color: #a9c2b4; font-size: 14.5px; max-width: 520px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag { border: 1px solid rgba(255, 255, 255, .16); color: #cfe3d7; border-radius: 999px; padding: 5px 12px; font-size: 12px; }
.metrics { display: flex; gap: 40px; margin-top: 40px; }
.metrics span { display: block; font-size: 28px; font-weight: 700; color: #fff; }
.metrics small { color: #8fa79a; font-size: 11.5px; letter-spacing: 1px; }
.auth-right { display: grid; place-items: center; padding: 32px; background: var(--cream); }
.auth-right .card { width: 100%; max-width: 400px; padding: 28px; }
.auth-right h2 { margin: 0; font-size: 20px; }
.auth-right .sub { color: var(--dim); font-size: 12.5px; margin: 6px 0 8px; }
.auth-right .hint { font-size: 12px; color: var(--dim); margin-top: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; color: var(--dim); background: var(--paper); }
.tab:hover, .tab.active { border-color: var(--green); color: var(--green); }

/* ---------------- 客户端（移动） ---------------- */
.phone { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--cream); position: relative; padding-bottom: 74px; box-shadow: 0 0 60px rgba(0, 0, 0, .06); }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  height: 62px; display: flex; background: rgba(255, 253, 248, .94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
.tabbar > div { flex: 1; display: grid; place-items: center; gap: 1px; color: var(--dim); font-size: 10.5px; cursor: pointer; padding-top: 8px; }
.tabbar > div .ti { font-size: 19px; line-height: 1; }
.tabbar > div.active { color: var(--green); font-weight: 600; }
.m-sec { padding: 0 16px; }
.m-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.m-title h2 { font-size: 17px; margin: 0; letter-spacing: -.3px; }
.m-title span { font-size: 12px; color: var(--dim); }
.banner { position: relative; border-radius: 18px; overflow: hidden; min-height: 168px; padding: 22px;
  background: linear-gradient(135deg, #17362a 0%, #245a41 55%, #3d7a56 100%); color: #f2fbf6; box-shadow: var(--shadow); }
.banner h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.6px; max-width: 82%; }
.banner p { margin: 0; font-size: 12.5px; color: #b7d6c5; }
.banner .badge { display: inline-block; margin-bottom: 12px; font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.16); }
.dots { position: absolute; right: 16px; bottom: 14px; display: flex; gap: 5px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35); }
.dots i.on { background: #fff; width: 16px; border-radius: 4px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.quick > div { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; font-size: 11.5px; cursor: pointer; }
.quick > div .qi { font-size: 20px; display: block; margin-bottom: 4px; }
.plist { display: grid; gap: 12px; }
.pcard { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); cursor: pointer; }
.pcard .cover { width: 92px; height: 92px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 30px;
  background: linear-gradient(140deg, #e9f3ec, #d8e9df); color: var(--green); background-size: cover; background-position: center; }
.pcard .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pcard h4 { margin: 2px 0 4px; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .meta { font-size: 11.5px; color: var(--dim); }
.pcard .price { margin-top: auto; color: var(--red); font-weight: 700; font-size: 16px; }
.pcard .price small { color: var(--dim); font-weight: 400; }
.news { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.news > div { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.news > div:last-child { border-bottom: 0; }
.news .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-top: 8px; flex: none; }
.statbar { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.statbar > div { padding: 12px; text-align: center; border-right: 1px solid var(--line); }
.statbar > div:last-child { border-right: 0; }
.statbar b { display: block; font-size: 19px; }
.statbar small { font-size: 11px; }
.tl { position: relative; padding-left: 20px; }
.tl:before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl > div { position: relative; padding-bottom: 16px; }
.tl > div:before { content: ''; position: absolute; left: -19px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--green); }
.tl h4 { margin: 0; font-size: 13.5px; }
.tl p { margin: 2px 0 0; font-size: 12px; color: var(--dim); }
.hero-detail { padding: 20px 16px 16px; background: linear-gradient(160deg, #17362a, #285f45); color: #eefaf3; }
.hero-detail h1 { font-size: 22px; margin: 10px 0 6px; }
.buybar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,253,248,.97); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; z-index: 45; }
.buybar .amt { flex: 1; }
.buybar .amt b { color: var(--red); font-size: 20px; }

/* ---------------- 大屏 ---------------- */
.screen { min-height: 100vh; background:
  radial-gradient(1200px 600px at 50% -10%, rgba(55, 245, 166, .12), transparent 60%), var(--ink); color: var(--text); padding: 22px 26px 26px; }
.screen-h { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.screen-h h1 { margin: 0; font-size: 24px; letter-spacing: 3px; color: #fff; font-weight: 600; }
.screen-h h1 span { color: var(--green); }
.screen-h .clock { font-family: var(--mono); font-size: 14px; color: var(--dim); text-align: right; }
.screen .kpi { background: linear-gradient(180deg, rgba(18, 48, 60, .6), rgba(7, 18, 25, .2)); border-color: var(--line); }
.screen .kpi .val { color: var(--green); font-family: var(--mono); text-shadow: 0 0 18px rgba(55,245,166,.35); }
.screen .panel { background: rgba(7, 18, 25, .55); border-color: var(--line); }
.sborder { position: relative; }
.sborder:before, .sborder:after { content: ''; position: absolute; width: 14px; height: 14px; border-color: var(--green); border-style: solid; }
.sborder:before { left: -1px; top: -1px; border-width: 2px 0 0 2px; }
.sborder:after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.barcell { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: 8px; }
.barcell i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-2), var(--green)); border-radius: 4px; }
.ticker { overflow: hidden; white-space: nowrap; border: 1px solid var(--line); border-radius: 10px; padding: 9px 0; margin-top: 16px; }
.ticker span { display: inline-block; padding-left: 100%; animation: tick 38s linear infinite; color: var(--dim); font-size: 13px; }
@keyframes tick { to { transform: translateX(-100%) } }

@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .side { display: none; }
  .content { padding: 14px; }
}
@media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
