/* ============================================================================
   Chronos — branded booking-page styles
   Brand (NON-NEGOTIABLE): Telegraf (display) self-hosted; Inter (body) with a
   system fallback stack. Colors: cobalt #050E3D, coral #FF557E (accents only),
   seaglass #BFDDDB (hover). No Google Fonts, no CSS frameworks/CDNs.
   ========================================================================== */

/* ---- Self-hosted display font: Telegraf -------------------------------- */
@font-face {
  font-family: 'Telegraf';
  src: url('/fonts/PPTelegraf-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Telegraf';
  src: url('/fonts/PPTelegraf-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Self-hosted body font: Inter (the licensed TTF weights we ship) ------ */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---- Design tokens ------------------------------------------------------ */
:root {
  --cobalt: #050E3D;
  --coral: #FF557E;
  --seaglass: #BFDDDB;

  --ink: #1c2333;            /* primary body text */
  --ink-soft: #5a6275;       /* secondary text */
  --ink-faint: #9aa1b1;      /* dimmed / disabled */
  --line: #e6e8ef;           /* hairline borders */
  --line-soft: #f0f1f6;
  --surface: #ffffff;
  --surface-tint: #f7f8fb;   /* page background */
  --seaglass-tint: #eef6f5;  /* very light seaglass for soft hover fills */

  --font-display: 'Telegraf', 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;

  --radius: 12px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 2px rgba(5, 14, 61, 0.04),
    0 12px 40px -16px rgba(5, 14, 61, 0.18);
  --shadow-pop: 0 24px 60px -20px rgba(5, 14, 61, 0.28);

  --maxw: 980px;
}

/* ---- Reset / base ------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface-tint);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--cobalt);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

a { color: var(--cobalt); }

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ============================================================================
   HOME — booking-type selector (index.html)
   ========================================================================== */
.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.home-inner {
  width: 100%;
  max-width: 760px;
  text-align: center;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cobalt);
  letter-spacing: 0.18em;
  font-size: 15px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.home h1 {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
}

.home-sub {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 14px auto 40px;
  max-width: 460px;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: left;
}

.type-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.type-card:hover {
  transform: translateY(-3px);
  border-color: var(--seaglass);
  box-shadow: var(--shadow-pop);
}

.type-card h2 {
  font-size: 22px;
  font-weight: 700;
}

.type-card .type-duration {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 10px;
}

.type-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 16px 0 22px;
  flex: 1;
}

.type-card .type-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--cobalt);
}
.type-card .type-cta .arrow { transition: transform 0.15s ease; }
.type-card:hover .type-cta .arrow { transform: translateX(4px); }

.home-footer {
  margin-top: 44px;
  color: var(--ink-faint);
  font-size: 13px;
}

/* ============================================================================
   BOOKING PAGE — two-column (book.html)
   ========================================================================== */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--cobalt); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.booking-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
}

/* ---- LEFT column -------------------------------------------------------- */
.col-left {
  padding: 32px 30px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

/* Logo placeholder. TODO (Fred): replace .logo-wordmark with the real Real
   Broker white-transparent logo <img> on a cobalt chip, e.g.
   <img src="/assets/img/real-broker-white.png" alt="Real Broker" />. */
.logo-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: var(--cobalt);
  color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  margin-bottom: 26px;
}
.logo-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 13px;
  text-transform: uppercase;
}
.logo-img { height: 44px; display: block; }
/* Home page: extra-prominent brand lockup. */
.home .logo-chip { padding: 22px 34px; margin-bottom: 32px; }
.home .logo-img { height: 64px; }

/* Headshot placeholder. TODO (Fred): drop Fred's headshot at
   /assets/img/fred-headshot.jpg and the JS will swap it in; until then we show
   initials in a cobalt circle. */
.host {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 4px;
}
.host-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--cobalt);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  flex: 0 0 auto;
  background-size: cover;
  background-position: center;
}
.host-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.booking-title {
  font-size: 27px;
  font-weight: 700;
  margin-top: 18px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 15px;
  margin-top: 16px;
}
.meta-row svg { flex: 0 0 auto; color: var(--ink-faint); }
.meta-row:first-of-type { margin-top: 22px; }

.booking-desc {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.booking-desc:empty { display: none; }

/* ---- RIGHT column ------------------------------------------------------- */
.col-right {
  padding: 32px 30px;
  min-height: 470px;
  position: relative;
}

.right-header {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Two-pane layout inside the right column: calendar + slots */
.scheduler {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
.scheduler.has-date {
  grid-template-columns: 1fr 210px;
}

/* ---- Calendar ----------------------------------------------------------- */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-month {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cobalt);
  font-size: 17px;
}
.cal-nav {
  display: flex;
  gap: 6px;
}
.cal-nav button {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  color: var(--cobalt);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.cal-nav button:hover:not(:disabled) {
  background: var(--seaglass-tint);
  border-color: var(--seaglass);
}
.cal-nav button:disabled { opacity: 0.35; cursor: not-allowed; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 8px;
}
.cal-cell { aspect-ratio: 1 / 1; }
.cal-day {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}
.cal-day.is-empty { cursor: default; }
/* Dates WITH availability get a soft seaglass-tint chip + a dot indicator. */
.cal-day.is-available {
  background: var(--seaglass-tint);
  color: var(--cobalt);
}
.cal-day.is-available::after {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--coral);
}
.cal-day.is-available:hover { background: var(--seaglass); }
/* Past / unavailable dates dimmed + non-interactive. */
.cal-day.is-unavailable {
  color: var(--ink-faint);
  cursor: not-allowed;
}
.cal-day.is-selected,
.cal-day.is-selected:hover {
  background: var(--cobalt);
  color: #fff;
}
.cal-day.is-selected::after { background: #fff; }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--seaglass); }

/* ---- Slots pane --------------------------------------------------------- */
.slots-pane { display: none; }
.scheduler.has-date .slots-pane { display: block; }

.slots-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--cobalt);
  margin-bottom: 14px;
}
.slots-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 2px;
}
.slot-btn {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--cobalt);
  background: var(--surface);
  color: var(--cobalt);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease,
    transform 0.08s ease;
}
.slot-btn:hover {
  background: var(--cobalt);
  color: #fff;
}
.slot-btn:active { transform: scale(0.98); }

/* timezone selector */
.tz-row {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}
.tz-row svg { color: var(--ink-faint); flex: 0 0 auto; }
.tz-select {
  flex: 1;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  cursor: pointer;
}

/* ---- Generic state messages -------------------------------------------- */
.state-msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.state-msg.is-error { color: var(--cobalt); }
.state-msg .state-title {
  font-weight: 700;
  color: var(--cobalt);
  font-size: 15.5px;
}
.btn-link {
  align-self: flex-start;
  border: none;
  background: none;
  color: var(--coral);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* spinner */
.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--cobalt);
  border-radius: 50%;
  animation: chronos-spin 0.7s linear infinite;
}
@keyframes chronos-spin { to { transform: rotate(360deg); } }
.loading-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 44px 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ============================================================================
   FORM (step 2) — shown after a slot is picked
   ========================================================================== */
.form-step { display: none; }
.form-step.is-active { display: block; }

.form-summary {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--seaglass-tint);
  border: 1px solid var(--seaglass);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin-bottom: 24px;
}
.form-summary svg { color: var(--cobalt); flex: 0 0 auto; margin-top: 2px; }
.form-summary .fs-when {
  font-weight: 700;
  color: var(--cobalt);
  font-size: 14.5px;
}
.form-summary .fs-tz {
  color: var(--ink-soft);
  font-size: 12.5px;
  margin-top: 2px;
}
.form-summary .fs-change {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--coral);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.field { margin-bottom: 17px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field .req { color: var(--coral); margin-left: 2px; }
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  background: var(--surface);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(5, 14, 61, 0.08);
}
.field textarea { min-height: 88px; resize: vertical; }
.field.has-error input,
.field.has-error textarea { border-color: var(--coral); }
.field .err {
  display: none;
  color: var(--coral);
  font-size: 12.5px;
  margin-top: 5px;
}
.field.has-error .err { display: block; }

.form-error {
  display: none;
  background: #fff1f5;
  border: 1px solid var(--coral);
  color: #a11447;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.form-error.is-visible { display: block; }

.btn-primary {
  width: 100%;
  border: none;
  background: var(--cobalt);
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.btn-primary:hover:not(:disabled) { background: #0a164f; }
.btn-primary:active:not(:disabled) { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.7; cursor: progress; }
.btn-primary .spinner {
  width: 17px; height: 17px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
}

/* ============================================================================
   CONFIRMATION (step 3)
   ========================================================================== */
.confirm-step { display: none; }
.confirm-step.is-active { display: block; }
.confirm-inner {
  text-align: center;
  padding: 30px 10px 14px;
  max-width: 420px;
  margin: 0 auto;
}
.confirm-check {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--seaglass);
  color: var(--cobalt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.confirm-inner h2 { font-size: 25px; font-weight: 700; }
.confirm-inner p {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 12px 0 0;
}
.confirm-detail {
  margin-top: 24px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.confirm-detail .cd-row {
  display: flex;
  gap: 10px;
  font-size: 14px;
  padding: 6px 0;
}
.confirm-detail .cd-label {
  color: var(--ink-faint);
  width: 76px;
  flex: 0 0 auto;
}
.confirm-detail .cd-value { color: var(--ink); font-weight: 500; }
.confirm-detail .cd-link { color: var(--coral); font-weight: 600; text-decoration: none; }
.confirm-detail .cd-link:hover { text-decoration: underline; }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 760px) {
  .type-grid { grid-template-columns: 1fr; }

  .booking-grid { grid-template-columns: 1fr; }
  .col-left {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 26px 22px;
  }
  .col-right { padding: 26px 22px; min-height: auto; }

  /* On mobile, stack the slots under the calendar instead of side-by-side */
  .scheduler.has-date { grid-template-columns: 1fr; }
  .slots-list { max-height: none; }

  .booking-title { font-size: 24px; }
}

@media (max-width: 420px) {
  .page { padding: 20px 14px 48px; }
  .cal-day { font-size: 13px; }
}

/* ============================================================================
   ============================  ADMIN  =======================================
   Admin dashboard (admin.html + admin.js). Reuses every brand token above
   (cobalt / coral / seaglass, Telegraf headings, Inter body). Does NOT restyle
   the public booking pages — all selectors below are admin-scoped.
   ========================================================================== */

.admin-body { background: var(--surface-tint); }
body.modal-open { overflow: hidden; }

/* ---- Login + boot screens ---------------------------------------------- */
/* The hidden attribute must always win over a class's display:flex/grid below
   (admin.js toggles screens/modal via el.hidden). Without this, .admin-modal /
   .admin-boot stay visible when marked hidden. */
[hidden] { display: none !important; }

.admin-login,
.admin-boot {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.admin-login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 36px 32px 32px;
  text-align: center;
}
.admin-login-card h1 { font-size: 26px; font-weight: 700; }
.admin-login-sub {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 10px 0 26px;
}
.admin-login-card .field { text-align: left; }
.admin-login-card .btn-primary { margin-top: 6px; }

/* ---- Top bar ----------------------------------------------------------- */
.admin-top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-top-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.admin-top-logo { padding: 8px 14px; margin: 0; border-radius: 9px; }
.admin-top-logo .logo-img { height: 26px; }
.admin-top-title { display: flex; flex-direction: column; line-height: 1.05; }
.admin-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.admin-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cobalt);
}
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.admin-tab {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.admin-tab:hover { background: var(--seaglass-tint); color: var(--cobalt); }
.admin-tab.is-active { background: var(--cobalt); color: #fff; }
.admin-logout {
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.admin-logout:hover { border-color: var(--seaglass); color: var(--cobalt); }

/* ---- Main + panels ----------------------------------------------------- */
.admin-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 30px 24px 80px;
}
.admin-panel { display: none; }
.admin-panel.is-active { display: block; }
.admin-panel:not([hidden]) { display: block; }

.admin-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.admin-panel-head h2 { font-size: 23px; font-weight: 700; }
.admin-panel-sub {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 6px 0 0;
  max-width: 520px;
}

/* status messages */
.admin-msg {
  display: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.admin-msg.is-visible { display: block; }
.admin-msg.is-info { background: var(--seaglass-tint); color: var(--cobalt); border: 1px solid var(--seaglass); }
.admin-msg.is-success { background: #eafaf3; color: #0f7a52; border: 1px solid #b6e8d3; }
.admin-msg.is-error { background: #fff1f5; color: #a11447; border: 1px solid var(--coral); }

/* ---- Google Calendar status card -------------------------------------- */
.gcal-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}
.gcal-card.is-connected { border-color: var(--seaglass); background: var(--seaglass-tint); }
.gcal-card.is-disconnected { border-color: var(--coral); }
.gcal-icon {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--cobalt);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gcal-body { flex: 1; min-width: 0; }
.gcal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--cobalt);
}
.gcal-status { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.gcal-status.is-connected { color: #0f7a52; font-weight: 600; }
.gcal-status.is-error { color: #a11447; font-weight: 600; }
.gcal-action { flex: 0 0 auto; }
.gcal-action .btn-primary,
.gcal-action .btn-ghost { width: auto; padding: 10px 16px; font-size: 13.5px; }

/* ---- Transient toast -------------------------------------------------- */
.admin-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 200;
  max-width: 92vw;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.admin-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.admin-toast.is-success { background: #eafaf3; color: #0f7a52; border: 1px solid #b6e8d3; }
.admin-toast.is-error { background: #fff1f5; color: #a11447; border: 1px solid var(--coral); }

.admin-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.admin-empty-sm { padding: 16px; font-size: 13.5px; text-align: left; }

/* ---- Call-type list ---------------------------------------------------- */
.type-list { display: flex; flex-direction: column; gap: 12px; }
.type-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
}
.type-reorder { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; }
.reorder-btn {
  width: 30px; height: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 7px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.reorder-btn:hover:not(:disabled) { background: var(--seaglass-tint); border-color: var(--seaglass); color: var(--cobalt); }
.reorder-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.reorder-btn-sm { width: 26px; height: 20px; }

.type-main { flex: 1; min-width: 0; }
.type-title-row { display: flex; align-items: center; gap: 10px; }
.type-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--cobalt);
}
.type-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}
.type-badge.is-on { background: var(--seaglass-tint); color: #0f7a52; }
.type-badge.is-off { background: var(--line-soft); color: var(--ink-faint); }
.type-meta {
  color: var(--ink-soft);
  font-size: 13px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.type-meta .dot { margin: 0 8px; color: var(--ink-faint); }
.type-actions { display: flex; gap: 8px; flex: 0 0 auto; }

/* ---- Buttons (admin variants) ------------------------------------------ */
.btn-compact { width: auto; padding: 10px 16px; font-size: 14px; gap: 7px; }
.btn-ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--cobalt);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.btn-ghost:hover:not(:disabled) { background: var(--seaglass-tint); border-color: var(--seaglass); }
.btn-danger {
  border: 1px solid #f3c4d2;
  background: var(--surface);
  color: #c11550;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.btn-danger:hover:not(:disabled) { background: #fff1f5; border-color: var(--coral); }
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-mini { padding: 8px 14px; font-size: 13px; }

/* ---- Modal ------------------------------------------------------------- */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 14, 61, 0.42);
  backdrop-filter: blur(2px);
}
.admin-modal-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  margin: auto;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 80px);
}
.admin-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.admin-modal-head h2 { font-size: 20px; font-weight: 700; }
.admin-modal-x {
  border: none;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
}
.admin-modal-x:hover { color: var(--cobalt); background: var(--line-soft); }
.admin-modal-body { padding: 22px 24px; overflow-y: auto; }
.admin-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
.admin-modal-foot .btn-primary,
.admin-modal-foot .btn-ghost { width: auto; padding: 11px 20px; }

/* field grids inside the editor */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-grid.four { grid-template-columns: repeat(4, 1fr); }
.field-grid .field { margin-bottom: 0; }
.field select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  background: var(--surface);
  cursor: pointer;
}
.field input:disabled { background: var(--line-soft); color: var(--ink-faint); cursor: not-allowed; }

/* toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 18px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.toggle-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 42px; height: 24px;
  background: var(--line);
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
  transition: background 0.15s ease;
}
.toggle-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(5, 14, 61, 0.25);
  transition: transform 0.15s ease;
}
.toggle-row input:checked + .toggle-track { background: var(--cobalt); }
.toggle-row input:checked + .toggle-track .toggle-knob { transform: translateX(18px); }
.toggle-row input:focus-visible + .toggle-track { outline: 2px solid var(--coral); outline-offset: 2px; }
.toggle-hint { color: var(--ink-soft); font-weight: 400; }

/* editor sections */
.editor-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.editor-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.editor-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--cobalt);
  font-family: var(--font-display);
}
.editor-section-sub { color: var(--ink-soft); font-size: 12.5px; margin: 5px 0 14px; }

/* weekly hours grid */
.hours-grid { display: flex; flex-direction: column; gap: 8px; }
.hours-day {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.hours-day-head { display: flex; align-items: center; justify-content: space-between; }
.hours-day-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.hours-add {
  border: none;
  background: none;
  color: var(--coral);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
}
.hours-closed { color: var(--ink-faint); font-size: 12.5px; margin-top: 6px; }
.hours-window { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.hours-time {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface);
}
.hours-sep { color: var(--ink-faint); font-size: 12.5px; }
.hours-remove {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
}
.hours-remove:hover { color: #c11550; background: #fff1f5; }

/* questions editor */
.questions-list { display: flex; flex-direction: column; gap: 10px; }
.q-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface-tint);
}
.q-reorder { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; padding-top: 2px; }
.q-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.q-label-input {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: var(--surface);
}
.q-label-input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(5, 14, 61, 0.08); }
.q-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.q-type-select {
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface);
  cursor: pointer;
}
.q-required { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.q-required input { width: 16px; height: 16px; accent-color: var(--cobalt); cursor: pointer; }
.q-remove {
  border: none;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: flex;
  flex: 0 0 auto;
}
.q-remove:hover { color: #c11550; background: #fff1f5; }

/* ---- Bookings list ----------------------------------------------------- */
.booking-list { display: flex; flex-direction: column; gap: 12px; }
.booking-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
}
.booking-when { flex: 0 0 auto; min-width: 150px; }
.booking-date { font-size: 14.5px; font-weight: 700; color: var(--cobalt); }
.booking-time { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.booking-who { flex: 1; min-width: 0; }
.booking-type-chip {
  display: inline-block;
  background: var(--seaglass-tint);
  color: var(--cobalt);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.booking-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.booking-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; }
.booking-link { font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.booking-link:hover { color: var(--cobalt); text-decoration: underline; }
.booking-actions { flex: 0 0 auto; }

/* ---- Admin responsive -------------------------------------------------- */
@media (max-width: 720px) {
  .admin-top-inner { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .admin-tabs { order: 3; width: 100%; }
  .admin-tab { flex: 1; }
  .admin-logout { margin-left: 0; }
  .admin-main { padding: 22px 16px 70px; }
  .admin-panel-head { flex-direction: column; align-items: stretch; }
  .admin-panel-head .btn-compact { width: 100%; }

  .field-grid, .field-grid.four { grid-template-columns: 1fr 1fr; }

  .type-row { flex-wrap: wrap; }
  .type-reorder { flex-direction: row; }
  .type-actions { width: 100%; }
  .type-actions .btn-mini { flex: 1; }

  .booking-row { flex-wrap: wrap; gap: 12px; }
  .booking-when { min-width: 0; width: 100%; }
  .booking-actions { width: 100%; }
  .booking-actions .btn-mini { width: 100%; }
}

@media (max-width: 460px) {
  .field-grid, .field-grid.four { grid-template-columns: 1fr; }
  .admin-modal { padding: 16px 10px; }
  .admin-modal-card { max-height: calc(100vh - 32px); }
}
