/* ux-admin.css — page-level styles for the admin console, admin payments and public info pages. */

/* ── Generic helpers ───────────────────────────────────────── */
[hidden] { display: none !important; }
.modalbg[hidden] { display: none !important; }
.ax-flex1 { flex: 1; min-width: 0; }
.ax-nowrap { white-space: nowrap; }
.ax-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.ax-inline { display: inline; }
.ax-nopad { padding: 0 !important; overflow: hidden; }
.ax-warn { color: var(--warn); }
.ax-ok { color: var(--ok); }
.ax-pink { color: var(--gold); }
.ax-link { color: var(--gold); font-weight: 600; text-decoration: none; }
.ax-link:hover { text-decoration: underline; }
.ax-top { align-items: flex-start; }
.ax-ls { letter-spacing: .06em; }
.ax-ml8 { margin-left: 8px; }
.ax-w90 { width: 90px; }
.ax-w120 { width: 120px; }
.ax-w140 { width: 140px; }
.ax-maxw220 { max-width: 220px; }
.ax-maxw200 { max-width: 200px; }
.ax-minw220 { min-width: 220px; }
.ax-minw300 { min-width: 300px; }
.ax-pre { white-space: pre-wrap; word-break: break-word; }
.ax-btnbtn { border: none; cursor: pointer; font: inherit; }
.ax-btn-block { width: 100%; justify-content: center; }
.ax-kpi-sm { font-size: 24px; }
.ax-kpi-xs { font-size: 16px; }
.ax-nolink { text-decoration: none; }
.ax-fs11 { font-size: 11px; }
.ax-tr { text-align: right; }
.ax-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Page summary tiles ────────────────────────────────────── */
.ax-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ax-stat { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; text-decoration: none; color: inherit; }
a.ax-stat:hover { border-color: var(--navy); }
.ax-stat-n { font-family: var(--serif); font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--navy); }
.ax-stat-l { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.ax-stat.attn { border-color: rgba(184,20,77,.35); background: #FFF6F9; }
.ax-stat.attn .ax-stat-n { color: var(--warn); }
.ax-stat.ok .ax-stat-n { color: var(--ok); }

/* ── Toolbars (search + chips) ─────────────────────────────── */
.ax-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.ax-toolbar.free { border-bottom: none; padding: 0 0 14px; }
.ax-toolbar .ax-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ax-toolbar .ax-find { display: flex; gap: 8px; align-items: center; flex: 1; justify-content: flex-end; min-width: 200px; }
.ax-toolbar .bc-search { flex: 1; max-width: 280px; min-width: 140px; }
.ax-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ax-cardhd { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ax-cardhd .t { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--navy); }
.ax-cardhd .s { font-size: 12px; color: var(--muted); margin-left: 6px; }
.ax-pad { padding: 16px 20px; }
.ax-pad-b { border-bottom: 1px solid var(--line); }
.ax-empty-row { padding: 24px 20px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* ── Forms in sections ─────────────────────────────────────── */
.ax-sec { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 18px; margin-bottom: 16px; background: #fff; }
.ax-sec > .ax-sec-t { font-weight: 700; font-size: 14px; color: var(--navy); margin-bottom: 2px; }
.ax-sec > .ax-sec-d { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.ax-help { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.ax-hint-bad { font-size: 12px; color: var(--warn); margin-top: 4px; }
.ax-formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.ax-formgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ax-formgrid .full { grid-column: 1 / -1; }
.ax-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ax-actions.end { justify-content: flex-end; }
.ax-actions.between { justify-content: space-between; }
.ax-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; line-height: 1.4; }
.ax-check input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--navy); }
.ax-modal-wide { max-width: 640px; }
.ax-modal-scroll { max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.ax-modal-scroll .modalbd { overflow-y: auto; }
.ax-modalft { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; background: #fff; }
.modalhd h2, .modalhd .ax-modal-title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--navy); margin: 0; }

/* ── Row actions ───────────────────────────────────────────── */
.ax-acts { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.ax-acts form { margin: 0; display: inline; }
.ax-badgebtn { border: none; cursor: pointer; font: inherit; }
.ax-badgebtn:hover { filter: brightness(.95); }

/* ── Switch toggle ─────────────────────────────────────────── */
.ax-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 13px; }
.ax-switch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.ax-switch .trk { width: 44px; height: 24px; border-radius: 99px; background: #CFCFCB; position: relative; transition: background .15s; flex: none; }
.ax-switch .trk::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.ax-switch input:checked + .trk { background: var(--ok); }
.ax-switch input:checked + .trk::after { transform: translateX(20px); }
.ax-switch input:focus-visible + .trk { outline: 2px solid var(--gold); outline-offset: 2px; }
.ax-switch .lbl-on { display: none; color: var(--ok); }
.ax-switch .lbl-off { color: var(--muted); }
.ax-switch input:checked ~ .lbl-on { display: inline; }
.ax-switch input:checked ~ .lbl-off { display: none; }

/* ── Lists as cards ────────────────────────────────────────── */
.ax-item { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ax-item:last-child { border-bottom: none; }
.ax-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.ax-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.ax-kv dt { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ax-kv dd { margin: 0; word-break: break-word; }
.ax-bar { height: 8px; background: var(--cream2); border-radius: 99px; overflow: hidden; }
.ax-bar > i { display: block; height: 100%; background: var(--gold); }

@media (max-width: 700px) {
    .ax-formgrid, .ax-formgrid.three { grid-template-columns: 1fr; }
    .ax-kv { grid-template-columns: 1fr; gap: 2px; }
    .ax-kv dd { margin-bottom: 8px; }
    .ax-toolbar { padding: 12px 14px; }
    .ax-toolbar .ax-find { justify-content: stretch; }
    .ax-toolbar .bc-search { max-width: none; }
    .ax-cardhd, .ax-pad, .ax-item { padding-left: 14px; padding-right: 14px; }
    .ax-modalft { padding: 12px 16px; }
    .ax-acts { justify-content: flex-start; }
}

/* ── Analytics ─────────────────────────────────────────────── */
.ax-span-all { grid-column: span 3; }
@media (max-width: 700px) { .ax-span-all { grid-column: auto; } }
.grid2.ax-top > .card { min-width: 0; }
canvas { max-width: 100%; }
.d-block{display:block}
.ax-maxw-form{max-width:420px}
.ax-modal-scroll form{display:flex;flex-direction:column;min-height:0;flex:1}
.ax-modal-scroll .modalbd{display:block}
.ax-modal-scroll .modalbd > * + *{margin-top:14px}
.ax-start{justify-content:flex-start !important}
.ax-code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:1.5}
.ax-between{justify-content:space-between}

/* ── Features ──────────────────────────────────────────────── */
.ax-col-mod { width: 34%; }
.ax-col-sw { width: 130px; }
.ax-off-row { background: var(--cream); }
.ax-pad-t { border-top: 1px solid var(--line); }
.ax-swbtn { display: inline-flex; align-items: center; gap: 10px; background: none; border: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 13px; color: var(--muted); padding: 4px 0; }
.ax-swbtn .trk { width: 44px; height: 24px; border-radius: 99px; background: #CFCFCB; position: relative; transition: background .15s; flex: none; }
.ax-swbtn .trk::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.ax-swbtn.on { color: var(--ok); }
.ax-swbtn.on .trk { background: var(--ok); }
.ax-swbtn.on .trk::after { transform: translateX(20px); }
.ax-swbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 99px; }

/* ── Invitations ───────────────────────────────────────────── */
.ax-gen { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.ax-gen .field { margin: 0; }
.ax-left { justify-content: flex-start !important; }
.ax-wide { max-width: 360px !important; }
.ax-auto { width: auto; }
.ax-w76 { width: 76px; }
.jc { justify-content: center; }

/* ── Layouts ───────────────────────────────────────────────── */
.ax-layout-img { width: 100%; border-radius: 8px; margin-top: 8px; display: block; }
.ax-swatch { height: 90px; border-radius: 8px; border: 1px solid var(--line); }
#layoutSwatch { height: 48px; }
.grid2 > .card[hidden] { display: none; }

/* ── Promo codes ───────────────────────────────────────────── */
.ax-upper { text-transform: uppercase; }
.ax-fieldset { min-width: 0; }
.ax-fieldset legend { padding: 0 6px; }
.mt12 { margin-top: 12px; }
.ax-clamp { max-height: 60px; overflow: hidden; }
.ax-right { text-align: right; }

/* ── Payments ──────────────────────────────────────────────── */
.ax-setrow { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.ax-sec > .ax-setrow:first-of-type { border-top: none; }
.ax-sec .ax-setrow + .ax-setrow { border-top: 1px solid var(--line); }
.modalbd > .ax-setrow { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.ax-stack { display: flex; flex-direction: column; gap: 12px; }
.ax-mr6 { margin-right: 6px; }
.ax-dim { opacity: .4; }
@media (max-width: 700px) { .ax-setrow { flex-direction: column; align-items: flex-start; } }
.ax-w160 { width: 160px; }
.ax-scroll { max-height: 220px; overflow: auto; }
.ax-kvtbl td:first-child { width: 42%; }
.ax-kvtbl td.tr { word-break: break-word; }
.card .tbl-wrap > .ax-kvtbl { min-width: 0; }

/* ── Public info pages (About / How it works / Privacy / Terms) ───── */
.land .ax-h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: -.01em; margin: 26px auto 0; max-width: 18ch; text-align: center; }
.land .ax-h1.ax-h1-sm { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; margin: 22px auto 0; max-width: 16ch; }
.land .ax-sidenote { max-width: 34ch; text-align: right; line-height: 1.55; }
.land .ax-lsec-flush { padding-top: 0; }
.land .ax-cta-kick { color: var(--gold); }
.land .ax-cta-h2 { font-size: 52px; margin: 14px 0 0; line-height: 1.06; color: #fff; }
.land .ax-cta-p { color: #c7d0e2; max-width: 520px; margin-left: auto; margin-right: auto; }
.land .ax-cta-ghost { background: transparent; border-color: #3a4d6f; color: #fff; }
.land .ax-cta-ghost:hover { border-color: #fff; }
.land .ax-foot-brand { color: var(--gold); }
.land .ax-foot-link { color: #c7d0e2; text-decoration: none; }
.land .ax-foot-link:hover { color: #fff; text-decoration: underline; }
.land .ax-foot-copy { color: #9aa6c0; }
.land .lnav .ax-nolink { text-decoration: none; }
.land .lnav-link[aria-current="page"] { color: var(--navy); border-bottom: 2px solid var(--gold); }
@media (max-width: 720px) {
    .land .ax-sidenote { text-align: left; max-width: none; }
    .land .ax-cta-h2 { font-size: 36px; }
}

/* Long-form legal documents: readable measure, contents box, stacked tables on phones */
.legal { max-width: 70ch; }
.legal-meta { flex-direction: column; gap: 4px; }
.legal-tocbox { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 20px; margin: 0 0 8px; }
.legal-toc-t { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.legal-tocbox .legal-toc { margin: 0; }
.legal-tocbox .legal-toc a { text-decoration: none; }
.legal-tocbox .legal-toc a:hover { color: var(--gold); text-decoration: underline; }
.legal h2 { scroll-margin-top: 24px; }
.legal-table th { width: 30%; white-space: normal; }
.legal-top { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.legal a:focus-visible, .legal-toc a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
@media (max-width: 600px) {
    .legal-table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; width: 100%; }
    .legal-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
    .legal-table th, .legal-table td { border: none; padding: 2px 0; }
    .legal-table th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
}
@media print {
    .land .lnav, .land .lfoot, .legal-top { display: none; }
    .legal { max-width: none; }
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
