/* MCA Admin · design tokens and components (from MCA Admin v2 design) */
:root {
  --ink: #141414;
  --ink-2: #1C1C1C;
  --ink-3: #272727;
  --paper: #F3F0E9;
  --paper-2: #E9E4D9;
  --card: #FFFFFF;
  --cream: #FEFDFA;
  --amber: #F7AD20;
  --amber-ink: #9A6400;
  --amber-soft: rgba(247,173,32,.18);
  --muted: rgba(20,20,20,.6);
  --faint: rgba(20,20,20,.36);
  --line: rgba(20,20,20,.08);
  --line-2: rgba(20,20,20,.14);
  --side-muted: rgba(254,253,250,.6);
  --green: #2D7D3E;
  --green-soft: rgba(45,125,62,.12);
  --red: #C4402B;
  --red-soft: rgba(196,64,43,.12);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 30px 60px -24px rgba(0,0,0,.25);
  --f-body: 'Barlow', system-ui, sans-serif;
  --f-cond: 'Barlow Condensed', 'Barlow', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font: 500 14px/1.45 var(--f-body); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* Icons */
.ms { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; flex: none; font-variation-settings: 'FILL' 0, 'wght' 400; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; }
.ms-fill { font-variation-settings: 'FILL' 1, 'wght' 400; }

/* Type */
.eyebrow { font: 600 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.h1 { font: 700 36px/.95 var(--f-cond); text-transform: uppercase; letter-spacing: .01em; }
.h2 { font: 700 20px/.95 var(--f-cond); text-transform: uppercase; letter-spacing: .01em; }
.h3 { font: 700 16px/1.1 var(--f-body); }
.big { font: 700 30px/.95 var(--f-cond); text-transform: uppercase; }
.mono { font-family: var(--f-mono); font-weight: 500; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.amber-ink { color: var(--amber-ink); }
.green { color: var(--green); }
.red { color: var(--red); }
.sm { font-size: 12px; }
.xs { font-size: 11px; }
.b { font-weight: 700; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.right { text-align: right; }

/* Layout helpers */
.row { display: flex; align-items: center; gap: 10px; }
.row-top { display: flex; align-items: flex-start; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-14 { gap: 14px; } .gap-18 { gap: 18px; }
.mt-auto { margin-top: auto; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main-side { grid-template-columns: minmax(0, 1fr) 340px; }
.g-side-main { grid-template-columns: 300px minmax(0, 1fr); }
.g-side-main-side { grid-template-columns: 300px minmax(0, 1fr) 320px; }

/* ───────── Web shell ───────── */
.shell { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: var(--ink); color: var(--cream); display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh; }
.side-logo { padding: 0 10px 24px; }
.side-logo img { height: 30px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { height: 40px; border-radius: 12px; padding: 0 12px; display: flex; align-items: center; gap: 12px; font: 600 14px var(--f-body); color: var(--side-muted); transition: background .15s, color .15s; }
.nav a:hover { color: var(--cream); background: rgba(254,253,250,.06); }
.nav a.on { background: var(--amber); color: var(--ink); }
.nav a.on .ms { font-variation-settings: 'FILL' 1; }
.nav a span:nth-child(2) { flex: 1; }
.nav-sep { height: 1px; background: rgba(254,253,250,.08); margin: 10px 12px; }
.nbadge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(254,253,250,.15); color: var(--cream); display: flex; align-items: center; justify-content: center; font: 700 11px var(--f-body); }
.nbadge.hot { background: var(--amber); color: var(--ink); }
.nav a.on .nbadge { background: var(--ink); color: var(--cream); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--ink-2); }
.me .av { width: 36px; height: 36px; background: repeating-linear-gradient(135deg, var(--ink-2) 0 8px, var(--ink-3) 8px 16px); color: var(--side-muted); }
.me form { margin-left: auto; }
.me button { color: var(--side-muted); display: flex; padding: 4px; border-radius: 8px; }
.me button:hover { color: var(--cream); }

.main { flex: 1; min-width: 0; padding: 26px 30px 40px; display: flex; flex-direction: column; gap: 18px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head .col { gap: 6px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumbs { display: flex; gap: 8px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

/* Buttons */
.btn { height: 40px; padding: 0 16px; border-radius: 20px; background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 700 13px var(--f-body); white-space: nowrap; border: 1px solid var(--line); transition: transform .08s, background .15s, filter .15s; flex: none; }
.btn .ms { font-size: 18px; }
.btn:hover { filter: brightness(.97); }
.btn:active { transform: scale(.98); }
.btn-amber { background: var(--amber); border-color: var(--amber); }
.btn-dark { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn-paper { background: var(--paper); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 16px; }
.btn-sm .ms { font-size: 16px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 11px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn-lg { height: 52px; border-radius: 26px; font-size: 15px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.link { color: var(--amber-ink); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.link .ms { font-size: 18px; }
.link:hover { text-decoration: underline; }

.search { width: 240px; height: 40px; border-radius: 20px; background: var(--card); display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); position: relative; }
.search .ms { font-size: 18px; color: var(--faint); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; font-size: 13px; }
.search-results { position: absolute; top: 46px; right: 0; width: 340px; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 6px; z-index: 40; max-height: 420px; overflow: auto; }
.search-results a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.search-results a:hover, .search-results a.sel { background: var(--paper); }

/* Cards */
.card { background: var(--card); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-dashed { background: transparent; border: 1.5px dashed var(--line-2); }
.card-dark { background: var(--ink); color: var(--cream); }
.card-amber { background: var(--amber); }
.card-paper { background: var(--paper); }
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-hd .row { align-items: baseline; gap: 12px; }
.sub-card { background: var(--paper); border-radius: var(--r-md); padding: 12px 14px; }
.divider { height: 1px; background: var(--line); }

/* Avatars: striped circle with initials (photo placeholder) */
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  background: repeating-linear-gradient(135deg, #E9E4D9 0 8px, #F3F0E9 8px 16px); color: var(--muted); font: 500 9px var(--f-mono); letter-spacing: .04em; border: 1px solid var(--line); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-lg { width: 48px; height: 48px; }
.av-xl { width: 88px; height: 88px; font-size: 14px; }
.av-sm { width: 32px; height: 32px; font-size: 8px; }
.av-xs { width: 24px; height: 24px; font-size: 7px; }
.av-ink { background: var(--ink); color: var(--cream); font: 700 12px var(--f-body); border: 0; }

/* Chips & pills */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 12px; font: 700 11px var(--f-body); background: var(--paper); color: var(--muted); white-space: nowrap; }
.chip .ms { font-size: 14px; }
.chip-amber { background: var(--amber-soft); color: var(--amber-ink); }
.chip-red { background: var(--red-soft); color: var(--red); }
.chip-green { background: var(--green-soft); color: var(--green); }
.chip-dark { background: var(--ink); color: var(--cream); }
.chip-solid { background: var(--amber); color: var(--ink); }
.chip-line { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.count { height: 22px; min-width: 22px; padding: 0 8px; border-radius: 11px; background: var(--ink); color: var(--cream); font: 700 11px var(--f-body); display: inline-flex; align-items: center; justify-content: center; }
.status { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--f-body); }
.status .ms { font-size: 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; }

/* Segmented / tabs */
.seg { display: inline-flex; background: var(--paper); border-radius: 20px; padding: 3px; gap: 2px; }
.seg a, .seg button { height: 32px; padding: 0 14px; border-radius: 16px; display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--f-body); color: var(--muted); white-space: nowrap; }
.seg a.on, .seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg-white { background: var(--card); }
.seg-white a.on { background: var(--ink); color: var(--cream); }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 0; font: 700 13px var(--f-body); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--amber); }

/* Lists */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li-link { border-radius: 12px; padding: 10px; margin: 0 -10px; border-bottom: 0; }
.li-link:hover { background: var(--paper); }
.li-link.on { background: var(--paper); box-shadow: inset 3px 0 0 var(--amber); }
.li .t { font: 700 14px var(--f-body); }
.li .s { font: 500 12px var(--f-body); color: var(--muted); }
.time { font: 600 13px var(--f-mono); width: 48px; flex: none; color: var(--muted); }
.time.now { color: var(--amber-ink); }
.ibox { width: 34px; height: 34px; border-radius: 50%; background: var(--paper); display: flex; align-items: center; justify-content: center; flex: none; }
.ibox .ms { font-size: 18px; }
.ibox-amber { background: var(--amber); }
.ibox-dark { background: var(--ink); color: var(--cream); }
.ibox-green { background: var(--green-soft); color: var(--green); }

/* Checkbox square */
.check { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-2); display: flex; align-items: center; justify-content: center; flex: none; background: var(--card); }
.check .ms { font-size: 16px; display: none; }
.check.on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.check.on .ms { display: block; }
.done-row .t { text-decoration: line-through; color: var(--faint); }

/* Plan strip */
.plan { display: flex; gap: 4px; height: 46px; }
.plan > div { border-radius: 10px; padding: 0 9px; display: flex; flex-direction: column; justify-content: center; gap: 2px; overflow: hidden; white-space: nowrap; min-width: 0; background: var(--card); border: 1px solid var(--line); }
.plan b { font: 700 12px var(--f-body); overflow: hidden; text-overflow: ellipsis; }
.plan small { font: 500 10px var(--f-mono); opacity: .75; }
.plan .past { background: var(--paper); border: 0; color: var(--faint); }
.plan .now { background: var(--amber); border: 0; }

/* Dog card */
.dog-card { background: var(--card); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dog-card .name { font: 700 17px var(--f-body); }
.dog-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; font: 700 12px var(--f-body); gap: 8px; }
.dog-foot a, .dog-foot span { display: inline-flex; align-items: center; gap: 5px; }
.dog-foot .ms { font-size: 16px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th { font: 600 11px var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: #FBFAF6; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.days { display: inline-flex; gap: 3px; }
.days span { height: 22px; padding: 0 7px; border-radius: 6px; background: var(--paper); font: 700 11px var(--f-body); display: inline-flex; align-items: center; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font: 600 11px var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, textarea.input {
  height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); padding: 0 12px; font: 500 14px var(--f-body); outline: none; width: 100%; transition: border .15s, box-shadow .15s; }
.field textarea, textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.input-paper { background: var(--paper); border-color: transparent; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; font-weight: 600; }
.check-row input { width: 18px; height: 18px; accent-color: var(--ink); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* Toggle pills (multi-select) */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { height: 32px; padding: 0 12px; border-radius: 16px; display: inline-flex; align-items: center; gap: 6px; background: var(--paper); font: 700 12px var(--f-body); cursor: pointer; border: 1px solid transparent; }
.pill input:checked + span { background: var(--ink); color: var(--cream); }
.pill input:checked + span::after { content: 'check'; font-family: 'Material Symbols Rounded'; font-size: 15px; color: var(--amber); }
.pill input:focus-visible + span { border-color: var(--amber); }

/* 1–5 rating */
.rate { display: flex; gap: 4px; }
.rate label { position: relative; flex: 1; }
.rate input { position: absolute; opacity: 0; }
.rate span { height: 34px; border-radius: 10px; background: var(--paper); display: flex; align-items: center; justify-content: center; font: 700 13px var(--f-mono); cursor: pointer; }
.rate input:checked + span { background: var(--amber); }
.rate-bar { display: flex; gap: 3px; }
.rate-bar i { height: 6px; flex: 1; border-radius: 3px; background: var(--paper-2); }
.rate-bar i.on { background: var(--amber); }

/* Media */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--paper-2); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb input { position: absolute; opacity: 0; }
.thumb .tick { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; }
.thumb .tick .ms { font-size: 15px; opacity: 0; }
.thumb input:checked ~ .tick { background: var(--amber); }
.thumb input:checked ~ .tick .ms { opacity: 1; }
.thumb input:not(:checked) ~ img { opacity: .55; }
.thumb .tag { position: absolute; left: 6px; bottom: 6px; height: 20px; padding: 0 7px; border-radius: 10px; background: rgba(0,0,0,.6); color: #fff; font: 700 10px var(--f-body); display: flex; align-items: center; gap: 3px; }
.thumb .tag .ms { font-size: 13px; }
.cover-radio { position: absolute; left: 6px; top: 6px; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { font: 600 11px var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 4px 4px; }
.cal-d { min-height: 86px; border-radius: 12px; background: var(--card); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; border: 1px solid transparent; position: relative; }
.cal-d:hover { border-color: var(--line-2); }
.cal-d.out { opacity: .35; }
.cal-d.closed { background: transparent; border: 1px dashed var(--line-2); color: var(--faint); }
.cal-d.full { background: var(--ink); color: var(--cream); }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--amber); }
.cal-d.sel { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-d .n { font: 700 14px var(--f-body); display: flex; justify-content: space-between; align-items: center; }
.cal-d .bar { display: flex; gap: 2px; }
.cal-d .bar i { height: 5px; flex: 1; border-radius: 3px; background: var(--paper-2); }
.cal-d .bar i.on { background: var(--amber); }
.cal-d.full .bar i { background: var(--amber); }
.cal-d .s { font: 600 11px var(--f-body); color: var(--muted); }
.cal-d.full .s { color: var(--side-muted); }
.full-tag { font: 700 10px var(--f-body); letter-spacing: .08em; background: var(--amber); color: var(--ink); padding: 2px 6px; border-radius: 5px; }

/* Progress */
.progress { height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--amber); border-radius: 3px; }
.steps { display: flex; gap: 4px; }
.steps i { height: 5px; flex: 1; border-radius: 3px; background: var(--paper-2); }
.steps i.done { background: var(--green); }
.steps i.next { background: var(--amber); }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kcol { background: rgba(255,255,255,.45); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.kcard { background: var(--card); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; border: 1px solid transparent; }
.kcard:hover { border-color: var(--line-2); }
.kcard.on { border-color: var(--ink); }

/* Chat */
.thread { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 4px 2px; }
.bub { max-width: 72%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.bub-in { background: var(--paper); align-self: flex-start; border-bottom-left-radius: 6px; }
.bub-out { background: var(--ink); color: var(--cream); align-self: flex-end; border-bottom-right-radius: 6px; }
.bub-req { background: var(--amber-soft); align-self: flex-start; border: 1px solid rgba(247,173,32,.4); }
.bub-meta { font: 500 11px var(--f-body); color: var(--faint); }
.bub-meta.r { align-self: flex-end; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; height: 44px; border-radius: 22px; padding: 11px 16px; resize: none; }

/* Map */
.map { border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2); min-height: 420px; flex: 1; position: relative; z-index: 0; }
.pin { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--cream); font: 700 13px var(--f-body); display: flex; align-items: center; justify-content: center; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.pin.done { background: var(--green); }
.pin.next { background: var(--amber); color: var(--ink); }
.pin.base { background: var(--amber); color: var(--ink); width: 36px; height: 36px; }

/* Stat */
.stat { font: 700 40px/.9 var(--f-cond); }
.stat-sm { font: 700 28px/.9 var(--f-cond); }

/* Flash */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: var(--cream); padding: 12px 16px; border-radius: 14px; display: flex; align-items: center; gap: 10px; font-weight: 600; box-shadow: var(--shadow); animation: toast-in .25s ease-out; max-width: 380px; }
.toast .ms { color: var(--amber); }
.toast.err .ms { color: #ff8a73; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* Dialog */
dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: min(520px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: var(--shadow); margin: auto; }
dialog::backdrop { background: rgba(20,20,20,.45); }
.dlg { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.dlg-hd { display: flex; justify-content: space-between; align-items: center; }

/* Empty */
.empty { padding: 28px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .ms { font-size: 32px; color: var(--faint); }

/* Phone preview frame (report preview) */
.phone { width: 300px; border-radius: 36px; background: var(--ink); padding: 10px; flex: none; }
.phone-in { background: var(--paper); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; min-height: 560px; }

/* Invoice preview */
.invoice { background: #fff; border-radius: var(--r-lg); padding: 24px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.inv-line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.items-table input { height: 36px; border-radius: 10px; border: 1px solid var(--line-2); padding: 0 10px; width: 100%; background: #fff; outline: none; }
.items-table input:focus { border-color: var(--amber); }
.items-table td { padding: 6px 4px; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: var(--ink); color: var(--cream); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art img { height: 44px; align-self: flex-start; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-form form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; }

/* Responsive web */
@media (max-width: 1280px) {
  .g-side-main-side { grid-template-columns: 280px minmax(0, 1fr); }
  .g-side-main-side > :last-child { grid-column: 1 / -1; }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .g-main-side, .g-side-main, .g-side-main-side, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .side { width: 76px; padding: 18px 10px; }
  .side-logo { padding: 0 0 18px; }
  .side-logo img { height: 22px; }
  .nav a { justify-content: center; padding: 0; position: relative; }
  .nav a span:nth-child(2), .me .col, .me form { display: none; }
  .nav .nbadge { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .me { justify-content: center; padding: 8px; }
}
@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px 16px; gap: 8px; overflow-x: auto; }
  .side-logo { padding: 0; }
  .nav { flex-direction: row; }
  .me { display: none; }
  .main { padding: 18px 16px 40px; }
  .search { width: 100%; }
  .g-2, .form-grid, .kanban { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .table-wrap { overflow-x: auto; }
}

/* Map tiles: warm, quiet basemap to match the paper palette */
.map .leaflet-tile-pane { filter: grayscale(1) sepia(.18) brightness(1.03) contrast(.88); }
.map .leaflet-control-attribution { font: 500 10px var(--f-body); background: rgba(255,255,255,.7); }
.bub-req { white-space: normal; }
.h2 { white-space: nowrap; }

/* ───────── Mobile app (floor & van) ───────── */
.m-body { background: #E9E6DF; }
.m-app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--paper); display: flex; flex-direction: column; position: relative; }
.m-main { flex: 1; padding: calc(env(safe-area-inset-top) + 18px) 18px 110px; display: flex; flex-direction: column; gap: 14px; }
.m-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.m-head .eyebrow { color: var(--amber-ink); margin-bottom: 6px; }
.m-head .h1 { font-size: 34px; }
.m-round { width: 42px; height: 42px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; flex: none; position: relative; }
.m-round .dot { position: absolute; top: 9px; right: 10px; }
.m-tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--card); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 8px calc(env(safe-area-inset-bottom) + 8px); z-index: 50; }
.m-tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 11px var(--f-body); color: var(--faint); position: relative; }
.m-tabs a .pillicon { width: 52px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; }
.m-tabs a.on { color: var(--ink); }
.m-tabs a.on .pillicon { background: var(--amber); }
.m-tabs a.on .ms { font-variation-settings: 'FILL' 1; }
.m-tabs .cap { margin-top: -26px; }
.m-tabs .cap .pillicon { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--amber); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.m-tabs .cap .ms { font-size: 26px; }
.m-tabs .nb { position: absolute; top: -2px; right: calc(50% - 22px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--amber); color: var(--ink); font: 700 10px var(--f-body); display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.m-now { background: var(--amber); border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.m-now .big { font-size: 34px; }
.m-now .progress { background: rgba(20,20,20,.15); }
.m-now .progress i { background: var(--ink); }
.m-card { background: var(--card); border-radius: 20px; padding: 6px 14px; }
.m-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.m-row:last-child { border-bottom: 0; }
.m-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--paper); display: flex; align-items: center; justify-content: center; flex: none; }
.m-alert { background: var(--card); border: 1.5px solid var(--amber); border-radius: 18px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.m-stop { background: var(--card); border: 2px solid var(--amber); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.slide { position: relative; height: 60px; border-radius: 30px; background: var(--paper); display: flex; align-items: center; justify-content: center; font: 700 14px var(--f-body); color: var(--muted); user-select: none; touch-action: pan-y; overflow: hidden; }
.slide-knob { position: absolute; left: 4px; top: 4px; width: 52px; height: 52px; border-radius: 50%; background: var(--amber); display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; z-index: 1; }
.slide.done { background: var(--green); color: #fff; }
.chipsel { display: flex; flex-wrap: wrap; gap: 8px; }
.chipsel label { position: relative; }
.chipsel input { position: absolute; opacity: 0; }
.chipsel > label > span { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 4px; border-radius: 22px; background: var(--card); font: 700 15px var(--f-body); cursor: pointer; border: 1.5px solid var(--line); }
.chipsel input:checked + span { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.chipsel input:checked + span::after { content: 'check'; font-family: 'Material Symbols Rounded'; color: var(--amber); font-size: 18px; }
.chipsel .av { width: 36px; height: 36px; }
.drop { border: 2px dashed var(--line-2); border-radius: 22px; min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--card); color: var(--muted); cursor: pointer; overflow: hidden; position: relative; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 100%; padding: 4px; }
.drop .previews img, .drop .previews video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.m-sticky { position: sticky; bottom: 92px; display: flex; gap: 8px; }
@media (min-width: 560px) {
  .m-body { padding: 24px 0; }
  .m-app { border-radius: 36px; min-height: calc(100vh - 48px); box-shadow: var(--shadow); overflow: hidden; }
  .m-tabs { bottom: 24px; border-radius: 0 0 36px 36px; }
}
@media (min-width: 721px) and (max-width: 1080px) { .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .plan { overflow-x: auto; }
  .plan > div { min-width: 64px; }
  .g-3 { grid-template-columns: minmax(0, 1fr); }
}
