/* ============================================================================
   Apothecary — design system for the wellness portal
   Palette: sage paper + deep herbal green (dominant) + restrained honey accent
   Type: one system sans throughout (headings differ only by size/weight).
   Signature: the arc (holistic / daily rhythm).
   ========================================================================== */

:root {
  --paper:     #F6F7F3;
  --surface:   #FFFFFF;
  --panel:     #EDF0EA;
  --ink:       #26302A;
  --ink-soft:  #5B665F;
  --pine:      #2E4B3B;
  --pine-deep: #213A2C;
  --sage:      #7E9384;
  --sage-soft: #A9B8AC;
  --honey:     #BE863A;
  --honey-tint:#F0E4CE;
  --line:      #E2E5DD;
  --danger:    #A5503E;
  --ok:        #3C7355;

  /* One font family throughout (headings differ only by size/weight). */
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: var(--font-body);
  /* One monospace family for all code/keys/hashes (was browser-default → varied). */
  --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(33,58,44,.05), 0 6px 20px rgba(33,58,44,.06);
  --shadow-sm: 0 1px 2px rgba(33,58,44,.06);
  --wrap: 680px;
  --wrap-wide: 1000px;
}

/* ── reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--pine); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; color: var(--ink); margin: 0 0 .4em; letter-spacing: -.01em; }
code, pre, kbd { font-family: var(--font-mono); font-size: .88em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }

/* ── eyebrow / labels ─────────────────────────────────────────────────── */
.eyebrow {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--sage); margin: 0 0 .5rem;
}

/* ── top bar (app shell) ──────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem clamp(1rem, 4vw, 2rem);
  background: rgba(246,247,243,.85);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.18rem;
  color: var(--pine); letter-spacing: -.01em; display: inline-flex; align-items: center; gap: .5rem;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--honey);
  display: inline-block; position: relative; flex: none;
}
.brand .mark::after {
  content: ''; position: absolute; inset: 5px 5px auto auto; width: 8px; height: 8px;
  border-radius: 50%; background: var(--pine);
}
.nav { display: flex; gap: 1.15rem; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); font-size: .92rem; }
.nav a.on { color: var(--pine); font-weight: 600; }
.nav a:hover { color: var(--pine); text-decoration: none; }

/* ── main container ───────────────────────────────────────────────────── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: clamp(1.4rem, 4vw, 2.6rem) clamp(1rem, 4vw, 1.8rem) 4rem; }
.wrap-wide { max-width: var(--wrap-wide); }

/* ── app shell: left sidebar + content ────────────────────────────────── */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100dvh; }
.sidebar {
  background: var(--pine-deep); color: #D8E0D6;
  display: flex; flex-direction: column; gap: .2rem;
  padding: 1.4rem 1rem; position: sticky; top: 0; height: 100dvh;
}
.sidebar .brand { color: #fff; font-size: 1.12rem; margin: 0 .4rem 1.7rem; }
.sidebar .brand .mark { border-color: var(--honey); }
.sidebar .brand .mark::after { background: #D8E0D6; }
.sidebar .brand:hover { text-decoration: none; }
.sidebar .brand .tag { color: var(--sage-soft); font-family: var(--font-body); font-weight: 400; font-size: .78rem; }
.sidebar nav { display: flex; flex-direction: column; gap: .12rem; }
.sidebar nav a {
  color: #B9C7B9; padding: .55rem .75rem; border-radius: var(--radius-sm);
  font-size: .95rem; display: flex; align-items: center; gap: .5rem;
}
.sidebar nav a svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .85; }
.sidebar nav a.on svg { opacity: 1; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar nav a.on { background: rgba(190,134,58,.16); color: #fff; box-shadow: inset 3px 0 0 var(--honey); }
/* Divider between everyday tasks (above) and admin tasks (below). */
.sidebar nav .nav-sep { height: 1px; background: rgba(255,255,255,.12); margin: .6rem .7rem; }
.sidebar nav a .nav-badge {
  margin-left: auto; background: #C0392B; color: #fff; font-size: .7rem; font-weight: 700;
  min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 100px;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.sidebar .spacer { flex: 1 1 auto; }
.sidebar .admin-badge {
  display: inline-block; align-self: flex-start; margin: 0 .75rem .3rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--honey); border: 1px solid var(--honey); border-radius: 100px; padding: .12rem .55rem;
}
.sidebar .signed-as { color: #8b9c8d; font-size: .78rem; line-height: 1.4; padding: .3rem .75rem; word-break: break-all; }
.sidebar .signout { color: #b9c7b9; font-size: .9rem; padding: .5rem .75rem; display: inline-flex; align-items: center; gap: .5rem; }
.sidebar .signout svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .85; }
.sidebar .signout:hover { color: #fff; }
.main { min-width: 0; }
.main .wrap { max-width: 940px; }
.main .wrap-wide { max-width: 1200px; }

@media (max-width: 820px) {
  /* Sidebar → sticky mobile top bar: brand · scrollable nav · sign out.
     display:block (not grid) so sections are simply full-width — a grid 1fr track
     grows to its content's min size and would blow the page wider than the phone. */
  .app-shell { display: block; overflow-x: clip; }
  .sidebar {
    position: sticky; top: 0; z-index: 50; height: auto;
    flex-direction: row; align-items: center; padding: .5rem .7rem; gap: .5rem;
  }
  .sidebar .brand { margin: 0 .5rem 0 0; flex: none; font-size: 1rem; }
  .sidebar .brand img { max-height: 30px; }
  .sidebar .brand .tag { display: none; }
  /* min-width:0 lets the nav shrink & scroll internally instead of forcing the
     1fr grid track (and the whole page) wider than the viewport. */
  .sidebar nav { flex-direction: row; gap: .15rem; flex: 1 1 auto; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sidebar nav a { white-space: nowrap; padding: .45rem .6rem; font-size: .9rem; }
  .sidebar nav a.on { box-shadow: inset 0 -3px 0 var(--honey); }
  .sidebar nav .nav-sep { display: none; }
  /* Free up horizontal room on the bar. */
  .sidebar .spacer, .sidebar .admin-badge, .sidebar .signed-as { display: none; }
  .sidebar form { margin: 0; flex: none; }
  .sidebar .signout { white-space: nowrap; font-size: .85rem; }
  /* Headers stack their action buttons instead of overflowing. */
  .pagehead.row-between, .pagehead .row-between { align-items: flex-start; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs button { white-space: nowrap; }
}

/* ── the arc signature ────────────────────────────────────────────────── */
.pagehead { position: relative; margin-bottom: 1.8rem; }
.pagehead .arc {
  position: absolute; right: -10px; top: -18px; width: 132px; height: 132px;
  border: 1.5px solid var(--honey); border-radius: 50%;
  border-right-color: transparent; border-bottom-color: transparent;
  transform: rotate(38deg); opacity: .5; pointer-events: none;
}
.pagehead h1 { position: relative; }
.greeting { font-size: 2rem; font-weight: 700; }
.greeting em { font-style: italic; color: var(--pine); }

/* ── tabs (Alpine-driven; §25 V2.2) ───────────────────────────────────── */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.3rem; flex-wrap: wrap; }
.tabs button {
  border: 0; background: none; font-family: var(--font-body); font-size: .95rem; font-weight: 600;
  color: var(--ink-soft); padding: .6rem .9rem; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; border-radius: 0;
}
.tabs button:hover { color: var(--pine); border-color: var(--sage-soft); }
.tabs button.on { color: var(--pine); border-color: var(--honey); }
[x-cloak] { display: none !important; }

/* ── cards ────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.35rem; box-shadow: var(--shadow-sm); margin-bottom: 1.1rem;
}
.card h2, .card h3 { margin-top: 0; }
/* Clickable cards (e.g. dashboard "Go to" tiles) lift + honey edge on hover. */
a.card { transition: transform .15s, box-shadow .15s, border-color .15s; display: block; }
a.card:hover { border-color: var(--honey); box-shadow: var(--shadow); transform: translateY(-3px); }
a.card:hover h3 { color: var(--pine); }
/* Clickable non-anchor rows (message conversations, calendar rows) — same feel. */
/* Clickable list cards (message conversations): grey-bg hover, matching the
   clients table rows — consistent "row" feel across list views. */
.card-click { transition: background .12s, border-color .12s; }
.card-click:hover { background: var(--paper); border-color: var(--sage-soft); }
tr.row-click { cursor: pointer; transition: background .12s; }
tr.row-click:hover { background: var(--paper); }
.card-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .card-grid, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr; } }
.card .kv { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--panel); font-size: .95rem; }
.card .kv:last-child { border-bottom: 0; }
.card .kv .k { color: var(--ink-soft); }
.client-meta { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .92rem; color: var(--ink); }
.client-meta .muted { color: var(--ink-soft); }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn, button, input[type=submit] {
  font-family: var(--font-body); font-size: .95rem; font-weight: 600;
  padding: .6rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); cursor: pointer; transition: .15s;
  display: inline-flex; align-items: center; gap: .4rem; line-height: 1.2;
}
.btn:hover, button:hover { background: #E3E7DE; border-color: var(--sage); text-decoration: none; }
.btn-primary, button.primary {
  background: var(--pine); color: #fff; border-color: var(--pine);
}
.btn-primary:hover, button.primary:hover { background: var(--pine-deep); border-color: var(--pine-deep); }
.btn-ghost { background: var(--paper); }
.btn-ghost:hover { background: var(--panel); }
.btn-sm { padding: .38rem .7rem; font-size: .85rem; }
.btn svg, .btn-ico { width: 15px; height: 15px; flex: 0 0 auto; vertical-align: -2px; }
.btn-link { border: 0; background: none; color: var(--pine); padding: 0; font-weight: 600; }
/* Soft tinted action buttons — same bordered/rounded shape as .btn. */
.btn-danger-soft { background: #f6e5e1; border-color: #e0b4aa; color: #8f4232; }
.btn-danger-soft:hover { background: #f0d6cf; border-color: var(--danger); }
.btn-warn-soft { background: var(--honey-tint); border-color: #ddc389; color: #7a5417; }
.btn-warn-soft:hover { background: #ead9b8; border-color: var(--honey); }

/* ── forms ────────────────────────────────────────────────────────────── */
.field { margin-bottom: 1rem; }
label { display: block; }
.label, form label { font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: .3rem; display: block; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]),
textarea, select {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); transition: .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(126,147,132,.18);
}
textarea { resize: vertical; min-height: 4.5rem; }
input[type=file] { font-size: .9rem; }
.hint { font-size: .82rem; color: var(--ink-soft); margin-top: .3rem; }

/* ── markdown toolbar + preview (§25 — reusable on textarea[data-md]) ──── */
.md-toolbar { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .4rem; }
.md-btn {
  font-family: var(--font-body); font-size: .82rem; font-weight: 600; padding: .3rem .6rem;
  border: 1px solid var(--line); background: var(--panel); border-radius: 6px; cursor: pointer; color: var(--ink);
}
.md-btn:hover { background: #E3E7DE; border-color: var(--sage); }
.md-btn.on { background: var(--pine); color: #fff; border-color: var(--pine); }
.md-preview {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1.1rem;
  background: var(--surface); min-height: 6rem;
}
.md-preview h1, .md-preview h2, .md-preview h3 { margin: .5rem 0 .3rem; }
.md-preview p { margin: 0 0 .6rem; }
.md-preview ul { margin: 0 0 .6rem 1.2rem; }

/* ── tables ───────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
/* .flush drops the wrapper's rounded box/border (e.g. the schedule grid, whose
   own square border would otherwise peek behind the rounded corners). Scroll kept. */
.table-wrap.flush { border: 0; border-radius: 0; background: none; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th {
  text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sage); font-weight: 700; padding: .7rem .9rem; border-bottom: 1px solid var(--line);
}
table.data td { padding: .7rem .9rem; border-bottom: 1px solid var(--panel); }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--paper); }

/* Bordered grid variant (Excel-style) — used for the schedule chart. */
table.data.grid { border: 1.5px solid var(--sage-soft); }
table.data.grid th, table.data.grid td { border: 1px solid var(--line); text-align: center; }
table.data.grid th:first-child, table.data.grid td:first-child { text-align: left; }
table.data.grid thead th { background: var(--panel); color: var(--pine); }
table.data.grid tr:last-child td { border-bottom: 1px solid var(--line); }

/* ── badges ───────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; font-size: .72rem; font-weight: 600; padding: .12rem .5rem;
  border-radius: 100px; border: 1px solid; line-height: 1.5;
}
.badge-draft { color: #3a5a8a; border-color: #b9c9df; background: #eef3f9; }
.badge-msg   { color: var(--ok); border-color: #b6d3c2; background: #e9f3ed; }
.badge-warn  { color: #8a6d1a; border-color: #e0cf8f; background: #f8f1dc; }
.badge-quiet { color: var(--ink-soft); border-color: var(--line); background: var(--panel); }
.badge-published  { color: #2c6a45; border-color: #b6d3c2; background: #e9f3ed; }
.badge-superseded { color: #8a6d1a; border-color: #e6d8ad; background: #f6efd9; }

/* ── alerts ───────────────────────────────────────────────────────────── */
.alert { padding: .7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.1rem; font-size: .93rem; border: 1px solid; }
.alert-ok   { background: #eaf3ed; border-color: #bcd8c6; color: #285c40; }
.alert-err  { background: #f7ece9; border-color: #e0bdb3; color: #8a3826; }

/* ── chat layout: scrolling history + pinned composer (§25 F) ─────────── */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 210px); min-height: 320px; }
.chat-scroll { flex: 1 1 auto; overflow-y: auto; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); }
.chat-composer { flex: none; border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .4rem; }
.chat-composer textarea { min-height: 2.6rem; }
@media (max-width: 820px) { .chat { height: calc(100dvh - 260px); } }

/* ── message bubbles ──────────────────────────────────────────────────── */
.thread { margin: 1rem 0; }
.msg { max-width: 82%; padding: .45rem .7rem; border-radius: var(--radius); margin: .3rem 0; border: 1px solid var(--line); }
.msg .who { font-size: .7rem; color: var(--ink-soft); margin-bottom: .1rem; font-weight: 600; }
.msg > div:last-child { line-height: 1.35; }
/* Initials avatar in the message "who" line — colour is per-person (--h hue). */
.avatar { display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; margin-right: .35rem; vertical-align: middle;
  background: hsl(var(--h, 210) 40% 44%); color: #fff; font-size: .6rem; font-weight: 700; letter-spacing: .02em; }
.msg.them { background: var(--surface); border-top-left-radius: 3px; }
.msg.me { background: var(--panel); border: 1px solid var(--line); margin-left: auto; border-top-right-radius: 3px; }
.msg .attach { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; margin-top: .4rem; }

/* Client dashboard action cards: equal-height (from the grid) + button pinned to
   the bottom so all four buttons line up regardless of text length. */
.dash-card { display: flex; flex-direction: column; }
.dash-card .btn { margin-top: auto; align-self: flex-start; }

/* ── dashboard "Go to" tiles (compact icon + label) ───────────────────── */
/* min ~250px → 4 across on the wide admin content column (8 tiles = a clean 4×2),
   dropping to 3/2/1 on narrower screens. */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .7rem; }
.tile { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none;
  transition: background .12s, border-color .12s, transform .12s; }
.tile:hover { border-color: var(--honey); background: var(--paper); transform: translateY(-1px); text-decoration: none; }
.tile .ic { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 9px; background: var(--panel); color: var(--pine); transition: background .12s, color .12s; }
.tile:hover .ic { background: var(--pine); color: #fff; }
.tile .ic svg { width: 19px; height: 19px; }
.tile .tx { min-width: 0; line-height: 1.25; }
.tile .tx strong { display: block; color: var(--ink); font-size: .92rem; font-weight: 600; }
.tile .tx span { color: var(--ink-soft); font-size: .76rem; }

/* ── recipient picker (searchable multi-select chips) ─────────────────── */
.rcp-chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: 100px; padding: .2rem .35rem .2rem .7rem; font-size: .85rem; }
.rcp-chip button { border: 0; background: none; color: var(--ink-soft); cursor: pointer;
  font-size: 1.05rem; line-height: 1; padding: 0 .15rem; }
.rcp-chip button:hover { color: var(--danger); }
.rcp-drop { position: absolute; z-index: 20; left: 0; right: 0; margin-top: .2rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 14rem; overflow-y: auto; }
.rcp-opt { display: block; width: 100%; text-align: left; padding: .5rem .7rem; border: 0;
  border-bottom: 1px solid var(--panel); background: none; cursor: pointer; font-family: var(--font-body); }
.rcp-opt:last-child { border-bottom: 0; }
.rcp-opt:hover { background: var(--paper); }

/* ── lists / misc ─────────────────────────────────────────────────────── */
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: .55rem 0; border-bottom: 1px solid var(--panel); }
.list-plain li:last-child { border-bottom: 0; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0; }
.stack > * + * { margin-top: .8rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pill-time {
  display: inline-block; font-size: .8rem; padding: .2rem .55rem; border-radius: 100px;
  background: var(--honey-tint); color: #7a5417; font-weight: 600;
}

/* ── auth card (login / enroll) ───────────────────────────────────────── */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem 1.9rem; position: relative; overflow: hidden;
}
.auth-card::before {
  content: ''; position: absolute; right: -90px; top: -90px; width: 240px; height: 240px;
  border: 1.5px solid var(--honey); border-radius: 50%;
  border-right-color: transparent; border-bottom-color: transparent; transform: rotate(30deg); opacity: .55;
}
.auth-brand {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--pine);
  letter-spacing: -.01em; margin-bottom: 1.4rem; position: relative;
}
.auth-card h1 { font-size: 1.6rem; margin-bottom: 1.3rem; position: relative; }
.auth-card .btn-primary { width: 100%; justify-content: center; margin-top: .4rem; }
/* Practitioner / staff sign-in — visually distinct from the client login. */
.auth-card.staff { border-color: var(--honey); border-top: 5px solid var(--honey); }
.auth-card.staff .auth-brand { color: var(--pine-deep); }
.auth-pill {
  display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1rem; position: relative;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--honey); border: 1px solid var(--honey); border-radius: 100px; padding: .2rem .7rem;
}
.auth-pill.client { color: var(--pine); border-color: var(--sage); }
.auth-switch { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line); position: relative; }
.qr { width: 220px; height: 220px; margin: 1rem auto; display: block; }
.qr svg { width: 100%; height: 100%; }

/* ── upload progress ──────────────────────────────────────────────────── */
.upload-status { display: inline-flex; align-items: center; gap: .5rem; margin-top: .5rem; font-size: .85rem; color: var(--ink-soft); }
.spinner {
  width: 1.05em; height: 1.05em; flex: none; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--honey);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── accessibility ────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Searchable combobox (template picker, etc.) — a text input that filters a dropdown list */
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 15rem; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(46,75,59,.12); padding: .25rem;
}
.combo-opt { padding: .5rem .6rem; border-radius: 7px; cursor: pointer; line-height: 1.3; }
.combo-opt:hover, .combo-opt.on { background: rgba(190,134,58,.14); }
.combo-empty { padding: .5rem .6rem; }
