/* ============================================================
   Koto Design System — reusable components
   ============================================================
   Depends on tokens.css. Component classes here are the canonical
   building blocks for any Koto-styled page. Use these instead of
   Bootstrap (.btn btn-primary) or hand-rolled per-page classes.

   Reference: /Koto Design System/preview/components-*.html
   ============================================================ */

/* ============================================================
   Buttons
   ============================================================
   Markup:
     <button class="btn btn-primary">Start shift</button>
     <button class="btn btn-secondary">Cancel</button>
     <a class="btn btn-ghost" href="...">Skip</a>
     <button class="btn btn-danger">Delete</button>

   Sizes: .btn-sm, .btn-lg
   Modifiers: .btn-block (full width), .btn-icon (icon-only square)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 9px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn[disabled],
.btn.disabled {
  background: var(--neutral-100);
  color: var(--neutral-400);
  border-color: transparent;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--sky-300);
  color: var(--sky-900);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--sky-400);
  color: var(--sky-900);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.btn-primary:active {
  background: var(--sky-500);
  color: #fff;
  transform: scale(0.98);
}

.btn-secondary {
  background: #fff;
  color: var(--fg1);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--neutral-50);
  color: var(--fg1);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--fg2);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--hover-bg);
  color: var(--fg1);
  text-decoration: none;
}

.btn-danger {
  background: var(--coral-500);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-danger:hover {
  background: var(--coral-700);
  color: #fff;
  text-decoration: none;
}

.btn-success {
  background: var(--mint-500);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-success:hover {
  background: var(--mint-700);
  color: #fff;
  text-decoration: none;
}

.btn-sm { font-size: 13px; padding: 6px 12px; }
.btn-lg { font-size: 16px; padding: 12px 22px; }
.btn-block { width: 100%; }
.btn-icon {
  padding: 9px;
  width: 36px;
  height: 36px;
  justify-content: center;
}

/* ============================================================
   Segmented Controls
   ============================================================ */
.koto-segmented {
  display: inline-flex;
  gap: var(--space-1, 4px);
  background: var(--bg-subtle, var(--sky-50));
  border: 1px solid var(--border, rgba(0,0,0,.07));
  border-radius: var(--radius-md, 10px);
  padding: var(--space-1, 4px);
}

.koto-segmented__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1, 4px);
  padding: var(--space-2, 8px) var(--space-3, 12px);
  border: none;
  background: transparent;
  color: var(--fg2, #64748b);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: background 150ms, color 150ms;
  font-family: var(--font-sans);
}

.koto-segmented__btn:hover {
  background: var(--bg-subtle-hover, var(--sky-100));
  color: var(--fg1);
}

.koto-segmented__btn.active {
  background: var(--bg);
  color: var(--fg1);
  box-shadow: var(--shadow-xs, 0 1px 3px rgba(0,0,0,.1));
  font-weight: 600;
}

.koto-segmented__icon {
  width: 14px;
  height: 14px;
}

/* ============================================================
   Cards
   ============================================================
   Markup:
     <article class="card">...</article>
     <article class="card card-elevated">...</article>
     <article class="card card-interactive">...</article>
   ============================================================ */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.card-elevated { box-shadow: var(--shadow-md); }
.card-flat     { box-shadow: none; }

.card-interactive {
  cursor: pointer;
  transition: box-shadow var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.card-interactive:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-padded   { padding: var(--space-5); }
.card-roomy    { padding: var(--space-6); }
.card-flush    { padding: 0; }

.card-header,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.card-header { margin-bottom: var(--space-3); }
.card-footer { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); }

/* ============================================================
   Pills (status chips)
   ============================================================
   Markup:
     <span class="pill pill-neutral">Dirty</span>
     <span class="pill pill-coral"><span class="pill-dot"></span>In progress</span>
     <span class="pill pill-mint">Clean</span>
     <span class="pill pill-sky">Inspected</span>
     <span class="pill pill-amber">Maintenance</span>
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-feature-settings: 'tnum';
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pill-neutral { background: var(--neutral-200); color: var(--neutral-700); }
.pill-neutral .pill-dot { background: var(--neutral-500); }

.pill-sky { background: var(--sky-100); color: var(--sky-800); }
.pill-sky .pill-dot { background: var(--sky-500); }

.pill-mint, .pill-success { background: var(--mint-100); color: var(--mint-700); }
.pill-mint .pill-dot, .pill-success .pill-dot { background: var(--mint-500); }

.pill-coral, .pill-accent { background: var(--coral-100); color: var(--coral-700); }
.pill-coral .pill-dot, .pill-accent .pill-dot { background: var(--coral-500); }

.pill-amber, .pill-warning { background: var(--amber-100); color: var(--amber-700); }
.pill-amber .pill-dot, .pill-warning .pill-dot { background: var(--amber-300); }

.pill-red, .pill-danger { background: var(--red-50); color: var(--red-700); border-color: var(--red-100); }
.pill-red .pill-dot, .pill-danger .pill-dot { background: var(--red-500); }

.pill-lilac { background: var(--lilac-100); color: var(--lilac-700); }
.pill-lilac .pill-dot { background: var(--lilac-500); }

.pill-outline {
  background: #fff;
  color: var(--fg2);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   Forms
   ============================================================
   Markup:
     <div class="field">
       <label for="x">Room number</label>
       <input id="x" type="text" />
       <span class="hint">Helper text</span>
     </div>
     <div class="field has-error">...</div>
     <div class="field-row"> two fields side by side </div>
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: var(--space-4);
}

.field > label {
  font-size: var(--t-label-size);
  font-weight: var(--t-label-w);
  color: var(--fg2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 8px 11px;
  color: var(--fg1);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
  outline: none;
}

.field textarea {
  font-family: var(--font-sans);
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.field textarea.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--sky-500);
  box-shadow: var(--focus-ring);
}

.field input[readonly],
.field input[disabled],
.field select[disabled],
.field textarea[disabled] {
  background: var(--neutral-100);
  color: var(--fg2);
  cursor: not-allowed;
}

.field .hint {
  font-size: var(--t-caption-size);
  color: var(--fg3);
  line-height: var(--t-caption-lh);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--coral-500);
}
.field.has-error .hint { color: var(--coral-700); }

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

/* Toggle switch */
.toggle {
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--neutral-300);
  border-radius: var(--radius-pill);
  position: relative;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.toggle.on { background: var(--sky-500); }
.toggle .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: left var(--dur-fast) var(--ease-out);
}
.toggle.on .knob { left: 18px; }

/* Checkbox visual (use with hidden native input) */
.check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--neutral-400);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  flex-shrink: 0;
}
.check.on {
  background: var(--sky-500);
  border-color: var(--sky-500);
  color: #fff;
}

/* ============================================================
   Flash messages / inline alerts
   ============================================================
   Markup:
     <div class="alert alert-success">Saved.</div>
     <div class="alert alert-danger">Something went wrong.</div>
     <div class="alert alert-warning">Heads up.</div>
     <div class="alert alert-info">FYI.</div>

   Legacy aliases (.koto-flash + category) still work via the
   matching selectors below for templates not yet migrated.
   ============================================================ */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid transparent;
  margin-bottom: var(--space-4);
}

.alert-success, .koto-flash.success {
  background: var(--mint-100);
  color: var(--mint-700);
  border-color: var(--mint-200);
}
.alert-danger, .alert-error, .koto-flash.danger, .koto-flash.error {
  background: var(--red-50);
  color: var(--red-700);
  border-color: var(--red-100);
}
.alert-warning, .koto-flash.warning {
  background: var(--amber-100);
  color: var(--amber-700);
  border-color: var(--amber-300);
}
.alert-info, .koto-flash.info {
  background: var(--sky-100);
  color: var(--sky-800);
  border-color: var(--sky-200);
}

/* ============================================================
   Toasts (top-right transient notifications)
   ============================================================ */
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  color: var(--fg1);
  min-width: 240px;
  max-width: 400px;
}
.toast-success { border-color: var(--mint-200); }
.toast-danger  { border-color: var(--red-100); }
.toast-warning { border-color: var(--amber-300); }

/* ============================================================
   Page header / topbar utilities
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0 var(--space-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-5);
}
.page-header .page-title {
  font-size: var(--t-h1-size);
  line-height: var(--t-h1-lh);
  font-weight: var(--t-h1-w);
  letter-spacing: -0.015em;
  color: var(--fg1);
  margin: 0;
}
.page-header .page-subtitle {
  font-size: var(--t-body-size);
  color: var(--fg2);
  margin: 4px 0 0;
}
.page-header .page-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* ============================================================
   Dividers + table
   ============================================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-5) 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.table th {
  background: var(--neutral-50);
  font-weight: 600;
  color: var(--fg2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================================
   Lucide icons — sized to body line-height by default
   ============================================================ */
.lucide,
[data-lucide] {
  width: 1em;
  height: 1em;
  stroke-width: 1.75;
  vertical-align: -0.125em;
  flex-shrink: 0;
}
.lucide-lg, [data-lucide].lucide-lg { width: 1.25em; height: 1.25em; }
.lucide-sm, [data-lucide].lucide-sm { width: 0.875em; height: 0.875em; }

/* ============================================================
   Small text utilities (Koto-flavored, prefer over Bootstrap)
   ============================================================ */
.text-muted   { color: var(--fg3); }
.text-soft    { color: var(--fg2); }
.text-strong  { color: var(--fg1); font-weight: 600; }
.text-mono    { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-success { color: var(--success-strong); }
.text-danger  { color: var(--danger-strong); }
.text-warning { color: var(--warning-strong); }

/* ============================================================
   Account / settings page primitives
   ============================================================
   Used by templates/account/settings.html. Helpers live here
   (not a per-page file) because the same primitives — read-only
   fields, notification toggles, settings-style sections — will
   be reused by future profile/settings pages.

   Markup contract:
     <section class="account-grid">
       <article class="card account-section">
         <header class="card-header account-section-header">
           <div class="account-section-title"><i …></i><h2>...</h2></div>
           <span class="account-section-meta">…</span>
         </header>
         …
       </article>
     </section>
   ============================================================ */
/* Uses full width of .koto-page-content (up to 1400px) — avoids a
   narrow 960px column and empty gutters on large monitors. */
.account-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
  max-width: 100%;
}

/* Side-by-side Profile + Security on wide viewports. */
.account-twin {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: start;
  width: 100%;
}
@media (min-width: 1024px) {
  .account-twin {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}

.account-section { padding: var(--space-5); }

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-5);
}
.account-header-identity {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.account-avatar {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}
/* shell.css loads after components — preserve account header avatar size and type */
.luxe-brand-avatar.account-avatar {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}
.account-header-text { display: flex; flex-direction: column; gap: 2px; }
.account-title {
  margin: 0;
  font-size: var(--t-h2-size);
  font-weight: var(--t-h2-w);
  letter-spacing: -0.01em;
  color: var(--fg1);
}
.account-subtitle {
  margin: 0;
  color: var(--fg2);
  font-size: 14px;
}
.account-subtitle strong { color: var(--fg1); }

.account-org-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-1) 0 0;
  font-size: 13px;
  color: var(--fg2);
  line-height: 1.4;
}
.account-org-line i[data-lucide] {
  width: 14px;
  height: 14px;
  color: var(--fg3);
  flex-shrink: 0;
}
.account-org-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Read-only fields: two columns (username + display name) on md+;
   full-width email row below. */
.account-readonly-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: var(--space-4);
}
.account-readonly-pair .field {
  margin-bottom: var(--space-4);
}
.account-readonly-pair .field:last-of-type { margin-bottom: 0; }
@media (min-width: 768px) {
  .account-readonly-pair {
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--space-5);
  }
  .account-readonly-pair .field {
    margin-bottom: 0;
  }
  .account-readonly-pair .account-field-full {
    grid-column: 1 / -1;
    margin-top: var(--space-1);
  }
}

/* Tighter lede in session row (avoids double vertical rhythm with strong). */
.account-session .account-lede-tight { margin: 0; }

.account-section-header {
  margin-bottom: var(--space-4);
}
.account-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.account-section-title h2 {
  margin: 0;
  font-size: var(--t-h3-size);
  font-weight: var(--t-h3-w);
  letter-spacing: -0.005em;
  color: var(--fg1);
}
.account-section-title i[data-lucide] {
  width: 20px;
  height: 20px;
  color: var(--fg2);
}
.account-section-meta {
  font-size: var(--t-caption-size);
  color: var(--fg3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.account-section-lede {
  margin: 0 0 var(--space-4);
  color: var(--fg2);
  font-size: 14px;
  line-height: 1.55;
}
.account-section-footer {
  flex-wrap: wrap;
  row-gap: var(--space-2);
}

/* Read-only inputs (email, username on account page).
   Visually distinct from editable fields so the user understands
   why they can't type — without making them look broken. */
.read-only-field input[readonly] {
  background: var(--neutral-50);
  color: var(--fg2);
  cursor: not-allowed;
  border-color: var(--border);
}
.read-only-field input[readonly]:focus {
  border-color: var(--border);
  box-shadow: none;
}

/* Inline support callout under the email field. */
.account-support-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: 0;
}
.account-support-note i[data-lucide] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.account-support-link {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.account-support-link:hover { text-decoration-thickness: 2px; }

/* Collapsible disclosure (used for change-password). Wraps a
   <details> + <summary> with the look of a Koto secondary button. */
.account-collapse { display: block; }
.account-collapse > summary {
  list-style: none;
  cursor: pointer;
  width: fit-content;
}
.account-collapse > summary::-webkit-details-marker { display: none; }
.account-collapse-trigger { gap: var(--space-2); }
.account-collapse-caret {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.account-collapse[open] .account-collapse-caret { transform: rotate(180deg); }
.account-collapse-body {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  max-width: 100%;
}
.account-collapse-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* Session block. */
.account-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Sidebar order editor (Account → Appearance). */
.account-sidebar-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 28rem;
}
.account-sidebar-order-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.account-sidebar-order-item:active {
  cursor: grabbing;
}
.account-sidebar-order-item--dragging {
  opacity: 0.55;
  box-shadow: var(--shadow-md);
}
.account-sidebar-order-grip {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg3);
  flex-shrink: 0;
}
.account-sidebar-order-grip [data-lucide] {
  width: 18px;
  height: 18px;
}
.account-sidebar-order-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg1);
}
.account-sidebar-order-status {
  margin: var(--space-3) 0 0;
  font-size: 13px;
  color: var(--fg2);
  min-height: 1.25em;
}

/* Bottom support line (complements the info callout in Profile). */
.account-page-footer {
  text-align: right;
  padding-top: var(--space-2);
  margin-top: calc(-1 * var(--space-1));
  width: 100%;
}
.account-page-footer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg3);
  max-width: 52ch;
  margin-left: auto;
}
.account-page-footer .account-support-link {
  color: var(--fg2);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: color var(--dur-fast) var(--ease-out);
}
.account-page-footer .account-support-link:hover {
  color: var(--fg1);
  border-bottom-color: var(--sky-500);
}
@media (max-width: 640px) {
  .account-page-footer { text-align: left; }
  .account-page-footer p { margin-left: 0; max-width: none; }
}

/* ============================================================
   Notification preference rows
   ============================================================
   Used inside the Notifications card. The native checkbox is
   visually hidden but kept in the form so the existing POST
   handler still receives presence/absence correctly. The
   `.notif-toggle` element provides the visual switch.
   ============================================================ */
.account-notif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}

.notif-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.notif-group-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  font-size: var(--t-caption-size);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg3);
}
.notif-group-title i[data-lucide] { width: 14px; height: 14px; }

.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out);
}
.notif-row:hover { background: var(--hover-bg); padding-left: 8px; padding-right: 8px; }
.notif-row-label {
  font-size: 14px;
  color: var(--fg1);
  line-height: 1.4;
}

/* Hide the native checkbox while keeping it focusable + form-submitting. */
.notif-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notif-toggle {
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--neutral-300);
  border-radius: var(--radius-pill);
  position: relative;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out);
}
.notif-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: left var(--dur-fast) var(--ease-out);
}
.notif-input:checked ~ .notif-toggle { background: var(--sky-500); }
.notif-input:checked ~ .notif-toggle .notif-toggle-knob { left: 18px; }
.notif-input:focus-visible ~ .notif-toggle { box-shadow: var(--focus-ring); }

.notif-inline-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-2);
  margin-bottom: 0;
  font-size: 13px;
}
.notif-inline-alert i[data-lucide] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================================
   Bed-alert Response Dialog  (.brd-*)
   Used by #tabletUpdateResponseModal in _koto_global_reception.html
   ============================================================ */
.brd {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: var(--radius-lg, 14px);
  overflow: hidden;
  max-height: 90vh;
}

/* Header */
.brd-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) var(--space-4);
  background: var(--primary-subtle);
  border-bottom: 1px solid var(--border);
}
.brd-header-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.brd-room-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg1);
  line-height: 1;
}
.brd-room-chip i[data-lucide] {
  width: 22px;
  height: 22px;
  color: var(--sky-600);
}
.brd-subtitle {
  font-size: 12px;
  color: var(--fg3);
  font-weight: 500;
  letter-spacing: .3px;
}
.brd-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm, 6px);
  color: var(--fg2);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.brd-close:hover { background: var(--hover-bg); }
.brd-close i[data-lucide] { width: 18px; height: 18px; }

/* Scrollable body */
.brd-body {
  overflow-y: auto;
  flex: 1;
  padding: 0;
}

/* Sections */
.brd-section {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}
.brd-section--last { border-bottom: none; }
.brd-section-heading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--fg3);
  margin-bottom: var(--space-3);
}
.brd-section-heading i[data-lucide] { width: 14px; height: 14px; }
.brd-section-heading--danger { color: var(--red-700); }

/* ── Side-by-side compare panel (housekeeper reported ↔ reception verified) ── */
.brd-compare-section { padding: 0; }
.brd-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.brd-compare-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
}
.brd-compare-col--reported {
  border-right: 1px solid var(--border);
  background: var(--bg-sunken);
}
.brd-compare-col-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--fg3);
}
.brd-compare-col-head i[data-lucide] { width: 13px; height: 13px; }

/* Read-only stat rows (left column) */
.brd-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border);
  background: var(--bg);
}
.brd-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg2);
}
.brd-stat-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}
.brd-stat-value--in   { color: var(--sky-600); }
.brd-stat-value--out  { color: var(--red-500); }
.brd-stat-value--free { color: var(--mint-700); }
.brd-stat--in  { border-color: var(--sky-100);  background: var(--sky-50);  }
.brd-stat--out { border-color: var(--red-100);  background: var(--red-50);  }
.brd-stat--free{ border-color: var(--mint-100); background: var(--mint-50); }

/* Notes strip — full width below the two columns */
.brd-notes-strip {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--fg2);
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  padding: var(--space-3) var(--space-5);
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Editable fields (right column) */
.brd-field { display: flex; flex-direction: column; gap: var(--space-1); }
.brd-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg2);
}
.brd-input {
  width: 100%;
  padding: 10px 10px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--bg);
  color: var(--fg1);
  outline: none;
  transition: border-color 0.15s;
}
.brd-input:focus { border-color: var(--primary); }
.brd-input--in:focus  { border-color: var(--sky-400); }
.brd-input--out:focus { border-color: var(--red-300); }
.brd-input--free:focus{ border-color: var(--mint-500);}

/* Guest lists */
.brd-guests-list { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-2); }
.brd-add-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--sky-700);
  background: transparent;
  border: 1px dashed var(--sky-300);
  border-radius: var(--radius-sm, 6px);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.brd-add-btn:hover { background: var(--sky-50); border-color: var(--sky-500); }
.brd-add-btn i[data-lucide] { width: 14px; height: 14px; }
.brd-add-btn--danger { color: var(--red-700); border-color: var(--red-200); }
.brd-add-btn--danger:hover { background: var(--red-50); border-color: var(--red-300); }

/* Notes textarea */
.brd-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--bg);
  color: var(--fg1);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
.brd-textarea:focus { border-color: var(--primary); }
.brd-textarea::placeholder { color: var(--fg3); }

/* Footer */
.brd-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Responsive: stack compare columns on narrow dialogs */
@media (max-width: 520px) {
  .brd-compare { grid-template-columns: 1fr; }
  .brd-compare-col--reported { border-right: none; border-bottom: 1px solid var(--border); }
}
