/* =====================================================================
   LibertyTV UI layer (R2) — shell + premium components, customer & admin.
   Loaded before the compiled Tailwind file, so utilities still win on
   conflict. Dark only. Logical properties → Arabic mirrors via dir="rtl".
   Tokens = ux-audit/design-system/ltv.css (storefront palette, Geist).
   ===================================================================== */
:root {
  --ltv-midnight: #080611; --ltv-surface: #151023; --ltv-surface-2: #1c1530; --ltv-surface-3: #261d3f;
  --ltv-border: #2a2140; --ltv-border-strong: #3d3160;
  --ltv-purple: #7c3aed; --ltv-purple-hover: #6d28d9; --ltv-purple-light: #a855f7; --ltv-purple-deep: #4c1d95;
  --ltv-purple-tint: rgba(124, 58, 237, .14);
  --ltv-text: #ffffff; --ltv-text-2: #aaa4b8; --ltv-text-3: #8c85a0; --ltv-focus: #c084fc;
  --ltv-success: #34d399; --ltv-success-bg: rgba(52, 211, 153, .12);
  --ltv-warning: #fbbf24; --ltv-warning-bg: rgba(251, 191, 36, .12);
  --ltv-danger: #f87171;  --ltv-danger-bg: rgba(248, 113, 113, .12);
  --ltv-info: #60a5fa;    --ltv-info-bg: rgba(96, 165, 250, .12);
  --ltv-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --ltv-ease: cubic-bezier(.2, .8, .2, 1);
  --ltv-tap: 44px; --ltv-bottombar-h: 64px;
  /* R3 shape scale — every radius in the app comes from these five */
  --ltv-r-btn: 10px; --ltv-r-btn-sm: 8px; --ltv-r-ctl: 10px; --ltv-r-panel: 12px; --ltv-r-card: 16px;
  --ltv-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------------------------------------------------------- page */
html { background: var(--ltv-midnight); }
body.bg-slate-950 {
  background:
    radial-gradient(1100px 520px at 12% -12%, rgba(124, 58, 237, .16), transparent 62%),
    radial-gradient(900px 420px at 100% -6%, rgba(168, 85, 247, .08), transparent 60%),
    var(--ltv-midnight);
  background-attachment: fixed;
}
::selection { background: rgba(168, 85, 247, .35); color: #fff; }
.font-mono, code, kbd, samp { font-family: var(--ltv-font-mono); }

/* ---------------------------------------------------------------- sidebar */
.ltv-sb { width: 16rem; background: rgba(11, 8, 23, .92); border-inline-end: 1px solid var(--ltv-border);
  padding: 20px 12px 16px; gap: 2px; }
@media (min-width: 1024px) { .ltv-sb { background: rgba(11, 8, 23, .6); backdrop-filter: blur(12px); } }
.ltv-sb__brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 20px; color: #fff; font-weight: 700;
  font-size: 17px; letter-spacing: -.01em; text-decoration: none; }
.ltv-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ltv-gradient); display: grid; place-items: center;
  box-shadow: 0 6px 18px -6px rgba(168, 85, 247, .8); flex: none; }
.ltv-mark svg { width: 14px; height: 14px; color: #fff; }
.ltv-sb__group { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ltv-text-3);
  padding: 16px 12px 6px; }
[dir="rtl"] .ltv-sb__group { letter-spacing: 0; }
.ltv-sb__link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--ltv-text-2); font-size: 14px; font-weight: 500; text-decoration: none; position: relative;
  transition: background-color .15s var(--ltv-ease), color .15s var(--ltv-ease); }
.ltv-sb__link svg { width: 20px; height: 20px; flex: none; }
.ltv-sb__link:hover { background: var(--ltv-surface); color: #fff; }
.ltv-sb__link[aria-current="page"] { background: var(--ltv-purple-tint); color: #fff; }
.ltv-sb__link[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px;
  width: 3px; border-radius: 3px; background: var(--ltv-purple-light); }
.ltv-sb__link[aria-current="page"] svg { color: var(--ltv-purple-light); }
.ltv-sb__badge { margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid;
  place-items: center; font-size: 11px; font-weight: 700; background: var(--ltv-warning); color: #241500; }
.ltv-sb__foot { margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid var(--ltv-border); display: flex; gap: 10px; align-items: center; }
.ltv-sb__close { margin-inline-start: auto; }
@media (min-width: 1024px) { .ltv-sb__close { display: none !important; } }

/* ---------------------------------------------------------------- top bar */
.ltv-tb { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; min-height: 60px;
  padding: 10px var(--ltv-main-px, 1rem); padding-top: max(10px, env(safe-area-inset-top)); margin-bottom: 20px;
  background: rgba(8, 6, 17, .78); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--ltv-border); }
.ltv-tb__brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; }
@media (min-width: 1024px) { .ltv-tb__brand { display: none; } }
.ltv-tb__title { font-size: 15px; font-weight: 600; color: #fff; display: none; }
@media (min-width: 1024px) { .ltv-tb__title { display: block; } }
.ltv-tb__end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.ltv-iconbtn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--ltv-text-2);
  background: transparent; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, color .15s; text-decoration: none; }
.ltv-iconbtn:hover { background: var(--ltv-surface); color: #fff; }
.ltv-iconbtn svg { width: 20px; height: 20px; }
.ltv-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--ltv-surface); border: 1px solid var(--ltv-border); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: border-color .15s, background-color .15s; white-space: nowrap; }
.ltv-pill:hover { border-color: var(--ltv-border-strong); background: var(--ltv-surface-2); }
.ltv-pill svg { width: 18px; height: 18px; color: var(--ltv-purple-light); }
@media (max-width: 479px) { .ltv-pill--help span { display: none; } .ltv-pill--help { width: 40px; padding: 0; justify-content: center; } }
.ltv-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #4c1d95, #7c3aed); display: grid;
  place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; text-decoration: none; }
.ltv-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 180px; z-index: 60; padding: 6px;
  background: #1a1430; border: 1px solid var(--ltv-border-strong); border-radius: 14px; box-shadow: 0 24px 64px -16px rgba(0,0,0,.8); }
.ltv-menu a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 9px; color: var(--ltv-text-2);
  font-size: 14px; font-weight: 500; text-decoration: none; }
.ltv-menu a:hover, .ltv-menu a[aria-current="true"] { background: var(--ltv-purple-tint); color: #fff; }
.ltv-menu hr { border: 0; border-top: 1px solid var(--ltv-border); margin: 6px 4px; }

/* ---------------------------------------------------------------- bottom bar (< 1024px) */
.ltv-bb { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--ltv-bottombar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(12, 9, 24, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--ltv-border); }
@media (min-width: 1024px) { .ltv-bb { display: none; } }
.ltv-bb a, .ltv-bb button { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: var(--ltv-bottombar-h);
  background: none; border: 0; color: var(--ltv-text-3); font-family: inherit; font-weight: 500; font-size: 11px; line-height: 1.1; text-decoration: none; cursor: pointer; }
.ltv-bb svg { width: 24px; height: 24px; }
.ltv-bb [aria-current="page"] { color: #fff; }
.ltv-bb [aria-current="page"] svg { color: var(--ltv-purple-light); }
@media (max-width: 1023px) {
  body.ltv-has-bb main { padding-bottom: calc(var(--ltv-bottombar-h) + env(safe-area-inset-bottom) + 24px) !important; }
  body.ltv-has-bb .ltv3-launcher-wrap, body.ltv-has-bb #ltv-toast { bottom: calc(var(--ltv-bottombar-h) + 16px) !important; }
}

/* ---------------------------------------------------------------- page header */
.ltv-ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.ltv-ph__eyebrow { font-size: 13px; color: var(--ltv-text-3); margin-bottom: 4px; }
.ltv-ph h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: #fff; margin: 0; }
.ltv-ph p { margin: 6px 0 0; color: var(--ltv-text-2); font-size: 15px; max-width: 62ch; }
@media (max-width: 767px) { .ltv-ph h1 { font-size: 24px; } }

/* ---------------------------------------------------------------- cards */
.ltv-card { background: var(--ltv-surface); border: 1px solid var(--ltv-border); border-radius: var(--ltv-r-card);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 1px 2px rgba(0,0,0,.4); }
.ltv-card__body { padding: 24px; }
.ltv-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 24px;
  border-bottom: 1px solid var(--ltv-border); }
.ltv-card__title { font-size: 16px; font-weight: 600; color: #fff; margin: 0; }
.ltv-card__sub { font-size: 13px; color: var(--ltv-text-3); margin: 2px 0 0; }
.ltv-card--hero { background: radial-gradient(900px 400px at 0% -40%, rgba(124,58,237,.30), transparent 60%), var(--ltv-surface);
  border-color: rgba(168, 85, 247, .30); box-shadow: 0 0 0 1px rgba(168,85,247,.12), 0 24px 60px -28px rgba(124,58,237,.6); }
.ltv-card--warning { background: radial-gradient(900px 400px at 0% -40%, rgba(251,191,36,.16), transparent 60%), var(--ltv-surface);
  border-color: rgba(251, 191, 36, .32); }
.ltv-card--danger { background: radial-gradient(900px 400px at 0% -40%, rgba(248,113,113,.16), transparent 60%), var(--ltv-surface);
  border-color: rgba(248, 113, 113, .32); }
.ltv-card--info { background: radial-gradient(900px 400px at 0% -40%, rgba(96,165,250,.14), transparent 60%), var(--ltv-surface);
  border-color: rgba(96, 165, 250, .30); }
@media (max-width: 767px) { .ltv-card__body { padding: 20px; } .ltv-card__head { padding: 14px 20px; } }

/* ---------------------------------------------------------------- buttons */
.ltv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--ltv-tap); padding: 0 20px;
  border-radius: var(--ltv-r-btn, 10px); border: 1px solid transparent; font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; color: #fff; cursor: pointer;
  white-space: nowrap; text-decoration: none !important; transition: background-color .12s var(--ltv-ease), border-color .12s, transform .12s; }
.ltv-btn:active { transform: translateY(1px); }
.ltv-btn svg { width: 18px; height: 18px; }
.ltv-btn--primary { background: var(--ltv-purple); box-shadow: 0 8px 24px -10px rgba(124, 58, 237, .8); }
.ltv-btn--primary:hover { background: var(--ltv-purple-hover); }
.ltv-btn--secondary { background: var(--ltv-surface-2); border-color: var(--ltv-border-strong); }
.ltv-btn--secondary:hover { background: var(--ltv-surface-3); }
.ltv-btn--ghost { background: transparent; color: var(--ltv-text-2); }
.ltv-btn--ghost:hover { background: var(--ltv-surface-2); color: #fff; }
.ltv-btn--danger { background: transparent; border-color: rgba(248,113,113,.45); color: #fca5a5; }
.ltv-btn--danger:hover { background: var(--ltv-danger-bg); }
.ltv-btn--lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.ltv-btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: var(--ltv-r-btn-sm, 8px); }
@media (pointer: coarse) { .ltv-btn--sm { min-height: var(--ltv-tap); } }
.ltv-btn--block { display: flex; width: 100%; }
.ltv-btn--icon { width: var(--ltv-tap); padding: 0; }
.ltv-btn[disabled], .ltv-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.ltv-btn[aria-busy="true"], .lt-btn[aria-busy="true"] { cursor: progress; opacity: .85; pointer-events: none; }
.ltv-btn[aria-busy="true"]::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor;
  border-inline-end-color: transparent; animation: ltv-spin .7s linear infinite; }
@keyframes ltv-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- badges */
.ltv-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid transparent; }
.ltv-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ltv-badge--plain::before { display: none; }
.ltv-badge--success { color: var(--ltv-success); background: var(--ltv-success-bg); border-color: rgba(52,211,153,.3); }
.ltv-badge--warning { color: var(--ltv-warning); background: var(--ltv-warning-bg); border-color: rgba(251,191,36,.3); }
.ltv-badge--danger  { color: var(--ltv-danger);  background: var(--ltv-danger-bg);  border-color: rgba(248,113,113,.3); }
.ltv-badge--info    { color: var(--ltv-info);    background: var(--ltv-info-bg);    border-color: rgba(96,165,250,.3); }
.ltv-badge--brand   { color: #d8b4fe; background: var(--ltv-purple-tint); border-color: rgba(168,85,247,.35); }
.ltv-badge--neutral { color: var(--ltv-text-2); background: rgba(170,164,184,.1); border-color: var(--ltv-border-strong); }

/* ---------------------------------------------------------------- status card */
.ltv-status { display: grid; gap: 20px; }
.ltv-status__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ltv-status__meta { font-size: 13px; color: var(--ltv-text-3); }
.ltv-status__big { font-size: 48px; font-weight: 700; letter-spacing: -.035em; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.ltv-status__big small { font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--ltv-text-2); margin-inline-start: 8px; }
.ltv-status__line { margin: 10px 0 0; font-size: 15px; color: var(--ltv-text-2); }
.ltv-status__line b { color: #fff; font-weight: 600; }
.ltv-status__actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 767px) { .ltv-status__big { font-size: 40px; } .ltv-status__actions .ltv-btn { flex: 1 1 auto; } }
.ltv-progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.ltv-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--ltv-gradient); }
.ltv-progress--warning > span { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.ltv-progress--danger > span { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ---------------------------------------------------------------- credentials */
.ltv-creds { display: grid; gap: 10px; }
.ltv-cred { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 10px 8px 10px 16px;
  background: var(--ltv-surface-2); border: 1px solid var(--ltv-border); border-radius: var(--ltv-r-panel); }
[dir="rtl"] .ltv-cred { padding: 10px 16px 10px 8px; }
.ltv-cred__label { grid-column: 1 / -1; font-size: 12px; color: var(--ltv-text-3); }
.ltv-cred__value { font-family: var(--ltv-font-mono); font-size: 15px; color: #fff; direction: ltr; unicode-bidi: isolate;
  overflow-wrap: anywhere; text-align: start; }
[dir="rtl"] .ltv-cred__value { text-align: end; }
.ltv-cred__actions { display: flex; gap: 2px; }
.ltv-help-line { font-size: 13px; color: var(--ltv-text-3); margin: 0; }
.ltv-help-line b { color: var(--ltv-text-2); font-weight: 600; }
.ltv-qr { background: #fff; border-radius: 14px; padding: 12px; width: 184px; height: 184px; display: grid; place-items: center; }
.ltv-qr svg, .ltv-qr img { width: 160px; height: 160px; }

/* ---------------------------------------------------------------- lists / rows */
.ltv-rows > * + * { border-top: 1px solid var(--ltv-border); }
.ltv-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 4px; color: #fff; font-size: 14px; text-decoration: none; }
.ltv-row:hover { color: #fff; }
.ltv-row svg.ltv-go { margin-inline-start: auto; width: 18px; height: 18px; color: var(--ltv-text-3); flex: none; }
[dir="rtl"] svg.ltv-go, [dir="rtl"] .ltv-flip { transform: scaleX(-1); }
.ltv-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .ltv-tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ltv-tile { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 14px; border-radius: var(--ltv-r-panel); background: var(--ltv-surface-2);
  border: 1px solid var(--ltv-border); color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; transition: border-color .15s, transform .15s var(--ltv-ease); }
.ltv-tile:hover { border-color: var(--ltv-border-strong); transform: translateY(-1px); }
.ltv-tile svg { width: 22px; height: 22px; color: var(--ltv-purple-light); flex: none; }

/* ---------------------------------------------------------------- stepper / timeline */
.ltv-steps { list-style: none; margin: 0; padding: 0; }
.ltv-step { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding-bottom: 20px; }
.ltv-step:last-child { padding-bottom: 0; }
.ltv-step::before { content: ""; position: absolute; inset-inline-start: 15px; top: 32px; bottom: 0; width: 2px; background: var(--ltv-border-strong); }
.ltv-step:last-child::before { display: none; }
.ltv-step__dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--ltv-surface-2); border: 2px solid var(--ltv-border-strong); color: var(--ltv-text-2); z-index: 1; }
.ltv-step--done .ltv-step__dot { background: var(--ltv-success); border-color: var(--ltv-success); color: #052e1f; }
.ltv-step--done::before { background: var(--ltv-success); }
.ltv-step--current .ltv-step__dot { background: var(--ltv-purple); border-color: var(--ltv-purple-light); color: #fff; box-shadow: 0 0 0 6px rgba(124,58,237,.2); }
.ltv-step__title { font-weight: 600; font-size: 14px; color: #fff; padding-top: 5px; }
.ltv-step__desc { font-size: 13px; color: var(--ltv-text-2); margin-top: 2px; }
.ltv-hsteps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; }
.ltv-hsteps li { flex: 1; height: 4px; border-radius: 4px; background: var(--ltv-border-strong); }
.ltv-hsteps li.is-done { background: var(--ltv-purple-light); }

/* ---------------------------------------------------------------- alerts / toast */
.ltv-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--ltv-r-panel); border: 1px solid; font-size: 14px; }
.ltv-alert strong { display: block; color: #fff; margin-bottom: 2px; }
.ltv-alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.ltv-alert--info    { background: var(--ltv-info-bg);    border-color: rgba(96,165,250,.3);  color: #bfdbfe; }
.ltv-alert--success { background: var(--ltv-success-bg); border-color: rgba(52,211,153,.3); color: #a7f3d0; }
.ltv-alert--warning { background: var(--ltv-warning-bg); border-color: rgba(251,191,36,.3); color: #fde68a; }
.ltv-alert--danger  { background: var(--ltv-danger-bg);  border-color: rgba(248,113,113,.3); color: #fecaca; }
.ltv-toasts { position: fixed; z-index: 70; inset-inline: 16px; bottom: calc(var(--ltv-bottombar-h) + 16px + env(safe-area-inset-bottom));
  display: grid; gap: 8px; justify-items: center; pointer-events: none; }
@media (min-width: 1024px) { .ltv-toasts { inset-inline: auto 24px; bottom: 24px; justify-items: end; } [dir="rtl"] .ltv-toasts { inset-inline: 24px auto; } }
.ltv-toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 440px; padding: 12px 16px; background: #221a38;
  border: 1px solid var(--ltv-border-strong); border-radius: 14px; box-shadow: 0 24px 64px -16px rgba(0,0,0,.8); color: #fff; font-size: 14px;
  animation: ltv-in .24s var(--ltv-ease); }
.ltv-toast svg { width: 20px; height: 20px; flex: none; }
.ltv-toast--success svg { color: var(--ltv-success); } .ltv-toast--error svg { color: var(--ltv-danger); } .ltv-toast--info svg { color: var(--ltv-info); }
.ltv-toast__x { margin-inline-start: auto; background: none; border: 0; color: var(--ltv-text-3); cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
@keyframes ltv-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- wizard */
.ltv-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .ltv-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ltv-pick { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 96px; padding: 14px 8px; border-radius: 16px;
  background: var(--ltv-surface); border: 1px solid var(--ltv-border); color: var(--ltv-text-2); font-size: 13px; font-weight: 600; text-align: center;
  text-decoration: none; transition: border-color .15s, background-color .15s; }
.ltv-pick svg { width: 28px; height: 28px; }
.ltv-pick:hover { border-color: var(--ltv-border-strong); color: #fff; }
.ltv-pick[aria-current="true"] { border-color: var(--ltv-purple-light); background: var(--ltv-purple-tint); color: #fff; box-shadow: 0 0 0 3px rgba(168,85,247,.2); }
.ltv-pick[aria-current="true"] svg { color: var(--ltv-purple-light); }
.ltv-code { font-family: var(--ltv-font-mono); font-size: 28px; letter-spacing: .14em; color: #fff; direction: ltr; unicode-bidi: isolate; }

/* ---------------------------------------------------------------- empty / error pages */
.ltv-empty { text-align: center; padding: 48px 24px; display: grid; justify-items: center; gap: 12px; }
.ltv-empty__art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--ltv-purple-tint); color: var(--ltv-purple-light); }
.ltv-empty__art svg { width: 28px; height: 28px; }
.ltv-empty h2 { margin: 0; font-size: 18px; color: #fff; }
.ltv-empty p { margin: 0; color: var(--ltv-text-2); max-width: 44ch; font-size: 14px; }
.ltv-errorpage { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.ltv-errorpage__code { font-size: 72px; font-weight: 700; letter-spacing: -.04em; background: var(--ltv-gradient); -webkit-background-clip: text;
  background-clip: text; color: transparent; line-height: 1; }

/* ---------------------------------------------------------------- tables (shared) */
.ltv-table-wrap { overflow-x: auto; border: 1px solid var(--ltv-border); border-radius: var(--ltv-r-card); background: var(--ltv-surface); }
.ltv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ltv-table th { position: sticky; top: 0; background: var(--ltv-surface-2); color: var(--ltv-text-2); font-size: 12px; font-weight: 600;
  text-align: start; padding: 10px 16px; white-space: nowrap; }
.ltv-table td { padding: 12px 16px; border-top: 1px solid var(--ltv-border); color: #fff; vertical-align: middle; }
.ltv-table tbody tr:hover { background: rgba(124, 58, 237, .06); }
.ltv-table .num { text-align: end; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .ltv-table--stack thead { display: none; }
  .ltv-table--stack, .ltv-table--stack tbody, .ltv-table--stack tr, .ltv-table--stack td { display: block; }
  .ltv-table--stack tr { padding: 12px 16px; border-top: 1px solid var(--ltv-border); }
  .ltv-table--stack td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
  .ltv-table--stack td::before { content: attr(data-label); color: var(--ltv-text-3); font-size: 12px; }
  .ltv-table--stack td.num { text-align: end; }
}

/* ---------------------------------------------------------------- legacy component refresh (lt-*) */
.lt-card { background: var(--ltv-surface); border-color: var(--ltv-border); border-radius: var(--ltv-r-card); }
.lt-btn { min-height: var(--ltv-tap); border-radius: var(--ltv-r-btn); font-weight: 600; }
.lt-btn--primary { background: var(--ltv-purple); box-shadow: 0 8px 24px -10px rgba(124, 58, 237, .8); }
.lt-btn--primary:hover { background: var(--ltv-purple-hover); }
.lt-input { min-height: 44px; border-radius: var(--ltv-r-ctl); background: var(--ltv-surface-2); border-color: var(--ltv-border-strong); }
.lt-input:focus { border-color: var(--ltv-purple-light); box-shadow: 0 0 0 4px rgba(168, 85, 247, .2); }
:where(a[href], button, summary, [role="button"], input, select, textarea):focus-visible { outline: 2px solid var(--ltv-focus); outline-offset: 2px; }
.ltv-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltv-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .ltv-grid--main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; } }
.ltv-stack { display: grid; gap: 16px; } .ltv-stack > * { min-width: 0; }

/* ---------------------------------------------------------------- icons */
.ltv-i { width: 20px; height: 20px; flex: none; }
.ltv-menu .ltv-i { width: 18px; height: 18px; }
.ltv-mark .ltv-i, .ltv-mark svg { width: 14px; height: 14px; }

/* the sticky top bar also cancels <main>'s top padding (no strip above it) */
main.py-6, main.p-6 { --ltv-main-pt: 1.5rem; } main.py-8, main.p-8 { --ltv-main-pt: 2rem; } main.py-4, main.p-4 { --ltv-main-pt: 1rem; }
main.py-10 { --ltv-main-pt: 2.5rem; } main.py-5 { --ltv-main-pt: 1.25rem; }
.ltv-tb { margin-top: calc(-1 * var(--ltv-main-pt, 1.5rem)); }

/* ---------------------------------------------------------------- admin: search + ⌘K palette */
.ltv-search-btn { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px 0 12px; border-radius: var(--ltv-r-ctl);
  background: var(--ltv-surface); border: 1px solid var(--ltv-border); color: var(--ltv-text-3); font-family: inherit; font-weight: 500; font-size: 14px; cursor: pointer; width: calc(100% - 8px); }
.ltv-search-btn:hover { border-color: var(--ltv-border-strong); color: var(--ltv-text-2); }
.ltv-kbd { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--ltv-border-strong);
  background: var(--ltv-surface-2); font: 500 11px var(--ltv-font-mono); color: var(--ltv-text-2); }
.ltv-cmdk { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
  background: rgba(4, 2, 10, .7); backdrop-filter: blur(6px); }
.ltv-cmdk.is-open { display: flex; }
.ltv-cmdk__box { width: min(640px, 100%); background: #140f24; border: 1px solid var(--ltv-border-strong); border-radius: 18px; box-shadow: 0 32px 80px -20px rgba(0,0,0,.9); overflow: hidden; }
.ltv-cmdk__in { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--ltv-border); }
.ltv-cmdk__in input { flex: 1; min-height: 56px; background: none; border: 0; outline: 0; color: #fff; font-family: inherit; font-weight: 400; font-size: 16px; }
.ltv-cmdk__list { max-height: min(60vh, 460px); overflow-y: auto; padding: 8px; }
.ltv-cmdk__group { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ltv-text-3); padding: 10px 12px 4px; }
.ltv-cmdk__item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ltv-text-2); text-decoration: none; font-size: 14px; }
.ltv-cmdk__item[aria-selected="true"] { background: var(--ltv-purple-tint); color: #fff; }
.ltv-cmdk__item small { color: var(--ltv-text-3); font-size: 12px; }
.ltv-cmdk__item .ltv-badge { margin-inline-start: auto; }
.ltv-cmdk__empty { padding: 24px; text-align: center; color: var(--ltv-text-3); font-size: 14px; }
.ltv-cmdk__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--ltv-border); color: var(--ltv-text-3); font-size: 12px; }

/* ---------------------------------------------------------------- admin: page header + KPI tiles */
.ltv-kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .ltv-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ltv-kpi { display: grid; gap: 6px; padding: 16px; border-radius: var(--ltv-r-card); background: var(--ltv-surface); border: 1px solid var(--ltv-border); color: #fff; text-decoration: none !important; transition: border-color .15s; }
.ltv-kpi:hover { border-color: var(--ltv-border-strong); }
.ltv-kpi .ltv-badge { justify-self: start; }
.ltv-kpi__n { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.ltv-kpi__l { font-size: 13px; color: var(--ltv-text-2); }
.ltv-kpi--crit { border-color: rgba(248,113,113,.45); background: linear-gradient(180deg, rgba(248,113,113,.10), transparent), var(--ltv-surface); }
.ltv-kpi--warn { border-color: rgba(251,191,36,.35); }
.ltv-kpi--calm .ltv-kpi__n { color: var(--ltv-text-2); }

/* =====================================================================
   R3 — consistency layer. One scale for buttons, form controls, cards,
   headings and tables on every page, without rewriting page markup.
   Scoped to `body.ltv-ui3 main` (set in both headers; frozen payment pages
   don't get it), which also gives these rules enough weight to beat the
   single-class Tailwind utilities they normalise. Colours, layout, display
   and visibility classes are never overridden, only shape and size.
   Audit + before/after numbers: ux-audit/UI-CONSISTENCY-AUDIT.md
   ===================================================================== */
.ltv-ui3 {
  --ltv-btn-h: 44px; --ltv-btn-h-sm: 36px; --ltv-ctl-h: 44px; --ltv-ctl-h-sm: 36px;
  --ltv-card-bg: rgba(21, 16, 35, .6); --ltv-well-bg: rgba(8, 6, 17, .55); --ltv-ctl-bg: #0b0817;
  --ltv-h1: 24px; --ltv-th: #9e97b2;
}
.ltv-ui3.ltv-area-admin { --ltv-btn-h: 40px; --ltv-btn-h-sm: 32px; --ltv-ctl-h: 40px; --ltv-ctl-h-sm: 32px; --ltv-h1: 22px; }
@media (min-width: 768px) { .ltv-ui3 { --ltv-h1: 28px; } .ltv-ui3.ltv-area-admin { --ltv-h1: 24px; } }

/* ---- buttons: real buttons and button-styled links (padding + fill/border), not card-sized tiles */
.ltv-ui3 main :is(button, a, input[type=submit], input[type=button])[class*="px-"]:is([class*="py-0"], [class*="py-1"], [class*="py-2"]):is([class*="bg-"], [class*="border"]):not([class*="ltv-"]):not([class*="rounded-full"]) {
  border-radius: var(--ltv-r-btn); border-width: 1px; border-style: solid; line-height: 20px; font-size: 14px;
  padding-block: calc((var(--ltv-btn-h) - 22px) / 2); letter-spacing: -.005em;
  transition: background-color .15s var(--ltv-ease), border-color .15s var(--ltv-ease), color .15s var(--ltv-ease), box-shadow .15s var(--ltv-ease), opacity .15s;
}
.ltv-ui3 main :is(button, a, input[type=submit], input[type=button])[class*="px-"]:is([class*="py-0"], [class*="py-1"], [class*="py-2"]):is([class*="bg-"], [class*="border"]):not([class*="ltv-"]):not([class*="rounded-full"]):not([class*="border-"]) { border-color: transparent; }
.ltv-ui3 main :is(button, a, input[type=submit], input[type=button])[class*="px-"]:is([class*="py-0"], [class*="py-1"], [class*="py-2"]):is([class*="bg-"], [class*="border"]):not([class*="ltv-"]):not([class*="rounded-full"]):not([class*="font-"]) { font-weight: 600; }
/* small: text-xs or py-0.5 / py-1 / py-1.5 (toolbar, row and filter actions) */
.ltv-ui3 main :is(button, a, input[type=submit], input[type=button])[class*="px-"]:is([class*="py-0"], [class*="py-1"], [class*="py-2"]):is([class*="bg-"], [class*="border"]):not([class*="ltv-"]):not([class*="rounded-full"]):is([class~="text-xs"], [class~="py-0.5"], [class~="py-1"], [class~="py-1.5"]) {
  border-radius: var(--ltv-r-btn-sm); line-height: 18px; font-size: 13px; padding-block: calc((var(--ltv-btn-h-sm) - 20px) / 2);
}
/* primary = brand purple (legacy emerald / violet / indigo "Save" buttons included) */
.ltv-ui3 main :is(button, a, input[type=submit], input[type=button])[class*="px-"]:is([class~="bg-brand-500"], [class~="bg-brand-600"], [class~="bg-brand-700"], [class~="bg-violet-600"], [class~="bg-purple-600"], [class~="bg-indigo-600"], [class~="bg-emerald-600"]):not([class*="ltv-"]) {
  background-color: var(--ltv-purple); border-color: transparent; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 18px -10px rgba(124, 58, 237, .85);
}
.ltv-ui3 main :is(button, a, input[type=submit], input[type=button])[class*="px-"]:is([class~="bg-brand-500"], [class~="bg-brand-600"], [class~="bg-brand-700"], [class~="bg-violet-600"], [class~="bg-purple-600"], [class~="bg-indigo-600"], [class~="bg-emerald-600"]):not([class*="ltv-"]):not(:disabled):hover { background-color: var(--ltv-purple-hover); }
/* secondary = raised surface */
.ltv-ui3 main :is(button, a, input[type=submit], input[type=button])[class*="px-"]:is([class~="bg-slate-700"], [class~="bg-slate-800"], [class~="bg-slate-900"]):not([class*="ltv-"]) {
  background-color: var(--ltv-surface-3); border-color: var(--ltv-border-strong);
}
.ltv-ui3 main :is(button, a, input[type=submit], input[type=button])[class*="px-"]:is([class~="bg-slate-700"], [class~="bg-slate-800"], [class~="bg-slate-900"]):not([class*="ltv-"]):not(:disabled):hover { background-color: #30254d; border-color: #4a3c73; color: #fff; }
.ltv-ui3 main :is(button, input[type=submit], input[type=button]):disabled { opacity: .55; cursor: not-allowed; }

/* ---- focus: one visible ring for everything interactive in the page body */
.ltv-ui3 main :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--ltv-focus); outline-offset: 2px; }

/* ---- form controls */
.ltv-ui3 main :is(input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=url], input[type=date], input[type=datetime-local], input[type=time], input[type=month], select):not([class*="bg-transparent"]):not([class*="border-0"]):not([class~="border-none"]):not([class*="ltv-"]):not([class*="sr-only"]) {
  height: var(--ltv-ctl-h); padding-block: 0; border-radius: var(--ltv-r-ctl); border: 1px solid var(--ltv-border-strong);
  background-color: var(--ltv-ctl-bg); color: var(--ltv-text); font-size: 14px; line-height: 20px;
  transition: border-color .15s var(--ltv-ease), box-shadow .15s var(--ltv-ease);
}
/* inline padding only where the page set none (icon fields keep their ps-10 / pl-10) */
.ltv-ui3 main :is(input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=url], input[type=date], input[type=datetime-local], input[type=time], input[type=month], select):not([class*="ltv-"]):not([class*="px-"]):not([class*="pl-"]):not([class*="pr-"]):not([class*="ps-"]):not([class*="pe-"]):not([class~="p-0"]) { padding-inline: 12px; }
.ltv-ui3 main textarea:not([class*="bg-transparent"]):not([class*="border-0"]):not([class~="border-none"]):not([class*="ltv-"]) {
  padding: 10px 12px; border-radius: var(--ltv-r-ctl); border: 1px solid var(--ltv-border-strong); background-color: var(--ltv-ctl-bg);
  color: var(--ltv-text); font-size: 14px; line-height: 1.5; transition: border-color .15s var(--ltv-ease), box-shadow .15s var(--ltv-ease);
}
.ltv-ui3 main :is(input, select):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([class*="bg-transparent"]):not([class*="border-0"]):not([class*="ltv-"]):is([class~="text-xs"], [class~="py-0.5"], [class~="py-1"], [class~="h-8"], [class~="h-7"]) {
  height: var(--ltv-ctl-h-sm); font-size: 13px; border-radius: var(--ltv-r-btn-sm);
}
.ltv-ui3 main :is(input, select, textarea):not([class*="bg-transparent"]):not([class*="border-0"]):not([class*="ltv-"]):hover:not(:focus):not(:disabled) { border-color: #4a3c73; }
.ltv-ui3 main :is(input, select, textarea):not([class*="bg-transparent"]):not([class*="border-0"]):not([class*="ltv-"]):focus {
  outline: none; border-color: var(--ltv-purple-light); box-shadow: 0 0 0 3px rgba(168, 85, 247, .22);
}
.ltv-ui3 main :is(input, textarea)::placeholder { color: var(--ltv-text-3); opacity: 1; }
.ltv-ui3 main :is(input, select, textarea):disabled { opacity: .6; cursor: not-allowed; }
.ltv-ui3 main :is(input[type=checkbox], input[type=radio], input[type=range]) { accent-color: var(--ltv-purple); }
@media (max-width: 639px) { /* 16px stops iOS zooming into the field */
  .ltv-ui3.ltv-area-customer main :is(input, select, textarea):not([type=checkbox]):not([type=radio]):not([class*="ltv-"]) { font-size: 16px; }
}

/* ---- cards and panels: one radius / border / fill family (paddings stay page-specific) */
.ltv-ui3 main :is(div, section, article, aside, form, details, li, fieldset)[class*="border"]:is([class*="bg-slate-9"], [class*="bg-slate-800/"]):not([class*="ltv-"]):not([class*="rounded-full"]):is([class~="rounded-2xl"], [class~="rounded-3xl"]) {
  border-radius: var(--ltv-r-card);
}
.ltv-ui3 main :is(div, section, article, aside, form, details, li, fieldset)[class*="border"]:is([class*="bg-slate-9"], [class*="bg-slate-800/"]):not([class*="ltv-"]):is([class~="rounded-xl"], [class~="rounded-lg"], [class~="rounded-md"], [class~="rounded"]) {
  border-radius: var(--ltv-r-panel);
}
.ltv-ui3 main :is(div, section, article, aside, form, details, li, fieldset):is([class~="bg-slate-900"], [class*="bg-slate-900/"]):is([class*="rounded-"], [class~="rounded"])[class*="border"]:not([class*="ltv-"]) { background-color: var(--ltv-card-bg); }
.ltv-ui3 main :is(div, section, article, aside, form, details, li, fieldset):is([class~="bg-slate-950"], [class*="bg-slate-950/"]):is([class*="rounded-"], [class~="rounded"])[class*="border"]:not([class*="ltv-"]) { background-color: var(--ltv-well-bg); }
.ltv-ui3 main :is(div, section, article, aside, form, details, li, fieldset):is([class~="border-slate-700"], [class~="border-slate-800"], [class*="border-slate-800/"], [class*="border-slate-700/"]):is([class*="rounded-"], [class~="rounded"]):not([class*="ltv-"]) { border-color: var(--ltv-border); }
.ltv-ui3 main :is(div, section, article, aside, form, details, li, fieldset)[class*="border"][class*="bg-slate-9"]:is([class~="rounded-2xl"], [class~="rounded-3xl"]):not([class*="ltv-"]):not([class*="shadow"]) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

/* ---- headings: page title + three section sizes */
.ltv-ui3 main h1:not([class~="text-xs"]):not([class~="text-sm"]):not([class~="text-base"]):not([class*="ltv-"]) {
  font-size: var(--ltv-h1); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--ltv-text);
}
.ltv-ui3 main h2:not([class*="ltv-"]) { font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.ltv-ui3 main h2:not([class*="ltv-"]):is([class~="text-base"], [class~="text-lg"], [class~="text-xl"], :not([class*="text-"])) { font-size: 18px; }
.ltv-ui3 main h2:not([class*="ltv-"]):is([class~="text-sm"], [class~="text-[15px]"]) { font-size: 15px; }
.ltv-ui3 main h2:not([class*="ltv-"]):is([class~="text-2xl"], [class~="text-3xl"]) { font-size: 22px; font-weight: 700; }
.ltv-ui3 main h3:not([class*="ltv-"]):not([class*="font-"]) { font-weight: 600; }
[dir="rtl"] .ltv-ui3 main :is(h1, h2) { letter-spacing: 0; }

/* ---- tables (legacy markup; .ltv-table already follows this) */
.ltv-ui3 main table:not(.ltv-table) th {
  font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ltv-th);
}
.ltv-ui3 main table:not(.ltv-table) :is(th, td)[class*="px-"] { padding-inline: 12px; }
.ltv-ui3 main table:not(.ltv-table) th[class*="py-"] { padding-block: 11px; }
.ltv-ui3 main table:not(.ltv-table) > tbody > tr { transition: background-color .12s; }
.ltv-ui3 main table:not(.ltv-table) > tbody > tr:hover { background-color: rgba(124, 58, 237, .05); }
[dir="rtl"] .ltv-ui3 main table th { letter-spacing: 0; text-transform: none; }

/* ---- admin page frame: one padding scale (max-widths stay page-specific) */
.ltv-ui3.ltv-area-admin main.flex-1 { padding: 20px 16px 32px; }
@media (min-width: 640px)  { .ltv-ui3.ltv-area-admin main.flex-1 { padding: 24px 24px 40px; } }
@media (min-width: 1024px) { .ltv-ui3.ltv-area-admin main.flex-1 { padding: 32px 32px 48px; } }
.ltv-ui3 main table :is(span, a)[class*="rounded-full"] { white-space: nowrap; }
/* fallback: admin/support-workspace.css (defines .support-scroll) is missing from the snapshot — F45 */
.support-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }

/* =====================================================================
   R4 — page rebuilds (dashboard plans, app devices, backup access,
   admin filter bar, Email Hub). Components only; no page logic here.
   ===================================================================== */
/* ---- plan cards: column count follows the space the grid really has, not the viewport */
.ltv-plans { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); padding-top: 6px; }
.ltv-plan { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 20px; border-radius: var(--ltv-r-card);
  background: var(--ltv-surface-2); border: 1px solid var(--ltv-border); }
.ltv-plan--best { border-color: rgba(168, 85, 247, .6); background: linear-gradient(180deg, rgba(124, 58, 237, .18), rgba(124, 58, 237, 0) 60%), var(--ltv-surface-2); }
.ltv-plan__flag { position: absolute; top: -11px; inset-inline-start: 16px; height: 22px; padding: 0 10px; border-radius: 999px; display: inline-flex;
  align-items: center; background: var(--ltv-purple); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ltv-plan__name { font-size: 14px; font-weight: 600; color: var(--ltv-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltv-plan--best .ltv-plan__name { color: #fff; }
.ltv-plan__price { margin-top: 10px; font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; color: #fff; text-align: start;
  font-variant-numeric: tabular-nums; }
.ltv-plan__meta { margin-top: 6px; font-size: 13px; color: var(--ltv-text-2); }
.ltv-plan__save { margin-top: 4px; min-height: 20px; font-size: 13px; font-weight: 600; color: var(--ltv-success); }
.ltv-plan__desc { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--ltv-text-3); }
.ltv-plan__cta { margin-top: auto; padding-top: 16px; }
.ltv-plan__cta .ltv-btn { padding-inline: 10px; }
@media (max-width: 479px) { /* phone: one compact row per plan — name + price side by side, button below */
  .ltv-plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 16px; }
  .ltv-plan__price { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; font-size: 26px; }
  .ltv-plan__name, .ltv-plan__meta, .ltv-plan__save { grid-column: 1; }
  .ltv-plan__save { min-height: 0; } .ltv-plan__save:empty { display: none; }
  .ltv-plan__desc, .ltv-plan__cta { grid-column: 1 / -1; } .ltv-plan__cta { padding-top: 12px; }
}
/* ---- dashboard without a plan: single column, help as one strip */
.ltv-trial-submit { align-self: flex-end; }
@media (max-width: 639px) { .ltv-trial-submit { align-self: stretch; width: 100%; } }
@media (min-width: 1024px) {
  .ltv-grid--solo .ltv-helpcard .ltv-card__body { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 28px; padding-block: 14px; }
  .ltv-grid--solo .ltv-helpcard .ltv-card__title { margin: 0; white-space: nowrap; }
  .ltv-grid--solo .ltv-helpcard .ltv-rows { display: flex; gap: 8px; min-width: 0; }
  .ltv-grid--solo .ltv-helpcard .ltv-rows > * { border: 0; flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: var(--ltv-r-btn);
    background: var(--ltv-surface-2); font-size: 13px; }
  .ltv-grid--solo .ltv-helpcard .ltv-rows > * > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ltv-grid--solo .ltv-helpcard .ltv-rows > *:hover { background: var(--ltv-surface-3); }
  .ltv-grid--solo .ltv-helpcard .ltv-btn { margin: 0; width: auto; }
}
@media (min-width: 640px) { #trial-form { max-width: 600px; } }
/* ---- top bar on very narrow phones: the mark stays, the name and pill labels give way */
@media (max-width: 359px) { .ltv-tb { gap: 6px; } .ltv-tb__name { display: none; } .ltv-tb__end { gap: 6px; } }
@media (max-width: 299px) { .ltv-tb .ltv-pill > span { display: none; } .ltv-tb .ltv-pill { padding: 0 11px; } }
@media (max-width: 359px) { .ltv-card__head .ltv-btn { white-space: normal; max-width: 100%; text-align: start; padding-block: 8px; } }
/* ---- supported devices (app.php): one drawing per device family */
.ltv-devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(46%, 132px), 1fr)); }
.ltv-device { display: grid; justify-items: center; gap: 10px; padding: 18px 8px 14px; border-radius: var(--ltv-r-panel); background: var(--ltv-surface-2);
  border: 1px solid var(--ltv-border); color: var(--ltv-text); font-size: 13px; font-weight: 500; text-align: center; }
.ltv-device-art { width: 48px; height: 48px; color: #cbb8f5; }
.ltv-device-art .t { fill: rgba(168, 85, 247, .22); stroke: none; }
.ltv-device-art .p { fill: var(--ltv-purple-light); stroke: none; }
/* ---- single-purpose pages (backup access): a readable column, not a dashboard */
.ltv-page-narrow { max-width: 760px; display: grid; gap: 16px; }
.ltv-page-narrow > * { min-width: 0; }
.ltv-page-title { margin: 4px 0 4px; font-size: var(--ltv-h1, 28px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: #fff; }
.ltv-status__title { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; color: #fff; }
.ltv-backup-form .ltv-btn { max-width: 100%; white-space: normal; text-align: center; padding-block: 10px; }
@media (max-width: 639px) { .ltv-backup-form .ltv-btn { width: 100%; } }
.ltv-facts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.ltv-facts li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; font-size: 14px; line-height: 1.5; color: var(--ltv-text-2); }
.ltv-facts li + li { border-top: 1px solid var(--ltv-border); }
.ltv-facts svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ltv-purple-light); }
/* ---- list toolbar (admin customers / orders): tabs, then search + filters on one line */
.ltv-filters { margin-bottom: 14px; }
.ltv-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ltv-border); overflow-x: auto; scrollbar-width: none; }
.ltv-tabs::-webkit-scrollbar { display: none; }
.ltv-tab { flex: none; padding: 10px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ltv-text-2); font-size: 14px; font-weight: 500;
  text-decoration: none; white-space: nowrap; transition: color .15s var(--ltv-ease), border-color .15s var(--ltv-ease); }
.ltv-tab:hover { color: #fff; }
.ltv-tab[aria-current="page"] { color: #fff; font-weight: 600; border-bottom-color: var(--ltv-purple-light); }
.ltv-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; }
.ltv-filterbar--more { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.ltv-filterbar--more.hidden { display: none; }
.ltv-filterbar .ltv-btn { min-height: 40px; padding: 0 14px; }
.ltv-filterbar .ltv-btn.is-on { color: #e9d5ff; background: var(--ltv-purple-tint); border-color: rgba(168, 85, 247, .4); }
.ltv-filterbar__reset { margin-inline-start: auto; font-size: 13px; color: var(--ltv-text-3); text-decoration: none; padding: 8px 4px; }
.ltv-filterbar__reset:hover { color: #fff; }
.ltv-filterbar__count { font-size: 13px; color: var(--ltv-text-2); }
.ltv-searchfield { position: relative; flex: 1 1 280px; min-width: 0; max-width: 520px; display: block; }
.ltv-searchfield > svg { position: absolute; inset-inline-start: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--ltv-text-3); pointer-events: none; }
.ltv-searchfield > .ltv-input { width: 100%; padding-inline-start: 36px; }
.ltv-input { height: 40px; padding: 0 12px; border-radius: var(--ltv-r-ctl); border: 1px solid var(--ltv-border-strong); background-color: var(--ltv-ctl-bg, #0b0817);
  color: #fff; font: inherit; font-size: 14px; min-width: 0; transition: border-color .15s var(--ltv-ease), box-shadow .15s var(--ltv-ease); }
.ltv-input::placeholder { color: var(--ltv-text-3); opacity: 1; }
.ltv-input:hover { border-color: #4a3c73; }
.ltv-input:focus { outline: none; border-color: var(--ltv-purple-light); box-shadow: 0 0 0 3px rgba(168, 85, 247, .22); }
.ltv-input--select { padding-inline-end: 28px; max-width: 100%; }
@media (max-width: 639px) { .ltv-searchfield { flex-basis: 100%; max-width: none; } .ltv-filterbar__reset { margin-inline-start: 0; } }
/* ---- wide admin lists: the actions column stays in view while the rest scrolls sideways */
@media (min-width: 768px) {
  .ltv-area-admin .orders-table-scroll table :is(th, td):last-child,
  .ltv-area-admin #bulk-form table :is(th, td):last-child { position: sticky; inset-inline-end: 0; z-index: 1; background: #130e22;
    box-shadow: -1px 0 0 var(--ltv-border), -12px 0 16px -12px rgba(0, 0, 0, .6); }
  .ltv-area-admin .orders-table-scroll table td:last-child:has([data-dropdown-menu]:not(.hidden)) { z-index: 3; }
}
/* ---- shared admin building blocks (first used by the Email Hub tokens in admin/includes/email-hub-ui.php) */
textarea.ltv-input { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.5; }
.ltv-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ltv-text-2); }
.ltv-muted { font-size: 13px; color: var(--ltv-text-3); }
.ltv-btn--danger-solid { background: #be123c; border-color: transparent; }
.ltv-btn--danger-solid:hover { background: #9f1239; }
.ltv-area-admin main .ltv-btn { min-height: 40px; padding-inline: 16px; }
.ltv-area-admin main .ltv-btn--sm { min-height: 32px; padding-inline: 12px; }
.ltv-hubcard { padding: 20px; }
.ltv-hubcard--flush { overflow: hidden; }
.ltv-seg { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--ltv-r-btn-sm); border: 1px solid transparent;
  color: var(--ltv-text-2); font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background-color .15s var(--ltv-ease), color .15s var(--ltv-ease); }
.ltv-seg:hover { color: #fff; background: var(--ltv-surface-2); }
.ltv-seg.is-on { color: #fff; background: var(--ltv-surface-3); border-color: var(--ltv-border-strong); font-weight: 600; }
.ltv-seg__n { font-size: 12px; color: var(--ltv-text-3); font-variant-numeric: tabular-nums; }
.ltv-seg.is-on .ltv-seg__n { color: #d8b4fe; }
.ltv-th { padding: 10px 12px 10px 0; text-align: start; font-size: 12px; font-weight: 600; color: var(--ltv-th, #9e97b2); white-space: nowrap; }
.ltv-td { padding: 12px 12px 12px 0; vertical-align: top; font-size: 14px; color: var(--ltv-text-2); }
.ltv-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; min-width: 0; }
.ltv-pagehead__sub { margin: 6px 0 0; max-width: 72ch; font-size: 14px; line-height: 1.5; color: var(--ltv-text-2); }
.ltv-pagehead__back { display: inline-block; margin-bottom: 6px; font-size: 13px; color: var(--ltv-text-3); text-decoration: none; }
.ltv-pagehead__back:hover { color: #fff; }
.ltv-pagehead__actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 639px) { .ltv-pagehead__actions { width: 100%; flex-direction: column; } }
.ltv-hubnav { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--ltv-border); }
.ltv-hubnav .ltv-tabs { flex: 1 1 auto; min-width: 0; border-bottom: 0; }
.ltv-hubnav .ltv-tab[aria-current="false"] { border-bottom-color: transparent; }
.ltv-hubnav__state { flex: none; padding-bottom: 6px; }
@media (max-width: 767px) { .ltv-hubnav { flex-direction: column-reverse; align-items: stretch; gap: 8px; border-bottom: 0; } .ltv-hubnav .ltv-tabs { border-bottom: 1px solid var(--ltv-border); } .ltv-hubnav__state { padding: 0; } }
.ltv-stat { padding: 16px 18px; border-radius: var(--ltv-r-panel); background: var(--ltv-surface); border: 1px solid var(--ltv-border); min-width: 0; }
.ltv-stat__label { font-size: 13px; color: var(--ltv-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltv-stat__value { margin-top: 6px; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ltv-stat__sub { margin-top: 6px; font-size: 12px; color: var(--ltv-text-3); overflow-wrap: anywhere; }
.ltv-stat--emerald .ltv-stat__value { color: var(--ltv-success); } .ltv-stat--amber .ltv-stat__value { color: var(--ltv-warning); }
.ltv-stat--rose .ltv-stat__value { color: var(--ltv-danger); }     .ltv-stat--sky .ltv-stat__value { color: var(--ltv-info); }
.ltv-stat--brand .ltv-stat__value { color: #d8b4fe; }
.ltv-empty__title { font-size: 16px; font-weight: 600; color: #fff; }
.ltv-empty__text { margin: 0; max-width: 52ch; font-size: 14px; line-height: 1.5; color: var(--ltv-text-2); }
.ltv-empty__action { margin-top: 6px; display: flex; justify-content: center; }
.ltv-empty:has(.ltv-empty__title) { padding: 40px 20px; gap: 8px; }
/* ---- status cards: long translated titles wrap instead of widening the page (expired-link card in French at 390 px) */
.ltv-status > * { min-width: 0; }
.ltv-status :is(h2, .ltv-status__meta, .ltv-status__line) { overflow-wrap: anywhere; }
.ltv-status__meta { text-align: end; }
.ltv-btn { max-width: 100%; }
@media (max-width: 479px) { .ltv-btn--lg { white-space: normal; text-align: center; padding-block: 10px; line-height: 1.3; } }
/* ---- R5 list toolbar: "More filters" panel + removable chips (admin customers / orders) */
.ltv-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ltv-purple); color: #fff;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ltv-filterpanel { margin-top: 10px; padding: 16px; border: 1px solid var(--ltv-border); border-radius: var(--ltv-r-panel); background: var(--ltv-surface); }
.ltv-filterpanel.hidden { display: none; }
.ltv-filterpanel__grid { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.ltv-filterpanel__grid > div { min-width: 0; }
.ltv-filterpanel__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ltv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ltv-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 30px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--ltv-purple-tint);
  border: 1px solid rgba(168, 85, 247, .35); color: #e9d5ff; font-size: 13px; font-weight: 500; text-decoration: none; }
.ltv-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltv-chip > svg { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; }
.ltv-chip:hover { color: #fff; border-color: rgba(168, 85, 247, .6); } .ltv-chip:hover > svg { background: rgba(255, 255, 255, .12); }
.ltv-chips__clear { font-size: 13px; color: var(--ltv-text-2); text-decoration: none; padding: 6px 4px; }
.ltv-chips__clear:hover { color: #fff; text-decoration: underline; }
@media (max-width: 639px) { .ltv-filterbar .ltv-searchfield + input + input + .ltv-btn, .ltv-filterbar > .ltv-btn { flex: 1 1 auto; } }
.ltv-filterpanel__grid > div:only-child { max-width: 420px; }
/* ---- R5 trials page */
.ltv-trials .ltv-trials__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ltv-trials .ltv-trials__stats { margin-bottom: 20px; }
.ltv-trials .ltv-trials__scope { margin: 10px 0 0; }
.ltv-trials .ltv-trials__done { margin-bottom: 20px; border-color: rgba(52, 211, 153, .4); }
.ltv-trials .ltv-trials__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 24px; margin: 0; font-size: 14px; }
.ltv-trials .ltv-trials__facts dt { font-size: 13px; color: var(--ltv-text-3); }
.ltv-trials .ltv-trials__facts dd { margin: 0; color: #fff; }
.ltv-trials .ltv-trials__done-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 20px; }
.ltv-trials .ltv-trials__toolbar { padding: 14px 24px; border-bottom: 1px solid var(--ltv-border); }
.ltv-trials .ltv-trials__toolbar .ltv-searchfield { flex: 1 1 240px; max-width: 400px; }
.ltv-trials .ltv-trials__rows { display: inline-flex; align-items: center; gap: 8px; }
.ltv-trials .ltv-trials__loading { margin: 0; padding: 12px 24px 0; }
.ltv-trials .ltv-trials__list .ltv-table th { position: static; }
.ltv-trials .ltv-trials__list .ltv-table :is(th, td):first-child { padding-inline-start: 24px; }
.ltv-trials .ltv-trials__list .ltv-table :is(th, td):last-child { padding-inline-end: 24px; }
.ltv-trials .ltv-trials__list .ltv-table td { vertical-align: top; }
.ltv-trials .ltv-trials__list .ltv-table strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.ltv-trials .ltv-trials__list .ltv-table small { display: block; margin-top: 2px; font-size: 12px; color: var(--ltv-text-3); }
.ltv-trials .ltv-trials__date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ltv-text-2); }
.ltv-trials .ltv-trials__details summary { cursor: pointer; font-size: 13px; font-weight: 500; color: #d8b4fe; white-space: nowrap; }
.ltv-trials .ltv-trials__details p { margin: 4px 0 0; font-size: 13px; color: var(--ltv-text-2); }
.ltv-trials .ltv-trials__details a { display: inline-block; margin-top: 6px; font-size: 13px; color: #d8b4fe; text-decoration: underline; }
.ltv-trials .ltv-trials__pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 24px; border-top: 1px solid var(--ltv-border); }
.ltv-trials .ltv-trials__pager p { margin: 0; }
.ltv-trials .ltv-trials__pagerbtns { display: flex; gap: 8px; }
.ltv-trials .ltv-trials__pager .ltv-btn:disabled { opacity: .45; cursor: default; }
.ltv-trials .ltv-trials__dlg { width: min(760px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); margin: auto; padding: 0; overflow: auto;
  border: 1px solid var(--ltv-border-strong); border-radius: var(--ltv-r-card); background: var(--ltv-surface); color: #fff; box-shadow: 0 32px 80px -24px rgba(0, 0, 0, .8); }
.ltv-trials .ltv-trials__dlg--narrow { width: min(460px, calc(100vw - 24px)); }
.ltv-trials .ltv-trials__dlg::backdrop { background: rgba(8, 6, 17, .74); }
.ltv-trials .ltv-trials__dlghead { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px; background: var(--ltv-surface); border-bottom: 1px solid var(--ltv-border); }
.ltv-trials .ltv-trials__dlgbody { padding: 20px 24px 24px; }
.ltv-trials .ltv-trials__repeat { margin: 20px 24px 0; padding: 16px; border: 1px solid rgba(251, 191, 36, .45); border-radius: var(--ltv-r-panel); background: var(--ltv-warning-bg); }
.ltv-trials .ltv-trials__sechead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; margin-bottom: 16px; }
.ltv-trials .ltv-trials__sechead p { margin: 0; }
.ltv-trials .ltv-trials__sechead .ltv-badge { white-space: normal; line-height: 1.3; }
.ltv-trials .ltv-trials__formactions { display: flex; flex-wrap: wrap; gap: 8px; }
.ltv-trials .ltv-trials__dlg textarea.ltv-input { min-height: 72px; }
.ltv-trials .ltv-trials__dlg .ltv-btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 767px) {
  .ltv-trials .ltv-trials__toolbar { padding: 14px 20px; }
  .ltv-trials .ltv-trials__list .ltv-table tr { padding: 12px 20px; }
  .ltv-trials .ltv-trials__list .ltv-table :is(th, td):first-child, .ltv-trials .ltv-trials__list .ltv-table :is(th, td):last-child { padding-inline: 0; }
  .ltv-trials .ltv-trials__list .ltv-table td:not([data-label]) { display: block; }
  .ltv-trials .ltv-trials__list .ltv-table td:not([data-label])::before { display: none; }
  .ltv-trials .ltv-trials__cell { text-align: end; }
  .ltv-trials .ltv-trials__pager, .ltv-trials .ltv-trials__loading { padding-inline: 20px; }
  .ltv-trials .ltv-trials__done-actions { padding-inline: 20px; }
}
@media (max-width: 639px) {
  .ltv-trials .ltv-pagehead__actions { flex-direction: row; }
  .ltv-trials .ltv-pagehead__actions .ltv-btn { flex: 1 1 0; padding-inline: 10px; }
  .ltv-trials .ltv-trials__toolbar .ltv-searchfield { flex-basis: 100%; max-width: none; }
  .ltv-trials .ltv-trials__toolbar > select { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .ltv-trials .ltv-trials__toolbar > .ltv-btn { flex: 1 1 auto; }
  .ltv-trials .ltv-trials__dlghead { padding: 12px 16px; }
  .ltv-trials .ltv-trials__dlgbody { padding: 16px 16px 20px; }
  .ltv-trials .ltv-trials__repeat { margin: 16px 16px 0; }
  .ltv-trials .ltv-trials__formactions .ltv-btn { flex: 1 1 auto; }
}
.ltv-trials .ltv-trials__dlg [hidden] { display: none; }
.ltv-trials .ltv-trials__scroll { overflow-x: auto; }
@media (max-width: 767px) { .ltv-trials .ltv-trials__details summary { padding-block: 6px; } }
.ltv-trials .ltv-trials__scroll { position: relative; }

/* ---- R5 admin audit: alerts.php — bulk bar: buttons were 32px next to 40px selects on the same row (>=768px) */
.alerts-workspace .alerts-bulk button { min-height: 40px; }

/* ---- R5 admin audit: attention.php — bulk bar: "Hide because…" select overflowed a 320px viewport; buttons were 32px next to 40px selects */
#q-bulk select { max-width: 100%; min-width: 0; }
#q-bulk .lt-btn--sm { min-height: 40px; }

/* ---- R5 regions page */
.ltv-regions__anchor { scroll-margin-top: 72px; }
.ltv-regions .ltv-regions__flash, .ltv-regions .ltv-regions__summary { margin-bottom: 14px; }
.ltv-regions :is(.ltv-regions__summary, .ltv-regions__note, .ltv-regions__fine, .ltv-regions__import .ltv-alert) a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ltv-regions :is(.ltv-regions__summary, .ltv-regions__note) a:hover { color: #fff; }
.ltv-regions .ltv-regions__fine { display: block; margin: 4px 0 0; font-size: 12.5px; opacity: .85; }
.ltv-regions code { font-size: .92em; padding: 1px 5px; border-radius: 5px; background: rgba(170, 164, 184, .12); overflow-wrap: anywhere; }
.ltv-regions .ltv-regions__h2 { margin: 26px 0 12px; font-size: 18px; font-weight: 600; color: #fff; }
.ltv-regions .ltv-regions__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.ltv-regions .ltv-regions__warn { color: var(--ltv-warning); }
.ltv-regions .ltv-regions__strong { color: #fff; }
.ltv-regions .ltv-regions__note { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ltv-text-2); }
.ltv-regions .ltv-regions__note strong { color: #fff; font-weight: 600; }
/* connection card */
.ltv-regions .ltv-regions__conn { overflow: hidden; }
.ltv-regions .ltv-regions__connhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding: 18px 20px; }
.ltv-regions .ltv-regions__connhead > div { flex: 1 1 280px; }
.ltv-regions .ltv-regions__connhead .ltv-card__sub { max-width: 62ch; line-height: 1.5; }
.ltv-regions .ltv-regions__connpick { flex: 0 1 340px; min-width: 0; margin: 0; }
.ltv-regions select.ltv-input, .ltv-regions .ltv-regions__dlg .ltv-input { width: 100%; min-width: 0; }
.ltv-regions .ltv-regions__connrow { padding: 12px 20px; border-top: 1px solid var(--ltv-border); }
.ltv-regions .ltv-regions__connstate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.ltv-regions .ltv-regions__connname { font-size: 15px; font-weight: 600; color: #fff; overflow-wrap: anywhere; min-width: 0; }
.ltv-regions .ltv-regions__connactions { display: flex; flex-wrap: wrap; gap: 8px; }
.ltv-regions .ltv-regions__needs { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.ltv-regions .ltv-regions__mismatch { margin-top: 10px; }
.ltv-regions .ltv-regions__mm { display: block; overflow-wrap: anywhere; }
.ltv-regions .ltv-regions__syncout { font-size: 13px; color: var(--ltv-text-2); }
.ltv-regions .ltv-regions__syncout.hidden { display: none; }
.ltv-regions .ltv-regions__setup > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: #fff; min-height: 28px; }
.ltv-regions .ltv-regions__setup > summary .ltv-muted { font-weight: 400; }
.ltv-regions .ltv-regions__checklist { list-style: none; margin: 10px 0 2px; padding: 0; display: grid; gap: 6px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); font-size: 13.5px; color: #fff; }
.ltv-regions .ltv-regions__checklist li { display: flex; gap: 8px; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; }
.ltv-regions .ltv-regions__tick { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.ltv-regions .is-ok > .ltv-regions__tick { background: var(--ltv-success-bg); color: var(--ltv-success); }
.ltv-regions .is-todo > .ltv-regions__tick { background: var(--ltv-warning-bg); color: var(--ltv-warning); }
/* region cards */
.ltv-regions .ltv-regions__list { display: grid; gap: 12px; }
.ltv-regions .ltv-regions__card { padding: 18px 20px 6px; scroll-margin-top: 72px; min-width: 0; }
.ltv-regions .ltv-regions__card.is-warning { border-inline-start: 3px solid var(--ltv-warning); }
.ltv-regions .ltv-regions__card.is-danger { border-inline-start: 3px solid var(--ltv-danger); }
.ltv-regions .ltv-regions__card:target { border-color: var(--ltv-purple-light, #a855f7); }
.ltv-regions .ltv-regions__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 16px; }
.ltv-regions .ltv-regions__ident { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; flex: 1 1 240px; }
.ltv-regions .ltv-regions__name { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: #fff; overflow-wrap: anywhere; }
.ltv-regions .ltv-regions__card.is-off .ltv-regions__name { color: var(--ltv-text-2); }
.ltv-regions .ltv-regions__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ltv-regions .ltv-regions__actions form { margin: 0; display: inline-flex; }
.ltv-regions .ltv-regions__facts { margin: 14px 0 0; display: grid; gap: 12px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.ltv-regions .ltv-regions__facts > div { min-width: 0; }
.ltv-regions .ltv-regions__facts dt { font-size: 12.5px; color: var(--ltv-text-3); }
.ltv-regions .ltv-regions__facts dd { margin: 2px 0 0; font-size: 14px; color: #fff; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ltv-regions .ltv-regions__facts dd.is-warning { color: var(--ltv-warning); }
.ltv-regions .ltv-regions__facts dd.is-danger { color: var(--ltv-danger); font-weight: 600; }
.ltv-regions .ltv-regions__checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; }
.ltv-regions .ltv-regions__checks li { position: relative; padding-inline-start: 16px; overflow-wrap: anywhere; color: var(--ltv-text-2); }
.ltv-regions .ltv-regions__checks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--ltv-info); }
.ltv-regions .ltv-regions__checks li.is-warning { color: #fde68a; } .ltv-regions .ltv-regions__checks li.is-warning::before { background: var(--ltv-warning); }
.ltv-regions .ltv-regions__checks li.is-danger { color: #fecaca; } .ltv-regions .ltv-regions__checks li.is-danger::before { background: var(--ltv-danger); }
.ltv-regions .ltv-regions__offnote { margin: 14px 0 12px; font-size: 13px; color: var(--ltv-text-3); }
.ltv-regions .ltv-regions__card > :is(.ltv-regions__facts, .ltv-regions__checks):last-child { margin-bottom: 12px; }
/* guided mapping edit */
.ltv-regions .ltv-regions__edit { margin-top: 14px; border-top: 1px solid var(--ltv-border); }
.ltv-regions .ltv-regions__edit > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 600; color: #d8b4fe; overflow-wrap: anywhere; }
.ltv-regions .ltv-regions__edit > summary::-webkit-details-marker { display: none; }
.ltv-regions .ltv-regions__edit > summary:hover { color: #fff; }
.ltv-regions .ltv-regions__edit > summary svg { flex: none; width: 16px; height: 16px; transition: transform .15s; }
.ltv-regions .ltv-regions__edit[open] > summary svg { transform: rotate(90deg); }
[dir="rtl"] .ltv-regions .ltv-regions__edit:not([open]) > summary svg { transform: scaleX(-1); }
.ltv-regions .ltv-regions__form { margin: 0; padding: 4px 0 14px; display: grid; gap: 18px; min-width: 0; }
.ltv-regions .ltv-regions__step { margin: 0; padding: 0; border: 0; min-width: 0; }
.ltv-regions .ltv-regions__step > legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 8px; }
.ltv-regions .ltv-regions__stepno { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--ltv-border-strong); background: var(--ltv-surface-2); color: #d8b4fe; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ltv-regions .ltv-regions__stepaction { margin: -4px 0 6px; }
.ltv-regions .ltv-regions__cols { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.ltv-regions .ltv-regions__field { min-width: 0; }
.ltv-regions .ltv-regions__form > .ltv-regions__field, .ltv-regions .ltv-regions__step > .ltv-regions__field { max-width: 560px; }
.ltv-regions .ltv-regions__hint { margin-top: 5px; font-size: 12.5px; line-height: 1.45; color: var(--ltv-text-3); overflow-wrap: anywhere; }
.ltv-regions .ltv-regions__hint.ltv-regions__warn { color: var(--ltv-warning); }
.ltv-regions .ltv-regions__use { appearance: none; background: none; border: 0; padding: 4px 2px; font: inherit; font-weight: 600; color: #d8b4fe; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ltv-regions .ltv-regions__use:hover { color: #fff; }
.ltv-regions .ltv-regions__formfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 14px; border-top: 1px solid var(--ltv-border); }
.ltv-regions .ltv-regions__formfoot p { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 220px; }
/* import list */
.ltv-regions .ltv-regions__import { margin-top: 24px; overflow: hidden; }
.ltv-regions .ltv-regions__import .ltv-card__head { padding: 16px 20px; align-items: flex-start; }
.ltv-regions .ltv-regions__importbody { padding: 16px 20px; }
.ltv-regions .ltv-regions__packs { list-style: none; margin: -8px 0; padding: 0; }
.ltv-regions .ltv-regions__packs li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 52px; padding: 8px 0; font-size: 14px; }
.ltv-regions .ltv-regions__packs li + li { border-top: 1px solid var(--ltv-border); }
.ltv-regions .ltv-regions__packs form { margin: 0; }
.ltv-regions .ltv-regions__packid { flex: none; min-width: 64px; color: var(--ltv-text-2); font-variant-numeric: tabular-nums; }
.ltv-regions .ltv-regions__packname { flex: 1 1 160px; min-width: 0; color: #fff; overflow-wrap: anywhere; }
/* add / edit region dialog */
.ltv-regions .ltv-regions__dlg { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 2, 10, .72); overflow-y: auto; overscroll-behavior: contain; }
.ltv-regions .ltv-regions__dlg.hidden { display: none; }
.ltv-regions .ltv-regions__dlgbox { width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 24px; background: var(--ltv-surface); border: 1px solid var(--ltv-border-strong); border-radius: var(--ltv-r-card); box-shadow: 0 24px 64px -16px rgba(0, 0, 0, .8); }
.ltv-regions .ltv-regions__dlgtitle { margin: 0 0 4px; font-size: 18px; font-weight: 600; color: #fff; }
.ltv-regions .ltv-regions__dlgform { margin: 16px 0 0; display: grid; gap: 14px; }
.ltv-regions .ltv-regions__dlgform > div { min-width: 0; }
.ltv-regions .ltv-regions__dlggrid { display: grid; gap: 14px 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: end; }
.ltv-regions .ltv-regions__dlggrid > div { min-width: 0; }
.ltv-regions .ltv-regions__dlgcheck { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; color: #fff; }
.ltv-regions .ltv-regions__dlgcheck input { flex: none; width: 20px; height: 20px; accent-color: var(--ltv-purple); }
.ltv-regions .ltv-regions__dlgfoot { display: flex; gap: 10px; padding-top: 4px; }
.ltv-regions .ltv-regions__dlgfoot .ltv-btn { flex: 1 1 0; }
@media (max-width: 767px) {
  .ltv-regions .ltv-regions__connhead, .ltv-regions .ltv-regions__connrow { padding-inline: 16px; }
  .ltv-regions .ltv-regions__connpick { flex-basis: 100%; }
  .ltv-regions .ltv-regions__card { padding: 16px 16px 4px; }
  .ltv-regions :is(.ltv-regions__actions, .ltv-regions__connactions, .ltv-regions__formfoot, .ltv-regions__packs) .ltv-btn--sm { min-height: 40px; }
  .ltv-regions .ltv-regions__actions { width: 100%; }
  .ltv-regions .ltv-regions__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  .ltv-regions .ltv-regions__facts > .ltv-regions__fact--wide { grid-column: 1 / -1; }
  .ltv-regions .ltv-regions__dlg { padding: 12px; align-items: flex-start; }
  .ltv-regions .ltv-regions__dlgbox { padding: 20px 16px; max-height: calc(100dvh - 24px); }
  .ltv-regions .ltv-regions__import .ltv-card__head, .ltv-regions .ltv-regions__importbody { padding-inline: 16px; }
}
@media (min-width: 900px) { .ltv-regions .ltv-regions__facts > .ltv-regions__fact--wide { grid-column: span 2; } }
@media (prefers-reduced-motion: reduce) { .ltv-regions .ltv-regions__edit > summary svg { transition: none; } }

/* ---- R5 admin audit: alerts.php — bulk bar on phones: selects were 40px beside 44px buttons */
@media (max-width: 767px) { .alerts-workspace .alerts-bulk select { min-height: 44px; } }
.ltv-regions .ltv-regions__use { font-size: 13px; }
@media (min-width: 768px) { .ltv-regions .ltv-regions__connpick { flex-basis: 440px; } }
/* (R5 alerts.php) same rule with the specificity needed to beat the page's inline <style> mobile block; the rule above is inert */
@media (max-width: 767px) { .alerts-workspace form.alerts-bulk select { min-height: 44px; } }

/* ---- R5 — the admin page stylesheets on the server (admin/support-workspace.css, trials.css, referrals.css,
   app-control.css, workflow-pages.css, management-lists.css) hard-code the old blue-grey surfaces and borders.
   These rules repeat ONLY their colour declarations with the brand tokens; nothing else is overridden, and a
   selector that does not exist on the server simply matches nothing. Generated from the owner's copies. */
/* app-control.css */
.ltv-ui3 .app-workspace .text-slate-500, .ltv-ui3 .app-workspace .text-slate-600, .ltv-ui3 .ac-muted { color:var(--ltv-text-2); }
.ltv-ui3 .ac-header p, .ltv-ui3 .ac-section-heading p, .ltv-ui3 .ac-box>p, .ltv-ui3 .ac-metrics p { color:var(--ltv-text-2); }
.ltv-ui3 .ac-tabs { border-bottom:1px solid var(--ltv-border-strong); }
.ltv-ui3 .ac-tabs a { color:var(--ltv-text-2); }
.ltv-ui3 .ac-metrics article, .ltv-ui3 .ac-box, .ltv-ui3 .ac-customer { border:1px solid var(--ltv-border); background:var(--ltv-surface); }
.ltv-ui3 .ac-metrics h2 { color:var(--ltv-text-2); }
.ltv-ui3 .ac-attention li+li { border-top:1px solid var(--ltv-border); }
.ltv-ui3 .ac-notice { border:1px solid var(--ltv-border-strong); color:var(--ltv-text-2); }
.ltv-ui3 .ac-technical>summary { border-top:1px solid var(--ltv-border-strong); }
.ltv-ui3 .ac-customer-head p { color:var(--ltv-text-2); }
.ltv-ui3 .ac-device-details { border-top:1px solid var(--ltv-border); }
.ltv-ui3 .ac-device { background:var(--ltv-surface-2); }
.ltv-ui3 .ac-device dt { color:var(--ltv-text-2); }
.ltv-ui3 .ac-current-version small { color:var(--ltv-text-2); }
/* management-lists.css */
.ltv-ui3 .management-list .mv-service { border-bottom:1px solid var(--ltv-border); }
.ltv-ui3 .management-list .mv-secondary { border-top:1px solid var(--ltv-border); }
.ltv-ui3 .management-list .mv-filters select, .ltv-ui3 .management-list .mv-filters input { background:var(--ltv-surface); border:1px solid var(--ltv-border-strong); }
.ltv-ui3 .management-list .mv-timeline { border-bottom:1px solid var(--ltv-border-strong); }
.ltv-ui3 .management-list .mv-timeline dt { color:var(--ltv-text-2); }
/* referrals.css */
.ltv-ui3 .referrals-workspace p { color:var(--ltv-text-2); }
.ltv-ui3 .referrals-workspace small { color:var(--ltv-text-2); }
.ltv-ui3 .rv-chip { border:1px solid var(--ltv-border-strong); }
.ltv-ui3 .rv-tabs { border-bottom:1px solid var(--ltv-border-strong); }
.ltv-ui3 .rv-metrics article, .ltv-ui3 .rv-box, .ltv-ui3 .rv-reward { border:1px solid var(--ltv-border); background:var(--ltv-surface); }
.ltv-ui3 .rv-metrics h2 { color:var(--ltv-text-2); }
.ltv-ui3 .rv-attention a { border-bottom:1px solid var(--ltv-border); }
.ltv-ui3 .referrals-workspace input:not([type=checkbox]), .ltv-ui3 .referrals-workspace select { background:var(--ltv-surface-2); border:1px solid var(--ltv-border-strong); }
.ltv-ui3 .rv-table-wrap { border:1px solid var(--ltv-border); }
.ltv-ui3 .rv-table th, .ltv-ui3 .rv-table td { border-bottom:1px solid var(--ltv-border); }
.ltv-ui3 .rv-table th { color:var(--ltv-text-2); background:var(--ltv-surface-2); }
.ltv-ui3 .rv-reward dt, .ltv-ui3 .rv-definition dt { color:var(--ltv-text-2); }
.ltv-ui3 .rv-reward details { border-top:1px solid var(--ltv-border); }
.ltv-ui3 .rv-reason, .ltv-ui3 .rv-notice { border:1px solid var(--ltv-border-strong); }
.ltv-ui3 .rv-action-context { background:var(--ltv-surface-2); }
.ltv-ui3 .rv-action-context form { border-top:1px solid var(--ltv-border-strong); }
/* support-workspace.css */
.ltv-ui3 .support-workspace .text-slate-500, .ltv-ui3 .support-workspace .text-slate-600 { color:var(--ltv-text-2); }
.ltv-ui3 .support-workspace .support-scroll { border:1px solid var(--ltv-border); }
.ltv-ui3 .support-workspace .support-secondary { border:1px solid var(--ltv-border); background:var(--ltv-surface); }
.ltv-ui3 .support-workspace .support-pagination { color:var(--ltv-text-2); }
.ltv-ui3 .support-workspace .support-pagination a { border:1px solid var(--ltv-border-strong); }
/* trials.css */
.ltv-ui3 .trials-page .text-slate-500, .ltv-ui3 .trials-dialog .text-slate-500 { color:var(--ltv-text-2); }
.ltv-ui3 .trials-dialog { border-left:1px solid var(--ltv-border-strong); background:var(--ltv-surface); }
.ltv-ui3 .trials-panel-head { background:var(--ltv-surface); border-bottom:1px solid var(--ltv-border-strong); }
.ltv-ui3 .trials-panel-head p { color:var(--ltv-text-2); }
.ltv-ui3 .trials-form-footer { background:var(--ltv-surface); border-top:1px solid var(--ltv-border-strong); }
.ltv-ui3 .trials-filters { border-bottom:1px solid var(--ltv-border); }
.ltv-ui3 .trials-table th { color:var(--ltv-text-2); background:var(--ltv-surface-2); }
.ltv-ui3 .trials-table td { border-top:1px solid var(--ltv-border); }
.ltv-ui3 .trials-table small { color:var(--ltv-text-2); }
.ltv-ui3 .trials-pagination { border-top:1px solid var(--ltv-border); }
.ltv-ui3 .trials-scope { color:var(--ltv-text-2); }
.ltv-ui3 .trials-table tr { border-top:1px solid var(--ltv-border-strong); }
.ltv-ui3 .trials-table td[data-label]::before { color:var(--ltv-text-2); }
/* workflow-pages.css */
.ltv-ui3 .workflow-page .text-slate-500, .ltv-ui3 .workflow-dialog .text-slate-500 { color:var(--ltv-text-2); }
.ltv-ui3 .workflow-page .lt-card, .ltv-ui3 .workflow-dialog>div { background:var(--ltv-surface); }
.ltv-ui3 .workflow-page .lt-card__head { border-bottom:1px solid var(--ltv-border); }
.ltv-ui3 .workflow-page form>fieldset+fieldset, .ltv-ui3 .workflow-page form>fieldset+.grid, .ltv-ui3 .workflow-page form>.grid+fieldset { border-top:1px solid var(--ltv-border); }
.ltv-ui3 .workflow-page .workflow-jumps { border-top:1px solid var(--ltv-border); }
.ltv-ui3 .workflow-page .workflow-actions { border-top:1px solid var(--ltv-border); }
.ltv-ui3 .workflow-page .workflow-actions p { color:var(--ltv-text-2); }
.ltv-ui3 .workflow-page th { color:var(--ltv-text-2); }

/* ---- R6 settings */
.ltv-settings > :is(.ltv-pagehead, .ltv-settings__flash, .ltv-settings__form, .ltv-settings__else) { max-width: 1080px; }
.ltv-settings .ltv-settings__flash { margin-bottom: 16px; }
.ltv-settings .ltv-settings__group { display: grid; gap: 16px; padding: 20px; }
.ltv-settings .ltv-settings__group + .ltv-settings__group { border-top: 1px solid var(--ltv-border); }
.ltv-settings .ltv-settings__intro .ltv-card__sub { margin-top: 4px; max-width: 46ch; line-height: 1.5; }
.ltv-settings .ltv-settings__fields { display: grid; gap: 16px; min-width: 0; }
.ltv-settings .ltv-settings__field { min-width: 0; }
.ltv-settings .ltv-settings__field .ltv-input { width: 100%; }
.ltv-settings .ltv-settings__help { margin: 6px 0 0; line-height: 1.45; overflow-wrap: anywhere; }
.ltv-settings .ltv-settings__save { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 20px;
  border-top: 1px solid var(--ltv-border); background: var(--ltv-well-bg, rgba(8, 6, 17, .55)); border-radius: 0 0 var(--ltv-r-card) var(--ltv-r-card); }
.ltv-settings .ltv-settings__save p { margin: 0; }
.ltv-settings .ltv-settings__else { margin-top: 32px; }
.ltv-settings .ltv-settings__links { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ltv-settings .ltv-settings__links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%; min-height: 44px; padding: 12px 14px;
  border: 1px solid var(--ltv-border); border-radius: var(--ltv-r-panel); text-decoration: none; transition: border-color .12s, background-color .12s; }
.ltv-settings .ltv-settings__links a:hover { border-color: var(--ltv-border-strong); background: var(--ltv-surface); }
.ltv-settings .ltv-settings__links a > span { display: grid; gap: 2px; min-width: 0; }
.ltv-settings .ltv-settings__links strong { font-size: 14px; font-weight: 600; color: #fff; }
.ltv-settings .ltv-settings__links a > span > span { font-size: 13px; line-height: 1.45; color: var(--ltv-text-2); overflow-wrap: anywhere; }
.ltv-settings .ltv-settings__links svg { width: 16px; height: 16px; flex: none; color: var(--ltv-text-3); }
[dir="rtl"] .ltv-settings .ltv-settings__links svg { transform: scaleX(-1); }
@media (max-width: 639px) { .ltv-settings .ltv-settings__save .ltv-btn { width: 100%; } }
@media (min-width: 900px) {
  .ltv-settings .ltv-settings__group { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px 40px; padding: 24px; }
  .ltv-settings .ltv-settings__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .ltv-settings .ltv-settings__save { padding: 16px 24px; }
}

/* ---- R6 staff */
.ltv-staff > :is(.ltv-pagehead, .ltv-staff__flash, .ltv-staff__list, .ltv-staff__invite, .ltv-staff__legacy, .ltv-staff__ref) { max-width: 1180px; }
.ltv-staff .ltv-staff__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ltv-staff .ltv-staff__flash { margin-bottom: 16px; }
.ltv-staff .ltv-staff__once p { margin: 2px 0 0; }
.ltv-staff .ltv-staff__oncerow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ltv-staff .ltv-staff__oncerow code { min-width: 0; max-width: 100%; padding: 8px 12px; border: 1px solid var(--ltv-border-strong); border-radius: var(--ltv-r-ctl);
  background: var(--ltv-midnight); color: #fff; font-family: var(--ltv-font-mono); font-size: 14px; overflow-wrap: anywhere; user-select: all; }
.ltv-staff .ltv-staff__list { position: relative; overflow: hidden; }
.ltv-staff .ltv-staff__cols { display: none; }
.ltv-staff .ltv-staff__person + .ltv-staff__person, .ltv-staff .ltv-staff__cols + .ltv-staff__person { border-top: 1px solid var(--ltv-border); }
.ltv-staff .ltv-staff__person { scroll-margin-top: 24px; }
.ltv-staff .ltv-staff__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.ltv-staff .ltv-staff__row::-webkit-details-marker { display: none; }
.ltv-staff .ltv-staff__row:hover { background: rgba(124, 58, 237, .06); }
.ltv-staff .ltv-staff__who { min-width: 0; }
.ltv-staff .ltv-staff__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15px; font-weight: 600; color: #fff; }
.ltv-staff .ltv-staff__name > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.ltv-staff .ltv-staff__mail { font-size: 13px; color: var(--ltv-text-2); overflow-wrap: anywhere; }
.ltv-staff .ltv-staff__go { grid-column: 2; grid-row: 1; }
.ltv-staff .ltv-staff__go svg { width: 14px; height: 14px; transition: transform .15s; }
.ltv-staff .ltv-staff__person[open] > .ltv-staff__row .ltv-staff__go svg { transform: rotate(180deg); }
.ltv-staff :is(.ltv-staff__role, .ltv-staff__status, .ltv-staff__seen) { grid-column: 1 / -1; min-width: 0; }
.ltv-staff .ltv-staff__can { margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--ltv-text-2); }
.ltv-staff .ltv-staff__seen { font-size: 13px; color: var(--ltv-text-2); }
.ltv-staff .ltv-staff__panel { padding: 4px 16px 20px; background: var(--ltv-well-bg, rgba(8, 6, 17, .55)); border-top: 1px solid var(--ltv-border); }
.ltv-staff .ltv-staff__panel > .ltv-staff__flash { margin: 16px 0 0; }
.ltv-staff .ltv-staff__why { margin: 16px 0 0; max-width: 72ch; }
.ltv-staff .ltv-staff__group { display: grid; gap: 12px; padding: 18px 0; min-width: 0; }
.ltv-staff .ltv-staff__group + .ltv-staff__group { border-top: 1px solid var(--ltv-border); }
.ltv-staff .ltv-staff__group:last-child { padding-bottom: 0; }
.ltv-staff .ltv-staff__group > h3 { margin: 0; font-size: 14px; font-weight: 600; color: #fff; }
.ltv-staff .ltv-staff__group > :not(h3) { min-width: 0; }
.ltv-staff .ltv-staff__forms { display: grid; gap: 24px; }
.ltv-staff .ltv-staff__form { display: grid; gap: 12px; align-content: start; min-width: 0; }
.ltv-staff .ltv-staff__field { min-width: 0; }
.ltv-staff .ltv-staff__field .ltv-input { width: 100%; }
.ltv-staff .ltv-staff__note { margin: 6px 0 0; line-height: 1.45; max-width: 72ch; }
.ltv-staff .ltv-staff__form--line .ltv-staff__note { margin: 0; }
.ltv-staff .ltv-staff__form--line + .ltv-staff__note, .ltv-staff .ltv-staff__blocked + .ltv-staff__note { margin-top: 12px; }
.ltv-staff .ltv-staff__rolehelp { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; line-height: 1.45; color: var(--ltv-text-3); }
.ltv-staff .ltv-staff__rolehelp strong { color: var(--ltv-text-2); font-weight: 600; }
.ltv-staff .ltv-staff__reason { margin: 0; font-size: 13px; line-height: 1.45; color: #fde68a; max-width: 60ch; }
.ltv-staff .ltv-staff__blocked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ltv-staff .ltv-staff__link { display: inline-flex; align-items: center; min-height: 32px; font-size: 13px; color: #d8b4fe; text-decoration: underline; text-underline-offset: 2px; }
.ltv-staff .ltv-staff__link:hover { color: #fff; }
.ltv-staff .ltv-staff__activity { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; font-size: 13px; color: #fff; }
.ltv-staff .ltv-staff__activity li { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.ltv-staff .ltv-staff__activity time { color: var(--ltv-text-3); font-variant-numeric: tabular-nums; }
.ltv-staff .ltv-staff__signed { margin: 0; padding: 12px 16px; border-top: 1px solid var(--ltv-border); font-size: 13px; color: var(--ltv-text-3); overflow-wrap: anywhere; }
.ltv-staff .ltv-staff__signed a { color: var(--ltv-text-2); text-decoration: underline; text-underline-offset: 2px; }
.ltv-staff .ltv-staff__signed a:hover { color: #fff; }
.ltv-staff .ltv-staff__invite { margin-top: 24px; scroll-margin-top: 24px; }
.ltv-staff .ltv-staff__invite > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; cursor: pointer; list-style: none; }
.ltv-staff .ltv-staff__invite > summary::-webkit-details-marker { display: none; }
.ltv-staff .ltv-staff__invite > summary > span { display: grid; gap: 2px; min-width: 0; }
.ltv-staff .ltv-staff__invite > summary svg { width: 16px; height: 16px; flex: none; color: var(--ltv-text-3); transition: transform .15s; }
.ltv-staff .ltv-staff__invite[open] > summary svg { transform: rotate(180deg); }
.ltv-staff .ltv-staff__invite[open] > summary { border-bottom: 1px solid var(--ltv-border); }
.ltv-staff .ltv-staff__inviteform { display: grid; gap: 16px; padding: 16px; }
.ltv-staff .ltv-staff__roles { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.ltv-staff .ltv-staff__roles legend { padding: 0; }
.ltv-staff .ltv-staff__rolecard { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--ltv-border-strong); border-radius: var(--ltv-r-panel); cursor: pointer; }
.ltv-staff .ltv-staff__rolecard:hover { border-color: #4a3c73; }
.ltv-staff .ltv-staff__rolecard:has(input:checked) { border-color: var(--ltv-purple-light); background: var(--ltv-purple-tint); }
.ltv-staff .ltv-staff__rolecard input { flex: none; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--ltv-purple); }
.ltv-staff .ltv-staff__rolecard > span { display: grid; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.45; color: var(--ltv-text-2); }
.ltv-staff .ltv-staff__rolecard strong { font-size: 14px; font-weight: 600; color: #fff; }
.ltv-staff .ltv-staff__legacy { margin-top: 24px; border-color: rgba(251, 191, 36, .3); }
.ltv-staff .ltv-staff__legacy .ltv-card__sub { margin-top: 4px; max-width: 80ch; line-height: 1.5; }
.ltv-staff .ltv-staff__legacy ul { list-style: none; margin: 12px 0 0; padding: 0; }
.ltv-staff .ltv-staff__legacy li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--ltv-border); }
.ltv-staff .ltv-staff__legacywho { min-width: 0; font-size: 14px; color: #fff; overflow-wrap: anywhere; }
.ltv-staff .ltv-staff__legacy form { display: flex; flex-wrap: wrap; gap: 8px; }
.ltv-staff .ltv-staff__legacy form .ltv-input { flex: 1 1 180px; min-width: 0; }
.ltv-staff .ltv-staff__ref { margin-top: 32px; }
.ltv-staff .ltv-staff__ref .ltv-card__sub { margin: 4px 0 14px; max-width: 80ch; line-height: 1.5; }
.ltv-staff .ltv-staff__caps :is(th, td) { padding: 9px 16px; }
.ltv-staff .ltv-staff__caps thead th { position: static; text-align: start; }
.ltv-staff .ltv-staff__caps thead th + th, .ltv-staff .ltv-staff__caps td { width: 110px; text-align: center; }
.ltv-staff .ltv-staff__caps tbody th[scope="row"] { position: static; background: none; border-top: 1px solid var(--ltv-border); font-size: 14px; font-weight: 400; color: #fff; text-align: start; text-transform: none; letter-spacing: 0; }
.ltv-staff .ltv-staff__caps .ltv-staff__area th { position: static; background: none; border-top: 1px solid var(--ltv-border); padding-top: 16px; padding-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ltv-text-2); text-align: start; text-transform: none; letter-spacing: 0; }
.ltv-staff .ltv-staff__caps tbody tr.ltv-staff__area:hover { background: none; }
.ltv-staff .ltv-staff__caps td svg { width: 18px; height: 18px; vertical-align: middle; }
.ltv-staff .ltv-staff__caps td.is-yes { color: var(--ltv-success); }
.ltv-staff .ltv-staff__caps td.is-no { color: var(--ltv-text-3); }
@media (max-width: 639px) {
  .ltv-staff .ltv-staff__invitego .ltv-btn, .ltv-staff .ltv-staff__legacy form .ltv-btn { width: 100%; }
  .ltv-staff .ltv-staff__form .ltv-btn { width: 100%; white-space: normal; height: auto; padding-block: 8px; }
  .ltv-staff .ltv-staff__caps :is(th, td) { padding-inline: 10px; }
  .ltv-staff .ltv-staff__caps thead th + th, .ltv-staff .ltv-staff__caps td { width: 72px; }
}
@media (min-width: 640px) {
  .ltv-staff .ltv-staff__inviteform { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px; align-items: start; }
  .ltv-staff .ltv-staff__roles { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ltv-staff .ltv-staff__roles legend { grid-column: 1 / -1; }
  .ltv-staff .ltv-staff__invitego { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
  .ltv-staff .ltv-staff__invite > summary { padding: 16px 20px; }
  .ltv-staff .ltv-staff__forms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ltv-staff .ltv-staff__form--line { grid-template-columns: minmax(0, 280px) minmax(0, 280px); align-items: end; }
  .ltv-staff .ltv-staff__form--line > :is(.ltv-staff__submit, .ltv-staff__note) { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .ltv-staff .ltv-staff__cols { display: grid; padding: 10px 20px; font-size: 12px; font-weight: 600; color: var(--ltv-text-3); background: var(--ltv-surface-2); }
  .ltv-staff .ltv-staff__cols, .ltv-staff .ltv-staff__row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) 150px 130px 110px; gap: 16px; }
  .ltv-staff .ltv-staff__row { padding: 14px 20px; }
  .ltv-staff :is(.ltv-staff__role, .ltv-staff__status, .ltv-staff__seen, .ltv-staff__go) { grid-column: auto; grid-row: auto; }
  .ltv-staff .ltv-staff__go { justify-self: end; }
  .ltv-staff .ltv-staff__panel { padding: 4px 20px 24px; }
  .ltv-staff .ltv-staff__group { grid-template-columns: 170px minmax(0, 1fr); gap: 12px 24px; }
  .ltv-staff .ltv-staff__signed { padding: 12px 20px; }
}
@media (prefers-reduced-motion: reduce) { .ltv-staff :is(.ltv-staff__go svg, .ltv-staff__invite > summary svg) { transition: none; } }

/* ---- R6 customer profile (admin/customer-detail.php) */
.ltv-cprof { max-width: 1360px; }
.ltv-cprof .ltv-cprof__head { margin-bottom: 20px; }
.ltv-cprof .ltv-cprof__name { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; color: #fff; overflow-wrap: anywhere; }
.ltv-cprof .ltv-cprof__mail { margin: 2px 0 0; font-size: 15px; line-height: 1.4; font-weight: 500; letter-spacing: 0; color: var(--ltv-text-2); }
.ltv-cprof .ltv-cprof__mail--lead { font-size: 24px; line-height: 1.25; font-weight: 650; letter-spacing: -.02em; color: #fff; }
.ltv-cprof__meta { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 8px 0 0; font-size: 13px; color: var(--ltv-text-3); }
.ltv-cprof__status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 16px; padding: 14px 18px;
  background: var(--ltv-surface); border: 1px solid var(--ltv-border); border-radius: var(--ltv-r-card); }
.ltv-cprof__state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.ltv-cprof__state .ltv-badge { font-size: 14px; min-height: 30px; padding-inline: 12px; }
.ltv-cprof__state-note { font-size: 13px; color: var(--ltv-text-2); }
.ltv-cprof__paid { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13px; color: var(--ltv-text-2); }
.ltv-cprof__paid strong { font-size: 16px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.ltv-cprof__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.ltv-cprof__actions:empty { display: none; }
.ltv-cprof__jump { display: flex; gap: 4px 20px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.ltv-cprof__jump a { color: var(--ltv-text-2); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.ltv-cprof__jump a:hover { color: #fff; border-bottom-color: var(--ltv-purple-light); }
.ltv-cprof__grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.ltv-cprof__main, .ltv-cprof__side { display: grid; gap: 20px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.ltv-cprof .ltv-card { min-width: 0; scroll-margin-top: 16px; }
.ltv-cprof .ltv-card__head { padding: 14px 20px; align-items: flex-start; }
.ltv-cprof__lines { padding: 16px 20px 20px; }
.ltv-cprof__tablewrap { border: 0; border-radius: 0 0 var(--ltv-r-card) var(--ltv-r-card); background: transparent; }
.ltv-cprof .ltv-table td { vertical-align: top; }
.ltv-cprof .ltv-table tr.is-current > td:first-child { box-shadow: inset 3px 0 0 var(--ltv-purple-light); }
.ltv-cprof__plan { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ltv-cprof__planname { font-weight: 600; }
.ltv-cprof__sub { display: block; margin-top: 2px; font-size: 12px; color: var(--ltv-text-3); }
td .ltv-cprof__sub, .ltv-cprof__facts .ltv-cprof__sub { display: inline; margin: 0; }
.ltv-cprof__plan + .ltv-cprof__sub { display: block; margin-top: 2px; }
.ltv-cprof__sub a, .ltv-cprof__same a { color: #d8b4fe; text-decoration: underline; text-underline-offset: 2px; }
.ltv-cprof__dash { color: var(--ltv-text-3); }
.ltv-cprof code { font-family: var(--ltv-font-mono); font-size: 13px; color: #fff; overflow-wrap: anywhere; }
.ltv-cprof__login { display: grid; gap: 2px; justify-items: start; }
.ltv-cprof__pass { display: inline-flex; align-items: center; gap: 4px; }
.ltv-cprof__pass code { color: var(--ltv-text-3); }
.ltv-cprof .ltv-cprof__pass button { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; border-radius: 8px; color: var(--ltv-text-2); background: none; border: 0; }
.ltv-cprof .ltv-cprof__pass button:hover { color: #fff; background: var(--ltv-surface-2); }
.ltv-cprof__outcome { display: grid; gap: 4px; justify-items: start; }
.ltv-cprof__outcome .ltv-cprof__sub { display: block; }
.ltv-cprof__none, .ltv-cprof__na { font-size: 14px; line-height: 1.5; color: var(--ltv-text-2); max-width: 64ch; }
.ltv-cprof .ltv-card__body.ltv-cprof__none, .ltv-cprof .ltv-card__body.ltv-cprof__na { padding: 16px 20px; }
.ltv-cprof__na { color: var(--ltv-text-3); }
.ltv-cprof p.ltv-cprof__none { margin: 0; padding: 12px 0; }
.ltv-cprof__foot { margin: 0; padding: 12px 20px; border-top: 1px solid var(--ltv-border); font-size: 12px; color: var(--ltv-text-3); }
.ltv-cprof__facts { margin: 0; padding: 4px 20px 8px; }
.ltv-cprof__facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 14px; }
.ltv-cprof__facts > div + div { border-top: 1px solid var(--ltv-border); }
.ltv-cprof__facts dt { flex: none; max-width: 50%; color: var(--ltv-text-3); font-size: 13px; }
.ltv-cprof__facts dd { margin: 0; min-width: 0; text-align: end; color: #fff; overflow-wrap: anywhere; }
.ltv-cprof__facts dd > div { display: none; }
.ltv-cprof__same { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 20px; border-top: 1px solid var(--ltv-border); font-size: 13px; color: var(--ltv-text-3); }
.ltv-cprof__tech { border-top: 1px solid var(--ltv-border); }
.ltv-cprof__tech > summary { padding: 12px 20px; font-size: 13px; color: var(--ltv-text-2); cursor: pointer; }
.ltv-cprof__tech > summary:hover { color: #fff; }
.ltv-cprof__facts--tech > div { display: block; }
.ltv-cprof__facts--tech dt { max-width: none; }
.ltv-cprof__facts--tech dd { text-align: start; font-size: 13px; font-family: var(--ltv-font-mono); }
.ltv-cprof .ltv-cprof__rows { padding-block: 4px; padding-inline: 20px; }
.ltv-cprof__rows .ltv-row { min-width: 0; }
.ltv-cprof__rows .ltv-cprof__audit { display: grid; gap: 0; align-content: center; padding-block: 8px; }
.ltv-cprof__audit .ltv-cprof__sub { display: block; margin: 0; }
@media (min-width: 1180px) {
  .ltv-cprof__grid { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 767px) {
  .ltv-cprof .ltv-cprof__name { font-size: 24px; }
  .ltv-cprof__status { padding: 14px 16px; }
  .ltv-cprof__actions { margin-inline-start: 0; width: 100%; }
  .ltv-cprof__actions form, .ltv-cprof__actions .ltv-btn { width: 100%; }
  .ltv-cprof .ltv-table--stack td { align-items: flex-start; }
  .ltv-cprof .ltv-table--stack td > :not(.ltv-cprof__dash) { min-width: 0; text-align: end; }
  .ltv-cprof .ltv-table--stack td::before { flex: none; padding-top: 2px; }
  .ltv-cprof__plan, .ltv-cprof__login, .ltv-cprof__outcome { justify-content: flex-end; justify-items: end; }
  .ltv-cprof .ltv-table tr.is-current > td:first-child { box-shadow: none; }
  .ltv-cprof .ltv-table--stack tr.is-current { box-shadow: inset 3px 0 0 var(--ltv-purple-light); }
}
/* ---- R6 customer profile: table density, device cards in the narrower main column */
.ltv-cprof .ltv-table th, .ltv-cprof .ltv-table td { padding-inline: 12px; }
.ltv-cprof .ltv-table th:first-child, .ltv-cprof .ltv-table td:first-child { padding-inline-start: 20px; }
.ltv-cprof .ltv-table th:last-child, .ltv-cprof .ltv-table td:last-child { padding-inline-end: 20px; }
.ltv-cprof .ltv-table td { overflow-wrap: normal; }
.ltv-cprof .ltv-table td.ltv-cprof__date, .ltv-cprof .ltv-table td .ltv-badge { white-space: nowrap; }
.ltv-cprof code { overflow-wrap: normal; }
.ltv-cprof .ltv-cprof__login code, .ltv-cprof__facts code { overflow-wrap: anywhere; }
.ltv-cprof .ltv-cprof__pass code { white-space: nowrap; overflow-wrap: normal; letter-spacing: .05em; }
.ltv-cprof .ltv-cprof__pass button { min-width: 44px; padding: 0; }
.ltv-cprof__lines [data-ol-group] > .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.ltv-cprof__lines [data-cred-value] { white-space: nowrap; }
@media (min-width: 1180px) and (max-width: 1359px) { .ltv-cprof__grid { grid-template-columns: minmax(0, 1fr) 300px; } }

/* ---- R6 audit */
.ltv-audit > :is(.ltv-pagehead, .ltv-audit__filters, .ltv-audit__pager, .ltv-table-wrap, .ltv-empty) { max-width: 1280px; }
.ltv-audit .ltv-audit__filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: end; margin-bottom: 16px; }
.ltv-audit .ltv-audit__f { min-width: 0; }
.ltv-audit .ltv-audit__f .ltv-input { width: 100%; }
.ltv-audit .ltv-audit__go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ltv-audit .ltv-audit__reset { font-size: 13px; color: var(--ltv-text-2); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.ltv-audit .ltv-audit__reset:hover { color: #fff; }
.ltv-audit .ltv-audit__pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: 13px; color: var(--ltv-text-2); }
.ltv-audit .ltv-audit__pager--top { margin-bottom: 10px; }
.ltv-audit .ltv-audit__pager--bottom { margin-top: 12px; }
.ltv-audit .ltv-audit__pager > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ltv-audit .ltv-audit__pageno { margin-inline-start: 4px; color: var(--ltv-text-3); }
.ltv-audit .ltv-audit__table td { vertical-align: top; }
.ltv-audit .ltv-audit__when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ltv-audit .ltv-audit__who, .ltv-audit .ltv-audit__target { overflow-wrap: anywhere; }
.ltv-audit .ltv-audit__sub { font-size: 12px; color: var(--ltv-text-3); overflow-wrap: anywhere; }
.ltv-audit code.ltv-audit__sub { font-family: var(--ltv-font-mono); }
.ltv-audit .ltv-audit__action { display: grid; gap: 4px; justify-items: start; }
.ltv-audit .ltv-audit__action .ltv-badge { white-space: normal; text-align: start; border-radius: 8px; }
.ltv-audit .ltv-audit__details > summary { cursor: pointer; font-size: 13px; color: #d8b4fe; }
.ltv-audit .ltv-audit__details pre { margin: 6px 0 0; max-width: 340px; padding: 8px 10px; border: 1px solid var(--ltv-border); border-radius: var(--ltv-r-btn-sm); background: var(--ltv-midnight);
  font-family: var(--ltv-font-mono); font-size: 12px; line-height: 1.5; color: var(--ltv-text-2); white-space: pre-wrap; overflow-wrap: anywhere; text-align: start; }
.ltv-audit .ltv-empty { border: 1px solid var(--ltv-border); }
@media (max-width: 767px) {
  .ltv-audit .ltv-audit__table td { justify-content: flex-start; }
  .ltv-audit .ltv-audit__table td::before { flex: 0 0 104px; }
  .ltv-audit .ltv-audit__table td > * { min-width: 0; }
  .ltv-audit .ltv-audit__when { white-space: normal; }
  .ltv-audit .ltv-audit__details pre { max-width: 100%; }
}
@media (min-width: 640px) { .ltv-audit .ltv-audit__filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ltv-audit .ltv-audit__go { grid-column: 1 / -1; } }
@media (min-width: 1100px) {
  .ltv-audit .ltv-audit__filters { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 1fr) 96px auto; }
  .ltv-audit .ltv-audit__go { grid-column: auto; flex-wrap: nowrap; }
}
/* ---- R6 staff (permission table fits narrow screens) */
.ltv-staff .ltv-staff__caps { table-layout: fixed; }
.ltv-staff .ltv-staff__caps tbody th { white-space: normal; overflow-wrap: anywhere; }
.ltv-staff .ltv-staff__caps thead th { white-space: normal; }
/* ---- R6 customer profile: column widths */
.ltv-cprof .ltv-table td:first-child { min-width: 190px; }
.ltv-cprof .ltv-table td[data-label="Length"], .ltv-cprof .ltv-table td[data-label="What"] { white-space: nowrap; }
.ltv-cprof .ltv-table td[data-label="What"] { white-space: normal; min-width: 110px; }
@media (max-width: 767px) { .ltv-cprof .ltv-table td:first-child, .ltv-cprof .ltv-table td[data-label="What"] { min-width: 0; } }
/* ---- R6 customer profile: only the subscriptions table reserves room for the plan cell */
.ltv-cprof .ltv-table td:first-child { min-width: 0; }
.ltv-cprof #all-subscriptions .ltv-table td:first-child { min-width: 190px; }
@media (max-width: 767px) { .ltv-cprof #all-subscriptions .ltv-table td:first-child { min-width: 0; } }
/* ---- R6 customer profile: on phones the plan cell is the heading of its stacked row */
@media (max-width: 767px) {
  .ltv-cprof #all-subscriptions .ltv-table--stack td:first-child { display: block; padding-bottom: 8px; }
  .ltv-cprof #all-subscriptions .ltv-table--stack td:first-child::before { display: none; }
  .ltv-cprof #all-subscriptions .ltv-table--stack td:first-child > * { text-align: start; }
  .ltv-cprof #all-subscriptions .ltv-cprof__plan { justify-content: flex-start; }
  .ltv-cprof .ltv-cprof__jump { gap: 0 18px; }
}
/* ---- R6 customer profile: stacked rows share one inline padding */
@media (max-width: 767px) {
  .ltv-cprof .ltv-table--stack td, .ltv-cprof .ltv-table--stack td:first-child, .ltv-cprof .ltv-table--stack td:last-child { padding-inline: 0; }
  .ltv-cprof .ltv-table--stack tr { padding-inline: 20px; }
}

/* ---- R6 referrals (admin/affiliates.php + admin/affiliate-program.php, main.ltv-ref) */
@media (max-width: 639px) { main.ltv-ref { padding: 16px; } }
.ltv-ref a:not([class]) { color: #d8b4fe; text-decoration: none; }
.ltv-ref a:not([class]):hover { color: #fff; text-decoration: underline; }
.ltv-ref :is(a, summary):focus-visible { outline: 2px solid var(--ltv-focus); outline-offset: 2px; border-radius: 4px; }
.ltv-ref code { font-family: var(--ltv-font-mono); font-size: 12px; color: var(--ltv-text-2); overflow-wrap: anywhere; }
.ltv-ref .ltv-ref__programs { margin-bottom: 14px; }
.ltv-ref .ltv-ref__programs .ltv-tab { font-size: 15px; padding: 10px 14px; }
.ltv-ref .ltv-ref__programs .ltv-count { margin-inline-start: 4px; vertical-align: 1px; }
.ltv-ref .ltv-ref__lede { margin: 0 0 16px; max-width: 78ch; font-size: 14px; line-height: 1.55; color: var(--ltv-text-2); }
.ltv-ref .ltv-ref__lede strong { color: #fff; font-weight: 600; }
.ltv-ref .ltv-ref__flash { margin-bottom: 16px; }
.ltv-ref .ltv-ref__views { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.ltv-ref .ltv-ref__views .ltv-seg { min-height: 36px; padding: 0 14px; text-decoration: none; }
.ltv-ref .ltv-ref__sub { display: flex; flex-wrap: wrap; gap: 2px 22px; margin: -6px 0 16px; border-bottom: 1px solid var(--ltv-border); }
.ltv-ref .ltv-ref__sublink { padding: 8px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 14px; color: var(--ltv-text-2); text-decoration: none; }
.ltv-ref .ltv-ref__sublink:hover { color: #fff; }
.ltv-ref .ltv-ref__sublink[aria-current="page"] { color: #fff; font-weight: 600; border-bottom-color: var(--ltv-purple-light); }
.ltv-ref .ltv-ref__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ltv-ref .ltv-ref__stats > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
@media (min-width: 768px) { .ltv-ref .ltv-ref__stats { grid-template-columns: repeat(5, minmax(0, 1fr)); } .ltv-ref .ltv-ref__stats--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ltv-ref .ltv-ref__stats > :first-child:nth-last-child(odd) { grid-column: auto; } }
@media (min-width: 1280px) { .ltv-ref .ltv-ref__stats--six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.ltv-ref a.ltv-stat { display: block; text-decoration: none; transition: border-color .15s var(--ltv-ease); }
.ltv-ref a.ltv-stat:hover { border-color: var(--ltv-border-strong); }
.ltv-ref a.ltv-stat:focus-visible { outline: 2px solid var(--ltv-focus); outline-offset: 2px; }
.ltv-ref .ltv-ref__scope { margin: 10px 0 0; }
.ltv-ref .ltv-ref__block { margin-top: 20px; }
.ltv-ref .ltv-ref__h2 { margin: 0; font-size: 16px; font-weight: 600; color: #fff; }
.ltv-ref .ltv-ref__h2sub { margin: 4px 0 12px; max-width: 92ch; line-height: 1.5; }
.ltv-ref .ltv-ref__h2sub strong { color: #fff; font-weight: 600; }
.ltv-ref .ltv-ref__h2 + .ltv-card, .ltv-ref .ltv-ref__h2 + .ltv-table-wrap { margin-top: 12px; }
.ltv-ref .ltv-ref__todo { list-style: none; margin: 0; padding: 0; }
.ltv-ref .ltv-ref__todo li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 14px 24px; }
.ltv-ref .ltv-ref__todo li + li { border-top: 1px solid var(--ltv-border); }
.ltv-ref .ltv-ref__todo-n { min-width: 36px; justify-content: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.ltv-ref .ltv-ref__todo-text { display: grid; gap: 2px; min-width: 0; }
.ltv-ref .ltv-ref__todo-text strong { font-size: 14px; font-weight: 600; color: #fff; }
.ltv-ref .ltv-ref__todo-text span { font-size: 13px; line-height: 1.5; color: var(--ltv-text-2); }
@media (max-width: 639px) { .ltv-ref .ltv-ref__todo li { grid-template-columns: auto minmax(0, 1fr); padding: 14px 20px; align-items: start; } .ltv-ref .ltv-ref__todo li > .ltv-btn { grid-column: 2; justify-self: start; } }
.ltv-ref .ltv-ref__tablewrap { overflow-x: auto; }
.ltv-ref .ltv-table th { position: static; }
.ltv-ref .ltv-table td { vertical-align: top; }
.ltv-ref .ltv-table td > span { display: inline-grid; gap: 2px; min-width: 0; justify-items: start; }
.ltv-ref .ltv-table td.num > span { justify-items: end; }
.ltv-ref .ltv-table strong { font-weight: 600; overflow-wrap: anywhere; }
.ltv-ref .ltv-table small { font-size: 12px; color: var(--ltv-text-3); overflow-wrap: anywhere; }
.ltv-ref .ltv-table a.ltv-badge { text-decoration: none; }
.ltv-ref .ltv-table a.ltv-badge:hover { border-color: currentColor; }
.ltv-ref .ltv-ref__date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ltv-text-2); }
.ltv-ref .ltv-ref__break { overflow-wrap: anywhere; }
.ltv-ref .ltv-ref__clip { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltv-ref .ltv-ref__inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ltv-ref .ltv-ref__num { width: 84px; }
@media (max-width: 767px) {
  .ltv-ref .ltv-table--stack td { align-items: flex-start; }
  .ltv-ref .ltv-table--stack td::before { flex: none; max-width: 42%; padding-top: 2px; }
  .ltv-ref .ltv-table--stack td[data-label=""]::before { display: none; }
  .ltv-ref .ltv-table--stack td > span { justify-items: end; text-align: end; }
  .ltv-ref .ltv-table--stack .ltv-ref__inline { justify-content: flex-end; }
  .ltv-ref .ltv-table--stack .ltv-ref__clip { max-width: none; white-space: normal; overflow-wrap: anywhere; text-align: end; }
  .ltv-ref .ltv-table--stack .ltv-ref__date { white-space: normal; text-align: end; }
}
.ltv-ref .ltv-ref__filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 16px; }
.ltv-ref .ltv-ref__filters .ltv-searchfield { flex: 1 1 240px; max-width: 420px; }
.ltv-ref .ltv-ref__f { display: block; flex: 0 1 190px; min-width: 0; }
.ltv-ref .ltv-ref__f--rows { flex: 0 0 84px; }
.ltv-ref .ltv-ref__f .ltv-label { margin-bottom: 4px; }
.ltv-ref .ltv-ref__f .ltv-input { width: 100%; }
.ltv-ref .ltv-ref__searchform { display: flex; flex: 1 1 320px; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.ltv-ref .ltv-ref__perpage { margin-inline-start: auto; }
@media (max-width: 639px) { .ltv-ref .ltv-ref__filters .ltv-searchfield { flex-basis: 100%; max-width: none; } .ltv-ref .ltv-ref__f { flex: 1 1 calc(50% - 6px); } .ltv-ref .ltv-ref__f--rows { flex: 0 0 84px; } }
.ltv-ref .ltv-ref__rewards { display: grid; gap: 12px; }
.ltv-ref .ltv-ref__reward { padding: 16px 20px; min-width: 0; }
.ltv-ref .ltv-ref__reward + .ltv-ref__reward { margin-top: 12px; }
.ltv-ref .ltv-ref__rewards > .ltv-ref__reward { margin-top: 0; }
.ltv-ref .ltv-ref__reward:not(.is-open) { background: transparent; }
.ltv-ref .ltv-ref__rhead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.ltv-ref .ltv-ref__rwho { min-width: 0; font-size: 15px; line-height: 1.45; color: #fff; overflow-wrap: anywhere; }
.ltv-ref .ltv-ref__rwho strong { font-weight: 600; }
.ltv-ref .ltv-ref__rfor { color: var(--ltv-text-2); }
.ltv-ref .ltv-ref__why { margin: 8px 0 0; max-width: 86ch; font-size: 14px; line-height: 1.55; color: #e4dff0; }
.ltv-ref .ltv-ref__reward:not(.is-open) .ltv-ref__why { color: var(--ltv-text-2); }
.ltv-ref .ltv-ref__rmeta { margin: 6px 0 0; font-size: 12px; color: var(--ltv-text-3); }
.ltv-ref .ltv-ref__reward > .ltv-alert { margin-top: 12px; }
.ltv-ref .ltv-ref__actions { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ltv-border); }
.ltv-ref .ltv-ref__target { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--ltv-text-2); }
.ltv-ref .ltv-ref__forms { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; }
.ltv-ref .ltv-ref__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; min-width: 0; }
.ltv-ref .ltv-ref__form .ltv-label { margin-bottom: 4px; }
.ltv-ref .ltv-ref__form :is(input, select).ltv-input:not(.ltv-ref__num) { width: 230px; max-width: 100%; }
.ltv-ref .ltv-ref__form--cancel { margin-inline-start: auto; }
.ltv-ref .ltv-ref__form--ask { margin-bottom: 14px; align-items: center; }
.ltv-ref .ltv-ref__ask { flex: 1 1 100%; font-size: 14px; color: #fff; }
.ltv-ref .ltv-ref__check { display: flex; flex: 1 1 100%; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.45; color: #e4dff0; cursor: pointer; }
.ltv-ref .ltv-ref__check input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--ltv-purple); }
.ltv-ref .ltv-ref__cost { margin: 12px 0 0; max-width: 92ch; font-size: 12px; line-height: 1.5; }
.ltv-ref .ltv-ref__blocked { margin: 0; flex: 1 1 100%; font-size: 13px; line-height: 1.5; color: #fde68a; }
@media (max-width: 639px) {
  .ltv-ref .ltv-ref__reward { padding: 14px 16px; }
  .ltv-ref .ltv-ref__forms { flex-direction: column; align-items: stretch; }
  .ltv-ref .ltv-ref__form { align-items: stretch; }
  .ltv-ref .ltv-ref__form > div, .ltv-ref .ltv-ref__form > .ltv-btn { flex: 1 1 100%; }
  .ltv-ref .ltv-ref__form :is(input, select).ltv-input:not(.ltv-ref__num) { width: 100%; }
  .ltv-ref .ltv-ref__form .ltv-btn { white-space: normal; height: auto; min-height: 40px; padding-block: 8px; text-align: center; }
  .ltv-ref .ltv-ref__form--cancel { margin-inline-start: 0; padding-top: 12px; border-top: 1px dashed var(--ltv-border); }
}
.ltv-ref .ltv-ref__details { margin-top: 12px; }
.ltv-ref .ltv-ref__details > summary { width: fit-content; cursor: pointer; font-size: 13px; font-weight: 500; color: #d8b4fe; }
.ltv-ref .ltv-ref__details > summary:hover { color: #fff; }
.ltv-ref :is(.ltv-ref__details, .ltv-ref__morebody) h3 { margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: #fff; }
.ltv-ref :is(.ltv-ref__details, .ltv-ref__morebody) p { margin: 6px 0 0; line-height: 1.5; }
.ltv-ref .ltv-ref__kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px 24px; margin: 12px 0 0; }
.ltv-ref .ltv-ref__kv dt { font-size: 12px; color: var(--ltv-text-3); }
.ltv-ref .ltv-ref__kv dd { margin: 2px 0 0; font-size: 14px; color: #fff; overflow-wrap: anywhere; }
.ltv-ref .ltv-ref__kv-wide { grid-column: 1 / -1; }
.ltv-ref .ltv-ref__pre { white-space: pre-wrap; color: #e4dff0; }
.ltv-ref .ltv-ref__plainlist { list-style: none; margin: 8px 0 0; padding: 0; }
.ltv-ref .ltv-ref__plainlist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 0; font-size: 14px; color: #fff; overflow-wrap: anywhere; }
.ltv-ref .ltv-ref__plainlist li + li { border-top: 1px solid var(--ltv-border); }
.ltv-ref .ltv-ref__events { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.ltv-ref .ltv-ref__events li { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; color: var(--ltv-text-2); }
.ltv-ref .ltv-ref__events li > span:first-child { font-variant-numeric: tabular-nums; }
.ltv-ref .ltv-ref__pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.ltv-ref .ltv-ref__pager > div { display: flex; gap: 8px; }
.ltv-ref .ltv-ref__pager button:disabled { opacity: .45; cursor: default; }
.ltv-ref .ltv-ref__more { margin-top: 20px; }
.ltv-ref .ltv-ref__more > summary { padding: 14px 24px; cursor: pointer; font-size: 14px; font-weight: 600; color: #fff; }
.ltv-ref .ltv-ref__more > summary .ltv-badge { margin-inline-start: 8px; vertical-align: 1px; font-weight: 500; }
.ltv-ref .ltv-ref__morebody { padding: 0 24px 20px; }
.ltv-ref .ltv-ref__morebody > :first-child { margin-top: 0; }
@media (max-width: 767px) { .ltv-ref .ltv-ref__more > summary { padding: 14px 20px; } .ltv-ref .ltv-ref__morebody { padding: 0 20px 18px; } }
.ltv-ref .ltv-ref__rules { margin: 0; }
.ltv-ref .ltv-ref__rules > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 4px 24px; padding: 14px 24px; }
.ltv-ref .ltv-ref__rules > div + div { border-top: 1px solid var(--ltv-border); }
.ltv-ref .ltv-ref__rules dt { font-size: 14px; font-weight: 600; color: #fff; }
.ltv-ref .ltv-ref__rules dd { margin: 0; max-width: 78ch; font-size: 14px; line-height: 1.55; color: var(--ltv-text-2); }
.ltv-ref .ltv-ref__rules dd strong { color: #fff; font-weight: 600; }
@media (max-width: 767px) { .ltv-ref .ltv-ref__rules > div { grid-template-columns: minmax(0, 1fr); padding: 14px 20px; } }
.ltv-ref .ltv-ref__settings { display: grid; gap: 16px; max-width: 900px; }
.ltv-ref .ltv-ref__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 18px 24px; }
.ltv-ref .ltv-ref__fields .ltv-input { width: 100%; max-width: 180px; }
.ltv-ref .ltv-ref__fields p { margin: 6px 0 0; line-height: 1.5; }
.ltv-ref .ltv-ref__fields--after { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ltv-border); }
.ltv-ref .ltv-ref__switch { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; cursor: pointer; }
.ltv-ref .ltv-ref__switch > span { display: grid; gap: 4px; min-width: 0; max-width: 70ch; line-height: 1.5; }
.ltv-ref .ltv-ref__switch-title { font-size: 14px; font-weight: 600; color: #fff; }
.ltv-ref .ltv-ref__switch input { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 44px; height: 24px; margin: 0; border-radius: 999px; background: var(--ltv-surface-3);
  border: 1px solid var(--ltv-border-strong); cursor: pointer; transition: background-color .15s var(--ltv-ease); }
.ltv-ref .ltv-ref__switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s var(--ltv-ease); }
.ltv-ref .ltv-ref__switch input:checked { background: var(--ltv-purple); border-color: transparent; }
.ltv-ref .ltv-ref__switch input:checked::after { transform: translateX(20px); }
.ltv-ref .ltv-ref__switch input:focus-visible { outline: 2px solid var(--ltv-focus); outline-offset: 2px; }
.ltv-ref .ltv-ref__save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
@media (prefers-reduced-motion: reduce) { .ltv-ref a.ltv-stat, .ltv-ref .ltv-ref__switch input, .ltv-ref .ltv-ref__switch input::after { transition: none; } }
/* ---- R6 referrals: cancel disclosure */
.ltv-ref .ltv-ref__cancel { margin-inline-start: auto; min-width: 0; }
.ltv-ref .ltv-ref__cancel > summary { width: fit-content; margin-inline-start: auto; padding: 9px 0; cursor: pointer; font-size: 13px; color: #fca5a5; }
.ltv-ref .ltv-ref__cancel > summary:hover { color: #fff; }
.ltv-ref .ltv-ref__cancel[open] { flex: 1 1 100%; padding-top: 12px; border-top: 1px dashed var(--ltv-border-strong); }
.ltv-ref .ltv-ref__cancel[open] > summary { margin-inline-start: 0; padding-top: 0; }
@media (max-width: 639px) { .ltv-ref .ltv-ref__cancel, .ltv-ref .ltv-ref__cancel > summary { margin-inline-start: 0; } }
.ltv-ref .ltv-ref__f { flex-basis: 215px; }
.ltv-ref .ltv-ref__cancel:not([open]) { overflow: clip; overflow-clip-margin: 4px; }
@media (max-width: 639px) { .ltv-ref .ltv-ref__f { flex: 1 1 calc(50% - 6px); } .ltv-ref .ltv-ref__f--rows { flex: 0 0 84px; } }

/* ---- R7 customer-detail: first / latest visit headings in "How this customer found us" */
.ltv-cprof .ltv-cprof__visit { margin: 0; padding: 14px 20px 0; font-size: 13px; font-weight: 600; color: #fff; }
.ltv-cprof .ltv-cprof__visit span { margin-inline-start: 6px; font-weight: 400; color: var(--ltv-text-3); }
.ltv-cprof .ltv-cprof__facts + .ltv-cprof__visit { border-top: 1px solid var(--ltv-border); }
