/* ==========================================================================
   Forge HR Group — Scheduling System Design System
   /assets/css/fhr.css
   Single source of truth for the admin console and the public booking flow.
   No build step: plain CSS custom properties, light + dark themes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand — sampled from the Forge HR Group mark */
  --brand-50:  #eef4fb;
  --brand-100: #d7e5f5;
  --brand-200: #b0c9e9;
  --brand-300: #7fa5d8;
  --brand-400: #4a7cc0;
  --brand-500: #2159a1;
  --brand-600: #0b3a6d;
  --brand-700: #09305a;
  --brand-800: #072544;
  --brand-900: #051a30;

  /* Semantic hues */
  --green-50:#ecfdf5; --green-100:#d1fae5; --green-500:#10b981; --green-600:#059669; --green-700:#047857;
  --amber-50:#fffbeb; --amber-100:#fef3c7; --amber-500:#f59e0b; --amber-600:#d97706; --amber-700:#b45309;
  --red-50:#fef2f2;   --red-100:#fee2e2;   --red-500:#ef4444;   --red-600:#dc2626;   --red-700:#b91c1c;
  --violet-50:#f5f3ff; --violet-100:#ede9fe; --violet-500:#8b5cf6; --violet-600:#7c3aed;
  --slate-50:#f8fafc; --slate-100:#f1f5f9; --slate-200:#e2e8f0; --slate-300:#cbd5e1;
  --slate-400:#94a3b8; --slate-500:#64748b; --slate-600:#475569; --slate-700:#334155;
  --slate-800:#1e293b; --slate-900:#0f172a; --slate-950:#020617;

  /* Surfaces & text (light) */
  --bg:            #f4f6fa;
  --bg-accent:     radial-gradient(1200px 600px at 12% -10%, #e8eff9 0%, rgba(232,239,249,0) 60%),
                   radial-gradient(900px 500px at 100% 0%, #eef2fb 0%, rgba(238,242,251,0) 55%),
                   #f4f6fa;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --surface-3:     #f1f5f9;
  --surface-inset: #f8fafc;
  --overlay:       rgba(15, 23, 42, 0.45);

  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-subtle: #94a3b8;
  --text-invert: #ffffff;

  --line:        #e5eaf1;
  --line-strong: #d3dbe6;

  --accent:       var(--brand-600);
  --accent-hover: var(--brand-700);
  --accent-soft:  var(--brand-50);
  --accent-text:  var(--brand-600);
  --focus-ring:   rgba(11, 58, 109, 0.28);

  /* Radii */
  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-2xl: 28px;
  --r-full: 999px;

  /* Elevation */
  --sh-xs: 0 1px 2px rgba(15, 23, 42, .06);
  --sh-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --sh-md: 0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .04);
  --sh-lg: 0 12px 32px rgba(15, 23, 42, .10), 0 4px 8px rgba(15, 23, 42, .04);
  --sh-xl: 0 24px 60px rgba(15, 23, 42, .16), 0 8px 16px rgba(15, 23, 42, .06);

  /* Type */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-num: 'Inter', ui-monospace, 'SF Mono', 'Segoe UI Mono', monospace;

  /* Motion */
  --ease: cubic-bezier(.32, .72, 0, 1);
  --dur: 180ms;

  /* Layout */
  --topbar-h: 64px;
  --page-max: 1440px;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg:            #0b1120;
  --bg-accent:     radial-gradient(1200px 600px at 12% -10%, #10203a 0%, rgba(16,32,58,0) 60%),
                   radial-gradient(900px 500px at 100% 0%, #0e1b31 0%, rgba(14,27,49,0) 55%),
                   #0b1120;
  --surface:       #131c2e;
  --surface-2:     #182338;
  --surface-3:     #1e2b42;
  --surface-inset: #0e1729;
  --overlay:       rgba(2, 6, 23, 0.68);

  --text:        #e8edf6;
  --text-muted:  #94a3b8;
  --text-subtle: #64748b;
  --text-invert: #0b1120;

  --line:        #24314b;
  --line-strong: #33425f;

  --accent:       #4a8fdc;
  --accent-hover: #6aa5e6;
  --accent-soft:  rgba(74, 143, 220, .14);
  --accent-text:  #7fb4ea;
  --focus-ring:   rgba(74, 143, 220, .35);

  --green-50: rgba(16,185,129,.13);  --green-100: rgba(16,185,129,.20);  --green-700:#5ee9b5;
  --amber-50: rgba(245,158,11,.13);  --amber-100: rgba(245,158,11,.20);  --amber-700:#fbbf24;
  --red-50:   rgba(239,68,68,.13);   --red-100:   rgba(239,68,68,.20);   --red-700:#fca5a5;
  --violet-50:rgba(139,92,246,.14);  --violet-100:rgba(139,92,246,.22);

  --sh-xs: 0 1px 2px rgba(0,0,0,.4);
  --sh-sm: 0 1px 3px rgba(0,0,0,.45);
  --sh-md: 0 4px 14px rgba(0,0,0,.45);
  --sh-lg: 0 14px 36px rgba(0,0,0,.5);
  --sh-xl: 0 28px 64px rgba(0,0,0,.6);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-accent);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02','cv03','cv04','ss01';
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.018em; line-height: 1.25; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p  { margin: 0; }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: var(--accent); color: #fff; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-full);
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); background-clip: content-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.fhr-page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 30px) 80px;
}

.fhr-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.fhr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 6px;
}
.fhr-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: var(--r-full);
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.fhr-page-sub { color: var(--text-muted); font-size: .92rem; margin-top: 4px; max-width: 68ch; }

.fhr-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fhr-row-end { justify-content: flex-end; }
.fhr-spacer { flex: 1 1 auto; }

.fhr-grid { display: grid; gap: 16px; }
.fhr-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fhr-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fhr-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fhr-split  { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }

@media (max-width: 1100px) { .fhr-split { grid-template-columns: 1fr; } }
@media (max-width: 900px)  { .fhr-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .fhr-grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px)  { .fhr-grid-2, .fhr-grid-3, .fhr-grid-4 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   4. Top bar (app shell)
   -------------------------------------------------------------------------- */
.fhr-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(12px, 3vw, 24px);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.fhr-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.fhr-brand img { height: 34px; width: auto; display: block; }
[data-theme="dark"] .fhr-brand img { filter: brightness(0) invert(1) opacity(.92); }

.fhr-nav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }

.fhr-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 550;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.fhr-nav-link i { font-size: .95em; opacity: .85; }
.fhr-nav-link:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.fhr-nav-link.is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }
.fhr-nav-link.is-active i { opacity: 1; }

.fhr-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.fhr-avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  flex: 0 0 auto;
}

.fhr-usermenu { position: relative; }
.fhr-usermenu-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fhr-usermenu-btn:hover { border-color: var(--line-strong); box-shadow: var(--sh-sm); }
.fhr-usermenu-name { font-size: .84rem; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fhr-usermenu-btn i { font-size: .7rem; color: var(--text-subtle); }
@media (max-width: 620px) { .fhr-usermenu-name, .fhr-usermenu-btn > i { display: none; } .fhr-usermenu-btn { padding: 3px; } }

.fhr-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 232px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  padding: 6px;
  z-index: 80;
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.fhr-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.fhr-menu-head { padding: 9px 11px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.fhr-menu-head b { display: block; font-size: .9rem; }
.fhr-menu-head span { font-size: .78rem; color: var(--text-muted); }
.fhr-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0; background: none;
  border-radius: var(--r-sm);
  font-size: .875rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur) var(--ease);
}
.fhr-menu-item i { width: 16px; text-align: center; color: var(--text-subtle); }
.fhr-menu-item:hover { background: var(--surface-3); text-decoration: none; }
.fhr-menu-item.danger { color: var(--red-600); }
.fhr-menu-item.danger i { color: var(--red-600); }
.fhr-menu-sep { height: 1px; background: var(--line); margin: 5px 0; }

.fhr-burger { display: none; }
@media (max-width: 860px) {
  .fhr-nav {
    position: fixed;
    left: 10px; right: 10px;
    top: calc(var(--topbar-h) + 6px);
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    margin: 0;
    padding: 7px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-xl);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  }
  .fhr-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .fhr-nav-link { padding: 12px 14px; font-size: .95rem; }
  .fhr-burger { display: inline-grid; }
}

/* --------------------------------------------------------------------------
   5. Card / panel
   -------------------------------------------------------------------------- */
.fhr-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
/* Round the head/foot instead of clipping the card, so dropdown menus
   anchored inside a card are not cut off at its edge. */
.fhr-card > :first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.fhr-card > :last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.fhr-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.fhr-card-head h2, .fhr-card-head h3 {
  display: flex; align-items: center; gap: 9px;
  font-size: .95rem; font-weight: 700; letter-spacing: -.01em;
}
.fhr-card-head h2 i, .fhr-card-head h3 i { color: var(--accent); font-size: .95em; }
.fhr-card-head .fhr-sub { font-size: .78rem; color: var(--text-muted); font-weight: 400; }
.fhr-card-body { padding: 16px; }
.fhr-card-body.tight { padding: 10px; }
.fhr-card-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.fhr-section {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 15px;
}
.fhr-section-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px;
}

/* --------------------------------------------------------------------------
   6. Stat tiles
   -------------------------------------------------------------------------- */
.fhr-stat {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 15px 16px;
  box-shadow: var(--sh-xs);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fhr-stat:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.fhr-stat::after {
  content: '';
  position: absolute; inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: .85;
}
.fhr-stat.is-green::after  { background: var(--green-500); }
.fhr-stat.is-amber::after  { background: var(--amber-500); }
.fhr-stat.is-red::after    { background: var(--red-500); }
.fhr-stat.is-violet::after { background: var(--violet-500); }

.fhr-stat-label {
  display: flex; align-items: center; gap: 7px;
  font-size: .72rem; font-weight: 650; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
}
.fhr-stat-label i { color: var(--text-subtle); }
.fhr-stat-value {
  font-size: 1.75rem; font-weight: 750; letter-spacing: -.03em;
  margin-top: 6px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.fhr-stat-note { font-size: .76rem; color: var(--text-subtle); margin-top: 3px; }

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.fhr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: .855rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.fhr-btn i { font-size: .92em; }
.fhr-btn:hover { background: var(--surface-3); border-color: var(--text-subtle); }
.fhr-btn:active { transform: translateY(1px); }
.fhr-btn[disabled], .fhr-btn.is-disabled { opacity: .48; cursor: not-allowed; pointer-events: none; }

.fhr-btn-primary {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  box-shadow: var(--sh-xs);
}
.fhr-btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); box-shadow: var(--sh-sm); }
[data-theme="dark"] .fhr-btn-primary { background: var(--accent); border-color: var(--accent); color: #06101f; }
[data-theme="dark"] .fhr-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.fhr-btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.fhr-btn-soft:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 12%); border-color: transparent; }

.fhr-btn-danger { background: var(--red-600); border-color: var(--red-600); color: #fff; }
.fhr-btn-danger:hover { background: var(--red-700); border-color: var(--red-700); }

.fhr-btn-danger-soft { background: var(--red-50); border-color: transparent; color: var(--red-600); }
.fhr-btn-danger-soft:hover { background: var(--red-100); border-color: transparent; }
[data-theme="dark"] .fhr-btn-danger-soft { color: var(--red-700); }

.fhr-btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.fhr-btn-ghost:hover { background: var(--surface-3); color: var(--text); border-color: transparent; }

.fhr-btn-sm { padding: 6px 11px; font-size: .8rem; border-radius: var(--r-xs); }
.fhr-btn-lg { padding: 12px 22px; font-size: .95rem; border-radius: var(--r-md); }
.fhr-btn-block { width: 100%; }

.fhr-icon-btn {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.fhr-icon-btn:hover { background: var(--surface-3); color: var(--text); }
.fhr-icon-btn[disabled] { opacity: .45; cursor: not-allowed; }
.fhr-icon-btn.bare { border-color: transparent; background: transparent; }
.fhr-icon-btn.bare:hover { background: var(--surface-3); }

/* Segmented control */
.fhr-segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface-3);
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.fhr-segmented button {
  border: 0;
  background: transparent;
  padding: 6px 13px;
  border-radius: var(--r-xs);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fhr-segmented button:hover { color: var(--text); }
.fhr-segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--sh-xs);
}

/* --------------------------------------------------------------------------
   8. Forms
   -------------------------------------------------------------------------- */
.fhr-field { display: block; margin-bottom: 13px; }
.fhr-field:last-child { margin-bottom: 0; }

.fhr-label {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.fhr-label .req { color: var(--red-500); }
.fhr-label .opt { font-weight: 400; color: var(--text-subtle); font-size: .74rem; }

.fhr-input, .fhr-select, .fhr-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: .9rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.fhr-textarea { min-height: 96px; resize: vertical; line-height: 1.55; }

.fhr-input::placeholder, .fhr-textarea::placeholder { color: var(--text-subtle); }

.fhr-input:hover, .fhr-select:hover, .fhr-textarea:hover { border-color: var(--text-subtle); }
.fhr-input:focus, .fhr-select:focus, .fhr-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.fhr-input.is-invalid, .fhr-select.is-invalid, .fhr-textarea.is-invalid {
  border-color: var(--red-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .16);
}

.fhr-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

.fhr-input[type="date"], .fhr-input[type="time"] { cursor: pointer; }
[data-theme="dark"] .fhr-input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] .fhr-input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.6); }

.fhr-hint { font-size: .78rem; color: var(--text-subtle); margin-top: 5px; line-height: 1.45; }
.fhr-error-text { font-size: .78rem; color: var(--red-600); margin-top: 5px; display: none; }
.fhr-error-text.is-shown { display: block; }
[data-theme="dark"] .fhr-error-text { color: var(--red-700); }

/* Search input with icon */
.fhr-search { position: relative; flex: 1 1 220px; min-width: 180px; }
.fhr-search i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-subtle); font-size: .85rem; pointer-events: none;
}
.fhr-search .fhr-input { padding-left: 34px; }

/* Checkbox / radio cards */
.fhr-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .86rem; user-select: none; }
.fhr-check input { width: 16px; height: 16px; accent-color: var(--brand-600); cursor: pointer; margin: 0; }

.fhr-choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.fhr-choice {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.fhr-choice:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.fhr-choice.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--focus-ring); }
.fhr-choice-icon {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 1rem;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.fhr-choice.is-selected .fhr-choice-icon { background: var(--accent); color: #fff; }
.fhr-choice-text b { display: block; font-size: .9rem; font-weight: 650; }
.fhr-choice-text span { font-size: .76rem; color: var(--text-muted); }
.fhr-choice-tick {
  position: absolute; top: 9px; right: 10px;
  color: var(--accent); font-size: .85rem; opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.fhr-choice.is-selected .fhr-choice-tick { opacity: 1; }

/* Honeypot */
.fhr-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------------------
   9. Badges / chips
   -------------------------------------------------------------------------- */
.fhr-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--text-muted);
  border: 1px solid transparent;
}
.fhr-badge i { font-size: .55em; }
.fhr-badge.blue   { background: var(--accent-soft); color: var(--accent-text); }
.fhr-badge.green  { background: var(--green-50);  color: var(--green-700); }
.fhr-badge.amber  { background: var(--amber-50);  color: var(--amber-700); }
.fhr-badge.red    { background: var(--red-50);    color: var(--red-700); }
.fhr-badge.violet { background: var(--violet-50); color: var(--violet-600); }
.fhr-badge.gray   { background: var(--surface-3); color: var(--text-muted); }
[data-theme="dark"] .fhr-badge.violet { color: #c4b5fd; }

.fhr-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--accent); color: #fff;
  font-size: .7rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   10. Tables
   -------------------------------------------------------------------------- */
.fhr-table-wrap { overflow-x: auto; }
.fhr-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.fhr-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2);
  text-align: left;
  padding: 11px 14px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.fhr-table th.sortable { cursor: pointer; user-select: none; }
.fhr-table th.sortable:hover { color: var(--text); }
.fhr-table th.sortable::after {
  content: '\f0dc';
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  margin-left: 6px; opacity: .3; font-size: .85em;
}
.fhr-table th.sortable.sort-asc::after  { content: '\f0de'; opacity: 1; color: var(--accent); }
.fhr-table th.sortable.sort-desc::after { content: '\f0dd'; opacity: 1; color: var(--accent); }

.fhr-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.fhr-table tbody tr { transition: background var(--dur) var(--ease); }
.fhr-table tbody tr:hover { background: var(--surface-2); }
.fhr-table tbody tr.is-clickable { cursor: pointer; }
.fhr-table tbody tr:last-child td { border-bottom: 0; }

/* Phones: a 7-column table cannot be read by scrolling sideways, so each row
   collapses into a stacked card. Cells carry data-label for their heading. */
@media (max-width: 720px) {
  .fhr-table.is-stacked thead { display: none; }
  .fhr-table.is-stacked,
  .fhr-table.is-stacked tbody,
  .fhr-table.is-stacked tr,
  .fhr-table.is-stacked td { display: block; width: 100%; }

  .fhr-table.is-stacked tr {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: var(--sh-xs);
  }
  .fhr-table.is-stacked tr:hover { background: var(--surface-2); }

  .fhr-table.is-stacked td {
    border: 0;
    padding: 5px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
  }
  .fhr-table.is-stacked td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-subtle);
    padding-top: 2px;
  }
  .fhr-table.is-stacked td[data-label=""]::before { content: none; }
  .fhr-table.is-stacked td:first-child {
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
    margin-bottom: 4px;
  }
  .fhr-table.is-stacked td:first-child::before,
  .fhr-table.is-stacked td:nth-child(2)::before { content: none; }
  .fhr-table.is-stacked td:first-child,
  .fhr-table.is-stacked td:nth-child(2) { display: block; text-align: left; }
  .fhr-table.is-stacked td:last-child { display: none; }
  .fhr-table.is-stacked .fhr-empty { text-align: center; }
  .fhr-table.is-stacked tr:has(.fhr-empty) { border: 0; background: none; box-shadow: none; padding: 0; }
}

.fhr-cell-strong { font-weight: 650; color: var(--text); }
.fhr-cell-sub { font-size: .76rem; color: var(--text-subtle); margin-top: 2px; }
.fhr-muted { color: var(--text-subtle); }
.fhr-nums { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   11. Empty / loading states
   -------------------------------------------------------------------------- */
.fhr-empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--text-muted);
}
.fhr-empty-icon {
  width: 54px; height: 54px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-subtle);
  font-size: 1.3rem;
}
.fhr-empty b { display: block; color: var(--text); font-size: .95rem; margin-bottom: 5px; }
.fhr-empty p { font-size: .86rem; max-width: 46ch; margin: 0 auto; }

.fhr-skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  animation: fhr-shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes fhr-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.fhr-spinner {
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--r-full);
  animation: fhr-spin .7s linear infinite;
  display: inline-block;
  opacity: .7;
}
@keyframes fhr-spin { to { transform: rotate(360deg); } }

.fhr-busy { position: relative; pointer-events: none; }
.fhr-busy::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: blur(1px);
  border-radius: inherit;
  z-index: 3;
}

/* --------------------------------------------------------------------------
   12. Toasts
   -------------------------------------------------------------------------- */
.fhr-toasts {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 200;
  display: flex; flex-direction: column; gap: 9px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.fhr-toast {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-size: .87rem;
  pointer-events: auto;
  animation: fhr-toast-in 260ms var(--ease);
}
.fhr-toast.is-leaving { animation: fhr-toast-out 200ms var(--ease) forwards; }
.fhr-toast i.lead { font-size: 1rem; margin-top: 1px; color: var(--accent); }
.fhr-toast.ok    { border-left-color: var(--green-500); } .fhr-toast.ok i.lead    { color: var(--green-600); }
.fhr-toast.err   { border-left-color: var(--red-500); }   .fhr-toast.err i.lead   { color: var(--red-600); }
.fhr-toast.warn  { border-left-color: var(--amber-500); } .fhr-toast.warn i.lead  { color: var(--amber-600); }
.fhr-toast-body { flex: 1 1 auto; min-width: 0; }
.fhr-toast-body b { display: block; font-weight: 650; margin-bottom: 1px; }
.fhr-toast-body span { color: var(--text-muted); font-size: .82rem; }
.fhr-toast-close { border: 0; background: none; color: var(--text-subtle); cursor: pointer; padding: 2px; font-size: .8rem; }
.fhr-toast-close:hover { color: var(--text); }

@keyframes fhr-toast-in  { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fhr-toast-out { to { opacity: 0; transform: translateX(24px); } }

@media (max-width: 520px) {
  .fhr-toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* --------------------------------------------------------------------------
   13. Modal / dialog
   -------------------------------------------------------------------------- */
.fhr-modal-backdrop {
  position: fixed; inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  z-index: 150;
  display: grid; place-items: center;
  padding: 18px;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.fhr-modal-backdrop.is-open { opacity: 1; }

.fhr-modal {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  overflow: hidden;
  transform: translateY(10px) scale(.97);
  transition: transform var(--dur) var(--ease);
  max-height: calc(100vh - 36px);
  display: flex; flex-direction: column;
}
.fhr-modal-backdrop.is-open .fhr-modal { transform: none; }
.fhr-modal.wide { max-width: 620px; }

.fhr-modal-head { padding: 16px 18px 12px; display: flex; align-items: flex-start; gap: 12px; }
.fhr-modal-head h3 { font-size: 1.02rem; }
.fhr-modal-head p { font-size: .86rem; color: var(--text-muted); margin-top: 4px; }
.fhr-modal-ico {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent-text);
}
.fhr-modal-ico.danger { background: var(--red-50); color: var(--red-600); }
.fhr-modal-ico.warn   { background: var(--amber-50); color: var(--amber-600); }
.fhr-modal-body { padding: 4px 18px 16px; overflow-y: auto; }
.fhr-modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   14. Drawer
   -------------------------------------------------------------------------- */
.fhr-drawer-backdrop {
  position: fixed; inset: 0;
  background: var(--overlay);
  z-index: 140;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.fhr-drawer-backdrop.is-open { opacity: 1; }

.fhr-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(460px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--sh-xl);
  z-index: 145;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 240ms var(--ease);
}
.fhr-drawer.is-open { transform: none; }
.fhr-drawer-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 12px;
}
.fhr-drawer-head h3 { font-size: 1.02rem; }
.fhr-drawer-head p { font-size: .82rem; color: var(--text-muted); margin-top: 3px; }
.fhr-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 18px; }
.fhr-drawer-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  display: flex; gap: 8px; flex-wrap: wrap;
}

/* Definition list used inside drawers */
.fhr-dl { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 9px 14px; font-size: .875rem; }
.fhr-dl dt { color: var(--text-muted); font-size: .78rem; font-weight: 600; padding-top: 1px; }
.fhr-dl dd { margin: 0; word-break: break-word; }
@media (max-width: 420px) { .fhr-dl { grid-template-columns: 1fr; gap: 2px 0; } .fhr-dl dd { margin-bottom: 8px; } }

/* --------------------------------------------------------------------------
   15. Calendar
   -------------------------------------------------------------------------- */
.fhr-cal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.fhr-cal-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; }
.fhr-cal-nav { display: flex; align-items: center; gap: 5px; }

.fhr-dow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}
.fhr-dow div {
  text-align: center;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 4px 0;
}

.fhr-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.fhr-day {
  position: relative;
  min-height: 76px;
  padding: 7px 8px 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fhr-day:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.fhr-day-num { font-size: .86rem; font-weight: 650; font-variant-numeric: tabular-nums; }

.fhr-day.is-pad { opacity: .38; background: var(--surface-2); cursor: default; }
.fhr-day.is-pad:hover { transform: none; box-shadow: none; border-color: var(--line); }
.fhr-day.is-past { background: var(--surface-2); }
.fhr-day.is-past .fhr-day-num { color: var(--text-subtle); }

.fhr-day.is-today { border-color: var(--accent); }
.fhr-day.is-today .fhr-day-num {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; margin: -2px 0 -2px -3px;
  border-radius: var(--r-full);
  background: var(--accent); color: #fff;
  font-size: .78rem;
}
.fhr-day.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.fhr-day-dots { display: flex; gap: 3px; flex-wrap: wrap; margin-top: auto; }
.fhr-day-dot { width: 6px; height: 6px; border-radius: var(--r-full); }
.fhr-day-dot.open  { background: var(--green-500); }
.fhr-day-dot.book  { background: var(--brand-500); }
.fhr-day-dot.block { background: var(--red-500); }

.fhr-day-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.fhr-mini-tag {
  font-size: .62rem; font-weight: 700; letter-spacing: .03em;
  padding: 1px 5px; border-radius: var(--r-xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.fhr-mini-tag.open  { background: var(--green-50);  color: var(--green-700); }
.fhr-mini-tag.book  { background: var(--accent-soft); color: var(--accent-text); }
.fhr-mini-tag.block { background: var(--red-50);    color: var(--red-700); }

/* Availability meter shown on public calendar */
.fhr-day-meter { height: 3px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.fhr-day-meter i { display: block; height: 100%; background: var(--green-500); }

@media (max-width: 560px) {
  .fhr-day { min-height: 58px; padding: 5px 5px 4px; }
  .fhr-days, .fhr-dow { gap: 4px; }
  .fhr-mini-tag { font-size: .55rem; padding: 1px 3px; }
}

/* Legend */
.fhr-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .76rem; color: var(--text-muted); }
.fhr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fhr-legend i { width: 9px; height: 9px; border-radius: var(--r-full); display: inline-block; }

/* --------------------------------------------------------------------------
   16. Time slots
   -------------------------------------------------------------------------- */
.fhr-slot-group + .fhr-slot-group { margin-top: 16px; }
.fhr-slot-group-title {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-subtle); margin-bottom: 9px;
}
.fhr-slot-group-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.fhr-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }

.fhr-slot {
  padding: 10px 8px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  font-size: .85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.fhr-slot:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-1px); }
.fhr-slot.is-selected {
  border-color: var(--accent);
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--sh-sm);
}
[data-theme="dark"] .fhr-slot.is-selected { background: var(--accent); color: #06101f; }

/* Admin slot chips — richer, with state + multi-select */
.fhr-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 7px; }

.fhr-chip {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 9px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  user-select: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fhr-chip:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }
.fhr-chip-time { font-size: .84rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fhr-chip-state { font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }

.fhr-chip.st-open   { border-color: color-mix(in srgb, var(--green-500) 45%, transparent); background: var(--green-50); }
.fhr-chip.st-open   .fhr-chip-state { color: var(--green-700); }
.fhr-chip.st-closed { border-color: var(--line-strong); background: var(--surface-2); }
.fhr-chip.st-closed .fhr-chip-state { color: var(--text-subtle); }
.fhr-chip.st-blocked{ border-color: color-mix(in srgb, var(--red-500) 45%, transparent); background: var(--red-50); }
.fhr-chip.st-blocked .fhr-chip-state { color: var(--red-700); }
.fhr-chip.st-booked { border-color: color-mix(in srgb, var(--brand-500) 55%, transparent); background: var(--accent-soft); cursor: pointer; }
.fhr-chip.st-booked .fhr-chip-state { color: var(--accent-text); }

.fhr-chip.is-selected {
  box-shadow: 0 0 0 2px var(--accent), var(--sh-sm);
  border-color: var(--accent);
}
.fhr-chip-tick {
  position: absolute; top: 5px; right: 6px;
  font-size: .72rem; color: var(--accent); opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.fhr-chip.is-selected .fhr-chip-tick { opacity: 1; }
.fhr-chip-note {
  font-size: .66rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Floating bulk-action bar */
.fhr-actionbar {
  position: sticky;
  bottom: 12px;
  z-index: 40;
  margin-top: 12px;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--accent);
  box-shadow: var(--sh-lg);
  animation: fhr-toast-in 200ms var(--ease);
}
.fhr-actionbar b { font-size: .85rem; }
.fhr-actionbar .fhr-spacer { flex: 1 1 auto; }

/* --------------------------------------------------------------------------
   17. Week view
   -------------------------------------------------------------------------- */
.fhr-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.fhr-week-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fhr-week-colhead {
  position: sticky; top: 0;
  padding: 8px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.fhr-week-colhead:hover { border-color: var(--accent); }
.fhr-week-colhead.is-today { border-color: var(--accent); background: var(--accent-soft); }
.fhr-week-dow { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-subtle); }
.fhr-week-date { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 1px; }
.fhr-week-meta { font-size: .68rem; color: var(--text-muted); margin-top: 2px; }
.fhr-week-body { display: flex; flex-direction: column; gap: 4px; min-height: 60px; }

.fhr-wslot {
  padding: 5px 7px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 5px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fhr-wslot:hover { transform: translateX(2px); box-shadow: var(--sh-xs); }
.fhr-wslot.st-open   { background: var(--green-50);  border-color: color-mix(in srgb, var(--green-500) 35%, transparent); }
.fhr-wslot.st-booked { background: var(--accent-soft); border-color: color-mix(in srgb, var(--brand-500) 45%, transparent); }
.fhr-wslot.st-blocked{ background: var(--red-50);    border-color: color-mix(in srgb, var(--red-500) 35%, transparent); }
.fhr-wslot.st-closed { background: var(--surface-2); }
.fhr-wslot i { font-size: .62rem; opacity: .8; }
.fhr-wslot.st-open i   { color: var(--green-600); }
.fhr-wslot.st-booked i { color: var(--accent); }
.fhr-wslot.st-blocked i{ color: var(--red-600); }
.fhr-wslot.st-closed i { color: var(--text-subtle); }

.fhr-week-empty {
  padding: 14px 6px; text-align: center;
  font-size: .72rem; color: var(--text-subtle);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   18. Public booking shell
   -------------------------------------------------------------------------- */
.fhr-public {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 26px clamp(12px, 3vw, 24px) 60px;
}
.fhr-public-inner { width: 100%; max-width: 1000px; }

.fhr-public-header { text-align: center; margin-bottom: 20px; }
.fhr-public-header img { height: 52px; width: auto; }
[data-theme="dark"] .fhr-public-header img { filter: brightness(0) invert(1) opacity(.94); }

.fhr-stepper { display: flex; align-items: center; gap: 0; margin: 0 auto 20px; max-width: 620px; }
.fhr-step { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.fhr-step-num {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-subtle);
  font-size: .8rem; font-weight: 700;
  transition: all var(--dur) var(--ease);
}
.fhr-step-label { font-size: .8rem; font-weight: 600; color: var(--text-subtle); white-space: nowrap; }
.fhr-step.is-active .fhr-step-num { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 0 0 4px var(--focus-ring); }
.fhr-step.is-active .fhr-step-label { color: var(--text); }
.fhr-step.is-done .fhr-step-num { background: var(--green-500); border-color: var(--green-500); color: #fff; }
.fhr-step.is-done .fhr-step-label { color: var(--text-muted); }
.fhr-step-line { flex: 1 1 auto; height: 2px; background: var(--line-strong); margin: 0 10px; border-radius: var(--r-full); }
.fhr-step-line.is-done { background: var(--green-500); }
@media (max-width: 640px) { .fhr-step-label { display: none; } .fhr-step-line { margin: 0 6px; } }

.fhr-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: .87rem;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.fhr-alert i { margin-top: 2px; }
.fhr-alert.info { background: var(--accent-soft); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.fhr-alert.ok   { background: var(--green-50);  color: var(--green-700); border-color: color-mix(in srgb, var(--green-500) 26%, transparent); }
.fhr-alert.warn { background: var(--amber-50);  color: var(--amber-700); border-color: color-mix(in srgb, var(--amber-500) 26%, transparent); }
.fhr-alert.err  { background: var(--red-50);    color: var(--red-700);   border-color: color-mix(in srgb, var(--red-500) 26%, transparent); }

/* Sticky order-summary rail */
.fhr-summary { position: sticky; top: 18px; }
.fhr-summary-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: .87rem;
}
.fhr-summary-row:last-child { border-bottom: 0; }
.fhr-summary-row .k { color: var(--text-muted); font-size: .8rem; flex: 0 0 auto; }
.fhr-summary-row .v { text-align: right; font-weight: 600; word-break: break-word; }
.fhr-summary-row .v.empty { color: var(--text-subtle); font-weight: 400; }

/* Success screen */
.fhr-success { text-align: center; padding: 26px 20px 8px; }
.fhr-success-ico {
  width: 66px; height: 66px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--green-50); color: var(--green-600);
  font-size: 1.7rem;
  animation: fhr-pop 420ms var(--ease);
}
@keyframes fhr-pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.fhr-success h2 { font-size: 1.35rem; margin-bottom: 7px; }
.fhr-success p { color: var(--text-muted); max-width: 44ch; margin: 0 auto; font-size: .92rem; }

/* --------------------------------------------------------------------------
   19. Utilities
   -------------------------------------------------------------------------- */
.fhr-hidden { display: none !important; }
.fhr-sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mb-2 { margin-bottom: 12px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-700 { font-weight: 700; }
.fs-sm { font-size: .82rem; }
.fs-xs { font-size: .75rem; }

.fhr-kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: var(--surface-2);
  font-family: var(--font-num);
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
}

@media print {
  .fhr-topbar, .fhr-toasts, .fhr-actionbar, .fhr-btn, .fhr-icon-btn { display: none !important; }
  body { background: #fff; }
  .fhr-card { box-shadow: none; border-color: #ccc; }
}
