/* INAGRO owner app. Plain CSS, light and dark from the system setting. */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --ink: #15181c;
  --ink-2: #4d5661;
  --ink-3: #737d88;
  --line: #e2e5e9;
  --line-2: #d3d8de;
  --accent: #1f6f5c;
  --accent-hover: #185a4a;
  --accent-ink: #ffffff;
  --accent-soft: #e3f2ed;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #9a5b00;
  --warn-soft: #fff4de;
  --good: #1f7a3d;
  --good-soft: #e5f5ea;
  --info: #2e5aac;
  --info-soft: #e8effc;
  --shadow: 0 1px 2px rgb(16 24 40 / .06), 0 1px 3px rgb(16 24 40 / .08);
  --shadow-lg: 0 12px 32px rgb(16 24 40 / .18);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 232px;
  --c1: #2f7d6b; --c2: #3e63b8; --c3: #b3542d; --c4: #8a4bb0; --c5: #b08a12; --c6: #c2416b;
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1012;
    --surface: #171a1d;
    --surface-2: #1f2327;
    --ink: #eceff2;
    --ink-2: #b3bcc6;
    --ink-3: #8a94a0;
    --line: #2a2f35;
    --line-2: #363c43;
    --accent: #4fb89d;
    --accent-hover: #63c7ac;
    --accent-ink: #0a1f19;
    --accent-soft: #163029;
    --danger: #f97066;
    --danger-soft: #3a1714;
    --warn: #fdb022;
    --warn-soft: #36270a;
    --good: #6cd08e;
    --good-soft: #13301d;
    --info: #84adff;
    --info-soft: #172542;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-lg: 0 12px 32px rgb(0 0 0 / .5);
    --c1: #5cc4a8; --c2: #86a8ff; --c3: #f0976b; --c4: #c79bea; --c5: #e7c24f; --c6: #f28bab;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
a { color: var(--accent); }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
/* Icons default to the size of the text around them; specific places override. */
svg[aria-hidden="true"] { width: 1em; height: 1em; vertical-align: -0.15em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 12px;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.brand strong { display: block; font-size: 15px; }
.brand .biz { display: block; font-size: 12px; color: var(--ink-3); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a, .bottomnav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav svg, .bottomnav svg { width: 18px; height: 18px; flex: none; }
.count {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--danger);
  color: #fff; font-size: 12px; font-weight: 650; text-align: center; line-height: 20px;
}
.me { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.main { margin-left: var(--sidebar); padding: 24px 28px 48px; max-width: calc(var(--sidebar) + 1180px); outline: none; }
.topbar, .bottomnav { display: none; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .topbar {
    display: flex; gap: 8px; align-items: center; position: sticky; top: 0; z-index: 10;
    padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
    background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .main { margin-left: 0; padding: 16px 16px calc(88px + env(safe-area-inset-bottom)); }
  .bottomnav {
    display: block; position: fixed; inset: auto 0 0 0; z-index: 10; background: var(--surface);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottomnav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .bottomnav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 8px 2px; border-radius: 0; position: relative; }
  .bottomnav a[aria-current="page"] { color: var(--accent); }
  .bottomnav .count { position: absolute; top: 4px; left: 55%; margin: 0; min-width: 18px; line-height: 18px; font-size: 11px; }
  h1 { font-size: 20px; }
}

/* ---------- Page structure ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { color: var(--ink-3); margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.stack > *, .grid-2 > * { min-width: 0; }
.stack { display: grid; gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card > .bd { padding: 16px; }
.card > .bd.flush { padding: 0; }
.empty { padding: 28px 16px; text-align: center; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink-2); margin-bottom: 4px; }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; }
a.tile:hover { border-color: var(--line-2); }
.tile .v { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tile .k { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.tile.alert .v { color: var(--danger); }
.tile.good .v { color: var(--good); }

/* ---------- Buttons & forms ---------- */
button, .btn {
  font: inherit; font-weight: 600; font-size: 14px; border-radius: var(--radius-sm); padding: 8px 14px;
  border: 1px solid transparent; cursor: pointer; background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; line-height: 1.3; min-height: 36px;
}
button:hover, .btn:hover { background: var(--accent-hover); }
button:disabled { opacity: .55; cursor: default; }
.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.secondary:hover { background: var(--surface-2); }
.danger { background: var(--danger); color: #fff; }
.danger:hover { background: var(--danger); filter: brightness(.95); }
.ghost { background: transparent; color: var(--ink-2); }
.ghost:hover { background: var(--surface-2); color: var(--ink); }
.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); font-weight: 500; }
.link:hover { background: none; text-decoration: underline; }
.sm { padding: 5px 10px; font-size: 13px; min-height: 30px; }
button svg, .btn svg { width: 16px; height: 16px; flex: none; }
button, .btn { white-space: nowrap; }

form { margin: 0; }
.field { display: grid; gap: 4px; align-content: start; }
.field > span, .label { font-size: 13px; font-weight: 550; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.fields { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); width: 100%;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 10px; min-height: 38px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
input:user-invalid, select:user-invalid { border-color: var(--danger); }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.prefix { position: relative; display: block; }
.prefix > b { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 500; pointer-events: none; }
.prefix > input { padding-left: 24px; }
.error { color: var(--danger); font-size: 13px; min-height: 0; }
.search { max-width: 320px; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; line-height: 20px; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- Lists & tables ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list a.rowlink { display: block; color: inherit; text-decoration: none; margin: -12px -16px; padding: 12px 16px; }
.list a.rowlink:hover { background: var(--surface-2); }
.split { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.split > :first-child { min-width: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--surface-2); }
td.r, th.r { text-align: right; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 99px; text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 550; border: 1px solid var(--line); background: var(--surface); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* ---------- Needs-you tasks ---------- */
.task { padding: 14px 16px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--line-2); }
.task:last-child { border-bottom: 0; }
.task.urgent { border-left-color: var(--danger); }
.task.high { border-left-color: var(--warn); }
.task .t { font-weight: 600; }
.task .r { color: var(--ink-2); font-size: 14px; margin: 4px 0 10px; }
.task .actions select { width: auto; min-width: 160px; }
.task form.inline { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.task form.inline input { flex: 1; min-width: 180px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.feed svg { width: 18px; height: 18px; color: var(--good); flex: none; margin-top: 2px; }

/* ---------- Today board ---------- */
.board-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: start; }
.board-row:last-child { border-bottom: 0; }
.board-row .who { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 13px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.chip.done { opacity: .65; text-decoration: line-through; }
@media (max-width: 560px) { .board-row { grid-template-columns: 1fr; } }

/* ---------- Schedule ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-height: 220px; display: flex; flex-direction: column; min-width: 0; }
.day.today { border-color: var(--accent); }
.day .dh { padding: 8px 10px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.day .dh b { font-size: 14px; }
.day .dh span { font-size: 12px; color: var(--ink-3); }
.day .dv { padding: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; }
.off { overflow-wrap: anywhere; font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 3px 8px; border-radius: 6px; }
.visit {
  text-align: left; display: block; width: 100%; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  border-left: 4px solid var(--cleaner, var(--line-2)); border-radius: var(--radius-sm); padding: 6px 8px; font-weight: 400; font-size: 13px; min-height: 0;
}
.visit:hover { background: var(--surface-2); border-color: var(--line-2); }
.visit .vt { font-weight: 650; font-variant-numeric: tabular-nums; }
.visit .vc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit .vs { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit.unassigned { border-color: var(--danger); border-left-color: var(--danger); background: var(--danger-soft); }
.visit.completed { opacity: .6; }
.visit.cancelled { opacity: .45; text-decoration: line-through; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 1000px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .day .dv:empty::after { content: "Nothing booked"; color: var(--ink-3); font-size: 13px; padding: 2px; }
}

/* ---------- Inbox ---------- */
.inbox { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 150px); min-height: 480px; overflow: hidden; }
.inbox .threads { border-right: 1px solid var(--line); overflow-y: auto; }
.inbox .threads a { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.inbox .threads a:hover { background: var(--surface-2); }
.inbox .threads a[aria-current="page"] { background: var(--accent-soft); }
.inbox .threads .nm { font-weight: 600; display: flex; gap: 6px; align-items: center; }
.inbox .threads .pv { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.conv .ch { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.msg { max-width: 75%; }
.msg .b { padding: 8px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .m { font-size: 11px; color: var(--ink-3); margin: 2px 6px 0; }
.msg.in { align-self: flex-start; }
.msg.in .b { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; text-align: right; }
.msg.out .b { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; text-align: left; }
.msg.out .b a { color: inherit; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { min-height: 40px; height: 40px; }
@media (max-width: 860px) {
  .inbox { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .inbox.has-conv .threads { display: none; }
  .inbox:not(.has-conv) .conv { display: none; }
  .msgs { max-height: 60vh; min-height: 300px; }
  .inbox .threads { border-right: 0; }
}

/* ---------- Dialog (drawer on desktop, sheet on phones) ---------- */
dialog {
  border: 0; padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
  width: min(520px, 100vw); max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0 0 0 auto; border-radius: 0;
}
dialog::backdrop { background: rgb(10 14 18 / .45); }
dialog .dlg { display: flex; flex-direction: column; height: 100%; }
dialog .dlg-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
dialog .dlg-b { padding: 20px; overflow-y: auto; flex: 1; display: grid; gap: 16px; align-content: start; }
dialog .dlg-f { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
dialog[open] { animation: slide-in .18s ease-out; }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
@media (max-width: 640px) {
  dialog { width: 100vw; height: auto; max-height: 92vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  dialog .dlg { height: auto; max-height: 92vh; }
  dialog[open] { animation-name: slide-up; }
  @keyframes slide-up { from { transform: translateY(24px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.section-title { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-bottom: 8px; }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.quote { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; }
.quote .big { font-size: 22px; font-weight: 650; color: var(--accent); }
.alts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: min(420px, 100%); }
.auth .card .bd { padding: 28px; display: grid; gap: 18px; }
.auth .logo { display: flex; gap: 10px; align-items: center; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: 14px; max-width: 360px; }
.toast.err { background: var(--danger); color: #fff; }
@media (max-width: 860px) { .toasts { left: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); } }

.loading { color: var(--ink-3); padding: 24px 0; }

/* ---------- Cleaner app ---------- */
.notice { background: var(--info-soft); color: var(--ink); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.notice.good { background: var(--good-soft); }
.section-h { font-size: 15px; margin: 24px 0 8px; }
.day-label { font-size: 14px; margin: 0 0 6px; color: var(--ink-2); }
.day-label.is-today b { color: var(--accent); }
.week-list { gap: 16px; }
.week-list .free { margin: 0; }
.jobs { display: grid; gap: 10px; }
.job { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 12px 14px; color: inherit; text-decoration: none; box-shadow: var(--shadow); }
.job:hover { border-color: var(--line-2); border-left-color: var(--accent); }
.job.completed { border-left-color: var(--good); opacity: .8; }
.job.in_progress { border-left-color: var(--warn); }
.job-time { display: grid; text-align: center; min-width: 52px; }
.job-time b { font-size: 18px; font-variant-numeric: tabular-nums; }
.job-time span { font-size: 12px; color: var(--ink-3); }
.job-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.job-go svg { width: 18px; height: 18px; color: var(--ink-3); }
.job-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.job-bar.bottom { margin: 20px 0 0; }
button.big, .btn.big { min-height: 48px; font-size: 16px; padding: 10px 18px; flex: 1; justify-content: center; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; min-height: 48px; }
.checklist input { width: 22px; height: 22px; }
.checklist input:checked + span { color: var(--ink-3); text-decoration: line-through; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.photos figure { margin: 0; position: relative; }
.photos .thumb { padding: 0; border: 1px solid var(--line); background: var(--surface-2); width: 100%; aspect-ratio: 1; overflow: hidden; display: block; border-radius: var(--radius-sm); }
.photos .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos figcaption { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.photos .del { position: absolute; top: 4px; right: 4px; background: rgb(0 0 0 / .55); color: #fff; min-height: 26px; padding: 3px; }
label.btn.is-busy { opacity: .55; pointer-events: none; }
.code { font-size: 20px; font-weight: 650; letter-spacing: .03em; background: var(--warn-soft); padding: 8px 12px; border-radius: var(--radius-sm); display: inline-block; }
.late-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.radio-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: 15px; }
.radio-row input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
@media (max-width: 860px) {
  .job-bar.bottom { position: sticky; bottom: calc(58px + env(safe-area-inset-bottom)); background: var(--bg); padding: 8px 0; margin-top: 12px; z-index: 5; }
}

/* ---------- Billing ---------- */
.sub-banner { margin-left: var(--sidebar); background: var(--warn-soft); color: var(--ink); padding: 10px 28px; font-size: 14px; border-bottom: 1px solid var(--line); }
.sub-banner[hidden] { display: none; }
@media (max-width: 860px) { .sub-banner { margin-left: 0; padding: 10px 16px; } }
.plan-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; font-size: 14px; }
.plan-opt input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; accent-color: var(--accent); flex: none; }
.plan-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.auth .check { align-items: flex-start; font-size: 13px; }
.auth .check input { flex: none; margin-top: 2px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }

/* ---------- Getting started ---------- */
.getting-started .progress { height: 6px; background: var(--surface-2); margin: 0 16px; border-radius: 99px; overflow: hidden; }
.getting-started .progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.steps-list { list-style: none; margin: 0; padding: 8px 16px 12px; display: grid; gap: 2px; }
.steps-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.steps-list .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: var(--accent); margin-top: 1px; }
.steps-list li.done .tick { border-color: var(--accent); background: var(--accent-soft); }
.steps-list .tick svg { width: 16px; height: 16px; }
.steps-list li.done a { color: var(--ink-3); text-decoration: line-through; }
.steps-list a { text-decoration: none; }
details.card > summary { cursor: pointer; list-style: revert; }

/* Help pages (v2) */
details.help > summary { cursor: pointer; list-style: none; }
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary h2::after { content: ' +'; color: var(--ink-3); font-weight: 400; }
details.help[open] > summary h2::after { content: ' −'; }
.prose { font-size: 15px; line-height: 1.6; }
.prose h3 { font-size: 16px; margin: 18px 0 6px; }
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 10px; }
.prose ol, .prose ul { margin: 0 0 10px; padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose .kv { grid-template-columns: minmax(160px, 1fr) 2fr; }
@media (max-width: 600px) { .prose .kv { grid-template-columns: 1fr; } .prose .kv dd { margin-bottom: 8px; } }

/* ---------- v2: phone-first Home ---------- */
.phone-only { display: none; }
.quick { gap: 8px; margin-bottom: 16px; }
.quick a, .quick button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 64px; padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 600;
  text-decoration: none; cursor: pointer; box-shadow: var(--shadow);
}
.quick svg { width: 20px; height: 20px; color: var(--accent); }
@media (max-width: 640px) {
  .desk-only { display: none !important; }
  .phone-only { display: grid; }
  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home .page-head { margin-bottom: 12px; }
  /* Money and today at a glance: one swipeable row instead of a tall grid. */
  .home .tiles {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px, 42%); grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 16px; padding: 2px 16px 6px; gap: 10px;
    scroll-padding-inline: 16px; scrollbar-width: none;
  }
  .home .tiles::-webkit-scrollbar { display: none; }
  .home .tile { scroll-snap-align: start; padding: 10px 12px; }
  .home .tile .v { font-size: 20px; }
  /* What needs you first, then today's work; setup and the AI summary at the bottom. */
  .home-grid { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .home-grid > .stack { display: contents; }
  #needs { order: 1; }
  .home-today { order: 2; }
  .home-handled { order: 3; }
  .home-setup { order: 4; }
  .home-ai { order: 5; }
}

/* Accountant logins are read-only: hide the buttons that change things. */
.read-only #addExpense, .read-only #scanReceipt, .read-only #newInvoice, .read-only #scanInvoice, .read-only #addIncome,
.read-only [data-pay], .read-only [data-credit], .read-only [data-lock], .read-only [data-unlock], .read-only [data-del],
.read-only [data-opening], .read-only #fromToday, .read-only #clearOpening, .read-only label.btn:has(#csv),
.read-only [data-match], .read-only [data-payinv], .read-only [data-expense], .read-only [data-income], .read-only [data-ignore],
.read-only [data-ignorego], .read-only [data-unmatch], .read-only #tripForm, .read-only #accountantCard { display: none !important; }
