/* Reunite Admin: design C + A's colours, Menu 2 (top bar). */
:root {
  --bg: #F4F6F6;
  --surface: #FFFFFF;
  --line: #E3E7EB;
  --line-soft: #EEF1F4;
  --field: #D5DBE0;
  --ink: #14181B;
  --ink-2: #2E3B43;
  --muted: #57636C;
  --label: #6B7780;
  --teal: #408888;
  --teal-deep: #2E6B6B;
  --teal-darker: #1F4F4F;
  --teal-tint: #E8F4F4;
  --row-on: #EEF6F5;
  --red: #C9473A;
  --red-ink: #A8392E;
  --red-tint: #FBE3DF;
  --red-tint-ink: #9A2E22;
  --amber-tint: #FFF4D6;
  --amber-ink: #7A5200;
  --green-tint: #E3F3EC;
  --green-ink: #1F5F4A;
  --gold: #EACB6E;
  --gold-ink: #3A2F06;
  --heading: 'Inter Tight', system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
}

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(assets/fredoka-wordmark.woff2) format('woff2');
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14px; }
a { color: var(--teal-deep); }
a:hover { color: var(--teal-darker); }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.55; }
img { display: block; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.grow { flex-grow: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.right { text-align: right; }
.text-red { color: var(--red-ink); }
.label { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--label); text-transform: uppercase; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-xs { display: flex; flex-direction: column; gap: 2px; }
.error { color: var(--red-ink); background: var(--red-tint); padding: 8px 12px; border-radius: 10px; margin: 0; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand-sub { font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: 0.6px; color: var(--muted); text-transform: uppercase; }
/* The app's logo, as on the website (brand v4). */
.brand-logo { --brand-ink: #347878; --brand-gold: #E3A63C; display: inline-block; white-space: nowrap; color: var(--brand-ink); font-family: 'Fredoka', var(--heading); font-weight: 600; font-size: 27px; line-height: 1; letter-spacing: -0.2px; }
.brand-logo .tile { display: inline-block; vertical-align: baseline; width: 0.9em; height: 0.9em; margin-right: 0.03em; overflow: visible; }
.brand-logo .tile-fill { fill: var(--brand-ink); }
.brand-logo .tile-paw { fill: var(--brand-gold); }
.brand-logo .idot { position: relative; display: inline-block; }
.brand-logo .idot svg { position: absolute; left: 50%; top: 0.06em; width: 0.34em; height: 0.34em; margin-left: -0.17em; overflow: visible; fill: var(--brand-gold); }
.brand-logo-tile { font-size: 60px; }
.brand-logo-tile .tile { margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: #F1F4F6; padding: 4px; border-radius: 12px; }
.tab { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.tab:hover { color: var(--ink); }
.tab-on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(20,24,27,0.12); }
.tab-count { min-width: 20px; height: 20px; border-radius: 10px; background: var(--line); color: var(--ink-2); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.tab-on .tab-count { background: var(--teal); color: #FFFFFF; }
.tab-count-red, .tab-on .tab-count-red { background: var(--red-tint); color: var(--red-tint-ink); }
.data-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.8px; padding: 5px 8px; border-radius: 6px; }
.data-prod { color: #8A3E17; background: #FDE8DC; }
.data-dev { color: #1F4E8C; background: #E1ECFA; }
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 22px; border: 1px solid var(--field); background: var(--surface); }
.account-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.account-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.account-role { font-size: 11.5px; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 16px; background: var(--teal-deep); color: #FFFFFF; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar-lg { width: 40px; height: 40px; border-radius: 20px; font-size: 14px; }
.avatar-sm { width: 26px; height: 26px; border-radius: 13px; font-size: 10.5px; }
.avatar-grey { background: #6F6A83; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20,24,27,0.16); padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px; border-bottom: 1px solid var(--line-soft); }
.menu-who { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.menu-who strong { font-size: 14px; color: var(--ink); }
.menu-facts { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; padding: 0 4px; }
.menu-facts dt { color: var(--muted); font-size: 11.5px; }
.menu-facts dt + dd { margin: 0 0 6px; overflow-wrap: anywhere; }
.menu-note { margin: 0; font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 8px 10px; }

/* Sign-in (online) */
.gate { min-height: calc(100vh - 62px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.gate-card p { margin: 0; line-height: 1.5; }
.gate-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 8px; }
.brand-mark-lg { width: 56px; height: 56px; border-radius: 16px; }
.menu-item { border: 0; background: transparent; text-align: left; padding: 9px 8px; border-radius: 8px; font-size: 13.5px; font-weight: 600; }
.menu-item:hover { background: var(--bg); }
.menu-item-danger { color: var(--red-ink); }

/* Page layout */
.view { display: flex; flex-direction: column; }
.page { padding: 22px 24px 28px; display: flex; flex-direction: column; gap: 20px; max-width: 1240px; width: 100%; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi-value { font-family: var(--heading); font-size: 30px; font-weight: 700; letter-spacing: -0.6px; }
.kpi-red { color: var(--red-ink); }
.kpi-amber { color: var(--amber-ink); }
.kpi-sub { font-size: 12.5px; color: var(--muted); }
.main-col { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
/* Totals, main column and side panel share one grid so the panel sits exactly
   under the last total. */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(380px, 1fr); gap: 18px 12px; padding: 20px 24px 28px; align-items: start; }
.board > .main-col { grid-column: 1 / 4; }
.board > .drawer { grid-column: 4; }
.board > .main-col.full { grid-column: 1 / -1; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-title { margin: 0; font-family: var(--heading); font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.search { flex: 0 1 300px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; background: var(--surface); border: 1px solid var(--field); border-radius: 10px; }
.search input { border: 0; outline: none; font: inherit; flex-grow: 1; min-width: 0; background: transparent; color: var(--ink); }
.search-row { display: flex; flex-wrap: wrap; gap: 8px; }
.search-lg { flex: 1 1 420px; max-width: 620px; height: 44px; border: 1.5px solid var(--teal); border-radius: 12px; font-size: 14.5px; }
.placeholder { padding: 40px 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; max-width: 640px; }
.placeholder p { margin: 0; color: var(--muted); }

/* Chips and pills */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 16px; background: var(--surface); border: 1px solid var(--field); color: var(--ink-2); }
.chip-amber { background: var(--amber-tint); border-color: #F0D58A; color: var(--amber-ink); font-weight: 700; }
.chip-on, .chip-amber.chip-on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.pills-lg .pill { font-size: 12.5px; padding: 5px 9px; border-radius: 8px; gap: 5px; }
.pill-green { background: var(--green-tint); color: var(--green-ink); }
.pill-red { background: var(--red-tint); color: var(--red-tint-ink); }
.pill-amber { background: var(--amber-tint); color: var(--amber-ink); }
.pill-grey { background: #F1F4F8; color: var(--ink-2); }
.flag { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; margin-left: 6px; white-space: nowrap; }
.flag-amber { background: var(--amber-tint); color: var(--amber-ink); }
.flag-purple { background: #E9E5F2; color: #4B3F72; }
.flag-blue { background: #E1ECFA; color: #1F4E8C; }
.flag-grey { background: #F1F4F8; color: var(--ink-2); }
.flag-red { background: var(--red-tint); color: var(--red-tint-ink); }
.type { font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px; padding: 3px 7px; border-radius: 5px; white-space: nowrap; }
.type-lost { background: var(--red-tint); color: var(--red-tint-ink); }
.type-found { background: #DCEFEF; color: var(--teal-darker); }
.type-reward { background: var(--gold); color: var(--gold-ink); }
.tag { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 7px; background: #F1F4F8; color: var(--ink-2); }
.kind { align-self: flex-start; font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.kind-blue { background: #E1ECFA; color: #1F4E8C; }
.kind-amber { background: var(--amber-tint); color: var(--amber-ink); }
.kind-teal { background: #DCEFEF; color: var(--teal-darker); }
.kind-purple { background: #E9E5F2; color: #4B3F72; }

/* Batch bar */
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--ink); color: #FFFFFF; border-radius: 12px; padding: 8px 10px 8px 14px; font-size: 13.5px; }
.bulk-ok, .bulk-warn { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.bulk-ok { color: #A8E0C9; }
.bulk-warn { color: #F6D58A; }
.btn-bulk { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid #5B6368; background: transparent; color: #FFFFFF; font-size: 13px; font-weight: 600; }
.btn-bulk-primary { border: 0; background: var(--teal); font-weight: 700; padding: 0 14px; }
.btn-bulk-danger { border: 0; background: #F08A7E; color: #3B0E08; font-weight: 700; }

/* Tables */
.table-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 780px; }
.table th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 11px 6px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 12px; }
.table th:last-child, .table td:last-child { padding-right: 12px; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #F8FAFA; }
.table tbody tr.row-on { background: var(--row-on); box-shadow: inset 3px 0 0 var(--teal); }
.table td.top { vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
.cell-check { width: 20px; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions > * + * { margin-left: 4px; }
.empty { text-align: center; color: var(--muted); padding: 32px 12px !important; cursor: default; }
.pet-cell { display: flex; align-items: center; gap: 10px; }
.pet-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pet-name { font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.pet-name .type { margin-left: 6px; }
.thumb { position: relative; width: 46px; height: 46px; border-radius: 9px; overflow: hidden; flex-shrink: 0; background: var(--teal-tint); display: flex; align-items: center; justify-content: center; }
.thumb img { width: 46px; height: 46px; object-fit: cover; }
.thumb-count { position: absolute; right: 2px; bottom: 2px; background: rgba(20,24,24,0.72); color: #FFFFFF; font-size: 10px; font-weight: 700; padding: 0 4px; border-radius: 4px; }
.what { max-width: 340px; }
.what > * { display: block; }
.what > .kind { display: inline-block; }
.what-text { margin: 4px 0 2px; line-height: 1.4; overflow-wrap: anywhere; }

/* Sortable headers */
.th-sort { border: 0; background: transparent; padding: 0; font: inherit; color: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.th-sort:hover, .th-sort-on { color: var(--ink); }
.th-arrow { font-size: 11px; color: #A3ADB5; }
.th-sort-on .th-arrow { color: var(--teal-deep); }

/* Equal-width action buttons in table cells */
.action-pair { display: inline-grid; grid-template-columns: 112px 112px; gap: 6px; }
.action-pair .btn-small { width: 100%; padding: 0 6px; white-space: nowrap; }
.btn-fixed { width: 112px; }

/* Buttons */
.btn { height: 44px; padding: 0 18px; border-radius: 12px; border: 0; font-size: 14.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn-primary { background: var(--teal); color: #FFFFFF; }
.btn-primary:hover { background: var(--teal-deep); }
.btn-outline { background: var(--surface); border: 1px solid var(--field); color: var(--ink-2); font-weight: 600; }
.btn-danger { background: var(--red); color: #FFFFFF; }
.btn-danger-outline { background: var(--surface); border: 1.5px solid var(--red); color: var(--red-ink); }
.btn-small { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--field); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.btn-small-danger { border-color: #EBC4BE; background: #FBEDEA; color: var(--red-ink); font-weight: 700; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.icon-btn-ok { border-color: #B9D9D7; background: var(--teal-tint); color: var(--teal-deep); }
.icon-btn-no { border-color: #EBC4BE; background: #FBEDEA; color: var(--red-ink); }

/* Side panel */
.drawer { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; }
.drawer-empty { align-items: center; justify-content: center; color: var(--muted); text-align: center; min-height: 240px; }
.drawer-head { display: flex; align-items: center; gap: 10px; }
.drawer-title { margin: 0; font-family: var(--heading); font-size: 24px; font-weight: 700; letter-spacing: -0.4px; }
.drawer-title-sm { font-size: 19px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badges .flag { margin-left: 0; }
.gallery { display: flex; flex-direction: column; gap: 6px; }
.gallery-main { position: relative; height: 240px; border-radius: 12px; overflow: hidden; background: #1E2626; display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.no-photo { color: #F6B2A9; font-weight: 700; }
.front-label { position: absolute; left: 10px; top: 10px; background: var(--teal); color: #FFFFFF; font-size: 11px; font-weight: 800; letter-spacing: 0.7px; padding: 5px 8px; border-radius: 7px; }
.photo-count { position: absolute; right: 10px; top: 10px; background: rgba(20,24,24,0.6); color: #FFFFFF; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 7px; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gallery-thumb { height: 64px; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: var(--line); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb-on { outline: 3px solid var(--teal); outline-offset: 2px; }
.note-box { margin: 0; font-size: 13px; line-height: 1.45; background: var(--amber-tint); color: var(--amber-ink); border-radius: 10px; padding: 8px 10px; }
.facts { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.decide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.decide-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.decide-3 .btn { white-space: nowrap; padding: 0 6px; font-size: 13.5px; }
.bubble { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.bubble p { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.bubble-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drawer p { margin: 0; }
.mini-post { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.mini-post > img { width: 56px; height: 56px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }

/* Reason picker, switch, dialogs, toasts */
.reason-picker { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.input { font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); height: 40px; width: 100%; border: 1px solid var(--field); border-radius: 10px; padding: 0 12px; background: var(--surface); }
select.input { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2357636C' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.textarea { height: auto; min-height: 72px; padding: 9px 12px; line-height: 1.45; resize: vertical; }
.input:disabled { background: var(--bg); color: var(--muted); }
.hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.form-section { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.form-title { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--label); text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.status-box { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.status-box p { margin: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.claim-link { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
.message-box { font-family: inherit; font-size: 13px; line-height: 1.45; min-height: 96px; }
.switch-row { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.switch-row > span { flex-grow: 1; }
.switch { width: 46px; height: 28px; border-radius: 14px; background: #C6CDD4; border: 0; position: relative; padding: 0; flex-shrink: 0; }
.switch-knob { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 11px; background: #FFFFFF; transition: left 0.15s; }
.switch-on { background: var(--teal); }
.switch-on .switch-knob { left: 21px; }
.who { display: flex; align-items: center; gap: 12px; }
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(20,24,27,0.45); display: flex; align-items: center; justify-content: center; padding: 24px; }
.dialog { width: 100%; max-width: 520px; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--surface); border-radius: 18px; box-shadow: 0 20px 48px rgba(20,24,27,0.25); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.dialog-title { margin: 0; font-family: var(--heading); font-size: 20px; font-weight: 700; }
.dialog-text { margin: 0; line-height: 1.5; color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { padding: 12px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600; box-shadow: 0 8px 24px rgba(20,24,27,0.18); line-height: 1.4; }
.toast-green { background: var(--ink); color: #FFFFFF; }
.toast-amber { background: var(--amber-tint); color: var(--amber-ink); border: 1px solid #F0D58A; }
.toast-red { background: var(--red-tint); color: var(--red-tint-ink); border: 1px solid #EBC4BE; }

/* Cards and small stats (Overview) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.card-title { margin: 0; font-family: var(--heading); font-size: 17px; font-weight: 700; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.mini-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.mini-value { font-family: var(--heading); font-size: 22px; font-weight: 700; }
.attention { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.attention:hover { background: var(--bg); color: var(--ink); }
.attention-amber { box-shadow: inset 3px 0 0 #E0A100; }
.attention-red { box-shadow: inset 3px 0 0 var(--red); }
.attention > span:first-child { flex-grow: 1; min-width: 0; overflow-wrap: anywhere; }
.attention-go { font-size: 20px; color: var(--muted); }

/* Charts */
.chart-head { display: flex; align-items: center; gap: 12px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.link-btn { border: 0; background: transparent; color: var(--teal-deep); font-size: 12.5px; font-weight: 600; padding: 4px 0; text-decoration: underline; }
.chart-wrap { position: relative; }
.chart { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 170px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; outline-offset: 2px; cursor: default; }
.col-value { font-size: 11.5px; font-weight: 700; color: var(--ink-2); height: 16px; }
.col-bar { width: 100%; max-width: 24px; height: 120px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.col-bar .seg { width: 100%; display: block; min-height: 3px; }
.col-bar .seg:first-child { border-radius: 4px 4px 0 0; }
.col-x { font-size: 11px; color: var(--muted); height: 22px; line-height: 22px; white-space: nowrap; }
.col:hover .col-bar, .col:focus .col-bar { filter: brightness(0.92); }
.chart-tip { position: absolute; top: 0; width: 150px; background: var(--ink); color: #FFFFFF; border-radius: 10px; padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; z-index: 2; }
.chart-tip[hidden] { display: none; }
.tip-row { display: inline-flex; align-items: center; gap: 6px; }
.chart-table { min-width: 0; }

/* Small helpers */
.pill-blue { background: #E1ECFA; color: #1F4E8C; }
.pill-gap { margin-left: 4px; }
.gap-left { margin-left: 6px; }
.note-line { display: block; margin-top: 2px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.thumb-sm, .thumb-sm img { width: 36px; height: 36px; }
.table-compact { min-width: 0; }
.table-compact td { padding: 6px; }
.file-input { font-size: 13px; color: var(--muted); }
.photo-preview { display: flex; align-items: center; gap: 12px; }
.photo-preview img { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }

@media (max-width: 1100px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board > .main-col, .board > .drawer { grid-column: 1 / -1; grid-row: auto; }
  .board > .drawer { position: static; max-height: none; }
}

@media (max-width: 700px) {
  .topbar { padding: 10px 16px; gap: 10px; }
  .board { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .page { padding: 16px; }
  .account-text { display: none; }
}
