/* ==================================================================
   Kathará — Swiss grid, Athens edition
   Ink on whitewash. One signal colour (Aegean blue). Rules, not cards.
   Commissioner (a Greek-designed grotesque) for text, IBM Plex Mono
   for every number. Square corners. Motion: one page entrance.
   ================================================================== */

:root {
  --paper: #f4f3ef;
  --paper-2: #ecebe5;
  --ink: #141414;
  --ink-2: #3d3d3a;
  --muted: #6b6b66;
  --faint: #a3a39c;
  --rule: #141414;
  --hair: #d5d4cc;
  --hair-2: #e6e5df;
  --blue: #1e6fa8;
  --blue-ink: #155a8a;
  --blue-wash: #e2eef7;
  --sand: #a8782f;
  --sand-wash: #f3ead5;
  --red: #b3341e;
  --red-wash: #f6e3de;
  --green: #2d7a5a;
  --on-ink: #f4f3ef;
  /* wayfinding marks in the nav; the only place these colours appear */
  --c-overview: #141414;
  --c-calendar: #1e6fa8;
  --c-turnovers: #a8782f;
  --c-properties: #2d7a5a;
  --c-cleaners: #6a4bbf;
  --c-money: #1a7f7a;
  --font: "Commissioner", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
  --r: 2px;
  --t: 120ms;
  --ease: cubic-bezier(.3, .7, .3, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #161615; --paper-2: #1f1f1d; --ink: #ecebe6; --ink-2: #c9c8c1; --muted: #8f8f88; --faint: #5a5a55;
  --rule: #ecebe6; --hair: #34342f; --hair-2: #2a2a27;
  --blue: #5fa5dd; --blue-ink: #86bde8; --blue-wash: #17293a; --sand: #d0a04a; --sand-wash: #2e2717; --red: #e0705a; --red-wash: #3a2420; --green: #5cbf95;
  --on-ink: #161615;
  --c-overview: #ecebe6; --c-calendar: #5fa5dd; --c-turnovers: #d0a04a; --c-properties: #5cbf95; --c-cleaners: #a892ff; --c-money: #4fc3bd;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161615; --paper-2: #1f1f1d; --ink: #ecebe6; --ink-2: #c9c8c1; --muted: #8f8f88; --faint: #5a5a55;
    --rule: #ecebe6; --hair: #34342f; --hair-2: #2a2a27;
    --blue: #5fa5dd; --blue-ink: #86bde8; --blue-wash: #17293a; --sand: #d0a04a; --sand-wash: #2e2717; --red: #e0705a; --red-wash: #3a2420; --green: #5cbf95;
    --on-ink: #161615;
    --c-overview: #ecebe6; --c-calendar: #5fa5dd; --c-turnovers: #d0a04a; --c-properties: #5cbf95; --c-cleaners: #a892ff; --c-money: #4fc3bd;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; font-weight: 400;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum";
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--blue-wash); }
.num, .t, .dd, .amount, .qty, .count, .stat .n, .mono, .time-block, .date-block, .cal-day .num, .chip .t, .job-when, .strip .v, .day-label, .eyebrow, .tag, .form-section h3, .note .label, .instruction .cat, .cal-head div, .legend, .section-head .small, .small.muted { font-family: var(--mono); }
.eyebrow, .form-section h3, .note .label, .instruction .cat, .cal-head div, .day-label { text-transform: none; letter-spacing: 0; }

/* ---------- Motion: one entrance ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .25s var(--ease) both; }
.stagger > * { animation: none; }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation: none !important; transition: none !important; } }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 12px; background: var(--ink); color: var(--on-ink); font-family: var(--mono); font-size: 13px; transition: top .15s; }
.skip:focus { top: 12px; }
@media (prefers-contrast: more) { :root { --muted: #3d3d3a; --hair: #9a9a93; } }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: 0 2px 0 var(--blue); }
.topbar-in { max-width: 1120px; margin: 0 auto; padding: 0 28px; height: 52px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark { width: 12px; height: 12px; background: var(--blue); flex: none; }
.brand-mark::after { display: none; }
.nav { display: flex; gap: 2px; }
.nav a { position: relative; padding: 15px 10px 14px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--t); }
.nav a::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--c, var(--ink)); margin-right: 8px; vertical-align: 1px; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.nav a.active::after { display: none; }
.nav a[data-c="overview"] { --c: var(--c-overview); }
.nav a[data-c="calendar"] { --c: var(--c-calendar); }
.nav a[data-c="turnovers"] { --c: var(--c-turnovers); }
.nav a[data-c="properties"] { --c: var(--c-properties); }
.nav a[data-c="cleaners"] { --c: var(--c-cleaners); }
.nav a[data-c="money"] { --c: var(--c-money); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.agency-name { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.topbar form:not(.lang) { display: contents; }
.topbar .btn-ghost { height: 30px; padding: 0 8px; font-size: 13px; }

.lang { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); }
.lang button { position: relative; z-index: 1; border: 0; background: transparent; cursor: pointer; width: 36px; height: 26px; font-family: var(--mono); font-size: 12px; color: var(--muted); transition: color .2s; }
.lang button.active { color: var(--on-ink); }
.lang-knob { position: absolute; top: 0; left: 0; width: 36px; height: 26px; background: var(--ink); transition: transform .28s var(--ease); }
.lang.is-el .lang-knob { transform: translateX(100%); }
.lang.is-switching .lang-knob { transform: translateX(100%); }
.lang.is-el.is-switching .lang-knob { transform: translateX(0); }

.theme-toggle { width: 28px; height: 26px; border: 1px solid var(--rule); background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); }
.theme-toggle svg { grid-area: 1 / 1; width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s; }
.theme-toggle .moon { opacity: 0; }
:root[data-theme="dark"] .theme-toggle .moon { opacity: 1; }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { opacity: 1; }
  :root:not([data-theme="light"]) .theme-toggle .sun { opacity: 0; }
}
.theme-toggle.is-spinning { transform: none; }
.auth-tools { position: fixed; top: 16px; right: 20px; display: flex; gap: 10px; align-items: center; }

/* ---------- Page ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 36px 28px 96px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.page-title { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.page-title a:hover { color: var(--blue); }
.page-sub { color: var(--muted); margin-top: 8px; font-size: 15px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.eyebrow { font-size: 12.5px; color: var(--muted); }
.eyebrow + .page-title { margin-top: 8px; }
.eyebrow-overview { color: var(--c-overview); } .eyebrow-calendar { color: var(--c-calendar); } .eyebrow-turnovers { color: var(--c-turnovers); }
.eyebrow-properties { color: var(--c-properties); } .eyebrow-cleaners { color: var(--c-cleaners); } .eyebrow-money { color: var(--c-money); }

/* ---------- Sections ---------- */
.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 0 8px; border-bottom: 1px solid var(--rule); margin-bottom: 0; }
.section-head h2 { font-size: 15px; font-weight: 600; flex: 1; min-width: 0; }
.section-head > :last-child:not(h2) { white-space: nowrap; flex: none; }
.section-head .small, .section-head .link-quiet { font-family: var(--mono); font-size: 12.5px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 36px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.divider { height: 1px; background: var(--hair); margin: 20px 0; }
.link-quiet { color: var(--muted); font-size: 13px; transition: color var(--t); }
.link-quiet:hover { color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--rule);
  background: transparent; color: var(--ink); font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.btn:hover { background: var(--paper-2); }
.btn:active { background: var(--hair-2); }
.btn-primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-accent { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-accent:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn-secondary { background: transparent; }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: var(--paper-2); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-wash); border-color: var(--red); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-lg { height: 48px; font-size: 16px; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Stats ---------- */
.stats { display: flex; gap: 0; flex-wrap: wrap; margin: 0 0 36px; border-bottom: 1px solid var(--rule); }
.stat { padding: 8px 32px 16px 0; margin-right: 32px; border-right: 1px solid var(--hair); }
.stat:last-child { border-right: 0; }
.stat .n { font-family: var(--mono); font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.stat .n.money { font-size: 32px; }
.stat .l { font-size: 13px; color: var(--muted); margin-top: 8px; }
.stat.is-deep .n { color: var(--sand); }
.stat.is-muted .n { color: var(--muted); }
.stat.is-accent .n { color: var(--blue); }
.stat.is-danger .n { color: var(--red); }

/* ---------- Month switcher ---------- */
.month-nav { display: flex; align-items: center; gap: 0; border: 1px solid var(--rule); }
.month-nav a { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); font-family: var(--mono); font-size: 15px; border-right: 1px solid var(--hair); transition: background var(--t); }
.month-nav a:last-child { border-right: 0; }
.month-nav a:hover { background: var(--paper-2); }
.month-nav .today { width: auto; padding: 0 10px; font-size: 12.5px; }

/* ---------- Lists (rules, not cards) ---------- */
.list, .bars, .instructions, .supplies, .feeds, .stays, .steps { display: flex; flex-direction: column; background: transparent; border: 0; border-radius: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--hair); transition: background var(--t); }
.list-item.link:hover { background: var(--paper-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.list-item .grow { flex: 1 1 180px; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .meta { color: var(--muted); font-size: 13px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .tail { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: 13px; color: var(--muted); }
.time-block { width: 58px; flex: none; }
.time-block .t { font-weight: 500; font-size: 15px; }
.time-block .d { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.date-block { width: 46px; flex: none; }
.date-block .dd { font-size: 22px; font-weight: 500; line-height: 1; }
.date-block .mm { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; text-transform: uppercase; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; background: var(--faint); }
.tag-deep { color: var(--sand); } .tag-deep::before { background: var(--sand); }
.tag-done { color: var(--green); } .tag-done::before { background: var(--green); }
.tag-danger { color: var(--red); } .tag-danger::before { background: var(--red); }
.tag-open::before { background: transparent; border: 1px solid var(--faint); width: 5px; height: 5px; }
.avatars { display: inline-flex; align-items: center; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; font-weight: 600; color: #fff; border: 2px solid var(--paper); margin-left: -7px; }
.avatar:first-child { margin-left: 0; }
.avatar-lg { width: 40px; height: 40px; font-size: 13px; margin: 0; border: 0; }
.avatar-xl { width: 56px; height: 56px; font-size: 18px; margin: 0; border: 0; }
.day-label { font-size: 12px; color: var(--muted); padding: 20px 0 6px; }
.day-label::first-letter { text-transform: uppercase; }
.list > .day-label + .list-item { border-top: 1px solid var(--rule); }
.empty { padding: 20px 0; color: var(--muted); font-size: 14px; }
.empty .big { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* ---------- Bars ---------- */
.bar-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto; gap: 18px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hair); transition: background var(--t); }
.bar-row:hover { background: var(--paper-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.bar-row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .area { font-size: 12px; color: var(--muted); }
.bar { height: 6px; background: var(--hair-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .done { background: var(--blue); }
.bar .planned { background: var(--hair); }
.bar-row .count { font-size: 13px; white-space: nowrap; text-align: right; }
.bar-row .count b { font-weight: 600; font-size: 15px; }
.bar-row .count span { color: var(--muted); }
.legend { display: flex; gap: 18px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 6px; margin-right: 6px; vertical-align: middle; }
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 96px; }
.strip .col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.strip .v { font-size: 12px; }
.strip .b { width: 100%; max-width: 36px; background: var(--blue); min-height: 2px; }
.strip .b.zero { background: var(--hair); }
.strip .m { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }

/* ---------- Forms ---------- */
.form { max-width: 680px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12px; color: var(--red); font-family: var(--mono); }
.input, select.input, textarea.input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--hair); border-radius: var(--r); background: transparent; color: var(--ink); font: inherit; font-size: 15px; transition: border-color var(--t); }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
input[type=number].input, input[type=date].input, input[type=time].input, input[type=datetime-local].input { font-family: var(--mono); font-size: 14px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%236b6b66' stroke-width='1.5'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; }
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.input:focus-visible { outline: none; }
.input::placeholder { color: var(--faint); }
.field.has-error .input { border-color: var(--red); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid > * { min-width: 0; }
.form-grid .span-2 { grid-column: span 2; }
.form-section { padding: 24px 0; border-bottom: 1px solid var(--hair); }
.form-section:first-child { padding-top: 0; }
.form-section h3 { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.form-section .lead { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 22px; }
.errorlist { margin: 0 0 18px; padding: 10px 12px; border: 1px solid var(--red); color: var(--red); font-size: 13px; list-style: none; }

.segmented { display: inline-flex; border: 1px solid var(--rule); }
.segmented div { display: contents; }
.segmented label { padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--muted); border-right: 1px solid var(--hair); font-family: var(--mono); transition: background var(--t), color var(--t); }
.segmented label:last-child { border-right: 0; }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented label:has(input:checked) { background: var(--ink); color: var(--on-ink); }
.segmented label:hover:not(:has(input:checked)) { background: var(--paper-2); color: var(--ink); }

.chip-select { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-select div, .chip-select form { display: contents; }
.chip-select label, .chip-btn { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--hair); background: transparent; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color var(--t), background var(--t), color var(--t); }
.chip-select label:hover, .chip-btn:hover { border-color: var(--ink); }
.chip-select input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-select label:has(input:checked), .chip-btn.is-on { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.chip-select .avatar, .chip-btn .avatar { width: 20px; height: 20px; font-size: 9px; margin: 0; border: 0; }
.chip-btn .tick { font-family: var(--mono); font-size: 12px; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches div { display: contents; }
.swatches label { width: 26px; height: 26px; cursor: pointer; position: relative; border: 2px solid transparent; }
.swatches input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatches label:has(input:checked) { border-color: var(--ink); }
.swatches label span { position: absolute; inset: 2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch-input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 1px solid var(--rule); background: transparent; position: relative; cursor: pointer; margin: 0; flex: none; }
.switch-input::after { content: ""; position: absolute; inset: 3px; background: var(--blue); opacity: 0; transition: opacity var(--t); }
.switch-input:checked::after { opacity: 1; }

.search { position: relative; }
.search .input { padding-left: 30px; height: 34px; }
.search svg { position: absolute; left: 9px; top: 9px; width: 15px; height: 15px; stroke: var(--muted); fill: none; stroke-width: 1.8; }

.tabs { display: inline-flex; border: 1px solid var(--rule); }
.tabs a { padding: 5px 11px; font-size: 13px; font-weight: 500; color: var(--muted); border-right: 1px solid var(--hair); font-family: var(--mono); transition: background var(--t), color var(--t); }
.tabs a:last-child { border-right: 0; }
.tabs a:hover { color: var(--ink); background: var(--paper-2); }
.tabs a.active { background: var(--ink); color: var(--on-ink); }

/* ---------- Property list ---------- */
.prop-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hair); transition: background var(--t); }
.prop-row:hover { background: var(--paper-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.prop-row .name { font-weight: 600; font-size: 16px; }
.prop-row .addr { color: var(--muted); font-size: 13px; }
.prop-row .kind { font-size: 13px; color: var(--muted); }
.prop-row .next { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; font-family: var(--mono); }
.prop-row .next b { color: var(--ink); font-weight: 500; }
.prop-row.inactive { opacity: .5; }

/* ---------- Notes & instructions ---------- */
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.note { padding: 12px 14px; border: 1px solid var(--rule); white-space: pre-line; }
.note .label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.note .label span { display: none; }
.note.is-empty { color: var(--faint); font-style: italic; }
.note.wide { grid-column: span 2; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 20px; }
.info-grid dt { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.info-grid dd { margin: 2px 0 0; font-weight: 500; }
.instruction { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.instruction .ico { min-width: 34px; height: 22px; padding: 0 6px; border: 1px solid var(--hair); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; color: var(--muted); flex: none; }
.instruction.important .ico { border-color: var(--sand); color: var(--sand); }
.instruction .txt { flex: 1; }
.instruction .cat { font-size: 11px; color: var(--muted); margin-top: 1px; }
.instruction form { display: inline; }
.instruction.is-checked .ico { background: var(--green); border-color: var(--green); color: #fff; }
.instruction.is-checked .txt > div:first-child { color: var(--muted); }
.icon-btn { width: 30px; height: 30px; border: 0; background: transparent; color: var(--faint); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); transition: color var(--t), background var(--t); }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.icon-btn.on { color: var(--sand); }
.icon-btn.on svg { fill: currentColor; }
.inline-form { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: center; margin-top: 12px; }

/* ---------- Supplies, feeds ---------- */
.supply { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.supply .grow { flex: 1; min-width: 0; }
.supply .name { font-weight: 500; }
.supply .qty { min-width: 28px; text-align: center; font-weight: 500; font-size: 15px; }
.supply.is-low .qty { color: var(--red); }
.low-mark { font-family: var(--mono); font-size: 10px; color: var(--red); margin-left: 6px; vertical-align: middle; }
.supply form { display: inline; }
.step { width: 28px; height: 28px; border: 1px solid var(--hair); background: transparent; cursor: pointer; font-family: var(--mono); font-size: 14px; line-height: 1; color: var(--ink-2); transition: border-color var(--t), background var(--t); }
.step:hover { border-color: var(--ink); background: var(--paper-2); }
.supply-form { display: grid; grid-template-columns: 64px 64px minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.supply-form input[name=name] { grid-column: 1 / -1; }
.bring { display: flex; flex-direction: column; }
.bring li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.bring li a { flex: 1; min-width: 0; }
.bring li .muted { font-family: var(--mono); font-size: 12px; }
.feed, .stay { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.feed .grow, .stay .dates { flex: 1; min-width: 0; }
.feed .name { font-weight: 500; }
.feed form, .stay form { display: inline; }
.err { color: var(--red); font-family: var(--mono); font-size: 12px; }
.feed-form { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.stay .dates { font-family: var(--mono); font-size: 13px; }

/* ---------- Turnover timeline ---------- */
.timeline { display: flex; flex-direction: column; margin-top: 10px; }
.tl { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 7px 0 7px 16px; position: relative; color: var(--muted); font-size: 14px; }
.tl::before { content: ""; position: absolute; left: 0; top: 13px; width: 6px; height: 6px; background: var(--faint); }
.tl::after { content: ""; position: absolute; left: 2.5px; top: 21px; bottom: -7px; width: 1px; background: var(--hair); }
.tl:last-child::after { display: none; }
.tl .t { color: var(--ink); font-weight: 500; }
.tl.is-us { color: var(--ink); }
.tl.is-us::before { background: var(--blue); }
.turnover.is-tight .tl.is-us::before { background: var(--red); }
.turnover .warn { margin-top: 10px; color: var(--red); font-size: 13px; font-family: var(--mono); }
.day-label + .turnover-row { border-top: 1px solid var(--rule); }
.turnover-row.is-open .title::before { content: ""; display: inline-block; width: 6px; height: 6px; border: 1px solid var(--red); margin-right: 8px; vertical-align: middle; }

/* ---------- Calendar ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-toolbar .title { font-size: 20px; font-weight: 600; margin: 0 8px; min-width: 210px; }
.cal-toolbar .title::first-letter { text-transform: uppercase; }
.cal { border-top: 1px solid var(--rule); border-left: 1px solid var(--hair); }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 8px; font-size: 11px; color: var(--muted); border-right: 1px solid var(--hair); border-bottom: 1px solid var(--rule); text-transform: uppercase; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day { min-width: 0; min-height: 112px; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; position: relative; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); transition: background var(--t); }
.cal-day:hover { background: var(--paper-2); }
.cal-day.out .num, .cal-day.out .chip { opacity: .35; }
.cal-day .num { font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; height: 22px; margin-bottom: 2px; }
.cal-day .num span { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; }
.cal-day.today .num span { background: var(--blue); color: #fff; }
.cal-day .add { opacity: 0; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-family: var(--mono); transition: opacity var(--t), background var(--t), color var(--t); }
.cal-day:hover .add { opacity: 1; }
.cal-day .add:hover { background: var(--ink); color: var(--on-ink); }
.chip { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 12.5px; line-height: 1.35; color: var(--ink); transition: color var(--t); }
.chip:hover { color: var(--blue); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--chip, var(--faint)); flex: none; }
.chip.is-unassigned .dot { background: transparent; border: 1px dashed var(--faint); }
.chip .t { color: var(--muted); flex: none; font-size: 11.5px; }
.chip .p { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.chip .k { flex: none; font-family: var(--mono); font-size: 10px; color: var(--sand); }
.chip .w { flex: none; font-family: var(--mono); font-size: 10px; color: var(--red); }
.chip.is-done { opacity: .45; }
.chip.is-done .p { text-decoration: line-through; }
.chip.is-overdue .t { color: var(--red); }
.chip-out { color: var(--muted); }
.chip-out .out { flex: none; font-family: var(--mono); font-size: 10px; color: var(--sand); }
.chip-out .p { font-weight: 400; }
.cal-week-view .cal-day { min-height: 280px; }
.cal-week-view .chip { flex-wrap: wrap; padding: 6px 0; gap: 3px 6px; border-bottom: 1px solid var(--hair-2); }
.cal-week-view .chip .p { white-space: normal; font-size: 13px; flex-basis: 100%; }
.cal-week-view .chip .cleaners { font-size: 11px; color: var(--muted); flex-basis: 100%; font-family: var(--mono); }

/* ---------- Messages ---------- */
.messages { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; }
.message { background: var(--ink); color: var(--on-ink); padding: 9px 12px 9px 14px; font-size: 13px; display: flex; align-items: center; gap: 12px; white-space: nowrap; border-left: 3px solid var(--blue); animation: rise .2s var(--ease) both; }
.message.error { border-left-color: var(--red); }
.message button { background: transparent; border: 0; color: var(--on-ink); opacity: .6; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; font-family: var(--mono); }
.message form { display: inline; }
.message .undo { background: transparent; border: 0; padding: 0; color: var(--on-ink); font: inherit; font-family: var(--mono); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; opacity: 1; }
.message.leaving { opacity: 0; transition: opacity .2s; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 360px; animation: rise .25s var(--ease) both; }
.auth-card .brand { margin-bottom: 36px; }
.auth-card h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.auth-card .lead { color: var(--muted); margin: 8px 0 28px; }
.auth-foot { margin-top: 20px; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Detail ---------- */
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.kv dd { font-weight: 500; }
.hero-tags { display: flex; gap: 16px; margin-bottom: 6px; }
.share-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.share-row .input { flex: 1 1 260px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.share-row form { display: contents; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.photo-grid a { display: block; aspect-ratio: 1; overflow: hidden; background: var(--paper-2); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .photo { position: relative; }
.photo-grid .photo form { position: absolute; top: 4px; right: 4px; }
.photo-grid .photo .icon-btn { background: rgba(0,0,0,.6); color: #fff; }

/* ---------- Money ---------- */
.amount { font-weight: 500; color: var(--ink); font-size: 14px; }
.money-row .tail { gap: 10px; }
.expense-form { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.expense-form .row > * { flex: 1; min-width: 0; }
.expense-form .row .btn { flex: none; }

/* ---------- Onboarding ---------- */
.onboarding { padding: 0 0 8px; }
.steps li { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.steps li > div { flex: 1; min-width: 0; }
.steps .num { width: 30px; height: 30px; border: 1px solid var(--step, var(--hair)); color: var(--step, var(--ink)); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; flex: none; }
.steps li.is-done .num { background: var(--step, var(--blue)); border-color: var(--step, var(--blue)); color: #fff; }
.steps li.is-done .title { color: var(--muted); text-decoration: line-through; }

/* ---------- Disclosure ---------- */
details.more { border-top: 1px solid var(--hair); }
details.more > summary { list-style: none; cursor: pointer; padding: 20px 0; font-size: 13px; font-family: var(--mono); color: var(--muted); display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; display: inline-block; width: 14px; }
details.more[open] > summary::before { content: "–"; }
details.more > summary:hover { color: var(--ink); }
details.codes { margin-top: 6px; }
details.codes > summary { cursor: pointer; color: var(--blue); font-weight: 500; list-style: none; font-size: 14px; }
details.codes > summary::-webkit-details-marker { display: none; }

/* ---------- Cleaner app ---------- */
.capp { background: var(--paper); }
.capp-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; max-width: 600px; margin: 0 auto; border-bottom: 1px solid var(--rule); box-shadow: 0 2px 0 var(--blue); }
.capp-main { max-width: 600px; margin: 0 auto; padding: 8px 18px 90px; }
.capp-head { margin: 12px 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.capp .page-title { font-size: 28px; margin-top: 4px; }
.capp .page-sub { margin-bottom: 14px; font-family: var(--mono); font-size: 14px; }
.capp .section { margin-bottom: 32px; }
.capp .notes { grid-template-columns: 1fr; }
.capp .note.wide { grid-column: auto; }
.capp .note.is-warn { border-color: var(--red); }
.capp .note .warn { margin-top: 8px; color: var(--red); font-weight: 500; font-family: var(--mono); font-size: 13px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.back::before { content: ""; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.jobs { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.job { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hair); min-height: 64px; transition: background var(--t); }
.job:active { background: var(--paper-2); }
.job.is-done { opacity: .55; }
.job-when { width: 70px; flex: none; font-family: var(--mono); }
.job-when .d { font-size: 11px; color: var(--muted); }
.job-when .t { font-size: 20px; font-weight: 500; line-height: 1.2; }
.job-when .dur { font-size: 11px; color: var(--muted); }
.job-what { flex: 1; min-width: 0; }
.job-what .title { font-weight: 600; font-size: 17px; }
.job-what .meta { color: var(--muted); font-size: 14px; }
.job .chev { color: var(--faint); font-family: var(--mono); }
.checks { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.checks form { display: block; }
.check { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 13px 0; border: 0; border-bottom: 1px solid var(--hair); background: transparent; cursor: pointer; font-size: 16px; }
.check .box { width: 24px; height: 24px; border: 1.5px solid var(--rule); display: inline-flex; align-items: center; justify-content: center; flex: none; font-family: var(--mono); font-weight: 600; color: #fff; transition: background var(--t); }
.check.is-on .box { background: var(--blue); border-color: var(--blue); }
.check.is-on .txt { color: var(--muted); text-decoration: line-through; }
.check.important:not(.is-on) .box { border-color: var(--sand); }
.check .k { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-right: 6px; }
.finish { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; }
.photo-pick { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--rule); cursor: pointer; font-size: 15px; transition: background var(--t); }
.photo-pick:hover { background: var(--paper-2); }
.photo-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.photo-pick .ico { font-family: var(--mono); font-size: 16px; }
.photo-pick.small { padding: 10px 14px; font-size: 14px; }
.tip, .notify { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 22px; }
.tip .grow, .notify .grow { flex: 1; min-width: 0; }
.tip .title, .notify .title { font-weight: 600; }
.notify form { display: contents; }
.on-mark { font-family: var(--mono); font-size: 10px; color: var(--blue); margin-left: 6px; }

.capp .brand span.txt { display: inline !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .topbar-in { padding: 0 16px; gap: 14px; height: 48px; overflow-x: auto; }
  .nav a { padding: 13px 8px 12px; font-size: 13px; }
  .nav a::before { margin-right: 6px; }
  .topbar .link-quiet, .agency-name { display: none; }
  .page { padding: 24px 16px 72px; }
  .page-title { font-size: 28px; }
  .page-head { margin-bottom: 24px; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .stats { gap: 0; }
  .stat { padding-right: 20px; margin-right: 20px; }
  .stat .n { font-size: 32px; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-row .bar { grid-column: 1 / -1; order: 3; }
  .cal-day { min-height: 76px; padding: 4px 5px; }
  .chip .t { display: none; }
  .inline-form { grid-template-columns: 1fr; }
  .supply-form { grid-template-columns: 64px 64px minmax(0, 1fr) auto; }
  .feed-form { grid-template-columns: 1fr auto; }
  .feed-form input { grid-column: 1 / -1; }
  .notes { grid-template-columns: 1fr; }
  .note.wide { grid-column: auto; }
  .prop-row { grid-template-columns: 1fr auto; }
  .prop-row .kind { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
}
@media (max-width: 520px) {
  .brand span.txt { display: none; }
  .cal-week-view .cal-week { grid-template-columns: 1fr; }
  .cal-week-view .cal-head { display: none; }
  .cal-week-view .cal-day { min-height: 0; }
  .messages { left: 16px; right: 16px; transform: none; }
  .message { white-space: normal; }
}
