/* ============================================================================
   My Loaf House component layer (provisional brand 0.1.0, 2026-10-29)
   Adapted from the Whatevy house layer (My Loaf canonical house.css v1, 2026-07-01):
   the same interaction craft (tight type family, generous padding, soft layered depth,
   translate-based hovers, gentle focus ring, disciplined motion) on the My Loaf crust
   palette. Depends only on the variables defined in tokens.css (accent aliases --accent,
   --accent-strong, --accent-text, --accent-soft-bg, --accent-soft-hover). Self-contained
   otherwise. House rules honored: no em-dashes, no arrow glyphs. Bilingual/RTL safe
   (logical properties). Respects prefers-reduced-motion.
   ============================================================================ */

:root {
  /* Extra tokens the component layer needs (namespaced, no clash with tokens.css). */
  --ring: 0 0 0 3px rgba(139, 74, 31, 0.22);      /* crust focus glow, gentle */
  --ring-danger: 0 0 0 3px rgba(214, 69, 69, 0.20);
  --lift: translateY(-1px);
  --dur-ui: 160ms;
  /* Consumer-app surface system (Facebook / Instagram / WhatsApp feel): crisp neutral canvas,
     clean white cards, flatter layered shadows, light-filled inputs. Crust stays the accent. */
  --app-bg: #FFFFFF;          /* app canvas: clean white (no cream) */
  --card-border: #E7E9EE;     /* hairline that reads on white */
  --field-bg: #F3F5F8;        /* filled input, subtle contrast on white cards */
  --field-border: #E4E7EC;
  --field-bg-disabled: #ECEFF3;
  --success-text: #1C7A44;  /* AA on white and on --success-50 */
  --warning-text: #7A5310;  /* AA on --warning-50 */
  --danger-text: #B23636;   /* AA on white and on --danger-50 */
  --danger-strong: #BF3A3A; /* danger fill hover */
  --accent-soft-hover-fallback: #F0DFC9;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.05);
  --shadow-pop: 0 8px 28px rgba(16, 24, 40, 0.14);
  --shadow-xl: 0 20px 48px rgba(16, 24, 40, 0.18); /* modals / sheets */
}

/* ---- App canvas + typographic crispness (consumer-app feel) ---- */
html, body { background: var(--app-bg); }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: var(--ink); }
#boot-splash { background: var(--app-bg) !important; }
h1, h2, h3 { letter-spacing: -0.02em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }

/* ============================================================================
   BUTTONS  .btn  +  variants + sizes
   ============================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: var(--r-md); border: 1px solid transparent;
  font-family: inherit; font-size: var(--text-body); font-weight: 700;
  line-height: 1; letter-spacing: -0.01em; text-decoration: none;
  cursor: pointer; user-select: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-ui) var(--ease),
              background-color var(--dur-ui) var(--ease),
              border-color var(--dur-ui) var(--ease),
              box-shadow var(--dur-ui) var(--ease),
              color var(--dur-ui) var(--ease);
}
.btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; box-shadow: var(--ring); }
.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none;
}

.btn--primary { background: var(--accent-strong); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }
.btn--primary:hover:not(:disabled) { background: #5E3313; transform: var(--lift); box-shadow: 0 4px 12px rgba(107, 58, 22, 0.28); }
.btn--primary:active:not(:disabled) { transform: translateY(0); }

.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn--ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-text); transform: var(--lift); }

.btn--soft { background: var(--accent-soft-bg); color: var(--accent-text); }
.btn--soft:hover:not(:disabled) { background: var(--accent-soft-hover); transform: var(--lift); }

.btn--danger { background: var(--danger-500); color: #fff; }
.btn--danger:hover:not(:disabled) { background: var(--danger-strong); transform: var(--lift); }

.btn--link {
  min-height: 0; padding: 6px 4px; background: none; border: none;
  color: var(--accent-text); font-weight: 600; box-shadow: none;
}
.btn--link:hover:not(:disabled) { color: var(--ink); transform: none; text-decoration: underline; text-underline-offset: 3px; }

.btn--sm { min-height: 40px; padding: 0 14px; font-size: var(--text-sm); }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: var(--text-body-lg); }
.btn--icon { min-height: 44px; width: 44px; padding: 0; }
.btn--icon.btn--sm { min-height: 38px; width: 38px; }
.btn--block { display: flex; width: 100%; }

/* loading spinner inside a button */
.btn.is-loading { color: transparent !important; pointer-events: none; position: relative; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 999px;
  border: 2px solid currentColor; border-top-color: transparent; color: #fff;
  animation: house-spin 640ms linear infinite;
}
.btn--ghost.is-loading::after, .btn--link.is-loading::after, .btn--soft.is-loading::after { color: var(--accent-text); }
@keyframes house-spin { to { transform: rotate(360deg); } }

/* ============================================================================
   FORM FIELDS  .field / .lbl / .inp / .hint  + validation
   ============================================================================ */
.field { display: flex; flex-direction: column; gap: 7px; }
.lbl { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.lbl .req { color: var(--danger-500); font-weight: 700; margin-inline-start: 2px; }
.hint { font-size: var(--text-xs); color: var(--ink-2); line-height: 1.45; }

.inp, .sel, .ta {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font-family: inherit; font-size: var(--text-body); color: var(--ink);
  background: var(--field-bg); border: 1px solid var(--field-border); border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--dur-ui) var(--ease), box-shadow var(--dur-ui) var(--ease), background var(--dur-ui) var(--ease);
}
.ta { min-height: 110px; resize: vertical; line-height: 1.55; }
.sel { appearance: none; -webkit-appearance: none; padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235B514B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
[dir="rtl"] .sel { background-position: left 12px center; }
.inp::placeholder, .ta::placeholder { color: var(--ink-3); opacity: 1; }
.inp:hover, .sel:hover, .ta:hover { border-color: var(--ink-3); }
.inp:focus, .sel:focus, .ta:focus { background: var(--surface); border-color: var(--accent); box-shadow: var(--ring); }
.inp:disabled, .sel:disabled, .ta:disabled { background: var(--field-bg-disabled); color: var(--ink-3); cursor: not-allowed; }

.field.is-error .inp, .field.is-error .sel, .field.is-error .ta { border-color: var(--danger-500); }
.field.is-error .inp:focus, .field.is-error .sel:focus, .field.is-error .ta:focus { box-shadow: var(--ring-danger); }
.field .err { display: none; font-size: var(--text-xs); font-weight: 600; color: var(--danger-500); }
.field.is-error .err { display: block; }
.field.is-ok .inp { border-color: var(--success-500); }

/* input group: prefix/suffix + control on one row (e.g. link kind + value) */
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row > .sel { flex: 0 0 auto; width: auto; min-width: 132px; }
.input-row > .inp { flex: 1 1 auto; min-width: 0; }
/* On narrow screens a control + button must stack, never squeeze the field. */
@media (max-width: 520px) {
  .input-row { flex-direction: column; }
  .input-row > .sel, .input-row > .inp, .input-row > .btn { width: 100%; }
}

/* ============================================================================
   CARDS / PANELS
   ============================================================================ */
.card {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 20px;
}
.card--pad-lg { padding: 28px; }
@media (max-width: 379px) { .card--pad-lg { padding: 24px 16px; } }
.card--hover { transition: transform var(--dur-ui) var(--ease), box-shadow var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease); }
.card--hover:hover { transform: var(--lift); box-shadow: var(--shadow-pop); border-color: var(--field-border); }
.card__title { font-size: var(--text-h3); font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.card__sub { font-size: var(--text-sm); color: var(--ink-2); margin-top: 4px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* section heading block */
.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-title { font-size: var(--text-h2); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.sec-sub { font-size: var(--text-sm); color: var(--ink-2); margin-top: 4px; }
.eyebrow { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); }

/* ============================================================================
   BADGES / PILLS / STATUS
   ============================================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: var(--text-xs); font-weight: 700; line-height: 1.2;
  background: var(--cream-2); color: var(--ink-2); border: 1px solid transparent;
}
.badge--ok { background: var(--success-50); color: var(--success-text); }
.badge--warn { background: var(--warning-50); color: var(--warning-text); }
.badge--danger { background: var(--danger-50); color: var(--danger-text); }
.badge--info { background: var(--accent-soft-bg); color: var(--accent-text); }
.badge .dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }

/* ============================================================================
   KPI TILE
   ============================================================================ */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 18px 20px; }
.kpi__label { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.kpi__value { font-size: 2rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi__delta { font-size: var(--text-xs); font-weight: 600; margin-top: 4px; }
.kpi__delta.up { color: var(--success-text); } .kpi__delta.down { color: var(--danger-text); }

/* ============================================================================
   NAV ITEM (sidebar / tabs)
   ============================================================================ */
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r-md);
  font-size: var(--text-body); font-weight: 600; color: var(--ink-2);
  text-decoration: none; cursor: pointer; position: relative;
  transition: background var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease);
}
.nav-item svg { width: 20px; height: 20px; flex: 0 0 auto; opacity: 0.85; }
.nav-item:hover { background: var(--cream-2); color: var(--ink); }
.nav-item[aria-current="page"], .nav-item.is-active {
  background: var(--accent-soft-bg); color: var(--accent-text); font-weight: 700;
}
.nav-item[aria-current="page"] svg, .nav-item.is-active svg { opacity: 1; }
.nav-item[aria-current="page"]::before, .nav-item.is-active::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 999px; background: var(--accent);
}

/* ============================================================================
   TABLE
   ============================================================================ */
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.data-table thead th {
  position: sticky; top: 0; z-index: 1; text-align: start;
  background: var(--surface-2); color: var(--ink-2);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.data-table tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.data-table tbody tr { transition: background var(--dur-fast) var(--ease); }
.data-table tbody tr:hover { background: var(--cream-2); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ============================================================================
   EMPTY STATE
   ============================================================================ */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 44px 24px; }
.empty__icon { width: 56px; height: 56px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--accent-soft-bg); color: var(--accent-text); }
.empty__icon svg { width: 28px; height: 28px; }
.empty__title { font-size: var(--text-body-lg); font-weight: 700; color: var(--ink); }
.empty__sub { font-size: var(--text-sm); color: var(--ink-2); max-width: 42ch; }

/* ============================================================================
   LOADING (skeleton + spinner)
   ============================================================================ */
.skel { position: relative; overflow: hidden; background: var(--cream-2); border-radius: var(--r-md); }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent); animation: house-shimmer 1.3s infinite; }
[dir="rtl"] .skel::after { animation-name: house-shimmer-rtl; }
@keyframes house-shimmer { 100% { transform: translateX(100%); } }
@keyframes house-shimmer-rtl { 100% { transform: translateX(-200%); } }
.skel-line { height: 12px; border-radius: 6px; }
.spinner { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--line); border-top-color: var(--accent); animation: house-spin 640ms linear infinite; }

/* ============================================================================
   BOTTOM SHEET / DIALOG   .sheet (native <dialog>)
   Bottom sheet on mobile, centered modal on >=560px. Backdrop blur.
   ============================================================================ */
.sheet {
  border: none; padding: 0; background: var(--surface); color: var(--ink);
  width: 100%; max-width: 560px; max-height: 92svh;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-xl); overflow: hidden;
  position: fixed; inset: auto 0 0 0; margin: 0 auto;
  /* Slides up on open and animates back down on close (native dialog + @starting-style +
     allow-discrete). No-preference browsers get the full motion; older ones show/hide instantly. */
  transform: translateY(100%); opacity: 0;
  transition: transform 340ms cubic-bezier(0.32, 0.72, 0, 1),
              opacity 240ms ease,
              overlay 340ms allow-discrete,
              display 340ms allow-discrete;
}
.sheet[open] { transform: translateY(0); opacity: 1; }
@starting-style { .sheet[open] { transform: translateY(100%); opacity: 0; } }
.sheet::backdrop {
  background: rgba(43, 33, 24, 0.45);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 300ms ease, overlay 300ms allow-discrete, display 300ms allow-discrete;
}
.sheet[open]::backdrop { opacity: 1; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }
.sheet__inner { padding: 24px; max-height: 92svh; overflow-y: auto; outline: none; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sheet__title { font-size: var(--text-h3); font-weight: 700; letter-spacing: -0.01em; }
.sheet__eyebrow { display: inline-block; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft-bg); padding: 4px 10px; border-radius: var(--r-pill); margin-bottom: 8px; }
.sheet__pill { display: inline-block; margin: 0 0 12px; font-size: 0.76rem; font-weight: 600; color: var(--accent-text); background: var(--accent-soft-bg); padding: 4px 11px; border-radius: var(--r-pill); }

/* ---- Option cards (.opt): mobile-app style choice list, pops in on open ---- */
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; column-gap: 12px;
  width: 100%; text-align: start; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--r-lg); cursor: pointer;
  transition: background var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease), transform var(--dur-ui) var(--ease), box-shadow var(--dur-ui) var(--ease);
  opacity: 0; transform: translateY(10px); animation: opt-in 340ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
.opt:hover { background: var(--cream-2); border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.opt:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.opt__ic { grid-column: 1; grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft-bg); color: var(--accent-text); }
.opt--accent .opt__ic { background: var(--accent-strong); color: #fff; }
.opt__tt { grid-column: 2; grid-row: 1; font-weight: 700; font-size: 0.98rem; line-height: 1.2; }
.opt__sb { grid-column: 2; grid-row: 2; font-size: 0.82rem; color: var(--ink-2); margin-top: 2px; }
.opt__ar { grid-column: 3; grid-row: 1 / span 2; color: var(--accent-text); font-weight: 900; font-size: 1.15rem; }
@keyframes opt-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .opt { animation: none; opacity: 1; transform: none; } }
.sheet__close { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--card-border); background: var(--surface-2); color: var(--ink-3); display: grid; place-items: center; cursor: pointer; transition: background var(--dur-ui), color var(--dur-ui), border-color var(--dur-ui); }
.sheet__close svg { width: 17px; height: 17px; }
.sheet__close:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (min-width: 560px) {
  /* Still a bottom sheet on desktop (rises from the bottom, whatevy style); just a touch wider. */
  .sheet { max-width: 560px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet[open], .sheet::backdrop, .sheet[open]::backdrop { transition: none; }
}

/* ============================================================================
   TOAST
   ============================================================================ */
.toast-wrap { position: fixed; inset-block-end: 20px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 90; pointer-events: none; padding-inline: 16px; }
.toast { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; max-width: 460px; padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-size: var(--text-sm); font-weight: 600; animation: toast-in 220ms var(--ease); }
.toast--ok { background: var(--success-text); } .toast--danger { background: var(--danger-text); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================================
   PHONE / COUNTRY PICKER  (theme intl-tel-input to house standard)
   Keeps the library's searchable country list; restyles it to match .inp.
   ============================================================================ */
.iti { width: 100%; }
.iti input, .iti input[type="tel"], .iti input[type="text"] {
  width: 100%; min-height: 48px; padding: 12px 14px; font-family: inherit; font-size: var(--text-body);
  color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-border); border-radius: var(--r-md);
  transition: border-color var(--dur-ui) var(--ease), box-shadow var(--dur-ui) var(--ease), background var(--dur-ui) var(--ease);
}
.iti input:focus { background: var(--surface); border-color: var(--accent); box-shadow: var(--ring); outline: none; }
.iti__selected-flag { border-start-start-radius: var(--r-md); border-end-start-radius: var(--r-md); }
.iti__selected-flag:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.iti__country-list { border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px; background: var(--surface); }
.iti__country { border-radius: var(--r-sm); padding: 9px 10px; }
.iti__country.iti__highlight { background: var(--cream-2); }
.iti__search-input { min-height: 42px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; margin: 2px; width: calc(100% - 4px); }
.iti__search-input:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; }

/* ============================================================================
   UTILITIES
   ============================================================================ */
.stack { display: flex; flex-direction: column; }
.stack-2 { gap: 8px; } .stack-3 { gap: 12px; } .stack-4 { gap: 16px; } .stack-6 { gap: 24px; }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid-auto { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.muted { color: var(--ink-2); }
.hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ============================================================================
   SEARCHABLE COMBOBOX (country picker etc.)  .combo
   ============================================================================ */
.combo { position: relative; }
.combo__btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: start; cursor: pointer; }
.combo__val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo__val.is-placeholder { color: var(--ink-3); }
.combo__chev { width: 18px; height: 18px; flex: 0 0 auto; color: var(--ink-3); }
.combo__btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: var(--ring); background: var(--surface); }
.combo__pop { position: absolute; z-index: 60; top: calc(100% + 6px); inset-inline: 0; background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--r-md); box-shadow: var(--shadow-pop); overflow: hidden; }
.combo__search-wrap { position: relative; padding: 8px; border-bottom: 1px solid var(--card-border); }
.combo__search-ic { position: absolute; inset-inline-start: 18px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.combo__search { width: 100%; min-height: 40px; padding: 8px 12px 8px 36px; font: inherit; color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-border); border-radius: var(--r-sm); outline: none; }
[dir="rtl"] .combo__search { padding: 8px 36px 8px 12px; }
.combo__search:focus { background: var(--surface); border-color: var(--accent); box-shadow: var(--ring); }
.combo__list { list-style: none; margin: 0; padding: 6px; max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.combo__opt { padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--text-body); color: var(--ink); }
.combo__opt:hover, .combo__opt.is-active { background: var(--cream-2); }
.combo__opt.is-sel { background: var(--accent-soft-bg); color: var(--accent-text); font-weight: 700; }
.combo__empty { padding: 12px; color: var(--ink-3); font-size: var(--text-sm); text-align: center; }

/* ============================================================================
   NUMBERED STEPS (setup guides, e.g. custom-domain DNS)  .steps / .step
   ============================================================================ */
.steps { display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.step__num { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: var(--accent-soft-bg); color: var(--accent-text); font-weight: 800; font-size: var(--text-sm); line-height: 1; }
.step__title { font-weight: 700; color: var(--ink); font-size: var(--text-body); }
.step__sub { font-size: var(--text-sm); color: var(--ink-2); margin-top: 3px; }

/* copyable DNS/record row: label + monospace value + copy button */
.rec { border: 1px solid var(--card-border); border-radius: var(--r-md); background: var(--surface-2); padding: 12px 14px; display: grid; gap: 8px; }
.rec__label { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.rec__row { display: flex; align-items: center; gap: 8px; }
.rec__k { font-size: var(--text-xs); font-weight: 700; color: var(--ink-3); flex: 0 0 auto; min-width: 54px; }
.rec__v { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--text-sm); color: var(--ink); word-break: break-all; flex: 1 1 auto; }
.rec__copy { flex: 0 0 auto; }
.rec__copy .ok { color: var(--success-text); }

/* inline status message (form feedback, live regions) */
.msg { font-size: var(--text-sm); color: var(--ink-2); }
.msg--err { color: var(--danger-500); font-weight: 600; }
.msg--ok { color: var(--success-text); font-weight: 600; }
.msg--info { color: var(--accent-text); font-weight: 600; }
.link { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--ink); }


/* ---- App switcher (cross-surface launcher) ---- */
.appsw { position: relative; display: inline-flex; }
.appsw__btn { display: inline-flex; align-items: center; gap: 7px; }
.appsw__pop {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60;
  min-width: 232px; padding: 8px; display: grid; gap: 2px;
  background: var(--surface, #fff); border: 1px solid var(--line, #e6e2da);
  border-radius: 16px; box-shadow: 0 16px 40px rgba(43, 33, 24, 0.16);
}
.appsw__item {
  display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 11px;
  color: var(--ink, #2B2118); text-decoration: none; font-weight: 600; font-size: 14px; line-height: 1.2;
}
.appsw__item:hover { background: rgba(139, 74, 31, 0.07); }
.appsw__item.is-current { background: rgba(139, 74, 31, 0.10); cursor: default; }
.appsw__ico {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(139, 74, 31, 0.10); color: var(--accent-strong, #5E3313);
}
.appsw__item.is-current .appsw__ico { background: var(--accent-strong, #5E3313); color: #fff; }
.appsw__name { flex: 1 1 auto; }
.appsw__here { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-strong, #5E3313); }
@media (max-width: 560px) { .appsw__lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }


/* ---- Live per-country phone digit hint (under intl-tel-input fields) ---- */
.phone-hint { margin-top: 6px; font-size: 0.78rem; color: var(--ink-2); font-weight: 500; letter-spacing: 0.01em; }
.phone-hint.is-error { color: var(--danger-500); font-weight: 600; }


/* ---- Floating support widget ---- */
.support-fab { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 80; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: none; cursor: pointer; background: var(--accent-strong, #5E3313); color: #fff; font-family: inherit; font-weight: 700; font-size: 14px; box-shadow: 0 8px 24px rgba(107, 58, 22, 0.35); transition: transform 180ms ease, box-shadow 180ms ease; }
.support-fab:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(107, 58, 22, 0.42); }
@media (max-width: 560px) { .support-fab { padding: 13px; } .support-fab__lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.hs-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--ink-3); font-size: 12px; }
.hs-or::before, .hs-or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
.hs-tick { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-strong, #5E3313); color: #fff; }

.hs-count { margin-top: 6px; font-size: 0.72rem; color: var(--ink-3); text-align: end; }
.hs-count.is-low { color: var(--danger-500); }
.hs-ts { display: flex; }

/* Custom dropdown (House.enhanceSelect): native <select> popups mis-position inside the portal
   iframe and misbehave in PWAs/desktop-mode on mobile. The <select> (.csel-native) stays the value
   store; this facade is the interaction layer. */
.csel { position: relative; }
.csel-native { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; margin: 0; }
.csel-btn { width: 100%; display: flex; align-items: center; justify-content: flex-start; text-align: start; font: inherit; color: var(--ink); }
.csel-btn .csel-lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csel-list { position: absolute; inset-inline-start: 0; inset-inline-end: 0; top: calc(100% + 6px); z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 38px rgba(16, 24, 40, 0.18); max-height: 264px; overflow-y: auto; padding: 6px; -webkit-overflow-scrolling: touch; }
.csel-list--up { top: auto; bottom: calc(100% + 6px); }
.csel-opt { display: block; width: 100%; text-align: start; padding: 11px 12px; border-radius: 9px; background: none; border: 0; cursor: pointer; color: var(--ink); font: inherit; }
.csel-opt:hover, .csel-opt:focus-visible { background: rgba(139, 74, 31, 0.08); outline: none; }
.csel-opt[aria-selected="true"] { background: rgba(139, 74, 31, 0.12); font-weight: 600; }

/* Turnstile inside narrow forms (design pass 2026-10-21). The widget container is 300 px wide and
   would force an auto-sized grid column to 300 px; forms shrink with minmax(0, 1fr), the container
   never exceeds its cell and the widget host (Turnstile renders inside a shadow root, so the host is scaled, not the iframe) scales below 375 px. */
form.grid { grid-template-columns: minmax(0, 1fr); }
.cf-turnstile { width: 100% !important; max-width: 300px; overflow: hidden; }
.cf-turnstile > * { transform-origin: 0 0; }
[dir="rtl"] .cf-turnstile > * { transform-origin: 100% 0; }
@media (max-width: 359px) { .cf-turnstile > * { transform: scale(0.82); } .cf-turnstile { height: 54px; } }
@media (min-width: 360px) and (max-width: 374px) { .cf-turnstile > * { transform: scale(0.95); } }
