/* Lioh — shared design tokens & components */

/* Brand fonts, self-hosted:
   Aileron (titles; public domain, fonts/LICENSE-Aileron.txt).
   Century Gothic (body) is used where it's installed (Windows, Macs with Office); everywhere else, including
   iPhones, the near-identical TeX Gyre Adventor is used (GUST Font License, fonts/LICENSE-TeXGyre-GUST.txt). */
@font-face { font-family: "Aileron"; font-weight: 400; font-display: swap; src: url("/fonts/aileron-400.woff2") format("woff2"); }
@font-face { font-family: "Aileron"; font-weight: 600; font-display: swap; src: url("/fonts/aileron-600.woff2") format("woff2"); }
@font-face { font-family: "Aileron"; font-weight: 700; font-display: swap; src: url("/fonts/aileron-700.woff2") format("woff2"); }
@font-face { font-family: "Aileron"; font-weight: 800; font-display: swap; src: url("/fonts/aileron-800.woff2") format("woff2"); }
@font-face { font-family: "TeX Gyre Adventor"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/adventor-regular.otf") format("opentype"); }
@font-face { font-family: "TeX Gyre Adventor"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/adventor-bold.otf") format("opentype"); }
@font-face { font-family: "TeX Gyre Adventor"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/adventor-italic.otf") format("opentype"); }
@font-face { font-family: "TeX Gyre Adventor"; font-weight: 700; font-style: italic; font-display: swap; src: url("/fonts/adventor-bolditalic.otf") format("opentype"); }
:root {
  /* Lioh brand: forest green on warm cream, near-black ink */
  --brand: #314B34;
  --brand-600: #243826;
  --brand-400: #5A735C;
  --ink: #1C100E;
  --cream: #F4EFEA;
  --cream-deep: #EBE3DB;
  --sage: #C7D1C4;
  --sage-100: #E6EBE3;
  --bronze: #9A7B4F;
  --bg: #F4EFEA;
  --surface: #FFFDFA;
  --text: #1C100E;
  --muted: #6F6862;
  --line: #E7DFD7;
  --line-strong: #D4CAC0;
  --danger: #B04A3E;
  --warn: #B07F2A;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(28, 16, 14, .04), 0 4px 18px rgba(28, 16, 14, .05);
  --shadow-lg: 0 14px 44px rgba(28, 16, 14, .16);
  --font: "Century Gothic", CenturyGothic, "TeX Gyre Adventor", "Avant Garde", Futura, sans-serif;
  --font-display: "Aileron", "Helvetica Neue", Arial, sans-serif;

  /* appointment statuses */
  --st-booked: #9A7B4F;
  --st-confirmed: #314B34;
  --st-done: #8A837C;
  --st-no_show: #B04A3E;
  --st-cancelled: #B4ACA4;
  --st-block: #8A8678;
}

/* Brand type: Aileron titles and spaced capitals (like "SEATTLE · EST 2026"), Century Gothic text */
h1, h2, .display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 21px; color: var(--brand); }
h1 { font-size: 26px; }
.eyebrow { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: var(--sage-100); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); }
.btn.danger { color: var(--danger); border-color: #EBC9C5; }
.btn.danger:hover { background: #FBEFED; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--sage-100); }
.btn.icon { width: 36px; padding: 0; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  height: 38px; padding: 0 11px; width: 100%; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 72px; padding: 9px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(42, 85, 53, .16); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }
input[type=color] { padding: 2px; width: 46px; }
.search { position: relative; }
.search input { padding-left: 34px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------- cards / tables ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FAFCFA; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: var(--bg); }

.avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 650; font-size: 12px; letter-spacing: .02em;
}
.avatar.lg { width: 64px; height: 64px; font-size: 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--sage-100); color: var(--brand);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* ---------- toast ---------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 500; animation: pop .18s ease-out; }
.toast.error { background: var(--danger); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(26, 46, 28, .38); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade .14s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; animation: pop .18s ease-out; }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.modal-body { padding: 12px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); margin-top: 6px; }

/* iPhones zoom into text fields under 16px; keep touch devices at 16px so pages don't jump */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
}

/* password show/hide eye */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pw-eye:hover { color: var(--brand); background: var(--cream); }
