/* ELLSMS — پنل هوشمند پیامک
   طراحی بر پایه‌ی رنگ‌های لوگو: بنفش‌آبی (indigo) تا آبی روشن، با تایپوگرافی
   فارسی یکدست (وزیرمتن) که سلسله‌مراتب را با وزن و اندازه می‌سازد، نه با
   ترکیب چند فونت. اعداد تاریخ و زمان همیشه فارسی؛ شماره‌موبایل و اعداد خام
   (اعتبار، کد) به‌صورت لاتین و چپ‌به‌راست ایزوله می‌مانند تا خوانا و
   کپی‌پذیر بمانند. */

/* Self-hosted Vazirmatn. This was previously an external webfont import; the
   font is now served from this application's own assets, so the panel has no
   runtime dependency on any third-party font service. All @font-face rules live
   in fonts.css and nowhere else. */
@import url('/assets/css/fonts.css');

:root {
  --indigo: #4a32e8;
  --blue:   #2e63f6;
  --ink:    #0b1023;
  --muted:  #5c657d; /* ≥4.5:1 on --card, --canvas, --tint and --line (was #666f87: 4.46 on --tint) */
  --line:   #e6e4f5;
  --canvas: #f7f7fb;
  --tint:   #eef1ff;
  --card:   #ffffff;
  --ok:     #157347;  --ok-bg:   #e7f8ef;
  --warn:   #b45309;  --warn-bg: #fdf3e3;
  --err:    #c0223a;  --err-bg:  #fdeaee;
  --grad: linear-gradient(120deg, var(--indigo), var(--blue));
  /* --lp-accent is a text/icon accent for the public marketing pages only.
     It defaults to --indigo (a no-op everywhere else) and is overridden to a
     brighter violet inside .lp-body's dark theme below, where plain --indigo
     text would not have enough contrast against a near-black page. */
  --lp-accent: var(--indigo);
  /* --font-ui is THE default typeface of the panel. Everything that renders
     prose, labels, buttons, tables and form controls resolves to this. Tahoma
     is the first fallback because it ships with Windows and covers Persian, so
     a failed font load degrades to something readable rather than to a Latin
     face that cannot draw Persian at all. */
  --font-ui: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;

  /* --font-mono is for DIAGNOSTIC values only: provider_message_id, API keys,
     hashes, request IDs, JSON. These need fixed-width digits so a 19-digit
     reference can be read and compared character by character. Vazirmatn is
     deliberately NOT in this stack — it is proportional, and listing it first
     (as this variable previously did) meant "monospace" values were never
     actually monospaced. */
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  /* --font-num is for DISPLAY numerals: dashboard stat values, price amounts,
     chart labels. These are branded headline numbers, not diagnostic strings —
     they want the UI face, kept LTR and tabular so digits align in a column.
     This is what the old --mono was actually being used for at those sites, so
     they keep their exact current appearance. */
  --font-num: var(--font-ui);

  /* Legacy aliases, kept so existing call sites work without renaming unrelated
     CSS. --mono maps to --font-num (its historical behaviour: Vazirmatn first)
     rather than to --font-mono, so repointing diagnostics to a true monospace
     does not silently restyle the dashboard's headline numbers. */
  --font: var(--font-ui);
  --mono: var(--font-num);

  /* ====================================================================
     TYPE SCALE — the panel's only permitted font sizes.
     --------------------------------------------------------------------
     Before this existed the panel used about twenty hardcoded sizes, five
     of them half-pixel values (11.5, 12.5, 13.5, 14.5, 15.5). Differences
     that small are invisible on their own but read, collectively, as an
     interface that was never measured: nothing lines up with anything, and
     hierarchy comes out of nowhere. These eight steps are a real scale —
     each one is distinguishable from its neighbour, and every panel rule
     below resolves to one of them. Adding a ninth size, or writing a px
     value at a call site, puts the panel back where it started.

     The landing pages (.lp-*) are a separate, display-oriented layout and
     deliberately keep their own larger sizes; this scale is for the panel. */
  --fs-2xs:  11px;  /* micro meta: chart axis labels, field provenance */
  --fs-xs:   12px;  /* table headers, hints, badges, captions */
  --fs-sm:   13px;  /* form labels, small buttons, pills */
  --fs-base: 14px;  /* table cells — the panel's densest running text */
  --fs-md:   15px;  /* body prose, form controls */
  --fs-lg:   17px;  /* card titles */
  --fs-xl:   20px;  /* page title */
  --fs-2xl:  26px;  /* dashboard stat values */

  /* LINE HEIGHTS. One global value cannot serve both a paragraph of Persian
     prose and a table of delivery statuses. 1.85 everywhere (the previous
     setting) made every dense surface sprawl. Three named values instead,
     each applied where it belongs. */
  --lh-tight: 1.3;   /* stat values, page title — single-line display text */
  --lh-snug:  1.5;   /* tables, labels, controls, badges — dense UI */
  --lh-base:  1.65;  /* running prose and hints, still comfortable in Persian */

  /* SPACING — a 4px grid, for the same reason the type scale exists. */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { direction: rtl; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: var(--ink);
  font-feature-settings: "ss01" 1;
  background:
    radial-gradient(circle at 6% 4%, rgba(74,50,232,.05), transparent 32%),
    radial-gradient(circle at 96% 96%, rgba(46,99,246,.05), transparent 32%),
    var(--canvas);
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* GLOBAL TYPOGRAPHY FLOOR.
   Form controls are the reason this block exists: browsers do NOT inherit
   font-family into <input>, <select>, <textarea>, <button> or <option> from
   body — the UA stylesheet substitutes a system face — so without naming them
   explicitly the panel's inputs would silently render in a different font from
   everything around them. <option> is listed because Windows in particular
   styles dropdown items from the UA sheet rather than from the <select>.
   Declared once here rather than repeated per component. */
html,
body,
button,
input,
select,
textarea,
option,
optgroup,
table,
th,
td,
a,
label,
legend,
fieldset,
dialog,
[role="dialog"] {
  font-family: var(--font-ui);
}

/* Latin/Western digits (phone numbers, raw amounts) stay LTR & isolated
   so they don't get visually reversed inside RTL text. */
.ltr, .msisdn, .num, code.kbd {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

/* DIAGNOSTIC VALUES — genuinely fixed-width.
   provider_message_id, API keys, hashes, request IDs, gateway/route codes and
   JSON are read character by character and compared against a provider's
   dashboard, so every glyph must occupy the same width. A 19-digit reference
   such as 4473621976262727360 is only checkable by eye when its digits line up.
   These values are strings, never numbers: word-break keeps a long reference
   inside its table cell instead of widening the row, and tabular-nums stops a
   proportional '1' from making two equal-length IDs look different lengths.
   CSS affects presentation only — the underlying value is never altered.

   Placed AFTER the .ltr/.msisdn rule above on purpose: an element carrying both
   (e.g. class="ltr provider-ref") must resolve to the monospace face, and these
   selectors tie on specificity, so source order decides. code.kbd is the one
   deliberate exception — it is a keyboard hint in running prose, not a value to
   transcribe — and it keeps the UI face via its higher specificity above. */
.mono, code, kbd, samp, pre,
.provider-ref, .api-key, .hash, .request-id,
input.mono, textarea.mono, input.provider-ref, textarea.api-key {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}
.provider-ref, .api-key, .hash, .request-id {
  word-break: break-all;
  user-select: all;
}

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; flex: 0 0 240px;
  background: var(--ink);
  color: #cfd4ea;
  display: flex; flex-direction: column;
}
.sidebar::before {
  content: ""; display: block; height: 4px;
  background: var(--grad);
}
.brand { display: block; padding: 20px 18px 10px; }
.brand img { width: 100%; border-radius: 12px; background: #fff; }
.nav-label {
  font-size: var(--fs-xs); letter-spacing: .02em;
  color: #8892b3; padding: 20px 20px 8px;
  position: relative; font-weight: 600;
}
.nav-label::after {
  content: ""; position: absolute; right: 20px; bottom: 3px;
  width: 24px; height: 2px; background: var(--grad); border-radius: 2px;
}
/* Collapsible sidebar groups (app/views/header.php): the label is the <summary>. */
.nav-group > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 8px;
  transition: color .15s ease;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover,
.nav-group.has-active > summary { color: #cfd4ea; }
.nav-group > summary:focus-visible { outline: 2px solid rgba(255,255,255,.45); outline-offset: -2px; }
.nav-chevron {
  margin-inline-start: auto; width: 7px; height: 7px;
  border-inline-start: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(135deg); transition: transform .15s ease; opacity: .8;
}
.nav-group[open] > summary .nav-chevron { transform: rotate(45deg); }
.nav-group > .nav-item:last-child { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .nav-chevron, .nav-group > summary { transition: none; } }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 20px; color: #cfd4ea; font-weight: 500;
  transition: background-color .15s ease;
}
.nav-item:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.nav-item.is-active {
  background: var(--grad); color: #fff;
  box-shadow: inset -3px 0 0 rgba(255,255,255,.55);
}
.nav-icon { width: 18px; text-align: center; opacity: .9; }
.sidebar-foot { margin-top: auto; padding: var(--sp-4) var(--sp-5); font-size: var(--fs-xs); color: #6f7899; direction: ltr; text-align: right; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 26px; position: sticky; top: 0; z-index: 5;
}
.page-title { font-size: var(--fs-xl); line-height: var(--lh-tight); margin: 0; font-weight: 800; flex: 1; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.credit-pill {
  background: var(--tint); color: var(--indigo);
  border-radius: 999px; padding: 6px 14px; font-size: var(--fs-sm); font-weight: 600;
}
.user-chip { color: var(--muted); font-size: var(--fs-base); }

/* Mobile menu toggle — hidden on desktop, shown via the media query below */
.menu-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 4px; width: 40px; height: 40px; flex: 0 0 40px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; padding: 0;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

.sidebar-backdrop { display: none; }

.content { padding: var(--sp-5); max-width: 1200px; width: 100%; }

/* ---------- Cards / grid ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: var(--sp-5); margin-bottom: var(--sp-4);
  box-shadow: 0 1px 2px rgba(11,16,35,.04), 0 10px 28px rgba(11,16,35,.035);
  transition: box-shadow .15s ease;
}
.card h2 { margin: 0 0 var(--sp-4); font-size: var(--fs-lg); line-height: var(--lh-tight); font-weight: 700; }
.grid { display: grid; gap: var(--sp-4); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: var(--sp-4) var(--sp-5);
}
.stat .stat-label { font-size: var(--fs-xs); line-height: var(--lh-snug); color: var(--muted); font-weight: 600; }
/* tabular-nums is the whole point of a stat row: without it Vazirmatn sets
   digits proportionally, so four figures stacked in a 4-up grid each start at a
   different optical position and the row reads as crooked. The .ltr/.msisdn rule
   above already does this for phone numbers and amounts; these headline numerals
   were the one place that never got it. */
.stat .stat-value {
  font-size: var(--fs-2xl); line-height: var(--lh-tight); font-weight: 800;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  margin-top: var(--sp-1); direction: ltr; unicode-bidi: isolate; display: block; text-align: right;
}
.stat.stat-accent { background: var(--grad); border: 0; color: #fff; }
.stat.stat-accent .stat-label { color: #dfe6ff; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: var(--fs-sm); line-height: var(--lh-snug); margin-bottom: var(--sp-3); }
/* The control used to be 16px against a 13.5px label, which inverted the
   hierarchy: the empty box shouted louder than the question it was asking.
   15px sits just above the label and just below body prose, so a form reads
   label → value instead of the other way round. */
input[type=text], input[type=password], input[type=number], input[type=email],
input[type=date], select, textarea {
  width: 100%; margin-top: var(--sp-1);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 12px; font-family: inherit; font-size: var(--fs-md); line-height: var(--lh-snug);
  background: #fff; color: #0b1023;
  transition: border-color .15s ease, box-shadow .15s ease;
}
/* ...except on a touch device, where iOS Safari zooms the whole viewport when a
   focused control is under 16px. Keyed to the pointer, not to a width: an iPad
   in landscape is wider than any phone breakpoint and still zooms. */
@media (pointer: coarse) {
  input[type=text], input[type=password], input[type=number], input[type=email],
  input[type=date], select, textarea { font-size: 16px; }
}
textarea { min-height: 112px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(46,99,246,.15); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.hint { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); line-height: var(--lh-base); margin-top: var(--sp-1); }

.btn {
  display: inline-block; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 18px; font: inherit; font-weight: 700; line-height: var(--lh-snug); cursor: pointer;
  background: #fff; color: var(--ink);
  transition: filter .15s ease, transform .1s ease;
}
.btn:hover { text-decoration: none; filter: brightness(.98); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--grad); border: 0; color: #fff; }
.btn-danger  { background: var(--err-bg); color: var(--err); border-color: #f4c9d1; }
.btn-ghost   { border-color: var(--line); color: var(--muted); }
.btn-sm      { padding: 5px 12px; font-size: var(--fs-sm); border-radius: 7px; }
.btn-block   { width: 100%; }

/* Persian date / time pickers (three selects) */
.jdate, .jtime { display: inline-flex; gap: 6px; align-items: center; }
.jdate select, .jtime select { width: auto; margin-top: 0; padding: 8px 8px; }
.jtime-sep { color: var(--muted); font-weight: 700; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
/* Tables carry their own line-height: inheriting body prose spacing made a
   twenty-row report twice as tall as it needed to be, which is the single
   biggest reason the panel felt loose. */
table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); line-height: var(--lh-snug); }
th, td { text-align: right; padding: var(--sp-2) 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); white-space: nowrap; }
tr:hover td { background: #f9f9ff; }

/* ---------- Badges / flash ---------- */
.badge { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: var(--fs-xs); line-height: var(--lh-snug); font-weight: 700; }
.badge-active, .badge-ok, .badge-delivered { background: var(--ok-bg); color: var(--ok); }
.badge-pending, .badge-processing { background: var(--warn-bg); color: var(--warn); }
.badge-failed, .badge-send_failed, .badge-undelivered, .badge-cancelled, .badge-off { background: var(--err-bg); color: var(--err); }
.badge-done, .badge-user, .badge-sent { background: var(--tint); color: var(--indigo); }
.badge-unknown { background: var(--line); color: var(--muted); }
.badge-admin { background: var(--ink); color: #fff; }

.badge-open { background: var(--warn-bg); color: var(--warn); }
.badge-answered { background: var(--tint); color: var(--indigo); }
.badge-closed { background: var(--ok-bg); color: var(--ok); }

/* ---------- Send confirmation modal (inline, same-page — see cost_preview.php) ---------- */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 80;
  background: rgba(11,16,35,.5); backdrop-filter: blur(2px);
  align-items: flex-start; justify-content: center;
  padding: 5vh 16px; overflow-y: auto;
}
.modal-overlay.is-open { display: flex; }
.modal-dialog {
  width: 100%; max-width: 640px; margin: auto 0;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(11,16,35,.28);
  animation: modal-in .18s ease;
}
.modal-dialog .card { margin-bottom: 0; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ticket-thread { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.ticket-msg { padding: 12px 16px; border-radius: 10px; background: var(--tint); }
.ticket-msg.is-admin { background: var(--ink); color: #fff; }
.ticket-msg-meta { font-size: var(--fs-xs); opacity: .7; margin-bottom: 6px; }

.flash { border-radius: 11px; padding: 12px 16px; margin-bottom: 18px; font-weight: 500; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-error   { background: var(--err-bg); color: var(--err); }
.flash-info    { background: var(--tint); color: var(--indigo); }

/* ---------- Simple bar chart (dashboard, no JS) ---------- */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; text-align: center; }
.bar .bar-fill { background: var(--grad); border-radius: 6px 6px 0 0; min-height: 2px; }
.bar .bar-x { font-size: var(--fs-2xs); color: var(--muted); margin-top: 6px; }
.bar .bar-v { font-size: var(--fs-2xs); font-family: var(--mono); direction: ltr; color: var(--ink); margin-bottom: 4px; }
/* Dashboard: recent bulk jobs with live progress */
.dash-jobs { display: grid; gap: 10px; }
.dash-job { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.dash-job:hover { border-color: var(--indigo); background: var(--tint); }
.dash-job-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dash-job-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-progress { display: flex; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.dash-progress-ok { background: var(--grad); }
.dash-progress-bad { background: var(--err); }
.dash-job-meta { margin-top: 6px; font-size: var(--fs-xs); }

/* ---------- Login ---------- */
.login-body {
  display: grid; place-items: center; min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(74,50,232,.10), transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(46,99,246,.10), transparent 40%),
    var(--canvas);
}
.login-card {
  width: min(410px, 92vw); background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: 30px;
  box-shadow: 0 24px 60px rgba(11,16,35,.10);
  position: relative;
}
.login-card::before {
  content: ""; position: absolute; top: -4px; left: -1px; right: -1px; height: 4px;
  background: var(--grad); border-radius: 18px 18px 0 0;
}
.login-logo { width: 74%; display: block; margin: 0 auto 16px; }
.login-foot { text-align: center; color: var(--muted); font-size: var(--fs-xs); margin: 16px 0 0; }
.login-foot a, .login-sub a { text-decoration: underline; text-underline-offset: 3px; }
.login-sub { text-align: center; color: var(--muted); margin: -8px 0 16px; font-size: var(--fs-sm); }

/* ---------- Misc ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.toolbar > * { margin-bottom: 0; }
.pagination { display: flex; gap: 8px; margin-top: 16px; }
.pager { flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; }
.pager .btn { min-width: 36px; justify-content: center; }
.pager .is-disabled { opacity: .45; pointer-events: none; }
.pager-gap { color: var(--muted); padding: 0 2px; }
.pager-info { color: var(--muted); font-size: var(--fs-sm); margin-inline-start: 8px; }
.pager-jump { display: flex; align-items: center; gap: 6px; margin: 0 0 0 0; margin-inline-start: 8px; }
.pager-jump label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-sm); color: var(--muted); font-weight: 400; }
.pager-jump input { width: 80px; padding: 5px 8px; margin: 0; }
.msg-preview { max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { color: var(--muted); text-align: center; padding: 34px 0; }

/* ---------- Profile / KYC — account-type switcher ---------- */
.segmented {
  display: inline-flex; background: var(--canvas); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px; gap: 4px;
}
.segmented input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented label {
  margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 22px; border-radius: 9px; font-size: var(--fs-base); font-weight: 700; color: var(--muted);
  cursor: pointer; transition: background .15s ease, color .15s ease; user-select: none;
}
.segmented input[type=radio]:checked + label { background: #fff; color: var(--indigo); box-shadow: 0 1px 2px rgba(11,16,35,.08); }
.segmented input[type=radio]:disabled + label { cursor: default; opacity: .6; }
.segmented input[type=radio]:focus-visible + label { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Profile — read-only / central-system fields ---------- */
.field-readonly { position: relative; }
.field-readonly input,
input[type=text][readonly], input[type=text]:disabled,
select:disabled { background: var(--canvas); color: var(--muted); cursor: not-allowed; }
.field-source { font-weight: 400; color: var(--muted); font-size: var(--fs-2xs); margin-inline-start: 6px; }

/* ---------- Profile — summary/overview strip ---------- */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.summary-item { background: var(--canvas); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; }
.summary-item .summary-label { font-size: var(--fs-2xs); color: var(--muted); font-weight: 700; }
.summary-item .summary-value { font-size: var(--fs-md); line-height: var(--lh-snug); font-weight: 700; margin-top: 4px; word-break: break-word; }
.summary-item .summary-value.ltr { direction: ltr; unicode-bidi: isolate; display: block; text-align: right; }

/* ---------- Profile — sub-sections within one card ---------- */
.subsection { margin-bottom: 22px; }
.subsection:last-child { margin-bottom: 0; }
.subsection-title {
  font-size: var(--fs-sm); font-weight: 800; color: var(--indigo); margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}
.subsection-title::before { content: ""; width: 4px; height: 14px; border-radius: 3px; background: var(--grad); display: inline-block; }

/* ---------- Structured forms ----------
   One layout for every long form: a card is split into titled .form-section blocks, each a
   .form-grid of fields (three columns on desktop, two on tablet, one on phone), and closes with a
   single .form-actions row. Fields line up across rows because every one is the same grid cell —
   the old auto-fit rows and inline date pickers made each row wrap at a different point. */
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.card-head h2 { margin: 0; }
.card-head .hint { margin: var(--sp-1) 0 0; }
.form-section + .form-section { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-5); }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid > label, .form-grid > .field { margin-bottom: 0; min-width: 0; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-full { grid-column: 1 / -1; }
@media (max-width: 1100px) {
  .form-grid, .form-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .form-grid, .form-grid.cols-2, .form-grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
}
/* A date inside a form grid fills its cell like any other control: year | month | day. */
.form-grid .jdate { display: flex; width: 100%; margin-top: var(--sp-1); }
.form-grid .jdate select { flex: 1 1 0; min-width: 0; padding-inline: 8px; }
.form-grid .jdate .jdate-m { flex-grow: 1.5; }
.form-actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.form-actions .hint { margin: 0; }
/* A checkbox option sized like a text field, so it sits on the same row line as its neighbours. */
.form-grid > label.check, label.check {
  display: flex; align-items: center; gap: var(--sp-2); align-self: end;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); cursor: pointer;
}
label.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--indigo); flex: none; }
/* A wrapping list of checkbox options (the contact form's groups); scrolls once it gets long. */
.group-picker { display: flex; flex-wrap: wrap; gap: var(--sp-2); max-height: 220px; overflow-y: auto; padding: 2px; }
.group-picker label.check { padding: 6px 10px; margin: 0; font-weight: 400; }
.req { color: var(--err); margin-inline-start: 2px; }
/* The caption of a field that is not a single control (e.g. a segmented radio group). */
.field-label { display: block; font-weight: 600; font-size: var(--fs-sm); line-height: var(--lh-snug); margin-bottom: var(--sp-1); }
/* ---------- Tabs ----------
   A long page (user editor, account profile) shows one section at a time. Without JavaScript every
   panel stays visible, one after another; assets/js/forms.js adds .is-ready and hides the rest. */
.tabs-nav {
  display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: thin;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: var(--sp-1); margin-bottom: var(--sp-4);
}
.tabs-nav button {
  appearance: none; border: 0; background: none; border-radius: 9px; cursor: pointer;
  padding: 8px 16px; font: inherit; font-size: var(--fs-sm); font-weight: 700; line-height: var(--lh-snug);
  color: var(--muted); white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.tabs-nav button:hover { color: var(--ink); background: var(--canvas); }
.tabs-nav button[aria-selected="true"] { background: var(--grad); color: #fff; }
.tabs-nav .tab-count { font-weight: 400; opacity: .8; margin-inline-start: 4px; }
.tabs.is-ready > .tab-panel:not(.is-active) { display: none; }
.tab-panel > .card:last-child, .tab-panel > .grid:last-child { margin-bottom: 0; }

/* ---------- KYC document tiles ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.doc-tile {
  border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff;
  display: flex; flex-direction: column; transition: box-shadow .15s ease;
}
.doc-tile:hover { box-shadow: 0 6px 18px rgba(11,16,35,.06); }
.doc-tile-thumb {
  height: 128px; background: var(--canvas); display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line); overflow: hidden; position: relative;
}
.doc-tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-tile-icon { font-size: 34px; opacity: .35; }
.doc-tile-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.doc-tile-title { font-size: var(--fs-sm); font-weight: 700; }
.doc-tile-note { font-size: var(--fs-xs); color: var(--err); background: var(--err-bg); border-radius: 8px; padding: 6px 9px; }
.doc-tile-foot { padding: 10px 14px; border-top: 1px solid var(--line); background: var(--canvas); }
.doc-tile-foot form { display: flex; align-items: center; gap: 8px; margin: 0; }

/* A styled stand-in for the raw file input: the native <input type=file> is visually hidden and its
   label takes over as a normal-looking button, with the chosen filename echoed beside it via a tiny
   inline script (no upload/validation behavior changes — purely cosmetic). */
.file-picker { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.file-picker input[type=file] {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.file-picker-btn {
  flex: 0 0 auto; border: 1px dashed var(--line); border-radius: 8px; background: var(--tint);
  color: var(--indigo); font-size: var(--fs-xs); font-weight: 700; padding: 7px 12px; cursor: pointer; white-space: nowrap;
}
.file-picker-name { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }

  .sidebar {
    position: fixed; top: 0; bottom: 0; right: 0; height: 100vh;
    width: min(78vw, 300px); flex: 0 0 auto;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 60;
    box-shadow: -12px 0 32px rgba(11,16,35,.18);
  }
  .sidebar.is-open { transform: translateX(0); }

  .sidebar-backdrop {
    display: block; position: fixed; inset: 0;
    background: rgba(11,16,35,.42);
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
    z-index: 55;
  }
  .sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }

  .brand img { width: 170px; }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .page-title { font-size: var(--fs-lg); }

  /* Comfortable touch targets */
  .nav-item { padding: 13px 20px; font-size: var(--fs-md); }
  .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-sm { min-height: 34px; }
}

@media (max-width: 480px) {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .content { padding: 12px; }
  .card { padding: 16px; border-radius: 12px; }
  .topbar { padding: 10px 12px; }
  .page-title { font-size: var(--fs-lg); }
  .credit-pill { font-size: var(--fs-xs); padding: 5px 11px; }
  .user-chip { font-size: var(--fs-sm); }
  table { font-size: var(--fs-sm); }
  th, td { padding: 8px 8px; }
  .stat .stat-value { font-size: var(--fs-xl); }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar > * { width: 100%; }
  .doc-grid, .summary-grid { grid-template-columns: 1fr; }
  .segmented { display: flex; }
  .segmented label { flex: 1; }
}

/* ---------- Marketing landing page ---------- */
/* Dark, glass theme for the public marketing pages (landing/contact/guide) —
   scoped to .lp-body so the logged-in dashboard (a plain <body>, no class,
   defined via app/views/header.php) keeps the light theme untouched. Nearly
   every landing component already reads var(--card)/var(--line)/var(--ink)/
   var(--muted)/var(--canvas)/var(--tint), so redefining those tokens here
   repaints the whole page — cards become frosted glass, borders become
   hairline-on-dark, text inverts — without rewriting each component. */
.lp-body {
  overflow-x: hidden;
  --ink: #f3f4fb;
  --muted: #a6acce;
  --line: rgba(255, 255, 255, .14);
  --canvas: #060814;
  --tint: rgba(255, 255, 255, .07);
  --card: rgba(255, 255, 255, .055);
  --lp-accent: #a78bfa;
  /* --ok/--ok-bg are the dashboard's "delivered" status colors (dark green on
     light mint) — overridden here as one consistent pair to a bright green on
     translucent green, everywhere they're used on this dark page (the phone
     mockup's delivered tick, the comparison table's checkmarks, the pricing
     check-badges). Scoped to .lp-body so the dashboard's own badges, which
     assume a light background, are untouched. */
  --ok: #34d399;
  --ok-bg: rgba(34, 197, 94, .16);
  background:
    radial-gradient(circle at 14% 0%, rgba(124, 58, 237, .35), transparent 42%),
    radial-gradient(circle at 90% 8%, rgba(46, 99, 246, .28), transparent 40%),
    radial-gradient(circle at 50% 75%, rgba(21, 163, 74, .10), transparent 46%),
    radial-gradient(circle, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--canvas);
}
@media (prefers-contrast: more) { .lp-body { background-image: none; background: var(--canvas); } }

.lp-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(3, 11, 24, .86); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: box-shadow .25s ease, background-color .25s ease;
}
/* A thin glowing rule in the banner's blue/green instead of a flat grey border. */
.lp-nav::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, .55) 30%, rgba(52, 211, 153, .5) 70%, transparent);
}
.lp-nav.is-scrolled { background: rgba(3, 11, 24, .95); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.lp-nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 12px 26px;
  display: flex; align-items: center; gap: 26px;
}
.lp-brand { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.lp-brand:hover { text-decoration: none; }
.lp-brand-mark { width: 40px; height: 34px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(31, 181, 201, .45)); }
.lp-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.lp-brand-text b { direction: ltr; font-size: 21px; font-weight: 800; letter-spacing: .06em; color: #fff; }
.lp-brand-text b i { font-style: normal; background: linear-gradient(90deg, #1fb5c9, #5fdbe8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-brand-text small { font-size: 10.5px; color: #8fa3cf; margin-top: 2px; }
.lp-nav-links { display: flex; gap: 4px; flex: 1; justify-content: center; }
.lp-nav-links a {
  position: relative; color: #c9d4f2; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px;
  transition: color .2s ease, background-color .2s ease;
}
.lp-nav-links a:hover { color: #fff; background: rgba(96, 165, 250, .12); text-decoration: none; }
.lp-nav-links a::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 3px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #60a5fa, #34d399); transform: scaleX(0); transition: transform .25s ease;
}
.lp-nav-links a:hover::after { transform: scaleX(1); }
.lp-nav-cta { flex: 0 0 auto; }
.lp-body .lp-nav-cta {
  background: linear-gradient(120deg, #2563eb, #6d4aff); border: 0; border-radius: 12px; padding: 10px 20px;
  box-shadow: 0 8px 22px -6px rgba(59, 130, 246, .7), 0 0 0 1px rgba(255, 255, 255, .1) inset;
}
.lp-nav-toggle {
  display: none; flex: 0 0 auto; width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 1px solid rgba(96, 165, 250, .3); border-radius: 11px; background: rgba(96, 165, 250, .08); color: #dbe4ff; cursor: pointer; padding: 0;
}
.lp-nav-toggle svg { width: 20px; height: 20px; }

.lp-hero {
  max-width: 780px; margin: 0 auto; padding: 76px 26px 40px; text-align: center;
}
.lp-eyebrow {
  display: inline-block; background: var(--tint); color: var(--lp-accent);
  border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 700; margin: 0 0 18px;
}
.lp-hero h1 { font-size: 48px; line-height: 1.28; font-weight: 800; letter-spacing: -.01em; margin: 0 0 18px; }
.lp-heading-accent {
  background: linear-gradient(100deg, #a78bfa, #6ea8fe 60%, #34d399);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-contrast: more) { .lp-heading-accent { background: none; -webkit-text-fill-color: currentColor; color: inherit; } }
.lp-hero-sub { font-size: 17px; color: var(--muted); max-width: 620px; margin: 0 auto 30px; }
.lp-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.lp-hero-cta .btn { padding: 13px 28px; font-size: 15.5px; }
.lp-hero-cta .btn-primary { box-shadow: 0 16px 32px -8px rgba(124,58,237,.7), 0 0 0 1px rgba(255,255,255,.08) inset; }
/* .btn's base style is a solid white fill, shared with the logged-in
   dashboard — overridden here, scoped to the dark public pages only, so the
   ghost button reads as glass instead of a stray white box. */
.lp-body .btn-ghost { background: rgba(255,255,255,.06); color: var(--ink); backdrop-filter: blur(8px); }
.lp-body .btn-ghost:hover { background: rgba(255,255,255,.1); }
/* A light sweep across primary buttons on hover — scoped to the public pages
   so the dashboard's own buttons (same .btn-primary class) are untouched. */
.lp-body .btn-primary { position: relative; overflow: hidden; }
.lp-body .btn-primary::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 48%, transparent 66%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.lp-body .btn-primary:hover::before { transform: translateX(120%); }
@media (prefers-reduced-motion: reduce) { .lp-body .btn-primary::before { display: none; } }

.lp-hero-stats {
  list-style: none; display: flex; gap: 0; justify-content: center; flex-wrap: wrap;
  margin: 0 0 44px; padding: 0;
}
.lp-hero-stats li {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 0 26px; border-inline-start: 1px solid var(--line);
}
.lp-hero-stats li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.lp-hero-stats strong { font-size: 19px; font-weight: 800; font-family: var(--font-num); color: var(--lp-accent); }
.lp-hero-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }


.lp-section { max-width: 1160px; margin: 0 auto; padding: 70px 26px; }
.lp-section-head { text-align: center; max-width: 560px; margin: 0 auto 40px; }
.lp-section-head h2 { font-size: 28px; font-weight: 800; margin: 0 0 10px; }
.lp-section-head p { color: var(--muted); font-size: 15.5px; margin: 0; }

.lp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lp-grid-narrow { grid-template-columns: repeat(4, 1fr); }
/* Frosted-glass treatment shared by every card-like surface on the dark
   public pages — a translucent fill (var(--card)) plus blur so the ambient
   background glow behind each card bleeds through instead of being hidden
   by a flat panel. */
.lp-card, .lp-price-card, .lp-compare-table, .lp-guide-item, .lp-usecase {
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset;
}
.lp-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.lp-card:hover { box-shadow: 0 16px 34px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.06) inset; transform: translateY(-2px); border-color: rgba(167,139,250,.4); }
.lp-card h3 { font-size: 16px; font-weight: 700; margin: 4px 0 8px; }
.lp-card p { color: var(--muted); font-size: 14px; margin: 0; }

.lp-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; background: var(--grad); color: #fff; margin-bottom: 6px;
}
.lp-icon svg { width: 21px; height: 21px; }

/* Bento feature grid: the smart-template feature is the product's real
   differentiator, so it gets the large tile instead of being one of eight
   equal boxes — the layout itself argues for what matters most. */
.lp-bento {
  display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(0, auto);
  grid-template-areas:
    "flag flag wide wide"
    "flag flag c1   c2"
    "c3   c4   c5   c6";
}
.lp-bento .lp-card { height: 100%; display: flex; flex-direction: column; }
.lp-bento-flag { grid-area: flag; background: var(--grad); border: 0; color: #fff; justify-content: center; padding: 30px; }
.lp-bento-flag h3 { font-size: 20px; }
.lp-bento-flag p { color: rgba(255,255,255,.85); font-size: 14.5px; }
.lp-icon-light { background: rgba(255,255,255,.18); }
.lp-bento-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lp-chip {
  font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff;
}
.lp-chip code { font-family: var(--mono); }
.lp-bento-wide { grid-area: wide; }
.lp-bento-c1 { grid-area: c1; }
.lp-bento-c2 { grid-area: c2; }
.lp-bento-c3 { grid-area: c3; }
.lp-bento-c4 { grid-area: c4; }
.lp-bento-c5 { grid-area: c5; }
.lp-bento-c6 { grid-area: c6; }

.lp-how { background: var(--tint); border: 1px solid var(--line); border-radius: 28px; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.lp-steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative;
}
.lp-steps li { background: transparent; padding: 0 22px; position: relative; }
.lp-steps li + li::before {
  content: ""; position: absolute; top: 17px; inset-inline-start: -1px; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--blue)); opacity: .28;
}
.lp-step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff;
  font-weight: 800; font-family: var(--mono); margin-bottom: 18px; position: relative; z-index: 1;
  box-shadow: 0 0 0 6px var(--tint);
}
.lp-steps h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.lp-steps p { color: var(--muted); font-size: 14px; margin: 0; }

.lp-trust-item { padding: 6px 0; }
.lp-trust-item h4 { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.lp-trust-item p { color: var(--muted); font-size: 13.5px; margin: 0; }

.lp-cta {
  position: relative; overflow: hidden;
  max-width: 1160px; margin: 0 auto 70px; padding: 60px 26px;
  background: var(--grad); border-radius: 28px; text-align: center; color: #fff;
  box-shadow: 0 40px 80px -24px rgba(74,50,232,.5);
}
.lp-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.16) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
          mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
}
.lp-cta > * { position: relative; }
.lp-cta h2 { font-size: 28px; font-weight: 800; margin: 0 0 10px; }
.lp-cta p { color: rgba(255,255,255,.85); margin: 0 0 26px; font-size: 15.5px; }
.lp-cta .btn-primary { background: #fff; color: var(--indigo); font-size: 15.5px; padding: 13px 30px; }

.lp-footer {
  text-align: center; padding: 30px 26px 40px; color: var(--muted); font-size: 13px;
}
.lp-footer-logo { height: 64px; border-radius: 12px; background: #fff; padding: 8px 18px; margin-bottom: 12px; }

@media (max-width: 980px) {
  .lp-grid, .lp-grid-narrow { grid-template-columns: repeat(2, 1fr); }
  .lp-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas: "flag flag" "flag flag" "wide wide" "c1 c2" "c3 c4" "c5 c6";
  }
  .lp-steps { grid-template-columns: 1fr; gap: 22px; }
  .lp-steps li { padding: 0; }
  .lp-steps li + li::before { display: none; }
  .lp-hero h1 { font-size: 34px; }
  .lp-hero-stats { gap: 14px 0; }
  .lp-hero-stats li { width: 50%; border-inline-start: 0 !important; padding: 10px 12px !important; }
  .lp-nav-toggle { display: flex; }
  .lp-nav-links {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; inset-inline: 0; top: 100%;
    background: rgba(3, 11, 24, .97); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(96, 165, 250, .25);
    box-shadow: 0 16px 30px rgba(0,0,0,.4);
    padding: 10px 26px 16px;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .25s ease, opacity .2s ease;
  }
  .lp-nav-links.is-open { max-height: 320px; opacity: 1; }
  .lp-nav-links a { padding: 12px 8px; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .lp-nav-links a::after { display: none; }
  .lp-nav-links a:last-child { border-bottom: 0; }
}
@media (max-width: 560px) {
  .lp-brand-text small { display: none; }
  .lp-nav-inner { gap: 12px; padding: 10px 16px; }
  .lp-grid, .lp-grid-narrow { grid-template-columns: 1fr; }
  .lp-bento { grid-template-columns: 1fr; grid-template-areas: none; }
  .lp-bento .lp-card { grid-area: auto; }
  .lp-hero { padding: 54px 20px 30px; }
  .lp-hero h1 { font-size: 27px; }
  .lp-section { padding: 50px 20px; }
  .lp-cta { border-radius: 20px; padding: 40px 20px; }
}
/* ---------- Landing top banner: five animated slides ---------- */
.lp-banner {
  position: relative; overflow: hidden; isolation: isolate;
  /* Fills the first screen below the sticky nav (--lp-nav-h is measured by landing.php); svh keeps
     it steady while a mobile browser's address bar shows/hides. */
  min-height: max(460px, calc(100vh - var(--lp-nav-h, 58px)));
  min-height: max(460px, calc(100svh - var(--lp-nav-h, 58px)));
  background: radial-gradient(ellipse at 22% 50%, #0b2447 0%, #061228 45%, #030b18 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.lp-banner-circuit { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .55; }
.lp-banner-circuit path { fill: none; stroke: rgba(96, 165, 250, .16); stroke-width: 1.4; }
.lp-banner-circuit path.is-glow {
  stroke: #7dd3fc; stroke-width: 2; stroke-dasharray: 60 640; stroke-dashoffset: 700;
  filter: drop-shadow(0 0 5px rgba(125, 211, 252, .9)); animation: lp-circuit-run 5s linear infinite;
}
@keyframes lp-circuit-run { to { stroke-dashoffset: 0; } }
.lp-banner-track { position: relative; min-height: inherit; }
.lp-banner-slide {
  position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 30px;
  max-width: 1240px; margin: 0 auto; padding: 40px 26px 64px;
  opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s linear .7s;
}
.lp-banner-slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s ease, visibility 0s; }
/* In RTL the first grid column is on the right: text right, visual left, as in the promo video. */
.lp-banner-copy { grid-column: 1; grid-row: 1; }
.lp-banner-visual { grid-column: 2; grid-row: 1; position: relative; }
.lp-banner-copy h2 { font-size: clamp(26px, 3.4vw, 42px); line-height: 1.35; font-weight: 800; margin: 0 0 12px; color: #fff; }
.lp-banner-copy h2 .is-blue { color: #60a5fa; }
.lp-banner-copy h2 .is-green { color: #34d399; }
.lp-banner-copy > p { color: #b6c2e0; font-size: 16px; margin: 0 0 20px; max-width: 520px; }
.lp-banner-copy .btn { margin-top: 20px; }
.lp-banner-feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lp-banner-feats div {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 8px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(96, 165, 250, .22); border-radius: 12px;
}
.lp-banner-feats svg { width: 30px; height: 30px; fill: none; stroke: #34d399; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.lp-banner-feats b { font-size: 13px; color: #fff; }
.lp-banner-feats span { font-size: 11.5px; color: #93a3c8; line-height: 1.6; }
.lp-banner-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.lp-banner-points li { position: relative; padding-inline-start: 26px; color: #dbe4ff; font-size: 15px; }
.lp-banner-points li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; color: #052e1f; background: #34d399;
}
/* Entrance: copy and cards rise in each time their slide becomes active. */
.lp-banner-slide.is-active .lp-banner-copy > * { animation: lp-banner-rise .7s ease both; }
.lp-banner-slide.is-active .lp-banner-copy > *:nth-child(2) { animation-delay: .08s; }
.lp-banner-slide.is-active .lp-banner-copy > *:nth-child(3) { animation-delay: .16s; }
.lp-banner-slide.is-active .lp-banner-copy > *:nth-child(4) { animation-delay: .24s; }
@keyframes lp-banner-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Slide 1: the tilted phone, fading into the background on its inner side, with light streaks. */
.lp-banner-phone { align-self: stretch; margin: -40px 0 -64px; display: flex; align-items: center; }
/* Never drawn taller than the 720px source, so a tall full-screen banner doesn't upscale (blur) it;
   when capped, its top/bottom edges fade into the background like the sides. */
.lp-banner-phone picture {
  display: block; width: 100%; height: 100%; max-height: 720px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
}
.lp-banner-phone img { display: block; height: 100%; width: 100%; object-fit: cover; object-position: left center; }
.lp-banner-phone {
  -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 32%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to left, transparent 0%, #000 32%, #000 82%, transparent 100%);
}
.lp-banner-slide.is-active .lp-banner-phone img { animation: lp-banner-zoom 9s ease-out both; }
@keyframes lp-banner-zoom { from { transform: scale(1.08) translateX(-2%); } to { transform: scale(1); } }
.lp-banner-streaks { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-banner-streaks path {
  fill: none; stroke: #e0f2ff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 140 900; stroke-dashoffset: 1040;
  filter: drop-shadow(0 0 6px rgba(125, 211, 252, .95)); opacity: .9; animation: lp-streak 3.3s ease-in-out infinite;
}
@keyframes lp-streak { to { stroke-dashoffset: 0; } }

/* Slide 2: one template turning into personal messages. */
.lp-banner-smart { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lp-smart-template {
  padding: 14px 18px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px dashed rgba(167, 139, 250, .6);
  color: #e5e7ff; font-size: 15px; margin-bottom: 8px;
}
.lp-smart-template b { color: #c4b5fd; }
.lp-smart-bubble {
  width: min(340px, 92%); padding: 11px 14px; border-radius: 16px 16px 16px 5px; font-size: 14px; color: #fff;
  background: linear-gradient(120deg, rgba(74, 50, 232, .55), rgba(46, 99, 246, .45)); border: 1px solid rgba(255, 255, 255, .12);
  opacity: 0; transform: translateY(14px);
}
.lp-smart-bubble b { color: #a7f3d0; }
.lp-smart-bubble em { float: left; font-style: normal; color: #34d399; opacity: 0; }
.lp-banner-slide.is-active .lp-smart-bubble { animation: lp-banner-rise .6s ease both; animation-delay: calc(.5s + var(--i) * .7s); }
.lp-banner-slide.is-active .lp-smart-bubble em { animation: lp-fade-in .4s ease both; animation-delay: calc(1.2s + var(--i) * .7s); }
@keyframes lp-fade-in { to { opacity: 1; } }

/* Slide 3: a live report card. */
.lp-report-card {
  width: min(380px, 94%); margin-inline: auto; padding: 18px; border-radius: 18px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(96, 165, 250, .25); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.lp-report-head { display: flex; justify-content: space-between; align-items: baseline; color: #93a3c8; font-size: 13px; }
.lp-report-head b { color: #fff; font-size: 26px; font-family: var(--font-num); }
.lp-report-bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; margin: 14px 0 12px; }
.lp-report-bars i { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #60a5fa, #4a32e8); transform-origin: bottom; transform: scaleY(.08); }
.lp-banner-slide.is-active .lp-report-bars i { animation: lp-bar-grow .9s cubic-bezier(.2, .8, .3, 1) both; }
.lp-report-bars i:nth-child(2) { animation-delay: .08s !important; } .lp-report-bars i:nth-child(3) { animation-delay: .16s !important; }
.lp-report-bars i:nth-child(4) { animation-delay: .24s !important; } .lp-report-bars i:nth-child(5) { animation-delay: .32s !important; }
.lp-report-bars i:nth-child(6) { animation-delay: .4s !important; } .lp-report-bars i:nth-child(7) { animation-delay: .48s !important; }
@keyframes lp-bar-grow { to { transform: scaleY(1); } }
.lp-report-row {
  display: flex; justify-content: space-between; padding: 8px 2px; border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 13px; color: #cbd5f5; opacity: 0;
}
.lp-banner-slide.is-active .lp-report-row { animation: lp-banner-rise .5s ease both; animation-delay: calc(.8s + var(--i) * .35s); }
.lp-report-row em { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.lp-report-row em.is-ok { color: #34d399; background: rgba(52, 211, 153, .14); }
.lp-report-row em.is-wait { color: #fbbf24; background: rgba(251, 191, 36, .14); }

/* Slide 4: a voice message playing out — ripples round the mic, the waveform fills as it plays, calls land. */
.lp-voice-card {
  position: relative; width: min(400px, 94%); margin-inline: auto; padding: 18px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  border: 1px solid rgba(96, 165, 250, .25); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.lp-voice-card::before {
  content: ""; position: absolute; inset: -40px -30px auto auto; width: 180px; height: 180px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 50, 232, .45), transparent 70%); filter: blur(10px);
}
.lp-voice-head { display: flex; align-items: center; gap: 14px; }
.lp-voice-orb {
  position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #4a32e8, #2e63f6); box-shadow: 0 8px 24px -6px rgba(74, 50, 232, .8);
}
.lp-voice-orb svg { position: relative; width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lp-voice-orb i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(125, 211, 252, .7); opacity: 0; }
.lp-banner-slide.is-active .lp-voice-orb i { animation: lp-voice-ripple 2.4s ease-out infinite; }
.lp-voice-orb i:nth-child(2) { animation-delay: .8s !important; }
.lp-voice-orb i:nth-child(3) { animation-delay: 1.6s !important; }
@keyframes lp-voice-ripple { from { transform: scale(1); opacity: .8; } to { transform: scale(2.1); opacity: 0; } }
.lp-voice-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lp-voice-title b { color: #fff; font-size: 14.5px; }
.lp-voice-title span { color: #93a3c8; font-size: 12px; }
.lp-voice-time { color: #c4b5fd; font-family: var(--font-num); font-size: 14px; font-weight: 700; }
.lp-voice-wave { display: flex; align-items: center; gap: 3px; height: 74px; margin: 16px 0 10px; }
.lp-voice-wave i {
  flex: 1; height: var(--h); border-radius: 999px; background: rgba(255, 255, 255, .22); transform: scaleY(.25);
}
/* Each bar breathes on its own phase; the colour sweep marks how much of the message has played. */
.lp-banner-slide.is-active .lp-voice-wave i {
  animation: lp-voice-bar 1.1s ease-in-out infinite alternate, lp-voice-played .35s ease forwards;
  animation-delay: calc(var(--k) * -.13s), calc(.6s + var(--k) * .17s);
}
@keyframes lp-voice-bar { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes lp-voice-played { to { background: linear-gradient(180deg, #7dd3fc, #4a32e8); box-shadow: 0 0 8px rgba(125, 211, 252, .45); } }
.lp-voice-row {
  display: flex; justify-content: space-between; align-items: center; padding: 8px 2px; border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 13px; color: #cbd5f5; opacity: 0;
}
.lp-banner-slide.is-active .lp-voice-row { animation: lp-banner-rise .5s ease both; animation-delay: calc(1s + var(--i) * .4s); }
.lp-voice-row em { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.lp-voice-row em.is-ok { color: #34d399; background: rgba(52, 211, 153, .14); }
.lp-voice-row em.is-live { color: #7dd3fc; background: rgba(125, 211, 252, .14); }
.lp-voice-row em.is-wait { color: #fbbf24; background: rgba(251, 191, 36, .14); }
.lp-voice-row s { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.lp-voice-row s i { width: 2px; height: 100%; border-radius: 2px; background: currentColor; animation: lp-voice-bar .6s ease-in-out infinite alternate; transform-origin: bottom; }
.lp-voice-row s i:nth-child(2) { animation-delay: -.2s; } .lp-voice-row s i:nth-child(3) { animation-delay: -.4s; }

/* Slide 5: a Bale business chat — the panel types, the messages land and get read, the split floats beside. */
.lp-banner-bale { width: min(380px, 94%); margin-inline: auto; }
.lp-bale-chat {
  border-radius: 22px; overflow: hidden; background: rgba(8, 20, 40, .72);
  border: 1px solid rgba(45, 212, 191, .28); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .65), 0 0 0 6px rgba(255, 255, 255, .03);
}
.lp-bale-head {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  background: linear-gradient(120deg, rgba(20, 184, 166, .32), rgba(46, 99, 246, .18)); border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.lp-bale-head > div { display: flex; flex-direction: column; gap: 1px; }
.lp-bale-head b { display: inline-flex; align-items: center; gap: 5px; color: #fff; font-size: 14px; }
.lp-bale-head span { color: #99f6e4; font-size: 11.5px; }
.lp-bale-avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #14b8a6, #2e63f6); box-shadow: 0 6px 18px -6px rgba(20, 184, 166, .9);
}
.lp-bale-avatar svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.lp-bale-verified { width: 16px; height: 16px; fill: #2dd4bf; }
.lp-bale-verified .is-tick { fill: none; stroke: #04201c; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lp-bale-body {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 14px 16px; min-height: 236px;
  background:
    radial-gradient(circle at 15% 20%, rgba(45, 212, 191, .08), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(74, 50, 232, .12), transparent 45%);
}
.lp-bale-day { align-self: center; font-size: 11px; color: #a7b4d6; background: rgba(255, 255, 255, .06); padding: 2px 10px; border-radius: 999px; }
.lp-bale-typing {
  position: absolute; top: 46px; inset-inline-start: 14px; margin: 0; display: flex; gap: 4px; padding: 11px 14px;
  border-radius: 16px 4px 16px 16px; background: rgba(255, 255, 255, .08); opacity: 0;
}
.lp-bale-typing i { width: 6px; height: 6px; border-radius: 50%; background: #99f6e4; animation: lp-bale-dot 1s ease-in-out infinite; }
.lp-bale-typing i:nth-child(2) { animation-delay: .15s; } .lp-bale-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes lp-bale-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.lp-banner-slide.is-active .lp-bale-typing { animation: lp-bale-typing 1.3s ease both .3s; }
@keyframes lp-bale-typing { 0% { opacity: 0; transform: translateY(6px); } 20%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.lp-bale-msg {
  position: relative; max-width: 88%; margin: 0; padding: 9px 13px 20px; border-radius: 16px 4px 16px 16px;
  font-size: 13.5px; line-height: 1.75; color: #f1f5ff; opacity: 0; transform: translateY(12px);
  background: linear-gradient(130deg, rgba(20, 184, 166, .32), rgba(46, 99, 246, .26)); border: 1px solid rgba(153, 246, 228, .16);
}
.lp-bale-msg b { color: #a7f3d0; }
.lp-bale-msg small { position: absolute; bottom: 4px; inset-inline-end: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: #a7b4d6; font-family: var(--font-num); }
.lp-bale-msg small svg { width: 17px; height: 11px; fill: none; stroke: #a7b4d6; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lp-bale-msg small .is-second { stroke-dasharray: 16; stroke-dashoffset: 16; }
.lp-banner-slide.is-active .lp-bale-msg { animation: lp-banner-rise .55s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(1.5s + var(--i) * .7s); }
/* Read receipt: the second tick draws in and both turn teal. */
.lp-banner-slide.is-active .lp-bale-msg small svg { animation: lp-bale-read .3s ease forwards; animation-delay: calc(2.4s + var(--i) * .7s); }
.lp-banner-slide.is-active .lp-bale-msg small .is-second { animation: lp-bale-tick .35s ease forwards; animation-delay: calc(2.4s + var(--i) * .7s); }
@keyframes lp-bale-read { to { stroke: #2dd4bf; } }
@keyframes lp-bale-tick { to { stroke-dashoffset: 0; } }
.lp-bale-btn {
  align-self: stretch; text-align: center; font-size: 13px; font-weight: 700; color: #99f6e4; padding: 8px; border-radius: 12px;
  background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .35); opacity: 0;
}
.lp-banner-slide.is-active .lp-bale-btn { animation: lp-banner-rise .5s ease both 3.2s; }
.lp-bale-chip {
  position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 14px; border-radius: 14px;
  font-size: 11.5px; color: #cbd5f5; background: rgba(6, 18, 40, .82); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, .7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0;
}
.lp-bale-chip b { font-family: var(--font-num); font-size: 19px; }
.lp-bale-chip.is-a { top: 4px; left: -52px; }
.lp-bale-chip.is-a b { color: #2dd4bf; }
.lp-bale-chip.is-b { top: 196px; left: -52px; }
.lp-bale-chip.is-b b { color: #60a5fa; }
.lp-banner-slide.is-active .lp-bale-chip { animation: lp-banner-rise .6s ease both, lp-bale-float 4s ease-in-out infinite; }
.lp-banner-slide.is-active .lp-bale-chip.is-a { animation-delay: 3.6s, 4.2s; }
.lp-banner-slide.is-active .lp-bale-chip.is-b { animation-delay: 4s, 4.6s; }
@keyframes lp-bale-float { 50% { transform: translateY(-7px); } }

.lp-banner-controls {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 10px;
}
.lp-banner-dots { display: flex; gap: 0; }
/* Each dot is a 24×24 target (WCAG 2.5.8); the visible dot is drawn by ::before. */
.lp-banner-dots button {
  position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
  transition: width .3s ease;
}
.lp-banner-dots button::before {
  content: ""; position: absolute; inset: 7.5px; border-radius: 999px; background: rgba(255, 255, 255, .45);
  transition: background .3s ease;
}
.lp-banner-dots button.is-active { width: 40px; }
.lp-banner-dots button.is-active::before { background: #60a5fa; }
.lp-banner-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 12px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(6, 8, 20, .55);
  color: #f3f4fb; font: inherit; font-size: 12.5px; white-space: nowrap; cursor: pointer;
}
.lp-banner-toggle-icon { width: 10px; height: 10px; border-inline: 3px solid currentColor; box-sizing: border-box; }
.lp-banner-toggle[aria-pressed="true"] .lp-banner-toggle-icon {
  border: 0; width: 0; height: 0; border-block: 5px solid transparent; border-inline-end: 9px solid currentColor;
}
.lp-banner-dots button:focus-visible, .lp-banner-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 999px; }
.lp-banner.is-paused *, .lp-banner.is-stopped * { animation-play-state: paused !important; }
@media (max-width: 860px) {
  .lp-banner { min-height: calc(100vh - var(--lp-nav-h, 54px)); min-height: calc(100svh - var(--lp-nav-h, 54px)); }
  .lp-banner-track { display: grid; }
  .lp-banner-slide { position: relative; grid-area: 1 / 1; grid-template-columns: 1fr; align-content: center; gap: 18px; padding: 26px 20px 60px; text-align: center; }
  .lp-banner-copy, .lp-banner-visual { grid-column: 1; }
  .lp-banner-visual { grid-row: 1; }
  .lp-banner-copy { grid-row: 2; }
  .lp-banner-copy > p { margin-inline: auto; }
  .lp-banner-feats { grid-template-columns: repeat(2, 1fr); }
  .lp-banner-points { justify-items: center; }
  .lp-banner-phone { margin: -26px -20px 0; height: min(300px, 30svh); }
  .lp-banner-phone picture { -webkit-mask-image: none; mask-image: none; }
  .lp-banner-phone { -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 35%); mask-image: linear-gradient(to top, transparent 0%, #000 35%); }
  .lp-banner-phone img { object-position: center 30%; }
  .lp-bale-chip.is-a, .lp-bale-chip.is-b { left: -6px; }
  .lp-bale-body { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-banner *, .lp-banner-slide.is-active * { animation: none !important; }
  .lp-smart-bubble, .lp-smart-bubble em, .lp-report-row, .lp-voice-row, .lp-bale-msg, .lp-bale-btn, .lp-bale-chip { opacity: 1; transform: none; }
  .lp-report-bars i, .lp-voice-wave i { transform: none; }
  .lp-voice-wave i:nth-child(-n+14) { background: linear-gradient(180deg, #7dd3fc, #4a32e8); }
  .lp-bale-msg small .is-second { stroke-dashoffset: 0; }
  .lp-banner-streaks, .lp-banner-circuit path.is-glow { display: none; }
}

/* ---------- Landing: "how it works" flow (contacts file -> template -> phone) ---------- */
.lp-flow { display: grid; grid-template-columns: 1.15fr 70px 1fr 70px 0.9fr; align-items: center; gap: 0; }
.lp-flow-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.lp-flow-card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; margin-bottom: 12px; }
.lp-flow-file { font-size: 10px; font-weight: 800; color: #fff; background: #187a43; border-radius: 5px; padding: 2px 6px; letter-spacing: .5px; }
.lp-flow-row {
  display: grid; grid-template-columns: 1fr 1.5fr .6fr; gap: 8px; padding: 9px 10px; border-radius: 10px;
  font-size: 13px; color: var(--muted); transition: background .35s ease, color .35s ease, box-shadow .35s ease;
}
.lp-flow-row span:last-child { text-align: center; font-family: var(--font-num); }
.lp-flow-row-head { font-size: 11.5px; font-weight: 700; padding-top: 0; }
.lp-flow-row.is-active { background: rgba(167, 139, 250, .16); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .45); }
.lp-flow-text { margin: 0; font-size: 15px; line-height: 2; color: var(--ink); }
.lp-flow-token {
  display: inline-block; padding: 0 8px; border-radius: 8px; background: var(--tint); color: var(--lp-accent);
  font-weight: 800; transition: background .3s ease, color .3s ease, transform .3s ease;
}
.lp-flow-token.is-filled { background: var(--grad); color: #fff; transform: translateY(-1px); }
.lp-flow-link { position: relative; height: 2px; margin: 0 8px; background: var(--line); border-radius: 2px; overflow: hidden; }
.lp-flow-link i {
  position: absolute; top: -2px; right: -8px; width: 6px; height: 6px; border-radius: 50%; background: var(--lp-accent);
  opacity: 0; animation: lp-flow-dot 1.6s linear infinite;
}
.lp-flow-link i:nth-child(2) { animation-delay: .53s; }
.lp-flow-link i:nth-child(3) { animation-delay: 1.06s; }
/* RTL: data moves from the file (right) toward the phone (left). */
@keyframes lp-flow-dot { 0% { right: -8px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { right: 100%; opacity: 0; } }
.lp-flow-phone {
  position: relative; justify-self: center; width: 100%; max-width: 230px; height: 300px; border-radius: 30px; padding: 30px 12px 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)); border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}
.lp-flow-phone-notch { position: absolute; top: 11px; left: 50%; width: 64px; height: 7px; margin-left: -32px; border-radius: 6px; background: rgba(255,255,255,.18); }
.lp-flow-thread { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; height: 100%; overflow: hidden; }
.lp-flow-bubble {
  align-self: flex-end; max-width: 92%; padding: 8px 10px; border-radius: 14px 14px 14px 4px; background: rgba(255,255,255,.09);
  font-size: 12px; line-height: 1.7; color: var(--ink);
  opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .35s ease, transform .35s ease;
}
.lp-flow-bubble.is-in { opacity: 1; transform: none; }
.lp-flow-bubble em { display: block; margin-top: 2px; font-style: normal; font-size: 10.5px; color: var(--muted); }
.lp-flow-bubble em.is-done { color: var(--ok); }
@media (max-width: 860px) {
  .lp-flow { grid-template-columns: 1fr; gap: 0; max-width: 420px; margin: 0 auto; }
  .lp-flow-link { width: 2px; height: 34px; margin: 6px auto; }
  .lp-flow-link i { right: -2px; animation-name: lp-flow-dot-v; }
  @keyframes lp-flow-dot-v { 0% { top: -8px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
  .lp-flow-phone { height: 270px; }
}
@media (prefers-reduced-motion: reduce) { .lp-flow-link i { animation: none; } }

/* ---------- Landing hero: scroll progress + SMS-thread visual ---------- */
.lp-scroll-progress {
  position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60;
  background: rgba(255,255,255,.1); transform-origin: 0 0;
}
.lp-scroll-progress-bar {
  height: 100%; width: 100%; background: var(--grad);
  transform: scaleX(0); transform-origin: inline-start; transition: transform .1s linear;
}

.lp-hero-inner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center;
  max-width: 1040px; margin: 0 auto; text-align: initial;
}
.lp-hero-inner .lp-eyebrow,
.lp-hero-inner h1,
.lp-hero-inner .lp-hero-sub { text-align: center; }
.lp-hero-copy { display: flex; flex-direction: column; align-items: center; }
.lp-hero-copy h1 { margin-inline: auto; }
.lp-hero-visual { display: flex; align-items: center; justify-content: center; min-height: 260px; }

/* Hero visual: the 3D phone scene from the ELLSMS promo video as one still image, with the motion
   in CSS (envelopes flying off the phone, a comet on the orbit ring, a pulsing podium glow, rising
   sparks). All transforms/opacity only, so it stays on the compositor; paused off-screen
   (.is-paused) and still for prefers-reduced-motion. */
.lp-hero-visual { flex-direction: column; gap: 14px; }
.lp-scene {
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 760 / 720; margin-inline: auto;
  overflow: hidden; /* flying envelopes must not widen the page */
  -webkit-mask-image: radial-gradient(ellipse 54% 58% at 50% 47%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 54% 58% at 50% 47%, #000 58%, transparent 100%);
}
.lp-scene picture, .lp-scene-img { display: block; width: 100%; height: 100%; }
.lp-scene-img { object-fit: cover; animation: lp-scene-breathe 12s ease-in-out infinite alternate; }
@keyframes lp-scene-breathe { from { transform: scale(1); } to { transform: scale(1.04) translateY(-1%); } }
.lp-scene-glow {
  position: absolute; left: 50%; top: 90%; width: 80%; height: 18%; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, .55), rgba(56, 189, 248, 0) 70%);
  mix-blend-mode: screen; animation: lp-scene-pulse 3.2s ease-in-out infinite; pointer-events: none;
}
@keyframes lp-scene-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.lp-scene-orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lp-orbit-track { fill: none; stroke: rgba(186, 214, 255, .22); stroke-width: 1.2; }
.lp-orbit-comet {
  fill: none; stroke: #e0f2ff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 110 890;
  filter: drop-shadow(0 0 6px rgba(125, 211, 252, .9)); animation: lp-orbit-run 4.5s linear infinite;
}
@keyframes lp-orbit-run { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
.lp-scene-mail {
  position: absolute; left: 50%; top: 42%; width: 13%; opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%) scale(.3);
  animation: lp-mail-fly 6s cubic-bezier(.2, .7, .3, 1) infinite; animation-delay: var(--d, 0s);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35));
}
.lp-scene-mail svg { display: block; width: 100%; height: auto; }
.lp-scene-mail rect { fill: #eef3ff; stroke: rgba(147, 180, 255, .8); stroke-width: 1.2; }
.lp-scene-mail path { fill: none; stroke: #9db6f5; stroke-width: 1.4; stroke-linejoin: round; }
@keyframes lp-mail-fly {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0deg); }
  12%  { opacity: 1; }
  75%  { opacity: .95; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(var(--r)); }
}
.lp-scene-spark {
  position: absolute; left: var(--l); bottom: 12%; width: 3px; height: 3px; border-radius: 50%;
  background: #bae6fd; box-shadow: 0 0 6px 1px rgba(125, 211, 252, .8); opacity: 0;
  animation: lp-spark-rise 5s ease-in infinite; animation-delay: var(--d, 0s);
}
@keyframes lp-spark-rise { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-190px); } }
.lp-scene-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 440px; }
.lp-scene-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(52, 211, 153, .22); color: #6ee7b7;
  font-size: 12.5px; font-weight: 700; text-align: center;
  animation: lp-card-glow 6s ease-in-out infinite; animation-delay: var(--d, 0s);
}
.lp-scene-card svg { width: 26px; height: 26px; }
.lp-scene-card span { color: var(--ink); }
@keyframes lp-card-glow {
  0%, 30%, 100% { border-color: rgba(52, 211, 153, .22); box-shadow: none; }
  12%, 20% { border-color: rgba(52, 211, 153, .85); box-shadow: 0 0 18px -2px rgba(52, 211, 153, .55), 0 0 0 1px rgba(52, 211, 153, .35) inset; }
}
.lp-scene.is-paused *, .lp-scene.is-paused .lp-scene-img { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .lp-scene *, .lp-scene-img, .lp-scene-card { animation: none !important; }
  .lp-scene-mail, .lp-scene-spark { display: none; }
}
@media (max-width: 900px) { .lp-scene, .lp-scene-cards { max-width: 380px; } }

.lp-reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.lp-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .lp-reveal { transition-delay: 0s; } }

/* ---------- Landing hero video slider (reuses .lp-slider-full/.lp-slide from
   the image-slider block above — same full-bleed viewport, nav dots/arrows and
   caption, just with a <video> per slide instead of an <img>) ---------- */
.lp-slide video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease, filter .5s ease; }
/* Hovering (or holding a finger on) a slide cross-fades its video to the
   poster image with a gentle zoom — a nicer still preview than a plain loop. */
.lp-video-hover-image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06); transition: opacity .45s ease, transform .5s ease;
  pointer-events: none;
}
.lp-slide:hover video { transform: scale(1.04); filter: brightness(.75); }
.lp-slide:hover .lp-video-hover-image { opacity: 1; transform: scale(1); }
/* Shown instead of the <video> when playback fails and no poster/fallback image was set. */
.lp-slide--placeholder { display: flex; align-items: center; justify-content: center; background: var(--grad); }
.lp-slide--placeholder::before { content: "🎬"; font-size: 42px; opacity: .85; }
.lp-video-mute {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(11,16,35,.55); color: #fff; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .15s ease;
}
.lp-video-mute:hover { background: rgba(11,16,35,.75); }
.lp-slide-caption .btn-primary {
  padding: 9px 22px; font-size: 13.5px; border-radius: 10px;
  box-shadow: 0 10px 24px rgba(74,50,232,.35);
}

@media (max-width: 900px) {
  .lp-hero-inner { grid-template-columns: 1fr; }
  .lp-hero-visual { order: -1; min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Contact page ---------- */
.lp-contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 22px; align-items: start; }
.lp-contact-info h3 { font-size: 14px; font-weight: 700; margin: 18px 0 4px; }
.lp-contact-info h3:first-child { margin-top: 0; }
.lp-contact-info p { color: var(--muted); font-size: 14.5px; margin: 0; }
.lp-contact-form form { margin-top: 2px; }

@media (max-width: 900px) {
  .lp-contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Hero slider ---------- */
.lp-slider-full { position: relative; width: 100%; overflow: hidden; background: #0b1023; }
.lp-slider-viewport { position: relative; width: 100%; aspect-ratio: 21 / 7; }
.lp-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .6s ease;
}
.lp-slide.is-active { opacity: 1; visibility: visible; }
.lp-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-slide-caption {
  position: absolute; inset-inline: 0; bottom: 0; top: 0;
  display: flex; align-items: flex-end;
  background: linear-gradient(0deg, rgba(11,16,35,.75), rgba(11,16,35,.05) 55%, transparent 75%);
  color: #fff;
}
.lp-slide-caption-inner { max-width: 1160px; margin: 0 auto; width: 100%; padding: 0 26px 34px; text-align: right; }
.lp-slide-caption h3 { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.lp-slide-caption p { font-size: 14.5px; margin: 0 0 14px; color: rgba(255,255,255,.85); max-width: 520px; }
.lp-slider-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(11,16,35,.45); color: #fff; font-size: 21px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background-color .15s ease;
}
.lp-slider-nav:hover { background: rgba(11,16,35,.65); }
.lp-slider-prev { inset-inline-start: 18px; }
.lp-slider-next { inset-inline-end: 18px; }
.lp-slider-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.lp-dot { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.5); cursor: pointer; }
.lp-dot.is-active { background: #fff; }

@media (max-width: 900px) {
  .lp-slider-viewport { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .lp-slider-viewport { aspect-ratio: 4 / 3; }
  .lp-slide-caption h3 { font-size: 18px; }
  .lp-slide-caption-inner { padding: 0 18px 22px; }
}

/* ---------- Manual-vs-ELLSMS comparison ---------- */
.lp-compare-table { max-width: 880px; margin: 0 auto; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.lp-compare-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; }
.lp-compare-row + .lp-compare-row { border-top: 1px solid var(--line); }
.lp-compare-row > div { padding: 16px 18px; font-size: 13.5px; display: flex; align-items: center; }
.lp-compare-row > div:first-child { font-weight: 700; color: var(--ink); }
.lp-compare-head { background: var(--canvas); }
.lp-compare-head > div { font-weight: 700; font-size: 13px; color: var(--muted); }
.lp-compare-head .lp-compare-highlight { color: var(--lp-accent); }
.lp-compare-no { color: var(--muted); }
.lp-compare-no::before { content: "–"; margin-inline-end: 8px; color: #c7cbe0; font-weight: 800; }
.lp-compare-yes { color: var(--ink); font-weight: 600; }
.lp-compare-yes::before { content: "✓"; margin-inline-end: 8px; color: var(--ok); font-weight: 800; }
.lp-compare-row:not(.lp-compare-head) .lp-compare-highlight,
.lp-compare-row:not(.lp-compare-head) > div:nth-child(3) { background: var(--ok-bg); }

@media (max-width: 700px) {
  .lp-compare-row { grid-template-columns: 1fr; }
  .lp-compare-row > div:first-child { background: var(--canvas); font-size: 12.5px; padding-bottom: 8px; }
  .lp-compare-head > div:not(:first-child) { padding-bottom: 4px; }
  .lp-compare-row:not(.lp-compare-head) > div:nth-child(2),
  .lp-compare-row:not(.lp-compare-head) > div:nth-child(3) { padding-top: 4px; }
}

/* ---------- Use cases ---------- */
.lp-usecase {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.lp-usecase:hover { box-shadow: 0 16px 34px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.06) inset; transform: translateY(-2px); border-color: rgba(167,139,250,.4); }
.lp-usecase h3 { font-size: 15.5px; font-weight: 700; margin: 4px 0 8px; }
.lp-usecase p { color: var(--muted); font-size: 13.5px; margin: 0; }
.lp-icon-tint-a { background: linear-gradient(135deg, #4a32e8, #7c3aed); }
.lp-icon-tint-b { background: linear-gradient(135deg, #2e63f6, #06b6d4); }
.lp-icon-tint-c { background: linear-gradient(135deg, #157347, #22c55e); }
.lp-icon-tint-d { background: linear-gradient(135deg, #b45309, #f59e0b); }
.lp-icon-tint-e { background: linear-gradient(135deg, #be185d, #ec4899); }
.lp-icon-tint-f { background: linear-gradient(135deg, #0f766e, #14b8a6); }

/* ---------- Trust icons ---------- */
.lp-trust-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; background: var(--tint); color: var(--lp-accent);
  margin-bottom: 10px;
}
.lp-trust-icon svg { width: 17px; height: 17px; }

/* ---------- Pricing ---------- */
.lp-pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.lp-price-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px; display: flex; flex-direction: column; gap: 12px;
}
.lp-price-card.is-featured { border-color: var(--lp-accent); box-shadow: 0 20px 50px rgba(124,58,237,.35); }
.lp-price-badge {
  position: absolute; top: -12px; right: 22px; background: var(--grad); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 999px;
}
.lp-price-card h3 { font-size: 17px; font-weight: 700; margin: 4px 0 0; }
.lp-price-amount { font-size: 26px; font-weight: 800; font-family: var(--mono); direction: ltr; unicode-bidi: isolate; text-align: right; }
.lp-price-amount span { font-size: 13px; font-weight: 600; color: var(--muted); font-family: var(--font); margin-inline-start: 4px; }
.lp-price-credit { color: var(--muted); font-size: 13.5px; margin-top: -8px; }
.lp-price-features { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lp-price-features li { font-size: 13.5px; color: var(--ink); padding-inline-start: 26px; position: relative; }
.lp-price-features li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: -1px;
  width: 17px; height: 17px; border-radius: 50%; background: var(--ok-bg); color: var(--ok);
  font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

@media (max-width: 900px) { .lp-pricing-grid { grid-template-columns: 1fr; } }

/* ---------- Guide (public accordion) ---------- */
.lp-guide-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.lp-guide-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; transition: border-color .2s ease; }
.lp-guide-item:hover { border-color: rgba(167,139,250,.4); }
.lp-guide-item summary {
  padding: 16px 0; font-weight: 700; font-size: 15px; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.lp-guide-item summary::-webkit-details-marker { display: none; }
.lp-guide-item summary::after {
  content: "+"; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--tint); color: var(--lp-accent); font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease;
}
.lp-guide-item[open] summary::after { content: "−"; transform: rotate(180deg); }
.lp-guide-body { padding: 0 0 18px; color: var(--muted); font-size: 14.5px; line-height: 1.9; }

/* ---------- Financial commerce (FIN-11) — print-friendly invoice ---------- */
@media print {
  .topbar, .sidebar, .flash, .toolbar form, button, .btn { display: none !important; }
  .print-invoice { border: none !important; box-shadow: none !important; }
  body { background: #fff !important; }
}

/* Operator logos (app/OperatorLogos.php): height is set per use, width follows the image. */
.op-logo { width: auto; vertical-align: middle; object-fit: contain; flex: none; }
.op-label { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.op-label .op-logo { min-width: 20px; }

/* Price matrix: gateway x operator x encoding (app/views/price_matrix.php). */
.price-matrix { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.price-matrix th, .price-matrix td { padding: 5px 3px; text-align: center; border-bottom: 1px solid var(--border, #e6e8ee); }
.price-matrix thead th { font-weight: 600; white-space: nowrap; }
.price-matrix .pm-col-head { border-inline-start: 1px solid var(--border, #e6e8ee); }
.price-matrix .pm-col-head .op-label { justify-content: center; }
.price-matrix .pm-enc-head { font-size: .85em; font-weight: 500; color: var(--muted, #6b7280); }
.price-matrix .pm-gateway-head, .price-matrix .pm-gateway { text-align: start; white-space: nowrap; background: var(--surface-2, #f7f8fa); position: sticky; inset-inline-start: 0; z-index: 1; }
.price-matrix .pm-gateway { font-weight: 500; }
.price-matrix input { width: 62px; min-width: 0; padding: 5px 4px; text-align: center; margin: 0; font-size: .92em; }
.price-matrix .pm-fill { display: inline-flex; gap: 2px; align-items: center; }
.price-matrix .pm-fill input { width: 44px; }
.price-matrix .pm-fill .btn { padding: 4px 5px; line-height: 1; min-width: 0; }
.price-matrix tbody tr:hover td, .price-matrix tbody tr:hover th { background: #f3f6ff; }
.price-matrix input.is-default { color: #9aa1ad; background: #fafbfc; }
.price-matrix input:not(.is-default):not(:placeholder-shown) { font-weight: 600; }
.price-matrix tr.pm-default-row th, .price-matrix tr.pm-default-row td { background: #f2f4ff; border-bottom: 2px solid #c9cff5; }
.price-matrix tr.pm-default-row .pm-gateway { color: #3b3fc4; }

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* "پرش به محتوا": off-screen until focused with the keyboard. */
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 1000;
  padding: 10px 18px; border-radius: 10px; background: #fff; color: #0b1023; font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); text-decoration: none;
}
.skip-link:focus { top: 12px; outline: 3px solid #2e63f6; outline-offset: 2px; }
main:focus { outline: none; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 2px rgba(192, 34, 58, .25); }

/* Consent checkboxes (register, contact, buy credit). */
.consent-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; line-height: 1.9; cursor: pointer; }
.consent-check input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin: 5px 0 0; accent-color: var(--blue); }
.consent-check a { text-decoration: underline; text-underline-offset: 3px; }

/* Links to the legal pages in both footers. */
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-size: 13px; margin: 6px 0; }
.legal-links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }

/* ---------- Legal pages (terms, privacy, refund) ---------- */
.lp-legal { max-width: 860px; line-height: 2; }
.lp-legal-head { text-align: center; margin-bottom: 28px; }
.lp-legal-head h1 { font-size: 30px; font-weight: 800; margin: 0 0 8px; }
.lp-legal-meta { color: var(--muted); font-size: 14px; margin: 0; }
.lp-legal section { margin-top: 34px; scroll-margin-top: 90px; }
.lp-legal h2 { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.lp-legal p, .lp-legal li { font-size: 15.5px; }
.lp-legal ul, .lp-legal ol { padding-inline-start: 22px; margin: 8px 0; }
.lp-legal li { margin: 6px 0; }
.lp-legal a { color: #a5b4fc; text-decoration: underline; text-underline-offset: 3px; }
.lp-legal-toc { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 14px 22px; }
.lp-legal-toc ol { columns: 2; column-gap: 32px; margin: 0; }
.lp-legal-toc li { break-inside: avoid; font-size: 14.5px; margin: 2px 0; }
.lp-legal-identity { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 12px 0 0;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 14px 20px; }
.lp-legal-identity dt { color: var(--muted); font-size: 14px; }
.lp-legal-identity dd { margin: 0; font-size: 15px; }
.lp-legal-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.lp-legal-table th, .lp-legal-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; vertical-align: top; }
.lp-legal-table th { background: var(--tint); font-weight: 700; }
@media (max-width: 640px) {
  .lp-legal-toc ol { columns: 1; }
  .lp-legal-identity { grid-template-columns: 1fr; }
  .lp-legal-identity dd { margin-bottom: 8px; }
}
/* ---------- Line forwarding to URL (public/number-forwards.php) ---------- */
.fwd-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--canvas); font-size: var(--fs-sm); }
.fwd-status.is-on { background: var(--ok-bg); border-color: #bfe8d0; color: var(--ok); }
.fwd-status.is-off { background: var(--err-bg); border-color: #f5c2cc; color: var(--err); }
.fwd-status .fwd-meta { color: var(--muted); font-weight: 400; margin-inline-start: auto; }
.fwd-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #c4c9d6; flex: 0 0 auto; }
.fwd-dot.is-on { background: #22a35a; box-shadow: 0 0 0 3px rgba(34,163,90,.15); }
.fwd-dot.is-warn { background: #e0a106; box-shadow: 0 0 0 3px rgba(224,161,6,.15); }
.fwd-dot.is-err { background: var(--err); box-shadow: 0 0 0 3px rgba(192,34,58,.14); }
.fwd-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.fwd-line { border: 1px solid var(--line); border-radius: 14px; background: var(--card); display: flex; flex-direction: column; transition: box-shadow .15s ease, border-color .15s ease; }
.fwd-line:hover { box-shadow: 0 6px 18px rgba(11,16,35,.06); border-color: #d6d2f2; }
.fwd-line.is-editing { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(74,50,232,.12); }
.fwd-line-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.fwd-line-number { font-size: var(--fs-lg); font-weight: 800; }
.fwd-line-label { color: var(--muted); font-size: var(--fs-xs); }
.fwd-line-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-top: 1px dashed var(--line); font-size: var(--fs-sm); }
.fwd-line-row .fwd-kind { font-weight: 700; min-width: 64px; }
.fwd-line-row .fwd-url { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; font-size: var(--fs-xs); }
.fwd-line-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; margin-top: auto; border-top: 1px solid var(--line); background: var(--canvas); border-radius: 0 0 14px 14px; font-size: var(--fs-xs); color: var(--muted); }
.fwd-url-input { font-family: var(--font-mono); font-size: var(--fs-sm); }
.fwd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; direction: ltr; }
.fwd-chip { border: 1px solid var(--line); background: var(--tint); color: var(--indigo); border-radius: 999px; padding: 2px 10px; font: 600 var(--fs-2xs)/1.8 var(--font-mono); cursor: pointer; direction: ltr; }
.fwd-chip:hover { background: #e2e7ff; }
.fwd-schedule { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fwd-schedule span { background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-size: var(--fs-2xs); }
/* An on/off switch drawn over a real checkbox (still a checkbox for forms, keyboards and screen readers). */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; font-weight: 700; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 999px; background: #d3d7e3; position: relative; cursor: pointer; transition: background .15s ease; flex: 0 0 auto; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(11,16,35,.2); transition: inset-inline-start .15s ease; }
.switch input:checked { background: var(--indigo); }
.switch input:checked::after { inset-inline-start: 21px; }
.switch input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch input:disabled { opacity: .5; cursor: default; }
.switch .switch-sub { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }

/* Lazily loaded page parts (app/LazyParts.php, assets/js/lazy-parts.js). */
.lazy-part { display: flex; align-items: center; justify-content: center; margin: 18px 0; border: 1px dashed var(--line); border-radius: 18px; background: var(--card); }
.lazy-part-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; padding: 18px; }
.lazy-part-error { color: var(--err); }
.lazy-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--indigo); animation: lazy-spin .8s linear infinite; }
@keyframes lazy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lazy-spinner { animation-duration: 2.4s; } }
/* A live part (lazy_part_live_placeholder()) keeps its box once filled; a failed refresh dims it. */
.lazy-part.lazy-part-ready { display: block; margin: 0; border: 0; border-radius: 0; background: none; }
.lazy-part-stale { opacity: .55; transition: opacity .2s; }

/* Live queue monitor (public/queue-monitor.php). */
.qm-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.qm-live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); vertical-align: middle; margin-inline-end: 4px; animation: qm-pulse 1.6s ease-in-out infinite; }
@keyframes qm-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .qm-live-dot { animation: none; } }
.qm-delta { display: inline-block; margin-inline-start: 6px; font-size: var(--fs-xs); font-weight: 700; direction: rtl; }
.qm-delta.up { color: var(--err); }
.qm-delta.down { color: var(--ok); }
.stat-accent .qm-delta { color: inherit; opacity: .85; }
.qm-table .btn { white-space: nowrap; }
.qm-warn-text { color: var(--warn); }
.qm-row-warn td { background: var(--warn-bg); }
.qm-bar { height: 6px; min-width: 90px; border-radius: 999px; background: var(--line); overflow: hidden; }
.qm-bar > span { display: block; height: 100%; background: var(--indigo); }
.qm-providers { display: flex; flex-wrap: wrap; gap: 10px; }
.qm-provider { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: var(--fs-xs); }
.qm-footnote { text-align: center; margin: 4px 0 18px; }
