/* Raaveri Farm AI — island farm ledger.
   Layout: owner = sidebar + content (desktop) / top bar + bottom tabs (phone); staff = single-column big-tile app. */
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 700; font-display: swap; src: url(/fonts/bricolage-grotesque/files/bricolage-grotesque-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 800; font-display: swap; src: url(/fonts/bricolage-grotesque/files/bricolage-grotesque-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url(/fonts/figtree/files/figtree-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url(/fonts/figtree/files/figtree-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 700; font-display: swap; src: url(/fonts/figtree/files/figtree-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 400; font-display: swap; src: url(/fonts/dm-mono/files/dm-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 500; font-display: swap; src: url(/fonts/dm-mono/files/dm-mono-latin-500-normal.woff2) format('woff2'); }

:root {
  --bg: #f4f8f4; --surface: #ffffff; --surface-2: #eef5ef; --ink: #0f2a1d; --ink-2: #3e5a4b; --muted: #6b8577; --line: #dbe6dd; --line-2: #c7d7cb;
  --brand: #1e7a46; --brand-deep: #0f4d2c; --brand-ink: #ffffff; --leaf: #8cc63f; --lagoon: #149c97; --lagoon-soft: #dff3f1;
  --good: #1e7a46; --good-soft: #e1f2e6; --warn: #b7791f; --warn-soft: #fbf0d9; --bad: #c2412b; --bad-soft: #fbe5e0; --info: #2f6fa3; --info-soft: #e2edf7;
  --chart-1: #1e7a46; --chart-2: #149c97; --chart-3: #e9a825; --chart-4: #e0674b; --chart-5: #6b8f3a; --chart-6: #2f6fa3; --chart-grid: #e3ece5;
  --shadow: 0 1px 2px rgba(15, 42, 29, .06), 0 4px 14px rgba(15, 42, 29, .06);
  --shadow-lg: 0 10px 40px rgba(15, 42, 29, .18);
  --f-display: 'Bricolage Grotesque', 'Figtree', ui-sans-serif, system-ui, sans-serif;
  --f-body: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-num: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  /* Farm colour system — used the same way everywhere (cards, tasks, calendar, charts, pills):
     forest = identity · done = completed · water = irrigation · pending = waiting/upcoming · pest = urgent, pests, disease
     feed = fertilizer & plant treatment · notice = attention needed · soil = maintenance & general work */
  --c-forest: #0f4d2c; --c-done: #1e8a4c; --c-water: #1f6fbf; --c-pending: #d4700a; --c-pest: #c8372d; --c-feed: #7a46c2; --c-notice: #a77b00; --c-notice-bg: #fff3c4; --c-soil: #7a5a3a;
  --r: 14px; --r-sm: 10px; --tap: 48px;
  --side: 248px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0b1510; --surface: #12211a; --surface-2: #182b22; --ink: #e4f0e8; --ink-2: #b6cbbd; --muted: #86a091; --line: #243a2f; --line-2: #2f4a3c;
  --brand: #3fae6c; --brand-deep: #0d3a22; --brand-ink: #04140b; --leaf: #a4d65e; --lagoon: #3cc4be; --lagoon-soft: #10302e;
  --good: #4cc27c; --good-soft: #14301f; --warn: #e6b04a; --warn-soft: #33270f; --bad: #f07a63; --bad-soft: #3a1a14; --info: #6aa8dc; --info-soft: #132a3d;
  --chart-1: #4cc27c; --chart-2: #3cc4be; --chart-3: #f0bd45; --chart-4: #f07a63; --chart-5: #9cc463; --chart-6: #6aa8dc; --chart-grid: #1f3429;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.5); color-scheme: dark;
  --c-forest: #6fd39a; --c-done: #4cc27c; --c-water: #6aaef0; --c-pending: #f29c45; --c-pest: #f27b6b; --c-feed: #b592f0; --c-notice: #f0c64a; --c-notice-bg: #3a300c; --c-soil: #c9a27b; } }
:root[data-theme="dark"] {
  --bg: #0b1510; --surface: #12211a; --surface-2: #182b22; --ink: #e4f0e8; --ink-2: #b6cbbd; --muted: #86a091; --line: #243a2f; --line-2: #2f4a3c;
  --brand: #3fae6c; --brand-deep: #0d3a22; --brand-ink: #04140b; --leaf: #a4d65e; --lagoon: #3cc4be; --lagoon-soft: #10302e;
  --good: #4cc27c; --good-soft: #14301f; --warn: #e6b04a; --warn-soft: #33270f; --bad: #f07a63; --bad-soft: #3a1a14; --info: #6aa8dc; --info-soft: #132a3d;
  --chart-1: #4cc27c; --chart-2: #3cc4be; --chart-3: #f0bd45; --chart-4: #f07a63; --chart-5: #9cc463; --chart-6: #6aa8dc; --chart-grid: #1f3429;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.5); color-scheme: dark;
  --c-forest: #6fd39a; --c-done: #4cc27c; --c-water: #6aaef0; --c-pending: #f29c45; --c-pest: #f27b6b; --c-feed: #b592f0; --c-notice: #f0c64a; --c-notice-bg: #3a300c; --c-soil: #c9a27b; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.15; }
h2 { font-size: 1.2rem; line-height: 1.25; }
h3 { font-size: 1rem; line-height: 1.3; }
p { margin: 0; }
.num, .money { font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.eyebrow { font: 600 .72rem/1.2 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--lagoon) 60%, transparent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--brand-deep); color: #e3f2e7; padding: 18px 12px 24px; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: #fff; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font: 800 1.15rem/1 var(--f-display); letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; color: #a9d3b6; margin-top: 3px; }
.nav-group { font: 600 .66rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #8dbf9d; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: #d5ebdc; text-decoration: none; font-weight: 600; font-size: .92rem; min-height: 38px; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.07); }
.nav a.on { background: #fff; color: var(--brand-deep); }
.nav a.on svg { opacity: 1; }
.nav .badge { margin-left: auto; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 60px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.topbar .title { font: 700 1.05rem/1.2 var(--f-display); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .mobile-brand { display: none; }
.content { padding-block: 20px 110px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); width: 100%; max-width: 1280px; margin: 0 auto; }
.tabbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar .mobile-brand { display: flex; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); box-shadow: 0 -4px 20px rgba(15,42,29,.06); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border: 0; background: none; color: var(--muted); font: 600 .7rem/1 var(--f-body); text-decoration: none; border-radius: 12px; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .on { color: var(--brand); }
  .tabbar .fab { color: #fff; }
  .tabbar .fab span.ring { width: 48px; height: 48px; border-radius: 16px; background: var(--brand); display: grid; place-items: center; margin-top: -18px; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 45%, transparent); }
  .tabbar .fab span.ring svg { width: 26px; height: 26px; }
}

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s ease, background .15s ease; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.lagoon { background: var(--lagoon); color: #fff; border-color: transparent; }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.big { min-height: 54px; font-size: 1rem; padding: 0 22px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.icon { width: 42px; padding: 0; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.field .req { color: var(--bad); }
.field .hint { font-size: .78rem; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: var(--tap); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-size: 1rem; }
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { border-color: var(--lagoon); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lagoon) 22%, transparent); }
.input.num { font-family: var(--f-num); }
.input-group { display: flex; align-items: stretch; }
.input-group .pre { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line-2); border-right: 0; border-radius: 12px 0 0 12px; background: var(--surface-2); font: 500 .85rem var(--f-num); color: var(--muted); }
.input-group .input { border-radius: 0 12px 12px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-weight: 600; font-size: .92rem; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: .86rem; color: var(--ink-2); cursor: pointer; min-height: 34px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.errbox { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: .9rem; }
.okbox { background: var(--good-soft); color: var(--good); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: .9rem; }
.warnbox { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: .9rem; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card.pad-lg { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { flex: 1; min-width: 0; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .grow { flex: 1; min-width: 220px; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 65ch; }
.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .cols-3, .cols-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 12px 12px 12px 15px; } .kpi .v { font-size: .98rem; } }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); margin: 6px 0; }

/* KPI tiles */
.kpi { position: relative; padding: 14px 16px 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--kc, var(--brand)); }
.kpi .eyebrow { margin-bottom: 6px; }
.kpi .v { font: 500 clamp(1.05rem, .9rem + .7vw, 1.4rem)/1.15 var(--f-num); letter-spacing: -.02em; overflow-wrap: anywhere; }
.kpi .d { font-size: .78rem; margin-top: 6px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kpi .d .up { color: var(--good); font-weight: 700; } .kpi .d .down { color: var(--bad); font-weight: 700; }
.kpi.neg .v { color: var(--bad); }

/* Chips / pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font: 700 .72rem/1.3 var(--f-body); letter-spacing: .02em; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.info { background: var(--info-soft); color: var(--info); } .pill.lagoon { background: var(--lagoon-soft); color: var(--lagoon); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font: 700 .72rem/20px var(--f-body); text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-weight: 600; font-size: .86rem; cursor: pointer; min-height: 36px; text-align: left; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: transparent; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th { text-align: left; font: 700 .7rem/1.2 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover { background: var(--surface-2); }
table.t td.r, table.t th.r { text-align: right; }
table.t tr.cancelled td { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
table.t tr.total td { font-weight: 700; background: var(--surface-2); }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li .t1 { font-weight: 600; overflow-wrap: anywhere; }
.li .t2 { font-size: .82rem; color: var(--muted); }
.li.click { cursor: pointer; } .li.click:hover { background: var(--surface-2); border-radius: 10px; }

/* Empty states */
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 28px 16px; color: var(--muted); }
.empty > div > svg { width: 76px; height: 76px; }
.empty b { color: var(--ink); font-family: var(--f-display); font-size: 1.05rem; }
.empty p { max-width: 44ch; font-size: .9rem; }

/* Toolbar / filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar .input { min-height: 42px; width: auto; flex: 0 1 auto; }
.toolbar .search { flex: 1 1 200px; min-width: 160px; }

/* ---------- Island sky hero ---------- */
.hero { position: relative; border-radius: 20px; overflow: hidden; min-height: 190px; color: #fff; isolation: isolate; background: #0f4d2c; }
.hero svg.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero .in { position: relative; padding: 20px 22px; display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.hero .who { flex: 1 1 280px; min-width: 0; }
.hero .logo { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; border: 2px solid rgba(255,255,255,.7); background: rgba(255,255,255,.15); }
.hero h1 { color: #fff; font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); text-shadow: 0 1px 12px rgba(0,0,0,.18); }
.hero .loc { opacity: .92; font-weight: 600; margin-top: 4px; font-size: .92rem; }
.hero .clock { text-align: right; flex: 0 0 auto; }
.hero .clock .time { font: 500 2rem/1 var(--f-num); letter-spacing: -.03em; text-shadow: 0 1px 10px rgba(0,0,0,.2); }
.hero .clock .date { font-weight: 600; opacity: .9; margin-top: 4px; font-size: .9rem; }
.hero .strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero .glass { background: rgba(255,255,255,.16); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 8px 12px; font-size: .84rem; font-weight: 600; }
.hero .glass b { font-family: var(--f-num); font-weight: 500; font-size: 1rem; display: block; }
@media (max-width: 560px) { .hero .clock { text-align: left; } }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--f-body); fill: var(--muted); font-size: 11px; }
.chart .grid line { stroke: var(--chart-grid); }
.chart .axis-num { font-family: var(--f-num); font-size: 10.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: var(--ink-2); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 0; font-size: .86rem; }
.hbar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hbar .track { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 6px; background: var(--c, var(--chart-1)); transform-origin: left; animation: grow .6s cubic-bezier(.2,.8,.2,1) both; }
.hbar .val { font-family: var(--f-num); font-size: .82rem; text-align: right; }
@keyframes grow { from { transform: scaleX(0); } }
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 9px; border-radius: 8px; font-size: .8rem; box-shadow: var(--shadow-lg); }
.tip b { font-family: var(--f-num); font-weight: 500; }

/* ---------- Crop art & cards ---------- */
.crop-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; cursor: pointer; }
.crop-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); max-width: 100%; }
.crop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.crop-thumb svg { width: 100%; height: 100%; }
.art-badge { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); flex: none; overflow: hidden; display: grid; place-items: center; }
.art-badge svg, .art-badge img { width: 100%; height: 100%; object-fit: cover; }
.art-badge.sm { width: 34px; height: 34px; border-radius: 9px; }

/* Growth track */
.track { position: relative; height: 34px; margin: 6px 0 2px; }
.track .rail { position: absolute; left: 10px; right: 10px; top: 15px; height: 4px; border-radius: 2px; background: var(--surface-2); }
.track .prog { position: absolute; left: 10px; top: 15px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--leaf), var(--brand)); }
.track .st { position: absolute; top: 4px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); display: grid; place-items: center; }
.track .st svg { width: 14px; height: 14px; }
.track .st.done { border-color: var(--brand); background: var(--good-soft); }
.track .st.now { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }

/* Timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl { position: relative; padding: 6px 0 14px; }
.tl .dot { position: absolute; left: -26px; top: 7px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--c, var(--brand)); }
.tl .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--brand)); }
.tl.future .dot { border-style: dashed; } .tl.future .dot::after { background: transparent; }
.tl .when { font: 500 .78rem var(--f-num); color: var(--muted); }

/* ---------- Sheet / modal ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(8, 24, 15, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease both; }
@media (min-width: 720px) { .scrim { align-items: center; padding: 24px; } }
.sheet { width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); animation: rise .2s cubic-bezier(.2,.8,.2,1) both;
  padding: 18px max(18px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); }
.sheet.wide { max-width: 920px; }
@media (min-width: 720px) { .sheet { border-radius: 22px; } }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; position: sticky; top: -18px; background: var(--surface); padding: 6px 0; z-index: 2; }
.sheet-head h2 { flex: 1; min-width: 0; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; position: sticky; bottom: -20px; background: var(--surface); padding: 10px 0 4px; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.toast-wrap { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg); animation: rise .2s ease both; }
.toast.bad { background: var(--bad); color: #fff; }
.kv { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 8px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.hist { font-size: .82rem; border-left: 2px solid var(--line); padding-left: 12px; display: flex; flex-direction: column; gap: 10px; }
.hist .chg { color: var(--muted); }
.hist del { color: var(--bad); } .hist ins { color: var(--good); text-decoration: none; }

/* Photo input */
.photo-in { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.photo-prev { width: 92px; height: 92px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.photo-big { width: 100%; max-height: 380px; object-fit: contain; border-radius: 14px; background: var(--surface-2); }

/* ---------- Auth & onboarding ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth .art { position: relative; overflow: hidden; background: var(--brand-deep); min-height: 220px; }
.auth .art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth .art .say .brand-mark { width: 44px; height: 44px; }
.auth .art .say { position: absolute; left: 32px; bottom: 32px; right: 32px; color: #fff; }
.auth .art .say h1 { color: #fff; font-weight: 800; font-size: clamp(1.8rem, 1.3rem + 2vw, 3rem); }
.auth .art .say p { color: #d7f0de; margin-top: 8px; max-width: 40ch; }
.auth .panel { display: flex; align-items: center; justify-content: center; padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth .box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 860px) { .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; } .auth .art { min-height: 200px; } .auth .art .say { left: 20px; bottom: 18px; } .auth .art .say p { display: none; } }
.steps { display: flex; gap: 6px; } .steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); } .steps i.on { background: var(--brand); }
.recovery { font: 500 1.5rem/1.2 var(--f-num); letter-spacing: .06em; padding: 16px; border: 2px dashed var(--brand); border-radius: 14px; text-align: center; background: var(--good-soft); color: var(--brand-deep); user-select: all; }

/* ---------- Staff app ---------- */
.staff-hello { display: flex; align-items: center; gap: 12px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 124px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; color: var(--ink); text-decoration: none; position: relative; overflow: hidden; }
.tile:active { transform: scale(.98); }
.tile .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--tc-soft, var(--good-soft)); color: var(--tc, var(--brand)); }
.tile .ic svg { width: 24px; height: 24px; }
.tile b { font: 700 1.02rem/1.2 var(--f-display); }
.tile small { color: var(--muted); font-size: .8rem; display: block; margin-top: 2px; }
.queue-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--info-soft); color: var(--info); font-weight: 600; font-size: .88rem; }

/* ---------- Invoice builder & document ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.price-tile { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; min-width: 0; }
.price-tile:hover { border-color: var(--brand); }
.price-tile .art-badge { width: 100%; height: 76px; border-radius: 10px; }
.price-tile .nm { font-weight: 700; font-size: .9rem; line-height: 1.25; overflow-wrap: anywhere; }
.price-tile .pr { font: 500 .95rem var(--f-num); color: var(--brand); }
.price-tile.off { opacity: .5; }
.lines .line { display: grid; grid-template-columns: minmax(0, 1fr) 96px 120px 110px 36px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.lines .line .input { min-height: 42px; padding: 8px 10px; }
@media (max-width: 640px) { .lines .line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; } .lines .line .desc { grid-column: 1 / -1; } .lines .line .amt { text-align: left !important; } }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: .95rem; }
.totals .grand { font: 700 1.15rem var(--f-display); padding-top: 8px; border-top: 2px solid var(--ink); }
.totals .grand.v { font: 500 1.2rem var(--f-num); }

.doc { background: #fff; color: #0f2a1d; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; max-width: 820px; margin: 0 auto; font-size: .92rem; }
.doc .doc-head { position: relative; background: #0f4d2c; color: #fff; padding: 26px 28px 30px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; overflow: hidden; }
.doc .doc-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, #149c97 0 50%, #8cc63f 50%); }
.doc .doc-head svg.leaves { position: absolute; right: -10px; top: -10px; width: 260px; height: 160px; opacity: .9; pointer-events: none; }
.doc .doc-head .logo { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; border: 2px solid rgba(255,255,255,.6); }
.doc .doc-head h2 { color: #fff; font-weight: 800; font-size: 1.6rem; }
.doc .doc-head .sub { color: #cfe9d7; font-size: .85rem; margin-top: 2px; }
.doc .doc-head .kind { margin-left: auto; text-align: right; position: relative; z-index: 1; }
.doc .doc-head .kind .eyebrow { color: #bfe3c9; letter-spacing: .3em; }
.doc .doc-head .kind .no { font: 700 1.4rem var(--f-display); }
.doc .doc-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 20px; }
.doc .meta { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.doc .meta .billto b { font-size: 1.1rem; font-family: var(--f-display); }
.doc .meta dl { display: grid; grid-template-columns: auto auto; gap: 4px 18px; margin: 0; font-size: .88rem; }
.doc .meta dt { color: #5b7266; } .doc .meta dd { margin: 0; font-family: var(--f-num); text-align: right; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th { background: #0f4d2c; color: #fff; font: 700 .7rem var(--f-body); letter-spacing: .08em; text-transform: uppercase; padding: 9px 10px; text-align: left; }
.doc td { padding: 10px; border-bottom: 1px solid #e3ece5; }
.doc tr:nth-child(even) td { background: #f7faf7; }
.doc .r { text-align: right; font-family: var(--f-num); }
.doc .sum { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.doc .sum .words { max-width: 320px; font-size: .86rem; }
.doc .sum .tot { min-width: 260px; display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; }
.doc .sum .tot .g { background: #0f4d2c; color: #fff; border-radius: 10px; padding: 10px 12px; grid-column: 1 / -1; display: flex; justify-content: space-between; font-weight: 700; }
.doc .sum .tot .g span:last-child { font-family: var(--f-num); font-weight: 500; font-size: 1.1rem; }
.doc .stamp { display: inline-block; transform: rotate(-7deg); border: 2px solid currentColor; border-radius: 6px; padding: 4px 12px; font: 800 1rem var(--f-display); letter-spacing: .06em; }
.doc .eyebrow { color: #5b7266; }
.doc .thanks { text-align: center; font: 700 1rem var(--f-display); color: #1e7a46; }
.doc-wrap { overflow-x: auto; padding: 4px 2px 12px; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.cal .dow { padding: 8px; font: 700 .7rem var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); text-align: center; }
.cal .day { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: color-mix(in srgb, var(--surface-2) 55%, transparent); color: var(--muted); }
.cal .day .n { font: 500 .8rem var(--f-num); }
.cal .day.today .n { background: var(--brand); color: #fff; border-radius: 8px; padding: 1px 6px; align-self: flex-start; }
.cal .dow.we { color: var(--c-pending); }
.cal .day.we { background: color-mix(in srgb, var(--c-pending) 6%, var(--surface)); }
.cal .day.ram { box-shadow: inset 0 3px 0 color-mix(in srgb, var(--c-feed) 45%, transparent); }
.cal .day.hol { background: color-mix(in srgb, var(--c-pest) 9%, var(--surface)); }
.cal .day.out { opacity: .72; }
.cal .dhead { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.cal .hj { font: 500 .66rem var(--f-num); color: var(--muted); }
.cal .hj.first { color: var(--c-feed); font-weight: 700; font-family: var(--f-body); }
.cal .sd { font-size: .66rem; font-weight: 700; color: var(--c-feed); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .sd.h { color: var(--c-pest); }
.we-card { background: color-mix(in srgb, var(--c-pending) 5%, var(--surface)); }
.pill.hol { background: color-mix(in srgb, var(--c-pest) 14%, transparent); color: var(--c-pest); }
.legend .lg-hol { background: color-mix(in srgb, var(--c-pest) 35%, transparent) !important; }
.legend .lg-we { background: color-mix(in srgb, var(--c-pending) 30%, transparent) !important; }
.legend .lg-ram { background: var(--c-feed) !important; }
.cal .ev { font-size: .7rem; font-weight: 600; padding: 2px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
@media (max-width: 700px) { .cal .day { min-height: 62px; } .cal .dow.we { color: var(--c-pending); }
.cal .day.we { background: color-mix(in srgb, var(--c-pending) 6%, var(--surface)); }
.cal .day.ram { box-shadow: inset 0 3px 0 color-mix(in srgb, var(--c-feed) 45%, transparent); }
.cal .day.hol { background: color-mix(in srgb, var(--c-pest) 9%, var(--surface)); }
.cal .day.out { opacity: .72; }
.cal .dhead { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.cal .hj { font: 500 .66rem var(--f-num); color: var(--muted); }
.cal .hj.first { color: var(--c-feed); font-weight: 700; font-family: var(--f-body); }
.cal .sd { font-size: .66rem; font-weight: 700; color: var(--c-feed); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .sd.h { color: var(--c-pest); }
.we-card { background: color-mix(in srgb, var(--c-pending) 5%, var(--surface)); }
.pill.hol { background: color-mix(in srgb, var(--c-pest) 14%, transparent); color: var(--c-pest); }
.legend .lg-hol { background: color-mix(in srgb, var(--c-pest) 35%, transparent) !important; }
.legend .lg-we { background: color-mix(in srgb, var(--c-pending) 30%, transparent) !important; }
.legend .lg-ram { background: var(--c-feed) !important; }
.cal .ev { font-size: 0; height: 6px; padding: 0; border-radius: 3px; background: var(--c); } }

/* Coach */
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; }
.bubble.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.briefing { white-space: pre-wrap; line-height: 1.6; font-size: .95rem; }
.label-fact { color: var(--info); font-weight: 700; } .label-est { color: var(--warn); font-weight: 700; } .label-sug { color: var(--brand); font-weight: 700; }

/* Fruit counter */
.count-stage { position: relative; display: inline-block; max-width: 100%; border-radius: 14px; overflow: hidden; touch-action: manipulation; cursor: crosshair; }
.count-stage img { max-height: 70vh; width: auto; max-width: 100%; }
.mark { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 3px solid #fff; background: rgba(232, 104, 74, .85); box-shadow: 0 0 0 2px rgba(0,0,0,.35); color: #fff; font: 700 .7rem/20px var(--f-num); text-align: center; cursor: pointer; }
.mark.manual { background: rgba(20, 156, 151, .9); }
.big-count { font: 500 3rem/1 var(--f-num); letter-spacing: -.04em; }

/* Disease result */
.conf { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.conf i { display: block; height: 100%; background: var(--c); }
ul.clean { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* Weather */
.wx-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; text-align: center; font-size: .78rem; }
.wx-days div { background: var(--surface-2); border-radius: 10px; padding: 8px 4px; }
.wx-days b { font-family: var(--f-num); font-weight: 500; display: block; font-size: .86rem; }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; min-height: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.offline-banner { position: fixed; top: env(safe-area-inset-top, 0px); left: 50%; transform: translateX(-50%); z-index: 95; background: var(--warn); color: #221500; padding: 6px 14px; border-radius: 0 0 12px 12px; font-weight: 700; font-size: .82rem; }
.print-hide {}

.stack > a.btn.ghost:first-child { align-self: flex-start; padding-left: 4px; }
.doc table { min-width: 520px; }
.money, td.money, .kpi .v, .price-tile .pr { white-space: nowrap; }

/* Download app (same behaviour as Daftar) */
.install-slot:empty { display: none; }
.ci { display: flex; flex-direction: column; gap: 10px; }
.ci-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; cursor: pointer;
  font: 700 .92rem var(--f-body); color: var(--ink); background: var(--surface-2); border: 1.5px solid var(--line-2); border-bottom-width: 4px; text-decoration: none; }
.ci-btn:hover { background: var(--surface); }
.ci-btn:active { transform: translateY(2px); border-bottom-width: 1.5px; }
.ci-btn svg { flex: none; color: var(--brand); }
.ci-help { border: 1px dashed var(--line-2); border-radius: 14px; padding: 12px 14px; font-size: .9rem; line-height: 1.45; }
.ci-help ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.ci-help small { color: var(--muted); display: block; margin-top: 8px; }
.ci-sub { font-size: .8rem; color: var(--muted); text-align: center; }

/* Admin testing an account */
.imp-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: #7a3d00; color: #fff3e0; font-size: .88rem; }
.imp-bar svg { width: 18px; height: 18px; display: block; }
.imp-bar .btn { min-height: 36px; background: #fff3e0; color: #5a2d00; border-color: transparent; }

/* Codes and hand-over */
.code-input { font: 500 1.6rem/1 var(--f-num); letter-spacing: .4em; text-align: center; min-height: 58px; }
.handover { white-space: pre-wrap; font: 500 .95rem/1.6 var(--f-num); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 12px; padding: 14px; margin: 0; user-select: all; overflow-wrap: anywhere; }

/* ================= v3: colour-coded farm work ================= */
.k { --kc: var(--c-forest); }
.k-water { --kc: var(--c-water); } .k-feed { --kc: var(--c-feed); } .k-pest { --kc: var(--c-pest); } .k-done { --kc: var(--c-done); }
.k-pending { --kc: var(--c-pending); } .k-notice { --kc: var(--c-notice); } .k-soil { --kc: var(--c-soil); } .k-forest { --kc: var(--c-forest); }
.kchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 999px; font-weight: 700; font-size: .78rem;
  background: color-mix(in srgb, var(--kc) 14%, transparent); color: var(--kc); white-space: nowrap; }
.kchip svg { width: 16px; height: 16px; }
.kdot { width: 10px; height: 10px; border-radius: 50%; background: var(--kc); flex: none; }
.pill.done { background: color-mix(in srgb, var(--c-done) 15%, transparent); color: var(--c-done); }
.pill.pending { background: color-mix(in srgb, var(--c-pending) 15%, transparent); color: var(--c-pending); }
.pill.urgent { background: var(--c-pest); color: #fff; }
.pill.notice { background: var(--c-notice-bg); color: var(--c-notice); }
.noticebox { background: var(--c-notice-bg); color: var(--ink); border-left: 4px solid var(--c-notice); padding: 10px 12px; border-radius: 10px; font-weight: 500; }

/* Task cards (owner + staff): colour bar = kind, status in words and colour */
.taskcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 12px 12px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--kc); position: relative; }
.taskcard + .taskcard { margin-top: 10px; }
.taskcard .tic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--kc) 14%, transparent); color: var(--kc); }
.taskcard .tic svg { width: 26px; height: 26px; }
.taskcard .tt { font: 700 1.05rem/1.25 var(--f-display); }
.taskcard .ts { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.taskcard.done { opacity: .78; border-left-color: var(--c-done); }
.taskcard.done .tt { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.taskcard.overdue { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c-pest) 40%, transparent); }
.taskcard .go { min-height: 52px; padding: 0 16px; border-radius: 14px; font-weight: 800; border: 0; background: var(--c-done); color: #fff; font-size: 1rem; cursor: pointer; }
.taskcard .go.undo { background: var(--surface-2); color: var(--ink-2); }

/* Bilingual labels for staff: English, then the translation underneath */
.tr { display: inline-flex; flex-direction: column; line-height: 1.15; text-align: inherit; }
.tr > .tl { font-size: .78em; font-weight: 500; opacity: .82; margin-top: 2px; font-family: 'Noto Sans Bengali', 'Noto Sans Devanagari', var(--f-body); letter-spacing: 0; text-transform: none; }
.btn .tr, .tile .tr { align-items: inherit; }
h1 .tr > .tl, h2 .tr > .tl { font-size: .62em; font-weight: 600; }
label .tr > .tl { font-size: .82em; color: var(--muted); }
.trline { display: block; font-size: .86em; color: var(--muted); margin-top: 3px; }

/* Big tap-first controls */
.bigcheck { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.bigcheck input { width: 30px; height: 30px; accent-color: var(--c-done); flex: none; }
.bigcheck.on { border-color: var(--c-done); background: color-mix(in srgb, var(--c-done) 10%, var(--surface)); }
.bigcheck.prob.on { border-color: var(--c-pest); background: color-mix(in srgb, var(--c-pest) 9%, var(--surface)); }
.bigcheck.prob input { accent-color: var(--c-pest); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 50px; padding: 8px 14px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--surface); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-align: left; }
.choice.on { border-color: var(--kc, var(--c-forest)); background: color-mix(in srgb, var(--kc, var(--c-forest)) 12%, var(--surface)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--kc, var(--c-forest)); }
.choice svg { width: 20px; height: 20px; color: var(--kc, var(--c-forest)); }
.stepper { display: inline-flex; align-items: stretch; border: 2px solid var(--line-2); border-radius: 16px; overflow: hidden; background: var(--surface); }
.stepper button { width: 58px; min-height: 56px; border: 0; background: var(--surface-2); font: 800 1.6rem/1 var(--f-body); cursor: pointer; color: var(--ink); }
.stepper button:active { background: var(--line); }
.stepper input { width: 96px; border: 0; text-align: center; font: 600 1.35rem var(--f-num); background: transparent; color: var(--ink); }
.qrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qblock { display: flex; flex-direction: column; gap: 8px; }
.qblock > .ql { font-weight: 700; font-size: .95rem; }
.kindhead { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--kc) 12%, var(--surface)); color: var(--ink); }
.kindhead .tic { width: 48px; height: 48px; border-radius: 14px; background: var(--kc); color: #fff; display: grid; place-items: center; }
.kindhead .tic svg { width: 28px; height: 28px; }
.save-bar { position: sticky; bottom: 0; display: flex; gap: 10px; padding-top: 10px; background: linear-gradient(to top, var(--surface) 70%, transparent); }
.save-bar .btn { flex: 1; min-height: 56px; font-size: 1.05rem; }

/* Staff login: very large and simple */
.auth.simple .box { max-width: 460px; }
.auth .input.xl { min-height: 58px; font-size: 1.15rem; border-radius: 14px; }
.pwwrap { position: relative; }
.pwwrap .show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 44px; }
.helpline { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: .92rem; }
.phone-in { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; }

/* Language picker cards (owner settings) */
.langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.lang { padding: 14px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface); text-align: left; cursor: pointer; }
.lang.on { border-color: var(--c-forest); box-shadow: inset 0 0 0 1px var(--c-forest); background: color-mix(in srgb, var(--c-done) 8%, var(--surface)); }
.lang b { display: block; font-size: 1.05rem; } .lang .nat { font-size: 1.1rem; margin-top: 4px; } .lang .sample { color: var(--muted); font-size: .82rem; margin-top: 6px; }

/* Admin */
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--kc, var(--c-forest)); }
.stat .v { font: 700 clamp(1.15rem, 1rem + .6vw, 1.45rem)/1.15 var(--f-display); margin-top: 4px; overflow-wrap: anywhere; } .stat .l { color: var(--muted); font-size: .82rem; font-weight: 600; }
.admintabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.admintabs a { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink-2); font-weight: 700; white-space: nowrap; font-size: .9rem; }
.admintabs a.on { background: var(--c-forest); border-color: var(--c-forest); color: #fff; }
.demo-badge { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--c-notice-bg); color: var(--c-notice); font-weight: 800; font-size: .7rem; letter-spacing: .06em; }
.cred { font-family: var(--f-num); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; user-select: all; }
.switchrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switchrow:last-child { border-bottom: 0; }
.switchrow .d { color: var(--muted); font-size: .86rem; }
.toggle { width: 52px; height: 30px; border-radius: 999px; background: var(--line-2); border: 0; position: relative; cursor: pointer; flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle.on { background: var(--c-done); } .toggle.on::after { left: 25px; }
.hijri-today { font-size: .86rem; color: var(--c-feed); font-weight: 700; }

.tasklink { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; margin: 1px 2px; border-radius: 8px; font-weight: 700; text-decoration: none;
  background: color-mix(in srgb, var(--c-pending) 14%, transparent); color: var(--c-pending); border: 0; cursor: pointer; font-size: .92em; }
.tasklink.new { background: color-mix(in srgb, var(--c-done) 14%, transparent); color: var(--c-done); }

@media (max-width: 480px) {
  .taskcard:has(> .tic) { grid-template-columns: minmax(0, 1fr) auto; padding-left: 12px; }
  .taskcard .tic { display: none; }
  .taskcard { gap: 8px; }
}
.taskcard .kchip .tr > .tl, .pill .tr > .tl { font-size: .72em; }
.staff-hello h1 .tr { display: inline-flex; }
@media (min-width: 1000px) { .adminnav { display: none; } }

/* ================= Calendar (Daftar style) ================= */
.calpage { max-width: 900px; }
.calseg { align-self: flex-start; }
.calhd { display: flex; align-items: center; gap: 6px; }
.calhd h2 { font-size: 1.35rem; }
.calhd small { display: block; color: var(--c-feed); font-weight: 600; font-size: .8rem; margin-top: 2px; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); touch-action: pan-y; }
.mgrid .wd { font: 700 .7rem var(--f-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; padding: 10px 0 8px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--c-forest) 6%, var(--surface)); }
.mgrid .wd.we { color: var(--c-pending); background: color-mix(in srgb, var(--c-pending) 9%, var(--surface)); }
.dc { min-height: 82px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: none; padding: 5px 4px 4px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; text-align: left; cursor: pointer; color: var(--ink); min-width: 0; font: inherit; }
.dc:nth-child(7n) { border-right: 0; }
.dc.wkend { background: color-mix(in srgb, var(--c-pending) 5%, transparent); }
.dc.ram { box-shadow: inset 0 3px 0 color-mix(in srgb, var(--c-feed) 55%, transparent); }
.dc.out { opacity: .38; }
.dc .dtop { display: flex; align-items: flex-start; justify-content: space-between; }
.dc .dn { font: 800 .98rem var(--f-body); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.dc.past:not(.out):not(.td) .dn { color: var(--muted); font-weight: 700; }
.dc.td .dn { background: var(--c-forest); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--c-forest) 45%, transparent); }
.dc.sel { background: color-mix(in srgb, var(--c-done) 12%, transparent); }
.dc.sel .dn { outline: 2.5px solid var(--c-done); outline-offset: 1px; }
.dc.hol .dn { color: var(--c-pest); }
.dc.hol:not(.td) .dn { background: color-mix(in srgb, var(--c-pest) 13%, transparent); }
.dc .hj { font: 600 .6rem var(--f-body); color: var(--muted); padding-top: 3px; }
.dc .hj.first { color: var(--c-feed); font-weight: 800; }
.dc .pl { font: 700 .64rem/1.3 var(--f-body); padding: 2px 5px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--ink); border-left: 3px solid var(--c); }
.dc .dots { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.dc .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.dc .dots small { font-size: .58rem; color: var(--muted); font-weight: 700; }
@media (max-width: 600px) { .dc { min-height: 64px; padding: 3px 2px; } .dc .dn { width: 26px; height: 26px; font-size: .86rem; } .dc .pl { font-size: .56rem; padding: 1px 3px; } .dc .hj { font-size: .52rem; } .dc .hj.first { font-size: 0; } .dc .hj.first::after { content: '1'; font-size: .52rem; } }
.calleg { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 600 .76rem var(--f-body); color: var(--ink-2); padding: 0 4px; }
.calleg span { display: inline-flex; align-items: center; gap: 5px; }
.calleg i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.daypanel { margin-top: 4px; }
.dph { display: flex; align-items: flex-end; gap: 10px; margin: 6px 2px 8px; }
.dph h3 { font-size: 1.15rem; }
.cal-list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cal-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.cal-it:last-child, .cal-hol:last-child { border-bottom: 0; }
.cal-it:hover { background: var(--surface-2); }
.cal-it .lc { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); flex: none; }
.cal-it .ei { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); flex: none; }
.cal-it .ei svg { width: 20px; height: 20px; }
.cal-it .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-it .tt { font-weight: 700; line-height: 1.3; word-break: break-word; }
.cal-it .meta { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.cal-it .donetag { color: var(--c-done); font-weight: 800; font-size: .8em; }
.cal-hol { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--c-feed) 7%, var(--surface)); }
.cal-hol.ph { background: color-mix(in srgb, var(--c-pest) 8%, var(--surface)); }
.cal-hol .flag { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--c-feed); flex: none; }
.cal-hol.ph .flag { background: var(--c-pest); }
.cal-hol .flag svg { width: 18px; height: 18px; }
.cal-empty { padding: 16px; color: var(--muted); }
.wkv { padding: 0; overflow: hidden; }
.wkv .wd2 { display: flex; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.wkv .wd2:last-child { border-bottom: 0; }
.wkv .wd2.wkend { background: color-mix(in srgb, var(--c-pending) 5%, transparent); }
.wkv .wdl { width: 48px; flex: none; text-align: center; border: 0; background: none; cursor: pointer; color: var(--ink); padding: 0; }
.wkv .wdl b { display: block; font: 800 1.3rem var(--f-display); }
.wkv .wdl span { font: 700 .66rem var(--f-body); text-transform: uppercase; color: var(--muted); }
.wkv .wdl small { display: block; font-size: .62rem; color: var(--c-feed); font-weight: 700; }
.wkv .wd2.td .wdl b { color: var(--c-forest); }
.wkv .wdi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.wkv .pill2 { border: 0; text-align: left; font: 600 .84rem var(--f-body); padding: 6px 9px; border-radius: 8px; background: color-mix(in srgb, var(--c) 14%, transparent); border-left: 3px solid var(--c); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.grp { font: 700 .76rem var(--f-body); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 16px 4px 6px; display: flex; gap: 8px; }
.grp .hjg { text-transform: none; letter-spacing: 0; color: var(--c-feed); }

/* ================= Help "?" bubbles ================= */
.lblrow { display: flex; align-items: center; gap: 6px; }
.qhelp { position: relative; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--c-water) 14%, transparent); color: var(--c-water); font: 800 .8rem/1 var(--f-body); cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.qhelp:hover, .qhelp.open { background: var(--c-water); color: #fff; }
.qhelp .qbub { display: none; position: absolute; z-index: 40; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: min(260px, 72vw); padding: 10px 12px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font: 500 .84rem/1.4 var(--f-body); text-align: left; box-shadow: var(--shadow-lg); white-space: normal; }
.qhelp .qbub::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top: 0; border-bottom-color: var(--ink); }
.qhelp.open .qbub { display: block; }
.sheet .qhelp .qbub { left: 0; transform: none; } .sheet .qhelp .qbub::before { left: 11px; }

/* ================= Colour on numbers (Daftar style) ================= */
.money, .num { font-variant-numeric: tabular-nums; }
.kpi .v { color: var(--kc, var(--ink)); }
.neg, .money.neg, .kpi .v.neg { color: var(--c-pest) !important; }
[data-flow="in"] .money, [data-flow="in"] td.r { color: var(--c-done); }
[data-flow="out"] .money, [data-flow="out"] td.r { color: var(--c-pest); }
.amt-in { color: var(--c-done); font-weight: 700; } .amt-out { color: var(--c-pest); font-weight: 700; } .amt-owed { color: var(--c-pending); font-weight: 700; }
.qty-c { color: var(--c-water); font-weight: 700; } .date-c { color: var(--c-feed); font-weight: 600; }
.t2 .money { font-weight: 700; }
.stat .v { color: var(--kc, var(--ink)); }

/* ================= Staff task card (phone-first) ================= */
.stask { --kc: var(--c-forest); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--kc); border-radius: 16px; padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.stask + .stask { margin-top: 10px; }
.stask.overdue { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c-pest) 40%, transparent); }
.stask .st-top { display: flex; gap: 10px; align-items: flex-start; }
.stask .st-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--kc) 14%, transparent); color: var(--kc); }
.stask .st-ic svg { width: 22px; height: 22px; }
.stask .st-title { min-width: 0; flex: 1; }
.stask .tt { font: 700 1.08rem/1.3 var(--f-display); overflow-wrap: anywhere; }
.stask .st-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .88rem; color: var(--ink-2); }
.stask .st-meta span + span::before { content: ''; }
.stask .st-desc { font-size: .9rem; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.stask .st-done { display: flex; gap: 6px; align-items: center; font-size: .88rem; font-weight: 600; color: var(--c-done); }
.stask .st-done svg { width: 16px; height: 16px; }
.stask .st-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.stask .st-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 0; }
.stask .st-btns { display: flex; gap: 6px; }
.stask .st-btns .btn { min-height: 44px; display: inline-flex; gap: 6px; align-items: center; }
.stask .go { min-height: 52px; padding: 0 18px; border-radius: 14px; font-weight: 800; border: 0; background: var(--c-done); color: #fff; font-size: 1rem; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; margin-left: auto; }
.stask.done { opacity: .9; border-left-color: var(--c-done); }
.stask.done .tt { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.stask .kchip .tr, .stask .pill .tr { display: inline-flex; flex-direction: column; line-height: 1.1; }
.stask .pill { white-space: nowrap; }
@media (max-width: 420px) { .stask .go { width: 100%; justify-content: center; } .stask .st-btns { width: 100%; } .stask .st-btns .btn { flex: 1; justify-content: center; } }

/* ================= Shell additions ================= */
.backbtn { margin-left: -6px; }
.sw-bar { background: color-mix(in srgb, var(--c-water) 14%, var(--surface)); color: var(--ink); }
.practice-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 16px 0; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, color-mix(in srgb, var(--c-notice-bg) 90%, var(--surface)), color-mix(in srgb, var(--c-done) 12%, var(--surface))); border: 1px solid color-mix(in srgb, var(--c-notice) 35%, transparent); }
.practice-bar > span svg { width: 26px; height: 26px; color: var(--c-done); }
.sw-farm { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.sw-farm.live { border-color: color-mix(in srgb, var(--c-done) 45%, var(--line)); }
.sw-row { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; color: var(--ink); font: inherit; }
.sw-row:hover { background: var(--surface-2); }
.sw-row.on { border-color: var(--c-done); background: color-mix(in srgb, var(--c-done) 8%, var(--surface)); }
.sw-row .grow { display: flex; flex-direction: column; min-width: 0; }
.sw-row .sw-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c-water) 14%, transparent); color: var(--c-water); flex: none; }
.sw-row.owner .sw-ic { background: color-mix(in srgb, var(--c-forest) 14%, transparent); color: var(--c-forest); }
.sw-row .sw-ic svg { width: 20px; height: 20px; }
.check.keep { gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.check.keep input { width: 22px; height: 22px; accent-color: var(--c-done); }

/* ================= Live farm wizard ================= */
.golive { max-width: 860px; }
.gl-hero { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 20px; color: #fff; background: linear-gradient(130deg, var(--c-forest), color-mix(in srgb, var(--c-done) 80%, #0b6)); }
.gl-hero svg { width: 40px; height: 40px; } .gl-hero h1 { color: #fff; } .gl-hero p { color: #e2f5e8; margin-top: 4px; }
.gl-step .gl-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.gl-n { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--c-forest); color: #fff; font-weight: 800; }
.gl-save { position: sticky; bottom: 76px; display: flex; justify-content: flex-end; }
.gl-save .btn { min-height: 56px; font-size: 1.08rem; box-shadow: var(--shadow-lg); }

@media (max-width: 600px) {
  .practice-bar { flex-direction: column; align-items: stretch; margin: 10px 12px 0; }
  .practice-bar > span { display: none; }
  .practice-bar .btn { justify-content: center; }
  .gl-step .row:has(.seg) { flex-direction: column; align-items: stretch; }
  .gl-step .seg { flex-direction: row; }
}
.stask .go .tr, .stask .st-btns .tr { align-items: flex-start; }
/* Help bubble opens under the label line and stays inside the screen */
.lblrow, .qblock > .ql, .check.keep { position: relative; }
.qhelp { position: static; }
.qhelp .qbub, .sheet .qhelp .qbub { left: 0; right: auto; transform: none; top: calc(100% + 6px); width: min(320px, 100%); min-width: 220px; }
.qhelp .qbub::before, .sheet .qhelp .qbub::before { display: none; }
.qblock > .ql { display: flex; align-items: center; gap: 6px; }

/* ================= Vivid palette, light + dark (one set of tokens, used everywhere) ================= */
:root { --bg: #f5f9f5; --surface: #ffffff; --surface-2: #edf5ef; --ink: #0b2016; --ink-2: #2f4a3c; --muted: #5d7568; --line: #d8e5db; --line-2: #c2d5c7;
  --brand: #13753f; --brand-deep: #0d4a29; --brand-ink: #ffffff;
  --c-forest: #0f5e34; --c-done: #16a34a; --c-water: #2563eb; --c-pending: #ea7a0b; --c-pest: #dc2626; --c-feed: #7c3aed; --c-connect: #0d9488;
  --c-notice: #a16207; --c-notice-bg: #fff3c4; --c-soil: #8a5a2b;
  --good: #16a34a; --good-soft: #dcfce7; --warn: #c2410c; --warn-soft: #ffedd5; --bad: #dc2626; --bad-soft: #fee2e2; --info: #2563eb; --info-soft: #dbeafe; --lagoon: #0d9488; --lagoon-soft: #ccfbf1;
  --chart-1: #16a34a; --chart-2: #0d9488; --chart-3: #f59e0b; --chart-4: #ef4444; --chart-5: #65a30d; --chart-6: #2563eb; --chart-grid: #e2ece4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0b120f; --surface: #121c17; --surface-2: #19261f; --ink: #eef7f1; --ink-2: #c6d8cc; --muted: #95ad9f; --line: #243a2e; --line-2: #2f4a3b;
  --brand: #22c55e; --brand-deep: #0a2a18; --brand-ink: #04140b;
  --c-forest: #3ddc84; --c-done: #4ade80; --c-water: #60a5fa; --c-pending: #fb923c; --c-pest: #f87171; --c-feed: #c084fc; --c-connect: #2dd4bf;
  --c-notice: #facc15; --c-notice-bg: #3a2f08; --c-soil: #d9a873;
  --good: #4ade80; --good-soft: #12301f; --warn: #fb923c; --warn-soft: #3a220c; --bad: #f87171; --bad-soft: #3d1717; --info: #60a5fa; --info-soft: #132b47; --lagoon: #2dd4bf; --lagoon-soft: #0f302c;
  --chart-1: #4ade80; --chart-2: #2dd4bf; --chart-3: #fbbf24; --chart-4: #f87171; --chart-5: #a3e635; --chart-6: #60a5fa; --chart-grid: #1f3328;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 4px 16px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.55); color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #0b120f; --surface: #121c17; --surface-2: #19261f; --ink: #eef7f1; --ink-2: #c6d8cc; --muted: #95ad9f; --line: #243a2e; --line-2: #2f4a3b;
  --brand: #22c55e; --brand-deep: #0a2a18; --brand-ink: #04140b;
  --c-forest: #3ddc84; --c-done: #4ade80; --c-water: #60a5fa; --c-pending: #fb923c; --c-pest: #f87171; --c-feed: #c084fc; --c-connect: #2dd4bf;
  --c-notice: #facc15; --c-notice-bg: #3a2f08; --c-soil: #d9a873;
  --good: #4ade80; --good-soft: #12301f; --warn: #fb923c; --warn-soft: #3a220c; --bad: #f87171; --bad-soft: #3d1717; --info: #60a5fa; --info-soft: #132b47; --lagoon: #2dd4bf; --lagoon-soft: #0f302c;
  --chart-1: #4ade80; --chart-2: #2dd4bf; --chart-3: #fbbf24; --chart-4: #f87171; --chart-5: #a3e635; --chart-6: #60a5fa; --chart-grid: #1f3328;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 4px 16px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.55); color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
body { transition: background-color .2s ease, color .2s ease; }
/* dark-mode details */
:root[data-theme="dark"] .side, :root[data-theme="dark"] .tabbar { background: #08100c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side, :root:not([data-theme="light"]) .tabbar { background: #08100c; } }
.dc.td .dn, .gl-n { color: #fff; }
:root[data-theme="dark"] .dc.td .dn, :root[data-theme="dark"] .gl-n, :root[data-theme="dark"] .stask .go, :root[data-theme="dark"] .taskcard .go { color: #04140b; }
:root[data-theme="dark"] .gl-hero { background: linear-gradient(130deg, #0d3a22, #0f5e34); }
:root[data-theme="dark"] .qhelp .qbub { background: #eef7f1; color: #0b120f; }
:root[data-theme="dark"] .btn.primary { color: #04140b; }
/* theme picker */
.themeopts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.themeopt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.themeopt svg { width: 28px; height: 28px; }
.themeopt.on { border-color: var(--c-done); background: color-mix(in srgb, var(--c-done) 12%, var(--surface)); }
.themebtn.big { display: inline-flex; gap: 8px; align-items: center; }
.k-connect { --kc: var(--c-connect); }

/* ================= FarmConnect (teal = networking) ================= */
.pill.connect { background: color-mix(in srgb, var(--c-connect) 16%, transparent); color: var(--c-connect); }
.eyebrow.cx { color: var(--c-connect); }
.cxtabs a { display: inline-flex; gap: 6px; align-items: center; } .cxtabs a svg { width: 17px; height: 17px; }
.cxtabs a.on { background: var(--c-connect); border-color: var(--c-connect); color: #fff; }
:root[data-theme="dark"] .cxtabs a.on { color: #032420; }
.cx-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; padding: 20px; border-radius: 22px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #14b8a6 0%, #0d9488 38%, #0f5e34 100%); box-shadow: var(--shadow-lg); }
:root[data-theme="dark"] .cx-hero { background: radial-gradient(120% 140% at 0% 0%, #0f766e 0%, #0b4f49 45%, #0b2a1b 100%); border: 1px solid #1d5b52; }
.cx-hero .eyebrow { color: #ccfbf1; }
.cx-code { font: 800 clamp(2rem, 7vw, 2.8rem)/1.1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .04em; margin: 4px 0; }
.cx-hero .small { color: #e6fffa; }
.cx-hero .btn-row { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.cx-hero .btn { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.35); }
.cx-hero .btn:hover { background: rgba(255,255,255,.26); }
.cx-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-stats.admin { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cx-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); }
.cx-stat > span svg { width: 20px; height: 20px; opacity: .9; }
.cx-stat b { font-size: 1.7rem; line-height: 1.1; } .cx-stat small { font-size: .82rem; opacity: .92; }
.cx-stats.admin .cx-stat { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c-connect); color: var(--ink); }
.cx-stats.admin .cx-stat b { color: var(--c-connect); }
.cx-share { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 12px; }
.cx-sh { min-height: 48px; border-radius: 14px; border: 0; font: inherit; font-weight: 800; color: #fff; cursor: pointer; background: var(--c-connect); }
.cx-sh:disabled { opacity: .45; cursor: not-allowed; }
.cx-sh.sh-whatsapp { background: #128c4a; } .cx-sh.sh-viber { background: #6d4bd1; } .cx-sh.sh-telegram { background: #1f8bd8; }
.cx-sh.sh-sms { background: #ea7a0b; } .cx-sh.sh-email { background: #475569; } .cx-sh.sh-copy, .cx-sh.sh-share { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-2); }
.chip.cxj, .chip.cxs { cursor: default; border-color: color-mix(in srgb, var(--c-connect) 40%, var(--line)); color: var(--c-connect); background: color-mix(in srgb, var(--c-connect) 8%, var(--surface)); }
.qr { width: 120px; height: 120px; background: #fff; border-radius: 12px; padding: 6px; }
.qr.big { width: min(260px, 70vw); height: auto; aspect-ratio: 1; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c-connect); box-shadow: var(--shadow); }
.fc-top { display: flex; gap: 12px; align-items: center; } .fc-top h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.fc-av { width: 46px; height: 46px; border-radius: 14px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, var(--c-connect), var(--c-forest)); }
:root[data-theme="dark"] .fc-av { color: #032420; }
.fc-av.sm { width: 38px; height: 38px; border-radius: 12px; font-size: 1rem; } .fc-av.lg { width: 60px; height: 60px; border-radius: 18px; font-size: 1.6rem; }
.code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: var(--c-connect); }
.fc-crops .chip { cursor: default; min-height: 28px; padding: 3px 10px; font-size: .8rem; }
.fc-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .82rem; color: var(--muted); }
.fc-meta .why { color: var(--c-connect); font-weight: 700; }
.act { font-weight: 800; } .act-very { color: var(--c-done); } .act-active { color: var(--c-water); } .act-new { color: var(--c-pending); } .act-quiet { color: var(--muted); }
.fc-act { margin-top: auto; display: flex; justify-content: flex-end; }
.btn.connect { background: var(--c-connect); color: #fff; border-color: transparent; }
:root[data-theme="dark"] .btn.connect { color: #032420; }
.cx-row { text-decoration: none; color: inherit; }
.miles { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mile { display: flex; gap: 10px; align-items: center; } .mile > span svg { width: 22px; height: 22px; color: var(--muted); }
.mile.done > span svg { color: var(--c-notice); }
.mile .bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 4px 0 2px; }
.mile .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--c-connect), var(--c-done)); border-radius: 99px; }
.mile small { color: var(--muted); }
.cx-banner { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 18px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #0d9488, #2563eb); }
.cx-banner.com { background: linear-gradient(120deg, #0f5e34, #0d9488 60%, #7c3aed); }
:root[data-theme="dark"] .cx-banner { background: linear-gradient(120deg, #0b4f49, #1e3a8a); } :root[data-theme="dark"] .cx-banner.com { background: linear-gradient(120deg, #0b2a1b, #0b4f49 60%, #3b1d70); }
.cx-banner > div:first-child svg { width: 42px; height: 42px; } .cx-banner > div:nth-child(2) { flex: 1; min-width: 220px; }
.cx-banner h1 { color: #fff; font-size: 1.35rem; } .cx-banner p { color: #e0fbf6; margin-top: 4px; }
.cx-farmhead { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c-connect); }
.cx-farmhead h1 { font-size: 1.3rem; overflow-wrap: anywhere; }
.cxseg { display: flex; overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
.cxseg button { white-space: nowrap; } .cxseg button.on { background: var(--c-connect); color: #fff; } :root[data-theme="dark"] .cxseg button.on { color: #032420; }
.switchrow.fin b::after { content: ' $'; color: var(--c-pending); font-weight: 800; }
.chatwrap { display: flex; flex-direction: column; gap: 10px; }
.chatlog { display: flex; flex-direction: column; gap: 8px; max-height: min(60vh, 560px); overflow-y: auto; padding: 4px; }
.cmsg { max-width: min(78%, 520px); padding: 10px 12px; border-radius: 16px; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.cmsg.theirs { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cmsg.mine { align-self: flex-end; background: color-mix(in srgb, var(--c-connect) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c-connect) 35%, transparent); border-bottom-right-radius: 4px; }
.cmeta { font-size: .74rem; color: var(--muted); } .ctext { white-space: pre-wrap; }
.ctopic { align-self: flex-start; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--c-feed); }
.cimg { max-width: 100%; max-height: 260px; border-radius: 12px; display: block; }
.creport { background: var(--surface); border-radius: 12px; padding: 8px 10px; border-left: 4px solid var(--c-done); }
.cempty { text-align: center; color: var(--muted); padding: 30px 10px; }
.ccompose { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ccompose .ctopicsel { width: auto; min-width: 150px; flex: 1 1 150px; }
.ccompose form .btn.primary { align-self: stretch; }
.cmp { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.cmp-row { display: grid; grid-template-columns: minmax(80px, 140px) minmax(0, 1fr); gap: 10px; align-items: center; }
.cmp-l { font-weight: 700; overflow-wrap: anywhere; } .cmp-bars { display: flex; flex-direction: column; gap: 4px; }
.cmp-b { min-width: 34px; height: 22px; border-radius: 6px; font-size: .76rem; font-weight: 800; display: flex; align-items: center; padding: 0 6px; color: #fff; }
.cmp-b.me { background: var(--c-done); } .cmp-b.them { background: var(--c-connect); }
:root[data-theme="dark"] .cmp-b { color: #04140b; }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.post { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c-done); }
.post.story { border-top-color: var(--c-connect); } .post.featured { border-color: color-mix(in srgb, var(--c-notice) 55%, var(--line)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-notice) 25%, transparent), var(--shadow); }
.post-top { display: flex; gap: 6px; flex-wrap: wrap; } .post-body { white-space: pre-wrap; color: var(--ink-2); }
.post-img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; }
.post-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.helpful { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; min-height: 38px; }
.helpful.on { background: color-mix(in srgb, var(--c-done) 14%, var(--surface)); border-color: var(--c-done); color: var(--c-done); }
.invitebox { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--c-connect) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c-connect) 40%, transparent); }
.invitebox svg { width: 22px; height: 22px; color: var(--c-connect); }
@media (max-width: 760px) {
  .cx-hero { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .cmsg { max-width: 90%; }
  .cx-farmhead { padding: 12px; }
  .fgrid, .posts { grid-template-columns: minmax(0, 1fr); }
}
.act-getting { color: var(--c-water); } .act-active { color: var(--c-connect); }

/* Weather in the dashboard hero, bottom-right */
.hero .clock { display: flex; flex-direction: column; align-items: flex-end; align-self: stretch; gap: 0; }
.hero .clock .hero-wx { margin-top: auto; } .hero .clock > .small { margin-bottom: 12px; }
.hero-wx { margin-top: auto; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 16px; color: #fff; text-decoration: none; font: inherit; cursor: pointer; text-align: left;
  background: rgba(8, 40, 30, .32); border: 1px solid rgba(255,255,255,.35); box-shadow: 0 3px 0 rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.hero-wx:hover { background: rgba(8, 40, 30, .45); } .hero-wx:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.18); }
.hero-wx .wx-ic { font-size: 1.9rem; line-height: 1; } .hero-wx .wx-t { font: 700 1.7rem/1 var(--f-num); }
.hero-wx .wx-d { display: flex; flex-direction: column; } .hero-wx .wx-d small { opacity: .92; font-size: .76rem; white-space: nowrap; }
.hero-wx.none { font-size: .82rem; font-weight: 700; }
@media (max-width: 560px) { .hero .clock { align-items: flex-start; } .hero-wx { margin-top: 10px; } }

/* ================= Raised, clearly clickable buttons and tabs (light + dark) ================= */
:root { --edge: color-mix(in srgb, var(--ink) 22%, transparent); --edge-soft: color-mix(in srgb, var(--ink) 12%, transparent); }
.btn:not(.ghost), .chip, .seg, .admintabs a, .themeopt, .tile, .choice, .lang, .sw-row, .price-tile, .helpful, .cx-sh, .fab .ring {
  border-width: 1.5px; box-shadow: 0 3px 0 var(--edge-soft), 0 1px 2px var(--edge-soft), inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent); }
.btn:not(.ghost) { border-color: var(--edge); background-image: linear-gradient(180deg, color-mix(in srgb, #fff 10%, transparent), transparent 60%); }
.btn:not(.ghost):hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--edge-soft), 0 3px 8px var(--edge-soft), inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent); }
.btn:not(.ghost):active, .chip:active, .admintabs a:active, .seg button:active, .themeopt:active, .tile:active, .choice:active, .price-tile:active, .helpful:active, .cx-sh:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge-soft); }
.btn.primary, .btn.lagoon, .btn.connect { border-color: color-mix(in srgb, #000 22%, var(--brand)); box-shadow: 0 3px 0 color-mix(in srgb, #000 30%, var(--brand)), 0 2px 6px color-mix(in srgb, var(--brand) 30%, transparent), inset 0 1px 0 rgba(255,255,255,.28); }
.btn.lagoon { border-color: color-mix(in srgb, #000 22%, var(--lagoon)); box-shadow: 0 3px 0 color-mix(in srgb, #000 30%, var(--lagoon)), inset 0 1px 0 rgba(255,255,255,.28); }
.btn.connect { border-color: color-mix(in srgb, #000 22%, var(--c-connect)); box-shadow: 0 3px 0 color-mix(in srgb, #000 30%, var(--c-connect)), inset 0 1px 0 rgba(255,255,255,.28); }
.btn.danger { box-shadow: 0 3px 0 color-mix(in srgb, var(--bad) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.4); }
.btn.ghost { border: 1.5px solid transparent; }
.btn.ghost:hover { border-color: var(--line-2); background: var(--surface-2); }
.topbar .btn.icon.ghost { border-color: var(--line); background: var(--surface); box-shadow: 0 2px 0 var(--edge-soft); }
.btn[disabled], .btn[disabled]:hover { transform: none; box-shadow: none; }
.seg { border-color: var(--edge); padding: 4px; gap: 4px; box-shadow: inset 0 2px 3px var(--edge-soft); }
.seg button { border: 1.5px solid transparent; }
.seg button:not(.on):hover { background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: var(--line-2); }
.seg button.on { border-color: var(--edge); box-shadow: 0 2px 0 var(--edge-soft), 0 1px 3px var(--edge-soft); font-weight: 700; }
.chip { border-color: var(--edge); }
.chip.on { box-shadow: 0 2px 0 color-mix(in srgb, #000 30%, var(--brand)), inset 0 1px 0 rgba(255,255,255,.25); }
.admintabs { padding: 3px 2px 7px; }
.admintabs a { border-color: var(--edge); }
.admintabs a.on { box-shadow: 0 3px 0 color-mix(in srgb, #000 35%, var(--c-forest)), inset 0 1px 0 rgba(255,255,255,.25); }
.cxtabs a.on { box-shadow: 0 3px 0 color-mix(in srgb, #000 35%, var(--c-connect)), inset 0 1px 0 rgba(255,255,255,.25); }
:root[data-theme="dark"] { --edge: rgba(255,255,255,.22); --edge-soft: rgba(0,0,0,.55); }
:root[data-theme="dark"] .btn:not(.ghost), :root[data-theme="dark"] .chip, :root[data-theme="dark"] .admintabs a { box-shadow: 0 3px 0 rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --edge: rgba(255,255,255,.22); --edge-soft: rgba(0,0,0,.55); } }
.tabbar a, .tabbar button { transition: transform .08s; } .tabbar a:active, .tabbar button:active { transform: translateY(2px); }
.nav a { border: 1px solid transparent; } .nav a:hover { border-color: rgba(255,255,255,.18); }
.nav a.on { box-shadow: 0 3px 0 rgba(0,0,0,.25); }

/* ================= Payment details (settings, invoice) ================= */
.paybox { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.bankbadge { display: inline-grid; place-items: center; min-width: 34px; height: 20px; padding: 0 6px; border-radius: 5px; color: #fff; font-weight: 900; letter-spacing: .04em; font-size: .7rem; flex: none; }
.banklogo { height: 20px; width: auto; max-width: 56px; object-fit: contain; flex: none; }
.bankbadge.bml { background: #C8102E; } .bankbadge.mib { background: #00843D; }
.chatnum { display: inline-flex; align-items: center; gap: 8px; } .chatnum .ci { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.chatnum.viber .ci { background: #7360F2; } .chatnum.whatsapp .ci { background: #25D366; }
.chatnum.viber b, .chatnum.viber small { color: #7360F2; } .chatnum.whatsapp small { color: #1da851; }
.chatnum > span:last-child { display: flex; flex-direction: column; line-height: 1.15; } .chatnum small { font-weight: 700; font-size: .72rem; }
.chip.pay-bml.on { background: #C8102E; color: #fff; } .chip.pay-mib.on { background: #00843D; color: #fff; }
.chip.pay-viber.on { background: #7360F2; color: #fff; } .chip.pay-whatsapp.on { background: #1da851; color: #fff; }
.paydet { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.paydet .bankrow { display: flex; gap: 10px; align-items: center; } .paydet .acct { font-family: var(--f-num); font-size: .88rem; color: #10231a; }
.paydet .chatrow { display: flex; gap: 18px; flex-wrap: wrap; } .paydet .chatnum b { color: #10231a; font-family: var(--f-num); }
.cashpay { align-self: flex-start; background: #e8f6ee; color: #1e7a46; font-weight: 800; letter-spacing: .08em; padding: 6px 14px; border-radius: 8px; font-size: .85rem; }
.qbub .qen { display: block; } .qbub .qtl { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); font-size: .95em; }
/* Home page on phones: the top bar shows whose account this is */
.topbar .title .t-mob { display: none; }
@media (max-width: 900px) {
  .topbar .title .t-desk { display: none; }
  .topbar .title .t-mob { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
  .who-ic { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--c-forest), var(--c-done)); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
  :root[data-theme="dark"] .who-ic { color: #04140b; }
  .who-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
  .who-tx b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .who-tx small { font-size: .74rem; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 900px) { .topbar .title .t-mob { max-width: 42vw; } .who-tx b { font-size: .95rem; } .topbar .spacer { min-width: 4px; } .topbar .btn.icon { flex: none; } }

/* ================= Lists that stay readable on phones ================= */
.li > .grow { min-width: 0; }
.li .t1, .li .t2 { overflow-wrap: break-word; word-break: normal; hyphens: auto; }
@media (max-width: 640px) {
  .li { flex-wrap: wrap; row-gap: 8px; align-items: flex-start; }
  .li > .grow { flex: 1 1 52%; min-width: 52%; }
  .li > .grow + div, .li > .grow + .money, .li > .grow + b { margin-left: auto; text-align: right; }
  .li > .pill, .li > .btn, .li > .grow ~ .pill, .li > .grow ~ .btn { margin-left: auto; }
  .li > .grow ~ .pill:last-child, .li > .grow ~ .btn:last-child { flex: 0 0 auto; }
  .li .t2 { font-size: .82rem; line-height: 1.35; }
  .li .money { white-space: nowrap; }
  .kv { grid-template-columns: minmax(96px, 42%) minmax(0, 1fr); }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .t td, .t th { white-space: nowrap; } .t td:first-child { white-space: normal; min-width: 120px; }
}
/* Budget book rows */
.li.budget-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; }
.li.budget-row .kdot { margin-top: 7px; } .li.budget-row .grow { grid-column: 2; }
.li.budget-row .b-amt { grid-column: 3; text-align: right; } .li.budget-row .b-act { grid-column: 2 / 4; justify-self: end; }
@media (max-width: 640px) { .li.budget-row { flex-wrap: nowrap; } }
.money { font-variant-numeric: tabular-nums; }
/* Tables become card lists on phones */
@media (max-width: 640px) {
  table.cardtbl, table.cardtbl tbody, table.cardtbl tfoot { display: block; width: 100%; }
  table.cardtbl thead { display: none; }
  table.cardtbl tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.cardtbl tfoot tr { background: var(--surface-2); }
  table.cardtbl td { display: block; padding: 2px 0 !important; border: 0 !important; white-space: normal !important; min-width: 0 !important; max-width: 100%; overflow-wrap: anywhere; text-align: left !important; font-size: .9rem; }
  table.cardtbl td:first-child { font-weight: 700; font-size: 1rem; margin-bottom: 2px; }
  table.cardtbl td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: none; }
  table.cardtbl td.r, table.cardtbl td.num { font-weight: 700; }
  table.cardtbl td:empty { display: none; }
  table.cardtbl td .row { flex-wrap: wrap; }
  .table-wrap:has(table.cardtbl) { overflow: visible; }
  .who-tx b { font-size: 1.02rem; }
}

/* Sign-in / sign-up: logo sizing and early-access notice */
.auth .art .say .auth-logo { display: inline-block; width: 64px; height: 64px; margin-bottom: 12px; }
.auth .art .say .auth-logo .brand-mark { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.side .brand .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
.topbar .mobile-brand .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.earlybar { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c-connect) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c-connect) 35%, transparent); }
.earlybar .ea-badge { flex: none; align-self: center; font-weight: 800; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--c-connect); padding: 5px 9px; border-radius: 999px; }
:root[data-theme="dark"] .earlybar .ea-badge { color: #032420; }
.earlybar b { font-size: .92rem; } .earlybar .small { color: var(--muted); margin-top: 2px; line-height: 1.4; }

/* ================= Weather & farm alerts card ================= */
.wxcard.has-alert { border-color: color-mix(in srgb, var(--c-pest) 45%, var(--line)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-pest) 14%, transparent), var(--shadow); }
.wx-now { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.wx-big { display: flex; align-items: center; gap: 12px; }
.wx-emoji { font-size: 2.6rem; line-height: 1; }
.wx-deg { font: 700 2.2rem/1 var(--f-num); color: var(--ink); }
.wx-facts { display: flex; flex-direction: column; gap: 3px; font-size: .86rem; color: var(--ink-2); } .wx-facts b { font-family: var(--f-num); font-weight: 600; color: var(--ink); }
.wx-days .wx-dayic { font-size: 1.1rem; line-height: 1.3; }
.wx-days .wx-rain { color: var(--c-water); font-weight: 700; }
.wx-alerts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.wx-alert-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border-left: 4px solid var(--muted); background: var(--surface-2); }
.wx-alert-row .wx-ar-ic { font-size: 1.2rem; line-height: 1.2; flex: none; }
.wx-alert-row b { font-size: .9rem; } .wx-alert-row .small { color: var(--ink-2); margin-top: 1px; }
.wx-alert-row.wx-alert { border-left-color: var(--c-pest); background: color-mix(in srgb, var(--c-pest) 10%, var(--surface)); }
.wx-alert-row.wx-watch { border-left-color: var(--c-pending); background: color-mix(in srgb, var(--c-pending) 10%, var(--surface)); }
.wx-alert-row.wx-good { border-left-color: var(--c-done); background: color-mix(in srgb, var(--c-done) 10%, var(--surface)); }
.wx-alert-row.wx-info { border-left-color: var(--c-water); background: color-mix(in srgb, var(--c-water) 9%, var(--surface)); }
/* Initials avatar (profile picture) */
.who-ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 1rem; color: #fff; background: linear-gradient(135deg, var(--c-forest), var(--c-done)); box-shadow: 0 2px 0 rgba(0,0,0,.18); text-decoration: none; }
:root[data-theme="dark"] .who-ic { color: #04140b; }
.who-ic.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.5rem; }
.topbar .mobile-brand.ava-home { display: none; }
@media (max-width: 900px) { .topbar .mobile-brand.ava-home { display: inline-flex; } }

/* ---- v4.4: More menu as tidy tiles, repeat pickers, incomplete tasks ---- */
.morewrap { display: flex; flex-direction: column; gap: 16px; padding: 4px 4px 8px; }
.moregroup { display: flex; flex-direction: column; gap: 8px; }
.moreh { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: var(--muted); padding: 0 4px; }
.moregrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .moregrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.moretile { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 52px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 3px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; box-shadow: 0 1px 0 rgba(255,255,255,.4) inset; }
.moretile:active { transform: translateY(1px); border-bottom-width: 2px; }
.moretile .mt-ic { flex: 0 0 auto; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 11px; background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand); }
.moretile .mt-ic svg { width: 20px; height: 20px; }
.moretile .mt-l { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.moreout { margin-top: 4px; }
.choices.repeatpick, .choices.daypick { gap: 8px; }
.choices.daypick .choice { min-width: 46px; justify-content: center; }
.stask .st-late { color: var(--bad); font-weight: 800; font-size: .86rem; }
.stask .st-late.soft { color: var(--muted); font-weight: 700; }
.stask .st-ask { background: color-mix(in srgb, var(--c-notice) 16%, var(--surface)); border-radius: 10px; padding: 7px 10px; font-weight: 700; font-size: .88rem; }
.stask .st-rep { font-size: .8rem; color: var(--muted); font-weight: 700; }
/* Dashboard tiles: money in = green, out = red, waiting to be paid = orange */
.kpi { --tc: var(--good); --tb: var(--good-soft); }
.kpi.tone-in { --tc: #1e8a4c; --tb: color-mix(in srgb, #1e8a4c 11%, var(--surface)); }
.kpi.tone-out { --tc: #d2432d; --tb: color-mix(in srgb, #d2432d 10%, var(--surface)); }
.kpi.tone-owed { --tc: #d9822b; --tb: color-mix(in srgb, #f08a24 13%, var(--surface)); }
.kpi[class*="tone-"] { background: linear-gradient(135deg, var(--tb), var(--surface) 78%); border-color: color-mix(in srgb, var(--tc) 30%, var(--line)); border-bottom: 3px solid color-mix(in srgb, var(--tc) 55%, var(--line)); }
.kpi[class*="tone-"]::before { background: var(--tc); width: 5px; top: 10px; bottom: 10px; }
.kpi[class*="tone-"] .v { color: var(--tc); font-weight: 700; }
.kpi[class*="tone-"] .eyebrow { color: color-mix(in srgb, var(--tc) 70%, var(--ink)); }
:root[data-theme="dark"] .kpi.tone-in { --tc: #5fd18b; } :root[data-theme="dark"] .kpi.tone-out { --tc: #ff8a73; } :root[data-theme="dark"] .kpi.tone-owed { --tc: #ffb15c; }
.hero .glass.tone-in b { color: #b6f5cd; } .hero .glass.tone-out b { color: #ffc3b6; }
.hero .glass.tone-in { border-color: rgba(120,230,160,.55); } .hero .glass.tone-out { border-color: rgba(255,150,130,.55); }
.fc-break { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.fc-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); border-bottom-width: 3px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.fc-row.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.fc-row .num { font-size: 1.15rem; }
.fc-dot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; } .fc-dot.all { background: conic-gradient(#e8590c, #2f9e44, #1971c2, #9c36b5, #e8590c); }
.who-ic.has-photo { padding: 0; overflow: hidden; background: var(--surface-2); } .who-ic.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmsg.gone { opacity: .7; font-style: italic; }
.cdel { margin-left: 8px; border: 0; background: none; color: var(--bad); font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; padding: 2px 4px; }

/* ---- Notification centre ---- */
.nbanner { position: fixed; top: 10px; left: 50%; transform: translate(-50%, -140%); width: min(520px, calc(100vw - 20px)); z-index: 400; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); border-left: 6px solid var(--brand); background: var(--surface); color: var(--ink); box-shadow: 0 14px 40px rgba(0,0,0,.25); cursor: pointer; font: inherit; transition: transform .35s cubic-bezier(.2,.9,.3,1.2); }
.nbanner.in { transform: translate(-50%, 0); }
.nbanner.tone-chat { border-left-color: var(--c-connect, #2f8f83); } .nbanner.tone-good { border-left-color: var(--good); } .nbanner.tone-warn { border-left-color: var(--warn); } .nbanner.tone-bad { border-left-color: var(--bad); }
.nb-ic { font-size: 1.6rem; flex: none; } .nb-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; } .nb-tx b { overflow-wrap: anywhere; } .nb-tx small { color: var(--muted); overflow-wrap: anywhere; }
.nb-x { font-size: 1.4rem; color: var(--muted); padding: 0 4px; }
.has-new svg { color: var(--brand); } .wiggle { animation: bellwig .8s ease; }
@keyframes bellwig { 0%,100% { transform: rotate(0); } 15% { transform: rotate(18deg); } 30% { transform: rotate(-16deg); } 45% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 75% { transform: rotate(4deg); } }
.nlist { display: flex; flex-direction: column; gap: 8px; }
.nrow { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line); border-left: 5px solid var(--info); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; text-decoration: none; }
.nrow.unread { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.nrow.read { opacity: .78; } .nrow.tone-chat { border-left-color: var(--c-connect, #2f8f83); } .nrow.tone-good { border-left-color: var(--good); } .nrow.tone-warn { border-left-color: var(--warn); } .nrow.tone-bad { border-left-color: var(--bad); }
.nr-ic { font-size: 1.35rem; flex: none; } .nr-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; } .nr-tx b { overflow-wrap: anywhere; } .nr-tx small { color: var(--muted); overflow-wrap: anywhere; } .nr-ct { color: var(--brand); } .nr-t { font-size: .74rem; color: var(--muted); flex: none; }
.nsec { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: var(--muted); margin-top: 8px; }
.npush { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--c-connect, #2f8f83) 12%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--c-connect, #2f8f83) 50%, transparent); } .npush > div { flex: 1; display: flex; flex-direction: column; } .npush.off { background: var(--warn-soft); }
.nempty { text-align: center; padding: 28px 10px; display: flex; flex-direction: column; gap: 4px; align-items: center; } .nempty .big { font-size: 2.6rem; }

/* ---- Chat v2 ---- */
.chatwrap2 { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--c-connect, #2f8f83) 6%, var(--surface)), var(--surface)); }
.chat2 { display: flex; flex-direction: column; gap: 2px; max-height: min(62vh, 600px); min-height: 220px; overflow-y: auto; padding: 6px 4px; scroll-behavior: smooth; }
.cday { align-self: center; margin: 10px 0 6px; } .cday span { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: .72rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.cb { position: relative; max-width: min(80%, 460px); padding: 8px 12px 6px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; cursor: pointer; margin-bottom: 2px; }
.cb.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 6px 18px 18px 6px; }
.cb.mine { align-self: flex-end; background: linear-gradient(135deg, color-mix(in srgb, var(--c-connect, #2f8f83) 24%, var(--surface)), color-mix(in srgb, var(--c-connect, #2f8f83) 14%, var(--surface))); border: 1px solid color-mix(in srgb, var(--c-connect, #2f8f83) 38%, transparent); border-radius: 18px 6px 6px 18px; }
.cb.theirs.first { border-top-left-radius: 18px; margin-top: 8px; } .cb.theirs.last { border-bottom-left-radius: 18px; }
.cb.mine.first { border-top-right-radius: 18px; margin-top: 8px; } .cb.mine.last { border-bottom-right-radius: 18px; }
.cb.auto { border-style: dashed; }
.cfrom { font-size: .76rem; font-weight: 800; color: var(--c-connect, #2f8f83); }
.cb .ctext { white-space: pre-wrap; line-height: 1.35; } .cb .ctext.gone { color: var(--muted); font-style: italic; }
.cfoot { display: flex; justify-content: flex-end; gap: 6px; font-size: .68rem; color: var(--muted); } .ticks.seen { color: #1d9bf0; font-weight: 800; }
.cb .cimg { max-width: 100%; max-height: 300px; border-radius: 12px; display: block; }
.crx { display: flex; flex-wrap: wrap; gap: 4px; } .rx { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 8px; font-size: .82rem; cursor: pointer; } .rx.me { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.cbar { display: none; position: absolute; bottom: calc(100% - 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px; gap: 2px; box-shadow: 0 8px 22px rgba(0,0,0,.2); z-index: 3; }
.cb.mine .cbar { right: 0; } .cb.theirs .cbar { left: 0; } .cb.open .cbar { display: flex; }
.cbar button { border: 0; background: none; font-size: 1.25rem; padding: 2px 5px; cursor: pointer; border-radius: 8px; } .cbar button:hover { background: var(--surface-2); }
.cempty { text-align: center; padding: 30px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); } .cempty .big { font-size: 2.4rem; }
.cquick { display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: none; } .cquick button { flex: none; border: 1px solid var(--line); border-bottom-width: 3px; background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .84rem; cursor: pointer; }
.cattach { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .cattach .cat { padding: 6px 10px; min-height: 36px; gap: 6px; } .cattach .cat span { display: inline-flex; width: 18px; } .cattach .ctopicsel { max-width: 160px; margin-left: auto; min-height: 36px; padding: 4px 8px; }
.cinbar { display: flex; align-items: flex-end; gap: 8px; } .cinput { border-radius: 22px !important; resize: none; padding: 10px 14px !important; min-height: 44px; max-height: 120px; }
.csend { width: 46px; height: 46px; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; } .csend svg { width: 22px; height: 22px; }

/* ---- Budget & monthly expenses ---- */
.bd-month { display: flex; align-items: center; justify-content: center; gap: 14px; font-family: var(--f-display); font-size: 1.15rem; }
.bd-hero { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: center; border-left: 6px solid var(--line-2); }
.bd-hero.good { border-left-color: var(--good); background: linear-gradient(135deg, var(--good-soft), var(--surface) 60%); }
.bd-hero.warn { border-left-color: var(--warn); background: linear-gradient(135deg, var(--warn-soft), var(--surface) 60%); }
.bd-hero.bad { border-left-color: var(--bad); background: linear-gradient(135deg, var(--bad-soft), var(--surface) 60%); }
.bd-ring { position: relative; width: 160px; height: 160px; margin: auto; }
.bd-ring svg { width: 100%; height: 100%; }
.bd-ring circle { fill: none; stroke-width: 16; stroke-linecap: round; }
.bd-ring .bg { stroke: var(--line); } .bd-ring .fg { stroke: var(--line-2); transition: stroke-dashoffset .8s ease; }
.bd-ring.good .fg { stroke: var(--good); } .bd-ring.warn .fg { stroke: var(--warn); } .bd-ring.bad .fg { stroke: var(--bad); }
.bd-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.bd-ring-c b { font: 700 2rem var(--f-display); } .bd-ring-c small { color: var(--muted); max-width: 90px; line-height: 1.2; }
.bd-say { font: 700 1.05rem var(--f-display); margin-bottom: 8px; }
.bd-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.bd-nums small { display: block; color: var(--muted); font-size: .75rem; } .bd-nums b { font-size: 1.05rem; overflow-wrap: anywhere; }
.bd-nums b.good, .bd-nums .good { color: var(--good); } .bd-nums b.bad { color: var(--bad); }
.bd-cat-list { display: grid; gap: 8px; }
.bd-catrow, .bd-plan-main { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; cursor: pointer; min-width: 0; }
.bd-catrow:active, .bd-plan-main:active { transform: translateY(1px); }
.bd-ce { flex: 0 0 auto; display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface); font-size: 1.2rem; }
.bd-cn { display: block; font-weight: 700; margin-bottom: 5px; } .bd-cn em { font-weight: 400; color: var(--muted); font-style: normal; font-size: .8rem; }
.bd-bar { display: block; height: 9px; border-radius: 9px; background: var(--line); overflow: hidden; }
.bd-bar i { display: block; height: 100%; border-radius: 9px; background: var(--chart-2); transition: width .6s ease; }
.bd-bar.good i { background: var(--good); } .bd-bar.warn i { background: var(--warn); } .bd-bar.bad i { background: var(--bad); }
.bd-ca { text-align: right; flex: 0 0 auto; } .bd-ca small { display: block; color: var(--muted); font-size: .75rem; }
.bd-plans { display: grid; gap: 8px; margin-bottom: 10px; }
.bd-plan { display: flex; align-items: center; gap: 8px; } .bd-plan .bd-plan-main { flex: 1; } .bd-plan.done .bd-plan-main { opacity: .65; }
.bd-hist { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; }
.bd-hcol { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; padding: 4px 0; border-radius: 10px; }
.bd-hcol.on { background: var(--surface-2); } .bd-hcol small { color: var(--muted); } .bd-hcol b { font-size: .75rem; }
.bd-hplot { position: relative; width: 70%; height: 110px; display: flex; align-items: flex-end; }
.bd-hplot i { display: block; width: 100%; border-radius: 8px 8px 2px 2px; background: var(--chart-2); min-height: 2px; }
.bd-hplot i.good { background: var(--good); } .bd-hplot i.warn { background: var(--warn); } .bd-hplot i.bad { background: var(--bad); }
.bd-hplot u { position: absolute; left: -12%; right: -12%; border-top: 2px dashed var(--ink-2); text-decoration: none; z-index: 1; }
.bd-big { display: flex; flex-direction: column; gap: 6px; font-weight: 700; } .bd-big .bd-in { font: 700 2rem var(--f-display); padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--surface); width: 100%; }
.bd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-chip { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; min-height: 40px; }
.bd-chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); } .bd-chip.alt { background: var(--info-soft); }
.bd-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.bd-cat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; min-width: 0; }
.bd-cat span { font-size: 1.5rem; } .bd-cat small { font-size: .7rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-cat.on { border-color: var(--brand); background: var(--good-soft); transform: scale(1.04); }
.bd-setcats { display: grid; gap: 8px; margin-top: 8px; } .bd-setrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bd-setrow .bd-in { width: 120px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); text-align: right; }
.bd-more summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.more-suggest { float: right; margin: -4px 0 8px 8px; border-radius: 999px; background: var(--info-soft); border: 1px solid var(--info); font-weight: 700; }
.fb-mine { padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: grid; gap: 4px; }
.fb-reply { padding: 6px 10px; border-radius: 10px; background: var(--good-soft); font-size: .9rem; }
.fb-card textarea { width: 100%; }
@media (max-width: 560px) { .bd-hero { grid-template-columns: 1fr; text-align: center; } .bd-nums { text-align: center; } .bd-hero .btn-row { justify-content: center; } }
.bd-n { font: 700 .95rem var(--f-num); color: var(--ink); white-space: nowrap; }
.bd-nums { gap: 4px; } .bd-nums .bd-n { font-size: .82rem; white-space: normal; overflow-wrap: anywhere; }
.bd-nums b.good { color: var(--good); } .bd-nums b.bad { color: var(--bad); }
.bd-plan-main .grow { display: flex; flex-direction: column; min-width: 0; } .bd-plan-main .grow b, .bd-plan-main .grow small { display: block; }
.bd-plan { flex-wrap: wrap; } .bd-plan > .pill, .bd-plan > .btn { flex: 0 0 auto; }
.rk { display: inline-block; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); white-space: nowrap; vertical-align: middle; }
.rk.lv2 { background: var(--good-soft); } .rk.lv3 { background: var(--lagoon-soft); } .rk.lv4 { background: var(--warn-soft); } .rk.lv5 { background: linear-gradient(90deg, #f6d365, #fda085); color: #3a2400; border-color: transparent; }
.rk-hero { display: flex; align-items: center; gap: 16px; } .rk-big { font-size: 3.4rem; line-height: 1; }
.rk-hero.lv5 { background: linear-gradient(135deg, #fff3c4, var(--surface)); } .rk-part { display: grid; gap: 4px; }
.rk-mine { background: var(--good-soft); border-radius: 10px; }

.rk-s { color: #d49a00; letter-spacing: -1px; } .rk.st7 { background: linear-gradient(90deg, #fff3c4, #ffd9a8); border-color: #e0a100; } .rk.st7 .rk-s { color: #b87400; }
.rk-stars { font-size: 1.7rem; color: #d49a00; letter-spacing: 2px; line-height: 1.1; } .rk-hero.st7 { background: linear-gradient(135deg, #fff3c4, var(--surface)); }
.rk-lvl { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 72px; height: 72px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); } .rk-lvl b { font: 700 1.7rem var(--f-display); line-height: 1; } .rk-lvl small { font-size: .6rem; letter-spacing: .1em; }
.bd-entry { gap: 10px; } .bd-ea { display: flex; gap: 2px; flex: 0 0 auto; } .bd-ea .btn.icon { width: 36px; height: 36px; min-height: 36px; }
/* More menu: one colour per section */
.moregroup { --gc: var(--brand); }
.moregroup.g0 { --gc: var(--c-water); } .moregroup.g1 { --gc: var(--c-done); } .moregroup.g2 { --gc: var(--c-pending); } .moregroup.g3 { --gc: var(--c-feed); }
.moregroup.g4 { --gc: var(--lagoon); } .moregroup.g5 { --gc: #d6447f; } .moregroup.g6 { --gc: var(--c-soil); }
:root[data-theme="dark"] .moregroup.g5 { --gc: #f07fb0; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .moregroup.g5 { --gc: #f07fb0; } }
.moregroup .moreh { color: var(--gc); display: flex; align-items: center; gap: 8px; font-weight: 800; }
.moregroup .moreh::before { content: ''; width: 6px; height: 16px; border-radius: 4px; background: var(--gc); }
.moregroup .moretile { border-color: color-mix(in srgb, var(--gc) 30%, var(--line)); border-bottom-color: var(--gc); background: color-mix(in srgb, var(--gc) 9%, var(--surface)); }
.moregroup .moretile .mt-ic { background: color-mix(in srgb, var(--gc) 20%, var(--surface)); color: var(--gc); }
.bd-tile { display: grid; gap: 8px; text-decoration: none; color: inherit; border-left: 6px solid var(--line-2); margin-top: 12px; } .bd-tile.good { border-left-color: var(--good); } .bd-tile.warn { border-left-color: var(--warn); } .bd-tile.bad { border-left-color: var(--bad); }
.bd-pl { color: var(--c-pending); }
.hero .clock .hj-date { font-weight: 700; opacity: .95; margin-top: 2px; }
.mv { font-weight: 700; } .mv.mv-in { color: var(--c-done) !important; } .mv.mv-out { color: var(--c-pest) !important; } .mv.mv-owed { color: var(--c-pending) !important; }
/* ---- Quick sale ---- */
.qs-today { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; padding: 10px; border-radius: 14px; background: var(--good-soft); } .qs-today small { display: block; color: var(--muted); font-size: .72rem; } .qs-today b { font-size: .95rem; }
.qs-search { font-size: 1.05rem; padding: 12px 14px; }
.qs-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; } .qs-chips .small { white-space: normal; }
.qs-chip { flex: 0 0 auto; scroll-snap-align: start; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; text-align: left; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; min-width: 120px; }
.qs-chip .qe { grid-row: span 2; font-size: 1.5rem; } .qs-chip .qn { font-weight: 700; } .qs-chip small { color: var(--muted); } .qs-chip.new { border-style: dashed; background: var(--info-soft); }
.qs-chip:active { transform: scale(.97); }
.qs-cart { display: grid; gap: 10px; } .qs-line { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: grid; gap: 8px; box-shadow: var(--shadow); }
.qs-top { display: flex; align-items: center; gap: 8px; } .qs-top .qe { font-size: 1.4rem; }
.qs-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.step { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.qs-n { width: 64px; height: 40px; text-align: center; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; } .qs-n.wide { width: 84px; }
.qs-u { height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 6px; } .qs-lt { margin-left: auto; font-family: var(--f-num); color: var(--c-done); }
.qs-total { display: flex; justify-content: space-between; align-items: center; font: 700 1.3rem var(--f-display); padding: 12px 14px; border-radius: 14px; background: var(--good-soft); }
.toast.undo { display: flex; align-items: center; gap: 14px; } .undo-btn { background: rgba(255,255,255,.18); color: inherit; border: 0; border-radius: 10px; padding: 6px 12px; font-weight: 800; cursor: pointer; }
/* ---- Bills & salaries ---- */
.pb-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.pb-tile { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); border-bottom-width: 3px; background: var(--surface); cursor: pointer; min-width: 0; }
.pb-tile.sal { border-bottom-color: var(--c-feed); background: color-mix(in srgb, var(--c-feed) 7%, var(--surface)); } .pb-tile.bil { border-bottom-color: var(--c-pending); background: color-mix(in srgb, var(--c-pending) 8%, var(--surface)); }
.pb-ic { font-size: 1.8rem; } .pb-tile b { display: block; } .pb-tile small { display: block; color: var(--muted); } .pb-tile small.good { color: var(--good); } .pb-go { font-weight: 800; color: var(--brand); white-space: nowrap; }
.pb-row, .pb-bill { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); } .pb-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--brand); } .pb-row.paid { opacity: .75; }
.pb-row .bd-in { width: 110px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); text-align: right; background: var(--surface); } .pb-bill.over { border-color: var(--bad); background: var(--bad-soft); } .pb-bill small, .pb-row small { display: block; }
.mv.mv-zero { color: var(--muted) !important; font-weight: 600; }
/* ---- Coach ---- */
.coach-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.coach-tabs button { border: 0; background: transparent; padding: 11px 6px; border-radius: 12px; font-weight: 800; cursor: pointer; color: var(--ink-2); min-height: 44px; } .coach-tabs button.on { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow); }
.coach-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; } .coach-tile { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line); border-bottom-width: 3px; background: var(--surface-2); cursor: pointer; font-weight: 600; } .ct-e { font-size: 1.5rem; }
.coach-chat { max-height: 52vh; overflow-y: auto; scroll-behavior: smooth; } .coach-sugg { display: grid; gap: 8px; } .coach-sugg .chip.on { background: var(--brand); color: var(--brand-ink); }
.coach-qs { display: grid; gap: 6px; } .coach-q { text-align: left; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 600; } .coach-q:active { transform: scale(.98); } .coach-q:disabled { opacity: .5; }
.coach-bar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 4; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); } .coach-form { gap: 8px; align-items: center; flex-wrap: nowrap; } .coach-form .btn.icon.rec { background: var(--bad); color: #fff; animation: pulse 1s infinite; }
.bubble.typing { display: inline-flex; gap: 5px; } .bubble.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; } .bubble.typing span:nth-child(2) { animation-delay: .2s; } .bubble.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } } @keyframes pulse { 50% { transform: scale(1.08); } }
.li.ins.tap { cursor: pointer; } .li.ins.tap:hover { background: var(--surface-2); border-radius: 12px; }
.ins-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .ins-ask { margin-top: 6px; font-weight: 700; color: var(--c-notice); }

/* Red count on the AI Farm Coach entry */
.coach-dot { background: #d92d20; color: #fff; box-shadow: 0 0 0 2px var(--surface); }
.coach-dot[hidden] { display: none; }
.tabbar button .coach-dot { position: absolute; top: 4px; left: calc(50% + 6px); }
.moretile { position: relative; }
.moretile .coach-dot { margin-left: auto; flex: 0 0 auto; }
.nav a .coach-dot { margin-left: auto; }
.nav a:has(.coach-dot) { display: flex; align-items: center; }

/* Notification row with its own close button at the end */
.nrowwrap { position: relative; display: flex; align-items: stretch; gap: 6px; }
.nrowwrap .nrow { flex: 1; min-width: 0; }
.nrow-x { flex: 0 0 auto; width: 34px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2, #5a6b61); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.nrow-x:hover, .nrow-x:active { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); border-color: var(--bad); }

/* Discover and My network: slimmer header, search bar and ID card */
.cx-banner.slim { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, #0f766e, #0b4f49); color: #fff; }
.cx-banner.slim span { display: inline-flex; width: 22px; } .cx-banner.slim b { flex: 1; font-size: .98rem; } .cx-banner.slim small { opacity: .85; }
.cx-filters.slim { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.cx-searchrow { display: flex; gap: 8px; } .cx-searchrow .input { flex: 1; min-width: 0; height: 40px; }
.cx-filrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .cx-filrow .input { height: 38px; width: 100%; }
@media (min-width: 720px) { .cx-filrow { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fc-av img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; } .fc-av { overflow: hidden; }
.cx-hero { padding: 12px 14px; gap: 10px; border-radius: 16px; grid-template-columns: minmax(0, 1fr); }
.cx-hero .cx-code { font-size: 1.35rem; margin: 2px 0; } .cx-hero .btn-row { margin-top: 6px; } .cx-hero .btn { min-height: 34px; padding: 4px 12px; font-size: .85rem; }
.cx-hero .cx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .cx-hero .cx-stat { padding: 6px 4px; } .cx-hero .cx-stat b { font-size: 1.05rem; } .cx-hero .cx-stat small { font-size: .62rem; }

/* Phones: button rows wrap onto a second row instead of scrolling sideways */
@media (max-width: 720px) {
  .admintabs, .cxseg, .cquick, .qs-chips, .coach-tabs, .tabs-row { flex-wrap: wrap !important; overflow: visible !important; scroll-snap-type: none; }
  .admintabs a, .cquick button { flex: 1 1 auto; text-align: center; }
  .cxseg button, .seg button { flex: 1 1 auto; }
  .admintabs { padding-bottom: 0; }
}

/* Edit = pencil (yellow barrel), delete = red bin; both sit at the right end of a row */
.btn.icon.pencil { color: #b7791f; background: #fff4cf; border: 1px solid #f0d37a; } .btn.icon.pencil:hover { background: #ffe9a3; }
:root[data-theme="dark"] .btn.icon.pencil { color: #f6c453; background: #3a3213; border-color: #6b5a1c; }
.btn.icon.trash { color: #fff; background: #d92d20; border: 1px solid #b42318; } .btn.icon.trash:hover { background: #b42318; }
.bd-ea { margin-left: auto; }

/* Crops: compact list */
.crop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.crop-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); }
.crop-row .cr-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.crop-row .cr-thumb { width: 56px; height: 56px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; flex: none; background: var(--surface-2); }
.crop-row .cr-thumb img, .crop-row .cr-thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.crop-row .cr-tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .crop-row .cr-tx b { font-size: .98rem; } .crop-row .cr-tx small { color: var(--muted); }
.crop-row .cr-pills { display: flex; gap: 4px; flex-wrap: wrap; }

/* Sales history cards */
.lc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.lc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c-done, var(--brand)); cursor: pointer; box-shadow: var(--shadow); }
.lc:active { transform: translateY(1px); } .lc.cancelled { opacity: .55; border-left-color: var(--muted); }
.lc-date { flex: none; width: 46px; height: 50px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.lc-date b { font-size: 1.2rem; } .lc-date small { font-size: .62rem; font-weight: 800; letter-spacing: .06em; }
.lc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lc-top { display: flex; align-items: center; gap: 6px; justify-content: space-between; } .lc-cust { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .96rem; }
.lc-items { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-meta { display: flex; gap: 8px; font-size: .72rem; color: var(--muted); } .lc-no { font-family: var(--f-num); font-weight: 700; }
.lc-amt { flex: none; text-align: right; display: flex; flex-direction: column; } .lc-amt b { font-size: 1.02rem; } .lc-owe { color: var(--bad); font-weight: 700; } .lc-paid { color: var(--good); font-weight: 700; }
.lc-totals { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: .84rem; color: var(--muted); } .lc-totals b { margin-left: 6px; color: var(--ink); }
.bd-links { border: 1px dashed var(--line-2); border-radius: 12px; padding: 8px 10px; } .bd-links summary { cursor: pointer; font-weight: 700; font-size: .88rem; } .bd-links .field { margin-top: 8px; }
@media (max-width: 720px) {
  .toolbar:has(.search) { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
  .toolbar:has(.search) .search { grid-column: 1 / -1; } .toolbar:has(.search) > .muted { display: none; }
  .toolbar:has(.search) .input, .toolbar:has(.search) select { width: 100%; min-width: 0; height: 40px; }
  .toolbar:has(.search) label { grid-column: 1 / -1; }
  /* Month / Quarter / Year / Custom picker: full-width row, then the arrows and label centred */
  .toolbar:not(:has(.search)) { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .toolbar:not(:has(.search)) > .seg { display: flex; width: 100%; } .toolbar:not(:has(.search)) > .seg button { flex: 1 1 0; padding: 7px 4px; }
  .toolbar:not(:has(.search)) > .row { justify-content: center; }
}

/* Price list, inventory, net worth: compact listings */
.as-sec { display: flex; align-items: center; gap: 8px; margin-top: 6px; } .as-sec h2 { font-size: 1.05rem; } .as-sec small { color: var(--muted); display: block; font-size: .78rem; } .as-sec .btn.sm { min-height: 32px; padding: 3px 12px; }
.as-list { display: flex; flex-direction: column; gap: 6px; }
.as-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); cursor: pointer; }
.as-row .btn.icon { width: 36px; height: 36px; min-height: 36px; flex: none; }
.as-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: color-mix(in srgb, var(--brand) 10%, var(--surface-2)); }
.cr-thumb.sm { flex: none; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: var(--surface-2); } .cr-thumb.sm img, .cr-thumb.sm svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.as-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .as-main b { font-size: .96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .as-main small { color: var(--muted); font-size: .76rem; }
.as-price { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; } .as-price small { color: var(--muted); font-size: .72rem; }
.as-grades { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; } .as-g { display: inline-flex; gap: 4px; align-items: center; padding: 1px 7px 1px 2px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: color-mix(in srgb, var(--gc) 12%, var(--surface)); color: var(--gc); border: 1px solid color-mix(in srgb, var(--gc) 35%, var(--line)); }
.as-g b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--gc); color: #fff; font-size: .68rem; }
.as-grade { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--gc) 40%, var(--line)); background: color-mix(in srgb, var(--gc) 7%, var(--surface)); } .as-grade .gl { font-weight: 800; color: var(--gc); min-width: 70px; } .as-grade .input-group { flex: 1; }
.as-sum { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; } .as-sum > div { padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; } .as-sum > div:first-child { background: linear-gradient(135deg, #0f766e, #0b4f49); color: #fff; border: 0; }
.as-sum small { font-size: .68rem; opacity: .85; } .as-sum b { font-size: 1.05rem; } .as-sum .owe { color: var(--bad); }
.as-tabs { display: flex; flex-wrap: wrap; } .as-tabs button { flex: 1 1 auto; }
.as-big { text-align: center; padding: 18px 12px; border-radius: 20px; background: linear-gradient(135deg, #0f766e, #0b4f49); color: #fff; display: flex; flex-direction: column; gap: 2px; } .as-big b { font-size: 2rem; } .as-big small { opacity: .85; }
.as-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; color: inherit; border-left: 4px solid #0f766e; } .as-tile small { color: var(--muted); display: block; } .as-tile b { font-size: 1.15rem; }
.as-foot { display: flex; justify-content: center; margin-top: 4px; }
.pres-on { background: #dcf5e4; color: #14773a; border: 1px solid #8fd6a8; } .pres-on .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: presPulse 1.6s infinite; }
@keyframes presPulse { 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.pres-off { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.as-sum b { font-family: var(--f-num); } .as-sum > div:first-child b { color: #fff; } .as-sum > div:nth-child(2) b { color: var(--good); } .as-sum > div:nth-child(3) b { color: var(--bad); }
.as-big b { color: #fff; font-family: var(--f-num); }
.as-sum { grid-template-columns: 1.25fr 1fr 1fr; } .as-sum b { font-size: .98rem; white-space: nowrap; }
.as-main b { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
.as-price b { white-space: nowrap; }
.as-big b, .as-big b.mv { color: #fff !important; } .as-sum > div:first-child b, .as-sum > div:first-child b.mv { color: #fff !important; }
.as-sum > div:nth-child(2) b.mv { color: var(--good) !important; } .as-sum > div:nth-child(3) b.mv { color: var(--bad) !important; }
.as-row .as-price b.mv { color: var(--ink) !important; } .as-row .as-price b.mv-zero { color: var(--muted) !important; }

/* Coach briefing: one colour-coded card per section */
.bsecs { display: flex; flex-direction: column; gap: 10px; }
.bsec { --bc: #64748b; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--bc) 35%, var(--line)); border-left: 6px solid var(--bc); background: color-mix(in srgb, var(--bc) 7%, var(--surface)); padding: 10px 12px; }
.bs-red { --bc: #d92d20; } .bs-amber { --bc: #d97706; } .bs-blue { --bc: #2563eb; } .bs-green { --bc: #15803d; } .bs-purple { --bc: #7c3aed; } .bs-teal { --bc: #0d9488; } .bs-grey { --bc: #64748b; }
.bs-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .bs-h b { color: var(--bc); font-size: .98rem; flex: 1; }
.bs-e { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; background: color-mix(in srgb, var(--bc) 16%, var(--surface)); }
.bs-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--bc); color: #fff; font: 800 .72rem/22px var(--f-body); text-align: center; }
.bs-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bs-l li { position: relative; padding-left: 16px; font-size: .92rem; line-height: 1.4; } .bs-l li::before { content: ''; position: absolute; left: 3px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--bc); }
.bs-none { color: var(--muted); font-size: .86rem; margin: 0; }
.bsec .tasklink { margin: 2px 0; }

.banklogo { height: 22px; width: 22px; border-radius: 5px; } .paydet .acct { font-size: .8rem; } .paydet .chatnum b { font-size: .8rem; } .paydet .chatnum small { font-size: .66rem; }

/* Dashboard header row: period picker, then the PDF button on its own line on phones */
@media (max-width: 720px) { .page-head { flex-wrap: wrap; } .page-head .btn-row, .page-head > .btn { width: 100%; } .row.wrap > .btn { flex: 1 1 100%; } }
.as-sum { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); } .as-sum > div { min-width: 0; } .as-sum b { font-size: .86rem; letter-spacing: -.02em; }
@media (max-width: 400px) { .as-sum { grid-template-columns: minmax(0, 1fr); } .as-sum > div { flex-direction: row; justify-content: space-between; align-items: center; } }

/* Simple, fast dashboard header: solid colour, no animation, always readable */
.hero { background: linear-gradient(135deg, #0b4a2a 0%, #14753f 100%) !important; min-height: 0; }
.hero::after { content: ''; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.07); z-index: -1; }
.hero .in { padding: 16px 18px; } .hero h1 { text-shadow: none; } .hero .clock .time { text-shadow: none; }
.hero .glass { background: rgba(0,0,0,.22); border-color: rgba(255,255,255,.18); backdrop-filter: none; }
.hero .glass b { color: #fff !important; }
.qa { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.qa-b { --q: #15803d; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--q) 35%, var(--line)); border-bottom-width: 3px; background: color-mix(in srgb, var(--q) 9%, var(--surface)); color: var(--ink); font: 700 .74rem var(--f-body); cursor: pointer; }
.qa-b:active { transform: translateY(1px); } .qa-e { font-size: 1.4rem; line-height: 1; }
.qa-red { --q: #d92d20; } .qa-orange { --q: #d97706; } .qa-blue { --q: #2563eb; } .qa-teal { --q: #0d9488; }
@media (max-width: 420px) { .qa { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; } .qa-b { font-size: .66rem; padding: 8px 2px; } }

/* ---------- Dashboard theme v2: soft, fresh cards (light and dark follow the page colours) ---------- */
.hero { background: linear-gradient(135deg, color-mix(in srgb, #4caf50 17%, var(--surface)) 0%, color-mix(in srgb, #8bc34a 8%, var(--surface)) 62%, var(--surface) 100%) !important;
  color: var(--ink); border: 1px solid color-mix(in srgb, #4caf50 28%, var(--line)); border-radius: 26px; box-shadow: 0 8px 24px color-mix(in srgb, #2e7d32 14%, transparent); }
.hero::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: min(46%, 380px); z-index: -1; background: url(/img/farm-header.jpg) right center / cover no-repeat; opacity: .55;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }
:root[data-theme="dark"] .hero::before { opacity: .22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero::before { opacity: .22; } }
.hero::after { display: none; }
.hero .in { padding: 18px 20px; gap: 14px 18px; align-items: flex-start; }
.hero .logo { width: 54px; height: 54px; border-radius: 18px; object-fit: contain; padding: 5px; background: #fff; border: 2px solid color-mix(in srgb, #4caf50 40%, #fff); box-shadow: 0 3px 10px rgba(30,110,60,.18); }
.hero .hi { color: var(--ink-2); font-weight: 600; }
.hero h1 { color: var(--c-forest, #0f4d2c); font-weight: 800; text-shadow: none; }
:root[data-theme="light"] .hero h1 { color: #0f4d2c; }
.hero .loc { color: var(--ink-2); opacity: 1; }
.hero .clock .time, .hero .clock .date, .hero .clock .hj-date, .hero .clock .small { color: var(--ink); text-shadow: none; opacity: 1; }
.hero .clock .small, .hero .clock .hj-date { color: var(--ink-2); }
.hero .strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.hero .glass { --q: #2e9e4f; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 7px; min-width: 0; padding: 10px 12px; border-radius: 18px; backdrop-filter: none; color: var(--ink-2); font-size: .76rem; font-weight: 600; line-height: 1.15;
  background: linear-gradient(135deg, color-mix(in srgb, var(--q) 20%, var(--surface)), color-mix(in srgb, var(--q) 7%, var(--surface))); border: 1px solid color-mix(in srgb, var(--q) 30%, var(--line)); box-shadow: 0 4px 12px color-mix(in srgb, var(--q) 14%, transparent); }
.hero .glass.tone-in { --q: #3aa655; } .hero .glass.tone-out { --q: #2f7fd6; } .hero .glass.tone-grow { --q: #6bb52f; } .hero .glass.tone-task { --q: #f08a24; }
.hero .glass .g-ic { grid-area: 1 / 1; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; background: color-mix(in srgb, var(--q) 16%, var(--surface)); }
.hero .glass .g-t { display: contents; }
.hero .glass .g-l { grid-area: 1 / 2; min-width: 0; }
.hero .glass b, .hero .glass.tone-in b, .hero .glass.tone-out b { grid-area: 2 / 1 / 3 / 3; display: block; color: var(--ink) !important; font: 700 .98rem/1.15 var(--f-num); letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-wx { color: var(--ink); background: linear-gradient(135deg, color-mix(in srgb, #ffb300 22%, var(--surface)), color-mix(in srgb, #ffd54f 8%, var(--surface))); border: 1px solid color-mix(in srgb, #ffb300 35%, var(--line)); box-shadow: 0 4px 12px rgba(255,160,0,.14); backdrop-filter: none; border-radius: 18px; }
.hero-wx:hover { background: color-mix(in srgb, #ffb300 22%, var(--surface)); }
.hero-wx .wx-d small { color: var(--ink-2); }
@media (max-width: 700px) { .hero .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero .clock { align-items: flex-start; } }
@media (max-width: 700px) { .hero::before { width: 60%; opacity: .22; } }
@media (max-width: 380px) { .hero .glass { padding: 8px 9px; } .hero .glass b { font-size: .9rem; } }

/* stat cards under the header */
.kpi { border-radius: 20px; box-shadow: 0 4px 14px color-mix(in srgb, var(--tc, #2e7d32) 10%, transparent); }
.kpi[class*="tone-"] { border-bottom-width: 1px; }
.kpi[class*="tone-"]::before { top: 14px; bottom: 14px; width: 4px; }
.card, .stat, .price-tile { border-radius: 20px; }
.card { box-shadow: 0 4px 16px color-mix(in srgb, #2e7d32 7%, transparent); }

/* quick action tiles */
.qa { gap: 10px; }
.qa-b { border-radius: 20px; border-width: 1px; border-bottom-width: 1px; padding: 12px 4px; background: linear-gradient(160deg, color-mix(in srgb, var(--q) 15%, var(--surface)), var(--surface)); box-shadow: 0 4px 12px color-mix(in srgb, var(--q) 16%, transparent); }
.qa-e { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; font-size: 1.35rem; background: color-mix(in srgb, var(--q) 16%, var(--surface)); }
@media (max-width: 420px) { .qa { gap: 6px; } .qa-e { width: 36px; height: 36px; font-size: 1.15rem; border-radius: 12px; } }

/* buttons: soft rounded, green primary with a gentle shine; period picker as pills */
.btn { border-radius: 14px; }
.btn.primary { background: linear-gradient(180deg, #2f9e57, #1f7a42); color: #fff; box-shadow: 0 4px 12px rgba(31,122,66,.28); }
.btn.primary:hover { background: linear-gradient(180deg, #2a9150, #1b6e3b); }
.seg { border-radius: 16px; } .seg button { border-radius: 12px; }
.seg button.on { background: linear-gradient(180deg, #2f9e57, #1f7a42); color: #fff; box-shadow: 0 3px 8px rgba(31,122,66,.28); }
.tabbar { border-radius: 26px 26px 0 0; box-shadow: 0 -6px 24px rgba(30,110,60,.12); }
.tabbar .on { color: #1f7a42; font-weight: 700; }

/* install progress screen + reinstall notice */
.ip { position: fixed; inset: 0; z-index: 9999; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--bg); color: var(--ink); transition: opacity .4s; padding: 24px; text-align: center; }
.ip.done { opacity: 0; pointer-events: none; }
.ip img { width: 92px; height: 92px; object-fit: contain; } .ip b { font: 800 1.35rem var(--f-display); color: var(--c-forest, #0f4d2c); }
.ip-t { font-weight: 600; color: var(--ink-2); } .ip-bar { width: min(260px, 70vw); height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; }
.ip-bar i { display: block; height: 100%; width: 0; border-radius: 10px; background: linear-gradient(90deg, #2f9e57, #8bc34a); transition: width .35s ease; }
.ri-top { display: flex; gap: 12px; align-items: center; } .ri-top img { flex: none; border-radius: 16px; background: #f4fbf0; padding: 6px; }
.ri-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.hero .who { container-type: inline-size; }
@container (max-width: 600px) { .hero .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Dashboard top, laid out like the reference picture ---------- */
.dtop { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dtop > * { min-width: 0; }
.dbrand, .dgreet, .dclock, .dwx { grid-column: 1 / -1; }
.dbrand { position: relative; display: flex; align-items: center; gap: 14px; min-height: 118px; padding: 12px 8px 12px 6px; border-radius: 26px; overflow: hidden; isolation: isolate; }
.dbrand::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url(/img/farm-header.jpg) right center / cover no-repeat; opacity: .6; -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 80%); mask-image: linear-gradient(90deg, transparent 20%, #000 80%); }
.dbrand img { flex: none; width: 74px; height: 74px; object-fit: contain; }
.dbrand b { display: block; font: 800 clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem)/1.02 var(--f-display); color: #0f3f26; letter-spacing: -.02em; }
.dbrand em { display: block; margin-top: 6px; font: italic 600 .86rem var(--f-body); color: #1d7a45; }
:root[data-theme="dark"] .dbrand b { color: #e4f0e8; } :root[data-theme="dark"] .dbrand em { color: #6fd39a; } :root[data-theme="dark"] .dbrand::before { opacity: .25; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dbrand b { color: #e4f0e8; } :root:not([data-theme="light"]) .dbrand em { color: #6fd39a; } :root:not([data-theme="light"]) .dbrand::before { opacity: .25; } }
.dgreet { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 28px; background: linear-gradient(135deg, color-mix(in srgb, #4caf50 16%, var(--surface)), color-mix(in srgb, #8bc34a 6%, var(--surface)));
  border: 1px solid color-mix(in srgb, #4caf50 28%, var(--line)); box-shadow: 0 6px 18px color-mix(in srgb, #2e7d32 10%, transparent); }
.dav { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, #2e9e4f 14%, var(--surface)); border: 3px solid color-mix(in srgb, #2e9e4f 45%, #fff); box-shadow: 0 3px 10px rgba(30,110,60,.2); font: 800 1.3rem var(--f-display); color: #1f7a42; }
.dav img { width: 100%; height: 100%; object-fit: cover; }
.dgt { flex: 1; min-width: 0; display: grid; gap: 1px; } .dgt small { color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.dgt b { font: 800 clamp(1.25rem, 1.05rem + 1vw, 1.7rem)/1.15 var(--f-display); color: var(--ink); overflow-wrap: anywhere; }
.dloc { color: var(--ink-2); font-weight: 600; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drole { flex: none; align-self: center; padding: 8px 14px; border-radius: 999px; background: linear-gradient(180deg, #1f7a42, #0f4d2c); color: #fff; font-weight: 700; font-size: .84rem; white-space: nowrap; box-shadow: 0 4px 10px rgba(15,77,44,.3); }
.ds { --q: #2e9e4f; grid-column: span 2; display: flex; align-items: center; gap: 12px; min-height: 96px; padding: 14px 12px 14px 14px; border-radius: 24px; text-decoration: none; color: var(--ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--q) 24%, var(--surface)), color-mix(in srgb, var(--q) 8%, var(--surface))); border: 1px solid color-mix(in srgb, var(--q) 32%, var(--line)); box-shadow: 0 6px 16px color-mix(in srgb, var(--q) 16%, transparent); }
.ds:active { transform: translateY(1px); }
.ds-green { --q: #3aa655; } .ds-blue { --q: #2f7fd6; } .ds-lime { --q: #6bb52f; } .ds-orange { --q: #f08a24; }
.ds-ic { flex: none; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem; background: color-mix(in srgb, var(--q) 14%, var(--surface)); }
.ds-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ds-t b { font: 800 clamp(1.15rem, 1rem + .8vw, 1.6rem)/1.1 var(--f-display); color: var(--ink) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em; }
.ds-t small { font-weight: 600; font-size: .86rem; color: var(--ink-2); line-height: 1.2; }
.ds-go { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; line-height: 1; color: var(--q); background: color-mix(in srgb, var(--q) 16%, var(--surface)); }
.dclock, .dwx { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 5px 16px color-mix(in srgb, #2e7d32 8%, transparent); }
.dc-ic { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; background: linear-gradient(180deg, #1f7a42, #0f4d2c); }
.dc-t { display: grid; } .dc-t b { font: 800 clamp(1.8rem, 1.5rem + 1vw, 2.3rem)/1 var(--f-display); letter-spacing: -.02em; color: var(--ink); } .dc-t small { font-weight: 600; color: var(--ink-2); margin-top: 3px; }
.dc-sep { align-self: stretch; width: 1px; background: var(--line-2); } .dc-h { display: grid; gap: 8px; font-weight: 600; font-size: .86rem; color: var(--ink-2); min-width: 0; }
.dwx { width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; text-decoration: none; background: linear-gradient(120deg, color-mix(in srgb, #ffb300 18%, var(--surface)), color-mix(in srgb, #81d4fa 14%, var(--surface)) 55%, color-mix(in srgb, #8bc34a 16%, var(--surface))); border-color: color-mix(in srgb, #ffb300 28%, var(--line)); }
.dwx.none { cursor: default; } .dwx.none small { display: block; color: var(--ink-2); font-weight: 600; }
.dwx-ic { flex: none; font-size: 2.8rem; line-height: 1; }
.dwx-t { display: grid; } .dwx-t b { font: 800 2.3rem/1 var(--f-display); color: var(--ink); } .dwx-t i { font-style: normal; } .dwx-t sup { font-size: .9rem; vertical-align: top; position: relative; top: 2px; } .dwx-t small { font-weight: 700; color: var(--ink-2); font-size: 1rem; margin-top: 2px; }
.dwx-f { margin-left: auto; display: flex; gap: 14px; align-items: flex-start; padding-left: 14px; border-left: 1px solid var(--line-2); } .dwx-f span { display: grid; justify-items: center; gap: 2px; font-size: 1.1rem; } .dwx-f b { font-size: .8rem; color: var(--ink); white-space: nowrap; }
@media (min-width: 901px) { .dclock, .dwx { grid-column: span 2; } .ds { grid-column: span 1; } }
@media (max-width: 480px) { .ds { padding: 12px 10px; gap: 8px; min-height: 88px; } .ds-ic { width: 44px; height: 44px; font-size: 1.6rem; border-radius: 15px; } .ds-go { width: 22px; height: 22px; font-size: 1.1rem; } .ds-t small { font-size: .78rem; }
  .dwx-f { gap: 8px; padding-left: 8px; } .dwx-ic { font-size: 2.2rem; } .dwx-t b { font-size: 1.9rem; } .dc-sep { display: none; } .dgreet { padding: 12px; } .dav { width: 54px; height: 54px; } .drole { padding: 6px 10px; font-size: .74rem; } }
.qa-head { font: 800 1.1rem var(--f-display); color: var(--ink); margin: 2px 2px -4px; }

/* bottom bar: floating rounded bar, active item as a green pill */
@media (max-width: 900px) {
  .tabbar { left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); border: 1px solid var(--line); border-radius: 30px; padding: 6px 8px; box-shadow: 0 8px 28px rgba(30,110,60,.18); }
  .tabbar a.on, .tabbar button.on { background: linear-gradient(180deg, #2f9e57, #1a6f3c); color: #fff; border-radius: 22px; }
  .content { padding-bottom: 120px; }
}
.ip.up { overflow: auto; align-content: center; } .ip-s { max-width: 320px; color: var(--ink-2); margin: 0; } .ip-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.ip-help { max-width: 340px; text-align: left; font-size: .88rem; color: var(--ink-2); display: grid; gap: 8px; }
.dstats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dstats .ds { grid-column: auto; }
@media (min-width: 901px) { .dstats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ds-go::before { content: "›"; }
.ds-t b { font-size: clamp(1.05rem, .95rem + .6vw, 1.5rem); }

/* ================= One button theme everywhere, like the reference picture ================= */
:root { --soft: 0 4px 12px color-mix(in srgb, #2e7d32 14%, transparent); --grad-on: linear-gradient(180deg, #2f9e57, #1a6f3c); }
.btn:not(.ghost), .chip, .admintabs a, .themeopt, .choice, .lang, .sw-row, .helpful, .cx-sh { border-width: 1px; border-color: color-mix(in srgb, #4caf50 22%, var(--line-2)); box-shadow: var(--soft); background-image: none; }
.btn:not(.ghost):hover { transform: translateY(-1px); box-shadow: 0 6px 16px color-mix(in srgb, #2e7d32 20%, transparent); }
.btn:not(.ghost):active, .chip:active, .admintabs a:active, .tile:active, .choice:active { transform: translateY(1px); box-shadow: 0 1px 4px color-mix(in srgb, #2e7d32 18%, transparent); }
.btn { border-radius: 16px; font-weight: 700; }
.btn.primary { background: var(--grad-on); color: #fff; border-color: transparent; box-shadow: 0 5px 14px rgba(31,122,66,.32), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.lagoon { background: linear-gradient(180deg, #2eb3ac, #14807a); border-color: transparent; box-shadow: 0 5px 14px rgba(20,128,122,.3), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.connect { border-color: transparent; box-shadow: 0 5px 14px color-mix(in srgb, var(--c-connect) 32%, transparent), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.danger { border-color: color-mix(in srgb, var(--bad) 35%, transparent); box-shadow: 0 4px 12px color-mix(in srgb, var(--bad) 14%, transparent); }
.btn.icon:not(.ghost), .topbar .btn.icon.ghost { border-radius: 50%; width: 44px; height: 44px; background: var(--surface); border: 1px solid color-mix(in srgb, #4caf50 20%, var(--line)); box-shadow: 0 4px 12px color-mix(in srgb, #2e7d32 14%, transparent); }
.chip { border-radius: 999px; background: var(--surface); }
.chip.on, .admintabs a.on { background: var(--grad-on); color: #fff; border-color: transparent; box-shadow: 0 5px 14px rgba(31,122,66,.3), inset 0 1px 0 rgba(255,255,255,.25); }
.admintabs a { border-radius: 999px; padding: 10px 16px; }
.seg { box-shadow: none; border-color: color-mix(in srgb, #4caf50 22%, var(--line)); border-radius: 18px; }
.seg button.on { background: var(--grad-on); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(31,122,66,.3); }
.input, select.input, textarea.input { border-radius: 14px; border-color: color-mix(in srgb, #4caf50 20%, var(--line-2)); }
.input:focus { border-color: #2f9e57; box-shadow: 0 0 0 3px color-mix(in srgb, #2f9e57 22%, transparent); }
/* menu / More tiles: soft tinted cards with a rounded icon tile */
.tile { border-radius: 22px; border-width: 1px; border-color: color-mix(in srgb, var(--tc, #4caf50) 28%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, var(--tc, #4caf50) 12%, var(--surface)), var(--surface)); box-shadow: 0 5px 14px color-mix(in srgb, var(--tc, #2e7d32) 14%, transparent); }
.tile .ic { width: 48px; height: 48px; border-radius: 16px; background: color-mix(in srgb, var(--tc, #4caf50) 18%, var(--surface)); }
/* sidebar (computer): rounded items, soft white active pill */
.nav a { border-radius: 16px; min-height: 42px; }
.nav a svg { width: 20px; height: 20px; padding: 3px; box-sizing: content-box; border-radius: 10px; background: rgba(255,255,255,.08); }
.nav a.on { background: linear-gradient(180deg, #fff, #e9f6e4); box-shadow: 0 5px 14px rgba(0,0,0,.2); font-weight: 700; }
.nav a.on svg { background: color-mix(in srgb, #2f9e57 18%, #fff); color: #1a6f3c; }
/* bottom bar items: rounded icon feel */
.tabbar a, .tabbar button { border-radius: 22px; }
.tabbar .fab span.ring { border-radius: 50%; background: var(--grad-on); }
.pill, .badge { border-radius: 999px; }
.moregroup .moretile { border-radius: 20px; border-width: 1px; border-bottom-width: 1px; border-color: color-mix(in srgb, var(--gc) 30%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, var(--gc) 13%, var(--surface)), var(--surface)); box-shadow: 0 5px 14px color-mix(in srgb, var(--gc) 16%, transparent); }
@media (max-width: 480px) { .ds-go { display: none; } .ds-ic { width: 40px; height: 40px; font-size: 1.45rem; } .ds-t b { font-size: .98rem; } }

/* v2.4: emoji icons in the Add and All sections menus, profile sheet, account switcher back row */
.tile .ic.emo, .moretile .mt-ic.emo { font-size: 1.5rem; line-height: 1; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; }
.tile .ic.emo { background: color-mix(in srgb, var(--tc, var(--brand)) 14%, var(--surface)); }
.moretile .mt-ic.emo { font-size: 1.3rem; }
button.dav { padding: 0; cursor: pointer; font: inherit; color: inherit; }
.pf-photo .photo-in { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.pf-photo .photo-prev { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 3px solid var(--line); }
.pf-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pf-st { padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.pf-st b { display: block; font: 800 1.25rem/1.2 var(--f-display); }
.pf-st small { color: var(--muted); }
.pf-stars b { color: #e0a100; letter-spacing: 1px; font-size: 1rem; }
.sw-back { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--c-water, #2b7bbf) 14%, var(--surface)); border: 1px solid var(--line); }
.btn.sw-away { position: relative; }
.btn.sw-away::after { content: ""; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #e08a00; border: 2px solid var(--surface); }
.ip .ip-help li b, .ip .ip-help p b { font-size: 1em; font-weight: 700; line-height: 1.4; display: inline; color: var(--brand); }
.ip .ip-help p b { font-size: 1.15rem; }
.ip-help p:first-child { text-align: center; font-size: 1.05rem; }
.ip-help ol { text-align: left; display: inline-block; max-width: 340px; }
/* AI Farm Coach picture instead of the robot emoji: very light blue tile */
.moretile .mt-ic.bot, .tile .ic.bot { background: #eaf2ff !important; }
.mt-ic.bot img, .ic.bot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.moretile .mt-ic.bot { padding: 2px; }
[data-theme="dark"] .moretile .mt-ic.bot { background: #dbe8ff !important; }

/* Desktop dashboard: keep the four top figures on one line without cutting them off */
@media (min-width: 901px) {
  .ds { gap: 10px; padding: 12px 10px 12px 12px; }
  .ds-ic { width: 46px; height: 46px; font-size: 1.7rem; }
  .ds-t b { font-size: clamp(1rem, .5rem + .8vw, 1.28rem); }
  .ds-go { width: 24px; height: 24px; font-size: 1.1rem; }
}

/* iPhone / iPad "Add to Home Screen" guide */
.ios-steps { display: flex; flex-direction: column; gap: 10px; }
.ios-steps p { margin: 0; }
.ios-step { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); line-height: 1.4; }
.ios-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand, #1f7a3d); color: #fff; font-weight: 800; font-size: .85rem; }
.ios-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: #0a7aff; border: 1px solid var(--line); }
.ios-note { padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: .86rem; }
