/**
 * design.css — the single source of truth for pharmacy UI.
 *
 * Phase 1 of the 2026-07-08 UI rescue (see DESIGN-AUDIT.md at repo root).
 * Every pharmacy page — customer, staff, admin — imports this file as
 * its FIRST stylesheet. Pages MAY add page-local rules on top, but
 * MUST NOT redefine the tokens declared here in :root.
 *
 * Import:
 *   <link rel="stylesheet" href="/v2/pharmacy/shared/design.css">
 *
 * The design brief (owner directive 2026-07-08):
 *   - RTL-first (dir="rtl" on every pharmacy page).
 *   - One font: IBM Plex Sans Arabic → Tajawal → system fallback.
 *     Preloaded with font-display: swap so cart.html never flashes to
 *     Times New Roman on slow connections (fm55402 root cause).
 *   - Zero emoji as UI icons. Icons come from /v2/pharmacy/shared/icons.svg
 *     referenced via <svg class="icon"><use href="…#icon-<name>"></use></svg>.
 *   - Every colour lives in a token. Zero hex codes in page files after
 *     the Phase 3 migration finishes.
 *   - Every component is BEM-named at its top level (e.g. `.btn`,
 *     `.badge`, `.timeline__step--current`). Modifiers are additive so
 *     `.btn.btn--primary` and `.btn.btn--danger` compose cleanly.
 *   - Base components: btn, card, badge, timeline, field-row,
 *     empty-state, skeleton, alert, modal, form-input, form-select.
 *
 * Migration note:
 *   Old pages ship a legacy `.btn` / `.card` / `.alert` / `.timeline`
 *   in `shared/styles.css` and `customer.css`. When a page migrates in
 *   Phase 3, its `<link href="shared/styles.css">` is REMOVED so this
 *   file wins. Until then, unmigrated pages keep their look untouched.
 * ══════════════════════════════════════════════════════════════════ */

/* ══ Font loading ═════════════════════════════════════════════════ */
/* Phase 1 rescue 2026-07-08: pharmacy pages historically declared
   Tajawal (staff shell), Cairo (track-order — never loaded!), Inter
   (numeric runs), and IBM Plex Sans Arabic (rescue Phase 1 previous
   commit). Consolidated to Tajawal for Arabic body/UI + Inter for
   LTR numeric runs. The `display=swap` query prevents cart.html
   from flashing 'Times New Roman' on slow connections (fm55402 bug). */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&family=Inter:wght@500;700&display=swap');

:root {
  /* ─── Brand + neutrals ─────────────────────────────────────────── */
  /* Phase 1 rescue: navy #0d2647 wins over the drifted #1e2c5a
     (account.html :root claimed #1e2c5a, but every card uses #0d2647).
     Gold #b8935a wins over #c19a4f. #1e2c5a + #c19a4f are anti-
     regression greppable in Phase 6. */
  --color-primary:            #0d2647;   /* navy — Makkah Medical brand */
  --color-primary-dark:       #0a1a34;   /* navy-deep */
  --color-primary-soft:       #e6ecf5;   /* navy tint for hover / soft bg */
  --color-primary-line:       #c7d2e2;   /* navy line */
  --color-brand:              var(--color-primary);   /* alias */
  --color-brand-deep:         var(--color-primary-dark);
  --color-gold:               #b8935a;   /* accent — dividers, highlight */
  --color-gold-soft:          rgba(184,147,90,.14);
  --color-gold-line:          rgba(184,147,90,.35);

  --color-bg:                 #f8fafc;   /* app background */
  --color-surface:            #ffffff;   /* cards */
  --color-surface-elevated:   #ffffff;   /* modals / floating */
  --color-surface-muted:      #f1f5f9;   /* inactive rows / skeleton base */
  --color-border:             #e2e8f0;   /* hairline dividers */
  --color-border-strong:      #cbd5e1;   /* input borders */

  --color-text:               #0f172a;   /* headings + body */
  --color-text-muted:         #64748b;   /* meta, labels */
  --color-text-inverse:       #ffffff;   /* on primary bg */

  /* ─── Semantic ─────────────────────────────────────────────────── */
  --color-success:            #059669;
  --color-success-soft:       #d1fae5;
  --color-success-line:       #a7f3d0;

  --color-warning:            #d97706;
  --color-warning-soft:       #fef3c7;
  --color-warning-line:       #fde68a;

  --color-danger:             #dc2626;
  --color-danger-soft:        #fee2e2;
  --color-danger-line:        #fecaca;

  --color-info:               #2563eb;
  --color-info-soft:          #dbeafe;
  --color-info-line:          #bfdbfe;

  /* ─── Radii ───────────────────────────────────────────────────── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* ─── Shadows ─────────────────────────────────────────────────── */
  --shadow-card:   0 1px 2px rgba(15,23,42,.04), 0 4px 12px -6px rgba(15,23,42,.10);
  --shadow-elev:   0 6px 20px -8px rgba(15,23,42,.15);
  --shadow-modal:  0 30px 60px -20px rgba(15,23,42,.35);
  --shadow-focus:  0 0 0 3px rgba(15,118,110,.20);

  /* ─── Spacing (4px scale) ─────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* ─── Type ────────────────────────────────────────────────────── */
  --font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-family-num: 'Inter', 'Tajawal', system-ui, sans-serif;
  --font-mono:   ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', monospace;
  --font-size-xs:   12px;
  --font-size-sm:   14px;
  --font-size-base: 15px;
  --font-size-md:   16px;
  --font-size-lg:   18px;
  --font-size-xl:   22px;
  --font-size-2xl:  28px;
  --line-height:    1.55;

  /* ─── Motion ──────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-med:  220ms;
  --easing:        cubic-bezier(.2,.9,.3,1);

  /* ─── Layout ──────────────────────────────────────────────────── */
  --touch-target: 44px;   /* mobile min */
  --header-h:     64px;
  --z-modal:      1000;
  --z-toast:      1200;
}

/* ══ Body baseline ═════════════════════════════════════════════════ */
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
img, svg { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}
::selection { background: var(--color-primary-soft); }
button, input, select, textarea { font-family: inherit; }

/* ══════════════════════════════════════════════════════════════════
   ICON
   Consume the sprite via <use href="/v2/pharmacy/shared/icons.svg#icon-<name>">.
   The class here is only the sizing + fill contract.
   ══════════════════════════════════════════════════════════════════ */
.icon {
  display: inline-block;
  width:  20px;
  height: 20px;
  fill:   none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap:  round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 32px; height: 32px; }
/* When the icon is decorative next to text, adjust its baseline. */
.icon--inline { margin-inline: 2px; }

/* ══════════════════════════════════════════════════════════════════
   BUTTON  — .btn + .btn--<variant> + [disabled]
   Variants: primary, secondary, ghost, danger.
   Sizes:    default, --sm, --lg.
   ══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-family: inherit;
  font-size: var(--font-size-md);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background var(--duration-fast) var(--easing),
              border-color var(--duration-fast) var(--easing),
              color var(--duration-fast) var(--easing),
              transform var(--duration-fast) var(--easing);
  user-select: none;
  white-space: nowrap;
}
.btn:hover:not([disabled]):not(.is-disabled)  { background: var(--color-primary-dark); }
.btn:active:not([disabled]):not(.is-disabled) { transform: translateY(1px); }

.btn--primary  { /* default; here for explicitness in markup */ }
.btn--secondary {
  background: var(--color-surface);
  color:      var(--color-text);
  border-color: var(--color-border-strong);
}
.btn--secondary:hover:not([disabled]) {
  background: var(--color-surface-muted);
  border-color: var(--color-text-muted);
}
.btn--ghost {
  background: transparent;
  color:      var(--color-primary);
  border-color: transparent;
}
.btn--ghost:hover:not([disabled]) {
  background: var(--color-primary-soft);
}
.btn--danger {
  background: var(--color-danger);
  color:      var(--color-text-inverse);
}
.btn--danger:hover:not([disabled]) { background: #b91c1c; /* danger-700 */ }

.btn--sm { min-height: 36px; padding: var(--space-2) var(--space-3); font-size: var(--font-size-sm); }
.btn--lg { min-height: 52px; padding: var(--space-4) var(--space-6); font-size: var(--font-size-lg); }
.btn--block { width: 100%; }

.btn[disabled], .btn.is-disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════
   CARD  — .card + .card__header + .card__body + .card__footer
   ══════════════════════════════════════════════════════════════════ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card--flush { border-radius: 0; border-inline: 0; }
.card__header,
.card__footer {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.card__footer {
  border-top: 1px solid var(--color-border);
  border-bottom: 0;
  background: var(--color-surface-muted);
}
.card__title {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
}
.card__meta { color: var(--color-text-muted); font-size: var(--font-size-sm); }
.card__body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }

/* ══════════════════════════════════════════════════════════════════
   BADGE  — .badge + .badge--<status>
   Statuses expected by the app: pending, ready, awaiting-payment, paid,
   picking, delivered, cancelled. Neutral (default) covers any other.
   ══════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 700;
  line-height: 1.5;
  background: var(--color-surface-muted);
  color:      var(--color-text);
  border: 1px solid var(--color-border);
  white-space: nowrap;
}
.badge--pending          { background: var(--color-info-soft);    color: #1e40af; border-color: var(--color-info-line); }
.badge--ready            { background: var(--color-warning-soft); color: #92400e; border-color: var(--color-warning-line); }
.badge--awaiting-payment { background: var(--color-info-soft);    color: #1e3a8a; border-color: var(--color-info-line); }
.badge--paid             { background: var(--color-success-soft); color: #065f46; border-color: var(--color-success-line); }
.badge--picking          { background: #f3e8ff;                    color: #6b21a8; border-color: #ddd6fe; }
.badge--delivered        { background: var(--color-success-soft); color: #064e3b; border-color: var(--color-success-line); }
.badge--cancelled        { background: var(--color-danger-soft);  color: #7f1d1d; border-color: var(--color-danger-line); }

/* ══════════════════════════════════════════════════════════════════
   TIMELINE  — .timeline + .timeline__step + .timeline__step--<state>
   RTL-first vertical list. Owner rule: a step SHOWS a check only when
   it really happened. Modifiers: --done, --current, --upcoming.
   ══════════════════════════════════════════════════════════════════ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  list-style: none;
  margin: 0;
}
.timeline__step {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: start;
  gap: var(--space-3);
  padding-block: var(--space-2);
  position: relative;
  color: var(--color-text-muted);
}
/* Vertical connector — RTL respects the dot column at start position. */
.timeline__step:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 32px;
  bottom: -var(--space-2);
  inset-inline-start: 15px;
  width: 2px;
  background: var(--color-border);
}
.timeline__dot {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-weight: 700;
}
.timeline__label { font-weight: 600; color: inherit; padding-top: 4px; }
.timeline__meta  { font-size: var(--font-size-xs); color: var(--color-text-muted); }

.timeline__step--done {
  color: var(--color-text);
}
.timeline__step--done .timeline__dot {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-text-inverse);
}
.timeline__step--done:not(:last-child)::before { background: var(--color-success); }

.timeline__step--current {
  color: var(--color-text);
}
.timeline__step--current .timeline__dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 0 0 4px var(--color-primary-soft);
}
.timeline__step--current .timeline__label { color: var(--color-primary-dark); }

.timeline__step--upcoming {
  /* leave defaults — dot stays empty, label muted */
}

/* ══════════════════════════════════════════════════════════════════
   FIELD ROW  — .field-row + .field-row__label + .field-row__value
   Owner rule: if the value is empty, hide the row entirely via
   .field-row[hidden]. NEVER render "—".
   ══════════════════════════════════════════════════════════════════ */
.field-row {
  display: grid;
  grid-template-columns: minmax(auto, 140px) 1fr;
  gap: var(--space-3);
  align-items: baseline;
  padding-block: var(--space-2);
  border-bottom: 1px dashed var(--color-border);
}
.field-row:last-child { border-bottom: 0; }
.field-row[hidden]    { display: none !important; }
.field-row__label {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
}
.field-row__value {
  color: var(--color-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}
/* Numeric / LTR values (SKU, phone, email, currency) render LTR
   even in an RTL document. */
.field-row__value--ltr { direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }

/* ══════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-5);
  text-align: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  background: var(--color-surface-muted);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
}
.empty-state__title { color: var(--color-text); font-weight: 700; font-size: var(--font-size-lg); }
.empty-state__body  { max-width: 420px; }
.empty-state .icon  { width: 40px; height: 40px; color: var(--color-text-muted); }

/* ══════════════════════════════════════════════════════════════════
   SKELETON  — .skeleton, sized by inline width/height on the element.
   Prefer over spinners: matches the shape of the content it replaces.
   ══════════════════════════════════════════════════════════════════ */
@keyframes skeleton-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.skeleton {
  background: linear-gradient(90deg,
    var(--color-surface-muted) 0%,
    #e2e8f0 40%,
    var(--color-surface-muted) 80%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s linear infinite;
  border-radius: var(--radius-sm);
  color: transparent;
  user-select: none;
}
.skeleton--line   { height: 14px; margin-block: var(--space-1); }
.skeleton--title  { height: 22px; width: 60%; margin-bottom: var(--space-3); }
.skeleton--block  { height: 120px; }
.skeleton--circle { border-radius: var(--radius-pill); }

/* ══════════════════════════════════════════════════════════════════
   ALERT  — .alert + .alert--<tone>
   Tones: info, success, warning, error.
   ══════════════════════════════════════════════════════════════════ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-text);
}
.alert__icon  { flex-shrink: 0; }
.alert__title { font-weight: 700; margin-bottom: var(--space-1); }
.alert__body  { font-size: var(--font-size-sm); }
.alert--info    { background: var(--color-info-soft);    border-color: var(--color-info-line);    color: #1e3a8a; }
.alert--success { background: var(--color-success-soft); border-color: var(--color-success-line); color: #065f46; }
.alert--warning { background: var(--color-warning-soft); border-color: var(--color-warning-line); color: #92400e; }
.alert--error   { background: var(--color-danger-soft);  border-color: var(--color-danger-line);  color: #7f1d1d; }

/* ══════════════════════════════════════════════════════════════════
   MODAL  — .modal + .modal__overlay + .modal__dialog + .modal__header
             + .modal__body + .modal__footer
   Open by setting hidden=false on .modal (or removing it). Keep the
   underlying body scroll-locked via a JS side-effect (not this CSS).
   ══════════════════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(15,23,42,.55);
  overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal__dialog {
  background: var(--color-surface-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  max-width: 720px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal__header,
.modal__footer {
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.modal__header  { border-bottom: 1px solid var(--color-border); }
.modal__footer  { border-top:    1px solid var(--color-border); background: var(--color-surface-muted); justify-content: flex-end; }
.modal__title   { margin: 0; font-size: var(--font-size-lg); font-weight: 700; }
.modal__body    { padding: var(--space-5); overflow-y: auto; flex: 1 1 auto; }
.modal__close   {
  margin-inline-start: auto;
  background: transparent;
  border: 0;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
}
.modal__close:hover { background: var(--color-surface-muted); color: var(--color-text); }

/* ══════════════════════════════════════════════════════════════════
   FORMS  — .form-input + .form-select + .form-textarea + .form-label
   ══════════════════════════════════════════════════════════════════ */
.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-md);
  line-height: 1.4;
  transition: border-color var(--duration-fast) var(--easing),
              box-shadow var(--duration-fast) var(--easing);
}
.form-textarea { min-height: 96px; resize: vertical; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}
.form-input[aria-invalid="true"],
.form-select[aria-invalid="true"] {
  border-color: var(--color-danger);
}
.form-input[disabled],
.form-select[disabled] {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  cursor: not-allowed;
}
.form-help {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.form-help--error { color: var(--color-danger); }

/* ══════════════════════════════════════════════════════════════════
   CHAT BUBBLE — .chat-bubble + .chat-bubble--<direction/role>
   Order card messages. Directions: inbound (staff → customer),
   outbound (customer → staff). Role tint variants distinguish the
   4 staff surfaces (pharmacist / warehouse / driver / dispatcher).
   ══════════════════════════════════════════════════════════════════ */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.chat-bubble {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  box-shadow: var(--shadow-card);
}
.chat-bubble__meta {
  display: flex;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
  font-weight: 600;
}
.chat-bubble__body { color: inherit; overflow-wrap: anywhere; }
.chat-bubble--inbound {
  align-self: flex-start;
  border-inline-start: 3px solid var(--color-primary);
  background: var(--color-primary-soft);
}
.chat-bubble--outbound {
  align-self: flex-end;
  background: var(--color-success-soft);
  border-inline-end: 3px solid var(--color-success);
}
.chat-bubble--pharmacist  { border-inline-start-color: var(--color-primary); }
.chat-bubble--warehouse   { border-inline-start-color: #6b21a8; background: #f3e8ff; }
.chat-bubble--driver      { border-inline-start-color: #d97706; background: var(--color-warning-soft); }
.chat-bubble--dispatcher  { border-inline-start-color: var(--color-info); background: var(--color-info-soft); }

/* ══════════════════════════════════════════════════════════════════
   QUOTE BANNERS — moved from inline template strings on account.html.
   Three variants match the quote-lifecycle states + a fourth for the
   pharmacist-side "waiting for AI" strip.
   ══════════════════════════════════════════════════════════════════ */
.quote-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1.5px solid var(--color-border);
  margin-bottom: -6px;
  box-shadow: var(--shadow-card);
}
.quote-banner__icon {
  width: 36px; height: 36px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-inverse); font-weight: 900;
  flex-shrink: 0;
}
.quote-banner__body { flex: 1; min-width: 0; }
.quote-banner__title { display: block; font-weight: 900; font-size: var(--font-size-md); margin-bottom: 2px; }
.quote-banner__meta  { display: block; font-size: var(--font-size-sm); line-height: 1.55; }
.quote-banner__cta {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-weight: 900;
  font-size: var(--font-size-sm);
  white-space: nowrap;
  text-decoration: none;
  color: var(--color-text-inverse);
}
.quote-banner--ready {
  background: linear-gradient(135deg, #fef3c7, #fef9c3);
  border-color: var(--color-warning);
  color: #78350f;
}
.quote-banner--ready .quote-banner__title { color: #78350f; }
.quote-banner--ready .quote-banner__meta  { color: #92400e; }
.quote-banner--ready .quote-banner__icon  { background: linear-gradient(135deg, #f59e0b, var(--color-warning)); }
.quote-banner--ready .quote-banner__cta   { background: linear-gradient(135deg, var(--color-success), #047857); }

.quote-banner--pending {
  background: linear-gradient(135deg, var(--color-info-soft), #e0f2fe);
  border-color: #0369a1;
  color: #0c4a6e;
}
.quote-banner--pending .quote-banner__title { color: #0c4a6e; }
.quote-banner--pending .quote-banner__meta  { color: #075985; }
.quote-banner--pending .quote-banner__icon  { background: #0369a1; }

.quote-banner--accepted {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: var(--color-success);
  color: #065f46;
}
.quote-banner--accepted .quote-banner__title { color: #065f46; }
.quote-banner--accepted .quote-banner__meta  { color: #047857; }
.quote-banner--accepted .quote-banner__icon  { background: var(--color-success); }
.quote-banner--accepted .quote-banner__cta   { background: #065f46; }

.quote-banner__explainer {
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--color-info-soft), #e0f2fe);
  border: 1px solid #93c5fd;
  border-radius: var(--radius-md);
  color: #0c4a6e;
  line-height: 1.75;
}
.quote-banner__explainer strong { font-weight: 900; }

/* ══════════════════════════════════════════════════════════════════
   UTILITIES  — a small, opinionated set. Not a utility framework.
   ══════════════════════════════════════════════════════════════════ */
.stack   { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-1 { display: flex; flex-direction: column; gap: var(--space-1); }
.stack-4 { display: flex; flex-direction: column; gap: var(--space-4); }
.row     { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.text-muted { color: var(--color-text-muted); }
.text-ltr   { direction: ltr; text-align: end; unicode-bidi: isolate; }
.hidden     { display: none !important; }
.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;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE  — mobile is the reference (375px). This block only
   tightens spacing on the two components where 375px real-world
   testing showed overflow (timeline label, modal dialog).
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  :root { --font-size-base: 15px; }
  .card__body { padding: var(--space-4); }
  .card__header, .card__footer { padding: var(--space-3) var(--space-4); }
  .modal { padding: var(--space-2); }
  .modal__dialog { max-height: 100vh; border-radius: var(--radius-md); }
  .field-row { grid-template-columns: 1fr; gap: var(--space-1); }
  .field-row__label { font-size: var(--font-size-xs); }
  .btn { min-height: var(--touch-target); padding-inline: var(--space-4); }
}
