/* ===== Termintool – Gestaltung =====
   Idee: zweigeteilte Buchungsseite. Links die Person mit ihrem "Terminzettel", der sich beim Wählen füllt,
   rechts der Ablauf. Eine Akzentfarbe je Seite (im Generator einstellbar), alles andere ruhig. */
:root {
  --ink: #0F1F26;
  --ink-2: #3A4B53;
  --muted: #5E6F76;
  --paper: #EDF1F0;
  --surface: #FFFFFF;
  --line: #D6DFDD;
  --line-soft: #E7ECEB;
  --accent: #0C5C63;
  --on-accent: #FFFFFF;
  --ok: #17734A;
  --warn: #8F5600;
  --danger: #B42318;
  --font-display: 'Red Hat Display', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Red Hat Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 24px;
  --shadow: 0 1px 2px rgba(15, 31, 38, .06), 0 12px 32px -16px rgba(15, 31, 38, .22);
  color-scheme: light;
}
/* Abgeleitete Farbtöne – überall dort neu berechnet, wo eine Akzentfarbe gesetzt wird */
:root, .themed {
  --accent-soft: color-mix(in srgb, var(--accent) 9%, #fff);
  --accent-mid: color-mix(in srgb, var(--accent) 22%, #fff);
  --accent-deep: color-mix(in srgb, var(--accent) 78%, #06131a);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased;
}
#app { min-height: 100%; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.015em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 750; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.icon { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack--tight { gap: 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Schaltflächen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--surface); color: var(--ink); border-color: var(--line);
  font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn--ghost { background: transparent; border-color: transparent; padding: 0 12px; }
.btn--ghost:hover { background: rgba(15, 31, 38, .06); border-color: transparent; }
.btn--danger { color: var(--danger); }
.btn--danger:hover { border-color: var(--danger); background: #FEF3F2; }
.btn--small { min-height: 34px; padding: 0 13px; font-size: .875rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-weight: 650; font-size: .875rem; }
.field-hint { color: var(--muted); font-size: .8125rem; }
.input {
  width: 100%; min-height: 42px; padding: 9px 12px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-s);
}
.input:hover { border-color: #B9C6C3; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-mid); }
textarea.input { min-height: 88px; resize: vertical; }
select.input { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235E6F76' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-prefix { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--surface); overflow: hidden; }
.input-prefix > span { display: flex; align-items: center; padding: 0 10px; background: var(--paper); color: var(--muted); font-size: .8125rem; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.input-prefix > .input { border: 0; border-radius: 0; min-width: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { width: 40px; height: 24px; border-radius: 999px; background: #C3CFCC; position: relative; transition: background .15s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg { display: inline-flex; align-self: flex-start; padding: 3px; background: var(--paper); border-radius: 999px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .875rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.seg button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 31, 38, .16); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; background: var(--c); }
.swatch.is-on { box-shadow: 0 0 0 2.5px var(--ink); }
.swatch-custom { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); }
.swatch-custom input { width: 38px; height: 34px; padding: 2px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--surface); cursor: pointer; }

/* ---------- Kleinteile ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: var(--paper); color: var(--ink-2); white-space: nowrap; }
.chip--ok { background: #E3F4EA; color: var(--ok); }
.chip--warn { background: #FCF0DA; color: var(--warn); }
.chip--danger { background: #FDE8E6; color: var(--danger); }
.chip--accent { background: var(--accent-soft); color: var(--accent-deep); }
.chip .icon { width: 1em; height: 1em; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-m); font-size: .9375rem; background: var(--accent-soft); border: 1px solid var(--accent-mid); }
.notice > .icon { margin-top: 2px; }
.notice--ok { background: #E9F6EE; border-color: #BFE3CD; color: #0F5132; }
.notice--warn { background: #FDF4E1; border-color: #F2D9A0; color: #6B4100; }
.notice--error { background: #FEF0EE; border-color: #F6C6C0; color: #8F1D14; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.avatar { --size: 44px; width: var(--size); height: var(--size); border-radius: 50%; object-fit: cover; flex: none; background: var(--accent-mid); color: var(--accent-deep); display: inline-flex; align-items: center; justify-content: center; font: 750 calc(var(--size) * .36)/1 var(--font-display); letter-spacing: .02em; }

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

.toast-wrap { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 90; width: max-content; max-width: calc(100% - 32px); }
.toast { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: .9375rem; box-shadow: var(--shadow); animation: rise .2s ease-out; }
.toast--error { background: var(--danger); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 31, 38, .5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 80; }
.modal { background: var(--surface); border-radius: var(--r-l); width: 100%; max-width: 520px; max-height: calc(100% - 20px); overflow: auto; padding: 26px; box-shadow: var(--shadow); animation: rise .18s ease-out; }
.modal h2 { margin-bottom: 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Demo-Leiste ---------- */
.demo-bar { background: #1C2F37; color: #D5E0DE; font-size: .8125rem; padding: 7px 16px; display: flex; gap: 6px 14px; align-items: center; flex-wrap: wrap; }
.demo-bar strong { color: #fff; font-family: var(--font-display); letter-spacing: .04em; text-transform: uppercase; font-size: .75rem; }
.demo-bar button { background: transparent; border: 1px solid #45606B; color: #fff; border-radius: 999px; padding: 3px 12px; cursor: pointer; font-size: .8125rem; font-weight: 600; }
.demo-bar button:hover, .demo-bar button.is-on { background: #fff; color: var(--ink); border-color: #fff; }

/* =====================================================================
   Buchungsseite (öffentlich) – reagiert auf die Breite ihres Behälters,
   damit die Vorschau im Generator Desktop und Handy zeigen kann.
   ===================================================================== */
.bp { container: bp / inline-size; flex: 1; background: var(--paper); padding: 28px 16px 40px; }
.bp-shell { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; min-height: 620px; }

.bp-rail { background: var(--accent); color: var(--on-accent); padding: 28px 26px; display: flex; flex-direction: column; gap: 22px; --rail-muted: color-mix(in srgb, var(--on-accent) 76%, var(--accent)); --rail-line: color-mix(in srgb, var(--on-accent) 22%, var(--accent)); }
.bp--light .bp-rail { background: var(--accent-soft); color: var(--ink); border-right: 1px solid var(--accent-mid); --rail-muted: var(--muted); --rail-line: var(--accent-mid); }
.bp-brand { display: flex; align-items: center; min-height: 34px; font: 750 1rem/1.2 var(--font-display); letter-spacing: -.01em; }
.bp-brand img { max-height: 40px; max-width: 180px; object-fit: contain; }
.bp-brand--chip img { background: #fff; padding: 6px 10px; border-radius: 10px; max-height: 48px; }
.bp-person { display: flex; flex-direction: column; gap: 12px; }
.bp-person .avatar { --size: 84px; background: color-mix(in srgb, var(--on-accent) 18%, var(--accent)); color: var(--on-accent); box-shadow: 0 0 0 3px var(--rail-line); }
.bp--light .bp-person .avatar { background: var(--accent); color: var(--on-accent); }
.bp-name { font-size: 1.65rem; }
.bp-role { color: var(--rail-muted); font-weight: 600; margin-top: 2px; }
.bp-bio { color: var(--rail-muted); font-size: .9375rem; }
.bp-contact { display: flex; flex-direction: column; gap: 6px; font-size: .9375rem; }
.bp-contact a { color: inherit; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; overflow-wrap: anywhere; }
.bp-contact a:hover { text-decoration: underline; }

/* Der Terminzettel: füllt sich Schritt für Schritt */
.bp-slip { margin-top: auto; background: #FFFDF8; color: var(--ink); border-radius: 12px; padding: 16px 18px 18px; position: relative; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5); }
.bp--light .bp-slip { box-shadow: 0 0 0 1px var(--accent-mid), 0 10px 24px -18px rgba(0, 0, 0, .4); }
.bp-slip::before, .bp-slip::after { content: ''; position: absolute; top: 44px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.bp--light .bp-slip::before, .bp--light .bp-slip::after { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-mid); }
.bp-slip::before { left: -7px; }
.bp-slip::after { right: -7px; }
.bp-slip-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1.5px dashed #CFC9B8; font: 800 .72rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.bp-stamp { border: 1.5px solid currentColor; border-radius: 6px; padding: 4px 7px; color: var(--muted); letter-spacing: .1em; transform: rotate(-3deg); }
.bp-stamp.is-done { color: var(--ok); background: #E9F6EE; }
.bp-slip dl { margin: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px 10px; font-size: .9375rem; }
.bp-slip dt { color: var(--muted); font-size: .8125rem; padding-top: 2px; }
.bp-slip dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.bp-slip dd.is-open { font-weight: 400; color: #A8AFAA; }
.bp-legal { font-size: .8125rem; color: var(--rail-muted); display: flex; gap: 4px 14px; flex-wrap: wrap; }
.bp-legal a { color: inherit; }

.bp-main { padding: 30px 34px 34px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.bp-progress { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.bp-progress li { flex: 1; font-size: .78rem; font-weight: 650; color: var(--muted); padding-top: 9px; border-top: 3px solid var(--line); }
.bp-progress li.is-done { border-color: var(--accent-mid); color: var(--ink-2); }
.bp-progress li.is-active { border-color: var(--accent); color: var(--accent-deep); }
.bp-step { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.bp-step.is-enter { animation: rise .22s ease-out; }
.bp-h { font-size: 1.5rem; }
.bp-sub { color: var(--muted); margin-top: 6px; }
.bp-back { align-self: flex-start; margin-left: -12px; }
.bp-options { display: flex; flex-direction: column; gap: 10px; }
.bp-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 15px 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-m); cursor: pointer; transition: border-color .12s, background .12s; }
.bp-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.bp-opt-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; flex: none; }
.bp-opt-icon .icon { width: 20px; height: 20px; }
.bp-opt-main { flex: 1; min-width: 0; }
.bp-opt-title { font: 700 1.03rem/1.25 var(--font-display); }
.bp-opt-desc { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.bp-opt-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.bp-opt-meta b { color: var(--ink); font: 750 .95rem/1 var(--font-display); }
.bp-opt-arrow { color: var(--accent); }

.bp-when { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.bp-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bp-cal-head strong { font: 750 1.05rem/1 var(--font-display); text-transform: capitalize; }
.bp-cal-nav { display: flex; gap: 6px; }
.bp-cal-nav button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bp-cal-nav button:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.bp-cal-nav button[disabled] { opacity: .35; cursor: default; }
.bp-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bp-dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); padding: 4px 0 6px; }
.bp-day { aspect-ratio: 1; border: 0; background: transparent; border-radius: 50%; font-variant-numeric: tabular-nums; color: #A3AEAB; display: flex; align-items: center; justify-content: center; padding: 0; font-size: .95rem; }
.bp-day.is-free { background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; cursor: pointer; }
.bp-day.is-free:hover { background: var(--accent-mid); }
.bp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--line); }
.bp-day.is-on { background: var(--accent); color: var(--on-accent); }
.bp-cal-note { font-size: .8125rem; color: var(--muted); margin-top: 10px; min-height: 1.3em; }
.bp-slots { display: flex; flex-direction: column; gap: 14px; max-height: 372px; overflow-y: auto; padding: 2px 4px 2px 2px; }
.bp-slots-date { font: 750 1.05rem/1.2 var(--font-display); }
.bp-slot-group > span { display: block; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 7px; }
.bp-slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 7px; }
.bp-slot { min-height: 42px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; padding: 5px 2px; }
.bp-slot small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.bp-slot:hover { border-color: var(--accent); color: var(--accent-deep); }
.bp-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.bp-done { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.bp-done-mark { width: 56px; height: 56px; border-radius: 50%; background: #E3F4EA; color: var(--ok); display: flex; align-items: center; justify-content: center; }
.bp-done-mark .icon { width: 28px; height: 28px; stroke-width: 2.4; }
.bp-linkbox { width: 100%; background: var(--paper); border-radius: var(--r-m); padding: 12px 14px; font-size: .875rem; overflow-wrap: anywhere; }
.bp-previewnote { font-size: .8125rem; color: var(--muted); }

.bp-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.bp-member { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; text-align: left; padding: 18px; border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--surface); cursor: pointer; color: inherit; text-decoration: none; transition: border-color .12s, background .12s; }
.bp-member:hover { border-color: var(--accent); background: var(--accent-soft); }
.bp-member .avatar { --size: 64px; }
.bp-member-name { font: 750 1.08rem/1.2 var(--font-display); }
.bp-member-cta { margin-top: auto; color: var(--accent-deep); font-weight: 700; font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; }
.bp-any { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--r-m); background: var(--accent-soft); border: 1px solid var(--accent-mid); }

.bp-center { max-width: 520px; margin: 4vh auto 0; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 30px; display: flex; flex-direction: column; gap: 18px; }

@container bp (max-width: 780px) {
  .bp-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .bp-rail { padding: 22px 20px; gap: 16px; }
  .bp-person { flex-direction: row; align-items: center; gap: 14px; }
  .bp-person .avatar { --size: 62px; }
  .bp-name { font-size: 1.35rem; }
  .bp-bio, .bp-legal { display: none; }
  .bp-slip { margin-top: 0; }
  .bp-slip.is-empty { display: none; }
  .bp-main { padding: 22px 20px 26px; }
  .bp-when { grid-template-columns: minmax(0, 1fr); }
  .bp-slots { max-height: none; }
  .bp-h { font-size: 1.3rem; }
  .bp-progress li span { display: none; }
  .bp-progress li { padding-top: 0; }
}
@container bp (max-width: 460px) {
  .bp-opt-icon { display: none; }
  .bp-contact { display: none; }
  /* Dauer und Terminform rutschen unter den Text, damit die Beschreibung die volle Breite bekommt */
  .bp-opt { flex-wrap: wrap; gap: 8px 12px; }
  .bp-opt-main { flex: 1 1 0; }
  .bp-opt-meta { order: 3; flex: 1 0 100%; flex-direction: row; align-items: baseline; gap: 10px; white-space: normal; }
}
@media (max-width: 520px) { .bp { padding: 0; } .bp-shell { border-radius: 0; } .bp-center { margin: 0; border-radius: 0; min-height: 100%; } }

/* =====================================================================
   Dashboard
   ===================================================================== */
.app { flex: 1; display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 0; }
.app-side { background: var(--ink); color: #C9D5D3; padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: #fff; font: 800 1.1rem/1 var(--font-display); letter-spacing: -.01em; }
.app-brand i { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-style: normal; }
.app-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #7E9198; padding: 14px 10px 6px; font-weight: 700; }
.app-nav a { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 600; font-size: .9375rem; }
.app-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.app-nav a.is-on { background: rgba(255, 255, 255, .12); color: #fff; }
.app-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid #25383F; font-size: .875rem; }
.app-user .avatar { --size: 36px; }
.app-user b { color: #fff; display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user button { background: transparent; border: 0; color: inherit; cursor: pointer; padding: 6px; border-radius: 8px; display: flex; }
.app-user button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.app-main { padding: 30px clamp(16px, 4vw, 44px) 60px; min-width: 0; }
.app-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.app-head p { color: var(--muted); margin-top: 6px; max-width: 62ch; }

.day-group { display: flex; flex-direction: column; }
.day-label { font: 750 .8rem/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 16px 0 8px; }
.appt { display: grid; grid-template-columns: 92px minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.appt-time { font: 750 1.1rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.appt-time small { display: block; font: 500 .8125rem/1.3 var(--font-body); color: var(--muted); }
.appt-title { font-weight: 650; }
.appt-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.hours { display: flex; flex-direction: column; }
.hours-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.hours-row:first-child { border-top: 0; }
.hours-ranges { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.hours-range { display: inline-flex; align-items: center; gap: 6px; }
.hours-range .input { width: 132px; min-height: 38px; padding: 6px 8px; }
.sample-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.sample-slots span { padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; font-size: .875rem; font-variant-numeric: tabular-nums; }
.sample-slots span.is-busy { background: #F1E7E6; color: #8F1D14; font-weight: 600; }

.savebar { position: sticky; bottom: 14px; align-self: flex-end; display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 8px 8px 8px 18px; border-radius: 999px; box-shadow: var(--shadow); z-index: 5; font-weight: 600; font-size: .9375rem; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 12px 10px 0; font-weight: 700; }
.table td { padding: 12px 12px 12px 0; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.table td:last-child, .table th:last-child { padding-right: 0; text-align: right; }
.table-wrap { overflow-x: auto; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who > div { min-width: 0; }
.who b { display: block; font-weight: 650; }

.page-tile { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.page-tile:first-of-type { border-top: 0; padding-top: 0; }
.page-url { font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }

/* Generator */
.gen { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: 22px; align-items: start; }
.gen-form { display: flex; flex-direction: column; gap: 14px; }
.gen-form .card { padding: 18px; }
.gen-form .card > h3 { margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }
.gen-preview { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
.gen-frame { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); height: calc(100vh - 150px); min-height: 520px; overflow: auto; display: flex; flex-direction: column; }
.gen-frame.is-phone { width: 390px; max-width: 100%; align-self: center; border-radius: 30px; border: 8px solid var(--ink); }
.gen-stage { display: flex; flex-direction: column; flex: 1; }
.gen-frame .bp { padding: 22px 22px 30px; }
.gen-frame.is-phone .bp { padding: 0; }
.gen-frame.is-phone .bp-shell { border-radius: 0; box-shadow: none; }
.photo-edit { display: flex; align-items: center; gap: 16px; }
.photo-edit .avatar { --size: 72px; }
.logo-preview { height: 48px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: var(--r-s); display: flex; align-items: center; }
.logo-preview img { max-height: 100%; }
.code { font: .8125rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--paper); border-radius: var(--r-s); padding: 10px 12px; overflow-x: auto; white-space: pre; }

.login { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.login-art { background: var(--ink); color: #fff; padding: clamp(24px, 6vw, 72px); display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.login-art h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); letter-spacing: -.03em; line-height: 1.02; }
.login-art h1 em { font-style: normal; color: color-mix(in srgb, var(--accent) 45%, #fff); }
.login-art ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; color: #C9D5D3; }
.login-art li { display: flex; gap: 10px; align-items: center; }
.login-form { padding: clamp(24px, 6vw, 72px); display: flex; flex-direction: column; justify-content: center; gap: 18px; max-width: 560px; }

@media (max-width: 1020px) {
  .gen { grid-template-columns: minmax(0, 1fr); }
  .gen-preview { position: static; }
  .gen-frame { height: 640px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-side { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; overflow-x: auto; }
  .app-brand span, .app-nav-label, .app-user > div { display: none; }
  .app-nav { flex-direction: row; }
  .app-nav a { white-space: nowrap; padding: 8px 10px; }
  .app-user { margin: 0 0 0 auto; border: 0; padding: 0; }
  .appt { grid-template-columns: 80px minmax(0, 1fr); }
  .appt > :nth-child(3), .appt-actions { grid-column: 1 / -1; }
  .appt-actions { justify-content: flex-start; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .hours-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
