/* =====================================================
   WeSendEyes — Foundation Layer  (Slice 0)
   Additive only. Zero overrides of existing classes.
   Load AFTER the existing <style> block in index.html.
   Each later slice migrates its screen onto these.
   ===================================================== */

/* ─── TYPE SCALE ──────────────────────────────────────
   ~20% readability bump (#7). Apply via .ts-* classes.
   Body uses Inter; headings/buttons use Outfit.
   ----------------------------------------------------- */
.ts-headline {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.ts-section {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.ts-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
}
.ts-label {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.ts-helper {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── COMPONENT 1: BUTTON ─────────────────────────────
   Base .btn required on all foundation buttons. Using
   .btn + modifier avoids overriding the legacy portal's
   standalone .btn-danger / .btn-sm (no .btn base there).
   ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  padding: 10px 20px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  min-height: 44px;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.btn:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* Primary */
.btn-primary {
  background: var(--cta);
  color: #fff;
  border-color: var(--cta);
}
.btn-primary:hover:not(:disabled) { background: var(--ctah); border-color: var(--ctah); }

/* Secondary — Outfit 500 per design-rules §6 */
.btn-secondary {
  background: var(--white);
  color: var(--p);
  border-color: var(--border);
  font-weight: 500;
}
.btn-secondary:hover:not(:disabled) { background: var(--bg); border-color: var(--muted); }

/* Danger — requires .btn base to avoid touching legacy .btn-danger */
.btn.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn.btn-danger:hover:not(:disabled) { background: #DC2626; border-color: #DC2626; }

/* Small — compact at desktop; 44px on touch (design-rules §3) */
.btn.btn-sm {
  font-size: 13px;
  padding: 6px 14px;
  min-height: 36px;
  border-radius: 10px;
}
@media (max-width: 1023px) {
  .btn.btn-sm { min-height: 44px; }
}

/* Loading state — spinner + "Saving…", disabled while pending.
   Silent async buttons are a trust failure (spec §3.1). */
.btn.btn-loading {
  cursor: not-allowed;
  opacity: 0.75;
  pointer-events: none;
}
.btn.btn-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: f-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.btn-secondary.btn-loading::before {
  border-color: rgba(31,35,183,0.25);
  border-top-color: var(--p);
}
@keyframes f-spin { to { transform: rotate(360deg); } }

/* ─── COMPONENT 2: FIELD ──────────────────────────────
   .field wrapper → .field-label + .field-input + .field-helper.
   Variants: .field-locked / .field-error / .field-disabled.
   helper-below is the canonical home for microtrust cues.
   ----------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field-label {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.field-label .req { color: var(--cta); margin-left: 2px; }
.field-input {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field-input:focus {
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(31,35,183,0.08);
}
/* Helper: home for trust cues ("We'll never share this") and errors */
.field-helper {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 5px;
}
/* Locked: lookup-derived value (TomTom country, postcode).
   Text stays --text (#1E293B on #EEF4FF ≈ 12:1 contrast). */
.field-locked .field-input {
  background: var(--soft);
  color: var(--text);
  cursor: not-allowed;
  border-color: var(--border);
}
.field-locked .field-input:focus { border-color: var(--border); box-shadow: none; }
.field-locked .field-helper::before {
  content: '\1F512';
  font-size: 11px;
}
/* Error: red border + red helper text */
.field-error .field-input { border-color: var(--red); }
.field-error .field-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.10);
}
.field-error .field-helper { color: var(--red); }
/* Disabled: bg --bg (#F8FAFC), text --muted (#64748B). Contrast: ~4.7:1. */
.field-disabled .field-input {
  background: var(--bg);
  color: var(--muted);
  cursor: not-allowed;
  border-color: var(--border);
}
.field-disabled .field-label { color: var(--muted); }
.field-disabled .field-input:focus { border-color: var(--border); box-shadow: none; }

/* ─── COMPONENT 3: CARD / PANEL ───────────────────────
   .f-panel: foundation panel (avoids name clash with .panel).
   .panel-header / .panel-title / .panel-subtitle / .panel-actions
   are new child classes — safe to use inside both .f-panel
   and the legacy .panel (they add, never override).
   ----------------------------------------------------- */
.f-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
}
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.panel-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.panel-subtitle {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .panel-header { flex-direction: column; gap: 10px; }
  .panel-actions { width: 100%; }
}

/* ─── COMPONENT 4: STATUS PILL ────────────────────────
   .f-status-pill + colour modifier from wse-status-glossary.md.
   Always icon + label — never colour-only (design-rules §5).
   report_ready = blue (settled v4).
   ----------------------------------------------------- */
.f-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.f-status-pill i { font-size: 13px; flex-shrink: 0; }
/* Colour map (wse-status-glossary.md):
   Blue  = received/looking/assigned/time_proposed/scheduled/on_site/report_ready
   Amber = awaiting_host_confirm/not_confirmed/rescheduled/redo/on_hold/host_not_responding/host_noshow_onsite/reassigning
   Green = completed
   Muted = cancellation_requested/cancellation_approved
   Red   = cancelled
   Violet = promoted job (dispatch bump) */
.f-sp-blue   { background: #DBEAFE; color: #1E40AF; }
.f-sp-amber  { background: #FEF3C7; color: #92400E; }
.f-sp-green  { background: #D1FAE5; color: #065F46; }
.f-sp-red    { background: #FEE2E2; color: #991B1B; }
.f-sp-muted  { background: #F1F5F9; color: #475569; }
.f-sp-violet { background: #EDE9FE; color: #5B21B6; }

/* ─── COMPONENT 5: BADGE ──────────────────────────────
   .f-badge — count chip. Count MUST also be in aria-label
   or .sr-only span (colour-only chip fails design-rules §5).
   ----------------------------------------------------- */
.f-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.f-badge-primary { background: var(--cta); color: #fff; }
.f-badge-neutral { background: var(--muted); color: #fff; }

/* Shared screen-reader utility (used by .f-badge and others) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── COMPONENT 6: MODAL ──────────────────────────────
   .f-modal-overlay + .f-modal-box. Focus-trapped by
   foundation.js (fOpenModal). Escape + backdrop close.
   ----------------------------------------------------- */
.f-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.65);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.f-modal-overlay.open { display: flex; }
.f-modal-box {
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}
.f-modal-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.f-modal-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.f-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
@media (max-width: 480px) {
  .f-modal-box { padding: 20px; }
  .f-modal-actions { flex-direction: column-reverse; }
  .f-modal-actions .btn { width: 100%; min-width: 0; }
}

/* ─── COMPONENT 7: INFO / TRUST PANEL ────────────────
   Soft indigo bg, brand icon, Inter body.
   Use for microtrust cues: what happens next, who sees.
   ----------------------------------------------------- */
.trust-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--soft);
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 13px 15px;
  margin-bottom: 14px;
}
.trust-panel-icon {
  font-size: 18px;
  color: var(--p);
  flex-shrink: 0;
  margin-top: 1px;
}
.trust-panel-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
}
.trust-panel-body strong { font-weight: 600; }

/* ─── COMPONENT 8: TABLE REFLOW ───────────────────────
   Desktop: normal table.
   Tablet 768–1023: h-scroll + right-edge gradient affordance.
   Phone ≤480: rows stack into labelled cards (data-label on td).
   ----------------------------------------------------- */
.table-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
  background: var(--white);
}
@media (max-width: 1023px) and (min-width: 481px) {
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(to left, rgba(255,255,255,0.95), transparent);
    pointer-events: none;
    border-radius: 0 10px 10px 0;
  }
  .table-wrap table { min-width: 600px; }
}
@media (max-width: 480px) {
  .table-wrap { border: none; background: transparent; border-radius: 0; }
  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 10px 14px;
  }
  .table-wrap td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
  }
  .table-wrap td:last-child { border-bottom: none; }
  .table-wrap td::before {
    content: attr(data-label);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    flex-shrink: 0;
    margin-right: 12px;
  }
}

/* ─── COMPONENT 9: ALERT / FEEDBACK ──────────────────
   Unified feedback strip replacing ~6 ad-hoc classes.
   role="alert" on dynamic insertions for screen readers.
   Optional .alert-dismiss (×) and .alert-action (right btn).
   ----------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  margin-bottom: 12px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
}
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-content { flex: 1; }
.alert-content strong { display: block; font-weight: 600; margin-bottom: 2px; }
.alert-action { flex-shrink: 0; align-self: center; }
.alert-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
  font-size: 16px;
}
.alert-dismiss:hover { opacity: 1; }
.alert-dismiss:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.alert-success { background: #D1FAE5; border-color: #6EE7B7; color: #065F46; }
.alert-success .alert-dismiss { color: #065F46; }

.alert-info { background: var(--soft); border-color: #BFDBFE; color: var(--text); }
.alert-info .alert-icon { color: var(--p); }
.alert-info .alert-dismiss { color: var(--p); }

.alert-warning { background: #FEF3C7; border-color: #FDE68A; color: #92400E; }
.alert-warning .alert-dismiss { color: #92400E; }

.alert-error { background: #FEE2E2; border-color: #FECACA; color: #991B1B; }
.alert-error .alert-dismiss { color: #991B1B; }

/* ─── COMPONENT 10: DETAIL ROW ────────────────────────
   Unified label + value pair. Unifies .detail-field /
   .df / .ver-info-row — the most-reused pattern in the UI.
   ----------------------------------------------------- */
.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-row-label {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 130px;
  flex-shrink: 0;
  padding-top: 1px;
  line-height: 1.4;
}
.detail-row-value {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  line-height: 1.4;
}
.detail-row-value a { color: var(--cta); text-decoration: none; }
.detail-row-value a:hover { text-decoration: underline; }
/* Compact: tighter for dense lists */
.detail-row.compact { padding: 6px 0; }
.detail-row.compact .detail-row-label { font-size: 11px; min-width: 110px; }
.detail-row.compact .detail-row-value { font-size: 12.5px; }
@media (max-width: 480px) {
  .detail-row { flex-direction: column; gap: 3px; }
  .detail-row-label { min-width: unset; }
}

/* ─── COMPONENT 11: TAB GROUP ─────────────────────────
   Unified tabs. Replaces .tab-row + .tab-strip.
   Scrollable on overflow (≤768 or whenever it overflows).
   Right-edge gradient affordance on scroll.
   .underline variant: lighter style.
   .tab-item-badge: count inside a tab.
   ----------------------------------------------------- */
.tab-group {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
}
.tab-group::-webkit-scrollbar { display: none; }
/* Gradient affordance when content overflows */
.tab-group::after {
  content: '';
  position: sticky;
  right: -4px;
  flex-shrink: 0;
  width: 28px;
  background: linear-gradient(to left, rgba(255,255,255,0.95), transparent);
  pointer-events: none;
  border-radius: 0 7px 7px 0;
  align-self: stretch;
}
.tab-group-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-radius: 7px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.tab-group-item:hover { background: var(--bg); color: var(--text); }
.tab-group-item.active { background: var(--soft); color: var(--p); font-weight: 600; }
.tab-group-item:focus-visible { outline: 2px solid var(--cta); outline-offset: -2px; }

/* Underline variant */
.tab-group.underline {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  padding: 0;
  gap: 0;
}
.tab-group.underline::after { display: none; }
.tab-group.underline .tab-group-item {
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 8px 16px;
}
.tab-group.underline .tab-group-item.active {
  background: transparent;
  border-bottom-color: var(--cta);
  color: var(--cta);
}
/* Badge inside tab */
.tab-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--cta);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.tab-group-item.active .tab-item-badge { background: var(--p); }

/* ─── COMPONENT 12: TOGGLE / SWITCH ──────────────────
   Real <input type="checkbox"> with .f-toggle styled wrapper.
   HTML: <label><input type="checkbox" class="f-toggle-input"/><span class="f-toggle"></span></label>
   Keyboard-accessible; focus ring on the visible track.
   ----------------------------------------------------- */
.f-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.f-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.f-toggle {
  display: inline-block;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--border);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}
.f-toggle::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.f-toggle-input:checked + .f-toggle { background: var(--cta); }
.f-toggle-input:checked + .f-toggle::after { left: 21px; }
.f-toggle-input:checked + .f-toggle.f-toggle-green { background: var(--green); }
.f-toggle-input:disabled + .f-toggle { opacity: 0.5; cursor: not-allowed; }
.f-toggle-input:focus-visible + .f-toggle {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}
.f-toggle-label {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  user-select: none;
  line-height: 1.4;
}
.f-toggle-hint {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  color: var(--muted);
}

/* ─── COMPONENT 13: AVATAR ────────────────────────────
   .avatar base + .avatar-sm / .avatar-lg size modifiers.
   Colour: .avatar-brand (dark) / .avatar-soft (indigo).
   Trust element — verifier photo shown to customer (#31).
   ----------------------------------------------------- */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1;
  background: var(--cta);
  color: #fff;
  width: 36px;
  height: 36px;
  font-size: 13px;
  position: relative;   /* initials/icon sit centred underneath; the photo overlays */
  user-select: none;    /* decorative — not clickable, not selectable (§6) */
}
/* Photo overlays the initials. No <img>, a 404/blocked load (onerror removes it),
   or a not-yet-loaded image all leave the centred initials/icon showing through. */
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.avatar-sm { width: 24px; height: 24px; font-size: 9px; }
.avatar.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar.avatar-brand { background: var(--dark, #0F172A); color: #fff; }
.avatar.avatar-soft  { background: var(--soft); color: var(--p); }

/* ─── COMPONENT 14: EMPTY STATE ──────────────────────
   icon slot + text slot + optional .empty-state-action.
   Every list/table in Slices 1–5 uses this.
   ----------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 32px 20px;
  text-align: center;
  gap: 10px;
}
.empty-state-icon {
  font-size: 36px;
  color: var(--muted);
  opacity: 0.25;
  line-height: 1;
}
.empty-state-text {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 280px;
}
.empty-state-action { margin-top: 4px; }

/* ─── COMPONENT 15: INTERNAL NOTE ────────────────────
   Admin-only label. Named class — not inline style.
   "Not visible to customer" on any admin-only field.
   ----------------------------------------------------- */
.internal-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 5px;
  padding: 2px 8px;
  white-space: nowrap;
}
.internal-note i { font-size: 11px; }

/* ─── RESPONSIVE SCAFFOLDING ──────────────────────────
   Breakpoints: phone ≤480 / tablet 768 / desktop ≥1024.
   Hamburger (.f-hamburger) in topbar: hidden ≥1024, shown below.
   Sidebar: becomes a fixed off-canvas drawer at <1024px.
   Backdrop (.f-drawer-backdrop): shown when .drawer-open.
   Focus management handled by foundation.js (fOpenDrawer).
   ----------------------------------------------------- */

/* Hamburger button — hidden at desktop */
.f-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94A3B8;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.f-hamburger:hover { background: rgba(255,255,255,0.08); color: #fff; }
.f-hamburger:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }
.f-hamburger i { font-size: 20px; pointer-events: none; }

/* Backdrop */
.f-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 299;
  cursor: pointer;
}

@media (max-width: 1023px) {
  /* Show hamburger */
  .f-hamburger { display: flex; }

  /* Sidebar off-canvas */
  .portal > .body > .sidebar {
    position: fixed;
    top: 0;
    left: -220px;
    height: 100%;
    width: 220px;
    z-index: 300;
    transition: left 0.25s ease;
    overflow-y: auto;
  }

  /* Drawer open */
  .portal.drawer-open > .body > .sidebar {
    left: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }
  .portal.drawer-open .f-drawer-backdrop { display: block; }

  /* Content fills full width when sidebar is off-canvas */
  .portal > .body {
    overflow: hidden;
  }
}

/* Tap targets on touch (applied to any interactive el needing the minimum) */
@media (max-width: 1023px) {
  .tap-target {
    min-height: 44px;
    min-width: 44px;
  }
}
