/* ============================================================
   WiFiX design system (Apexia house tokens). Mobile first. Light + dark.
   ============================================================ */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/InterVariable.woff2') format('woff2'); }

:root, [data-bs-theme=light] {
  --apx-brand: #0b84f3; --apx-brand-2: #0a5fc2; --apx-brand-soft: rgba(11, 132, 243, .11); --apx-brand-ink: #0a5fc2;
  --apx-bg: #f4f6fb; --apx-surface: #ffffff; --apx-surface-2: #f8fafd; --apx-border: #e4e8f0; --apx-border-strong: #d2d8e4;
  --apx-text: #17122b; --apx-muted: #6f6a85; --apx-faint: #a39eb7;
  --apx-shadow: 0 1px 2px rgba(23, 18, 43, .04), 0 8px 24px -12px rgba(23, 18, 43, .12);
  --apx-shadow-lg: 0 24px 60px -24px rgba(23, 18, 43, .25);
  --apx-radius: 14px; --apx-radius-sm: 10px;
  --bs-body-bg: var(--apx-bg); --bs-body-color: var(--apx-text); --bs-border-color: var(--apx-border);
  --bs-primary: var(--apx-brand); --bs-primary-rgb: 11, 132, 243; --bs-link-color: var(--apx-brand-ink); --bs-link-hover-color: #06427f;
  --bs-secondary-color: var(--apx-muted); --bs-font-sans-serif: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
[data-bs-theme=dark] {
  --apx-brand-soft: rgba(56, 160, 255, .18); --apx-brand-ink: #7cc0ff;
  --apx-bg: #0c1018; --apx-surface: #141a25; --apx-surface-2: #1a2130; --apx-border: #26303f; --apx-border-strong: #364256;
  --apx-text: #eeecf6; --apx-muted: #a49fbb; --apx-faint: #6f6a85;
  --apx-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
  --apx-shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --bs-body-bg: var(--apx-bg); --bs-body-color: var(--apx-text); --bs-border-color: var(--apx-border);
  --bs-link-color: var(--apx-brand-ink); --bs-link-hover-color: #b3d9ff; --bs-secondary-color: var(--apx-muted);
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--bs-font-sans-serif); font-feature-settings: 'cv11', 'ss01'; letter-spacing: -.005em; min-height: 100dvh; background: var(--apx-bg); color: var(--apx-text); }
h1, h2, h3, h4, .h1, .h2, .h3, .h4 { letter-spacing: -.02em; font-weight: 650; }
a { text-decoration: none; } a:hover { text-decoration: underline; }
.apx-muted { color: var(--apx-muted) !important; } .apx-faint { color: var(--apx-faint) !important; }
.apx-icon { flex: none; vertical-align: -.2em; }
.apx-icon-lg { width: 24px; height: 24px; }

/* ---- Buttons & forms -------------------------------------------------- */
.btn { --bs-btn-border-radius: var(--apx-radius-sm); --bs-btn-padding-y: .7rem; --bs-btn-padding-x: 1.1rem; --bs-btn-font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { --bs-btn-padding-y: .4rem; --bs-btn-padding-x: .8rem; --bs-btn-font-size: .875rem; min-height: 36px; }
.btn-primary { --bs-btn-bg: var(--apx-brand); --bs-btn-border-color: var(--apx-brand); --bs-btn-hover-bg: #0a6fd0; --bs-btn-hover-border-color: #0a6fd0; --bs-btn-active-bg: #0a5fc2; --bs-btn-active-border-color: #0a5fc2; --bs-btn-disabled-bg: #7fbcf7; --bs-btn-disabled-border-color: #7fbcf7; box-shadow: 0 6px 16px -8px rgba(11, 132, 243, .6); }
.btn-outline-primary { --bs-btn-color: var(--apx-brand-ink); --bs-btn-border-color: var(--apx-border-strong); --bs-btn-hover-bg: var(--apx-brand-soft); --bs-btn-hover-border-color: var(--apx-brand); --bs-btn-hover-color: var(--apx-brand-ink); --bs-btn-active-bg: var(--apx-brand-soft); --bs-btn-active-color: var(--apx-brand-ink); --bs-btn-active-border-color: var(--apx-brand); }
.btn-outline-secondary { --bs-btn-color: var(--apx-text); --bs-btn-border-color: var(--apx-border-strong); --bs-btn-hover-bg: var(--apx-surface-2); --bs-btn-hover-color: var(--apx-text); --bs-btn-hover-border-color: var(--apx-border-strong); }
.btn-outline-danger { --bs-btn-border-color: var(--apx-border-strong); }
.btn-link { min-height: 0; padding: 0; font-weight: 500; }
.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.form-control, .form-select { border-radius: var(--apx-radius-sm); border-color: var(--apx-border-strong); padding: .7rem .9rem; font-size: 16px; min-height: 48px; background-color: var(--apx-surface); color: var(--apx-text); }
.form-control-sm { min-height: 36px; padding: .35rem .6rem; font-size: 14px; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--apx-brand); box-shadow: 0 0 0 4px var(--apx-brand-soft); }
.form-check-input { width: 1.2em; height: 1.2em; margin-top: .15em; border-color: var(--apx-border-strong); }
.form-check-input:checked { background-color: var(--apx-brand); border-color: var(--apx-brand); }
.form-text { color: var(--apx-muted); }
.apx-input-group { position: relative; }
.apx-input-group .form-control { padding-right: 3rem; }
.apx-input-group .apx-input-btn { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--apx-muted); padding: .5rem; border-radius: 8px; line-height: 0; }
.apx-input-group .apx-input-btn:hover { background: var(--apx-surface-2); color: var(--apx-text); }
.apx-otp { font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.alert { border-radius: var(--apx-radius-sm); border: 1px solid transparent; padding: .8rem 1rem; }
.alert-danger { background: rgba(220, 53, 69, .08); border-color: rgba(220, 53, 69, .25); color: #b42335; }
.alert-success { background: rgba(25, 135, 84, .08); border-color: rgba(25, 135, 84, .25); color: #146c43; }
.alert-warning { background: rgba(255, 193, 7, .12); border-color: rgba(255, 193, 7, .35); color: #7a5a00; }
[data-bs-theme=dark] .alert-danger { color: #f5a3ad; } [data-bs-theme=dark] .alert-success { color: #8fd7b0; } [data-bs-theme=dark] .alert-warning { color: #ffd66b; }
.badge { font-weight: 600; border-radius: 999px; padding: .35em .7em; }
.badge.bg-purple { background: var(--apx-brand-soft) !important; color: var(--apx-brand-ink); }
.badge.text-bg-success { background: rgba(25, 135, 84, .12) !important; color: #146c43 !important; } [data-bs-theme=dark] .badge.text-bg-success { color: #8fd7b0 !important; }
.badge.text-bg-warning { background: rgba(255, 193, 7, .18) !important; color: #7a5a00 !important; } [data-bs-theme=dark] .badge.text-bg-warning { color: #ffd66b !important; }
.badge.text-bg-secondary, .badge.text-bg-light { background: var(--apx-surface-2) !important; color: var(--apx-muted) !important; border: 1px solid var(--apx-border); }
code.apx-code, .apx-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; background: var(--apx-surface-2); border: 1px solid var(--apx-border); padding: .15rem .45rem; border-radius: 6px; word-break: break-all; color: var(--apx-text); }
details > summary { cursor: pointer; list-style: none; } details > summary::-webkit-details-marker { display: none; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--apx-text); --bs-table-border-color: var(--apx-border); margin: 0; }
.table > thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--apx-muted); font-weight: 600; border-bottom-width: 1px; padding: .75rem 1rem; white-space: nowrap; }
.table > tbody td { padding: .85rem 1rem; vertical-align: middle; }
.table > tbody tr:last-child td { border-bottom: 0; }
.pagination { --bs-pagination-border-radius: 8px; --bs-pagination-active-bg: var(--apx-brand); --bs-pagination-active-border-color: var(--apx-brand); --bs-pagination-color: var(--apx-text); --bs-pagination-bg: var(--apx-surface); --bs-pagination-border-color: var(--apx-border); }
.dropdown-menu { border-radius: var(--apx-radius-sm); border-color: var(--apx-border); box-shadow: var(--apx-shadow-lg); padding: .4rem; --bs-dropdown-bg: var(--apx-surface); --bs-dropdown-link-color: var(--apx-text); --bs-dropdown-link-hover-bg: var(--apx-surface-2); --bs-dropdown-link-hover-color: var(--apx-text); }
.dropdown-item { border-radius: 8px; padding: .55rem .75rem; display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.dropdown-header { padding: .5rem .75rem .35rem; }
.list-group-item { background: transparent; border-color: var(--apx-border); color: var(--apx-text); }

/* ---- Cards ------------------------------------------------------------- */
.apx-card { background: var(--apx-surface); border: 1px solid var(--apx-border); border-radius: var(--apx-radius); box-shadow: var(--apx-shadow); }
.apx-card > .card-body { padding: 1.25rem; }
@media (min-width: 768px) { .apx-card > .card-body { padding: 1.5rem; } }
.apx-card-title { font-size: 1rem; font-weight: 650; margin: 0 0 .25rem; display: flex; align-items: center; gap: .5rem; }
.apx-card-sub { color: var(--apx-muted); font-size: .9rem; margin: 0 0 1rem; }
.apx-stat { display: flex; align-items: center; gap: .9rem; }
.apx-stat-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--apx-brand-soft); color: var(--apx-brand-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.apx-stat-icon.is-ok { background: rgba(25, 135, 84, .12); color: #198754; } .apx-stat-icon.is-warn { background: rgba(255, 193, 7, .18); color: #a06f00; }
.apx-stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.apx-stat-label { color: var(--apx-muted); font-size: .8rem; font-weight: 500; }
.apx-empty { text-align: center; padding: 2.25rem 1rem; color: var(--apx-muted); }
.apx-empty .apx-icon { width: 36px; height: 36px; color: var(--apx-faint); margin-bottom: .6rem; }
.apx-row-list > * { display: flex; align-items: center; gap: .9rem; padding: .9rem 0; border-top: 1px solid var(--apx-border); }
.apx-row-list > *:first-child { border-top: 0; padding-top: 0; } .apx-row-list > *:last-child { padding-bottom: 0; }
.apx-row-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--apx-surface-2); border: 1px solid var(--apx-border); display: flex; align-items: center; justify-content: center; color: var(--apx-muted); flex: none; }
.apx-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--apx-brand), var(--apx-brand-2)); color: #fff; font-weight: 700; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; letter-spacing: .02em; flex: none; }
.apx-avatar-lg { width: 56px; height: 56px; font-size: 1.15rem; }
img.apx-avatar { object-fit: cover; background: var(--apx-surface-2); }
.apx-avatar-xl { width: 96px; height: 96px; font-size: 2rem; }
.apx-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: var(--apx-surface-2); border: 1px solid var(--apx-border); color: var(--apx-muted); }
.apx-pill.is-ok { color: #146c43; background: rgba(25, 135, 84, .1); border-color: transparent; } [data-bs-theme=dark] .apx-pill.is-ok { color: #8fd7b0; }
.apx-pill.is-warn { color: #7a5a00; background: rgba(255, 193, 7, .15); border-color: transparent; } [data-bs-theme=dark] .apx-pill.is-warn { color: #ffd66b; }
.apx-callout { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: var(--apx-radius); background: var(--apx-brand-soft); border: 1px solid transparent; }
.apx-callout.is-warn { background: rgba(255, 193, 7, .12); }
.apx-callout .apx-icon { color: var(--apx-brand-ink); margin-top: .1rem; } .apx-callout.is-warn .apx-icon { color: #a06f00; }
.apx-recovery { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; letter-spacing: .04em; }
.apx-qr { display: inline-block; padding: .75rem; background: #fff; border-radius: 12px; border: 1px solid var(--apx-border); } .apx-qr svg { width: 180px; height: 180px; display: block; }

/* ---- Auth layout ------------------------------------------------------- */
.apx-auth { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 2rem 1rem 2.5rem; }
.apx-auth-card { width: 100%; max-width: 440px; }
.apx-auth-logo { text-align: center; margin-bottom: 1.5rem; }
.apx-auth-logo .apx-brand { justify-content: center; }
.apx-auth-logo .apx-brand > img { width: 38px; height: 38px; }
.apx-auth-card .card-body { padding: 1.5rem 1.25rem; }
.apx-auth-title { font-size: 1.5rem; margin: 0 0 .25rem; }
.apx-auth-lead { color: var(--apx-muted); margin: 0 0 1.5rem; }
.apx-auth-foot { color: var(--apx-faint); font-size: .8rem; text-align: center; margin: 1.5rem 0 0; }
.apx-auth-foot a { color: var(--apx-faint); }
.apx-divider { display: flex; align-items: center; gap: .75rem; color: var(--apx-faint); font-size: .8rem; margin: 1.1rem 0; }
.apx-divider::before, .apx-divider::after { content: ''; flex: 1; height: 1px; background: var(--apx-border); }
.apx-auth-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--apx-brand-soft); color: var(--apx-brand-ink); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.apx-auth-icon .apx-icon { width: 28px; height: 28px; }
@media (min-width: 768px) {
  .apx-auth { justify-content: center; padding: 3rem 1.5rem; }
  .apx-auth-logo .apx-brand > img { width: 42px; height: 42px; }
  .apx-auth-card .card-body { padding: 2.25rem; }
  .apx-auth-title { font-size: 1.75rem; }
}

/* ---- App shell --------------------------------------------------------- */
.apx-topbar { position: sticky; top: 0; z-index: 1020; background: color-mix(in srgb, var(--apx-surface) 88%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--apx-border); height: 60px; }
.apx-topbar .container-xl { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.apx-brand { display: flex; align-items: center; gap: .55rem; color: var(--apx-text); font-weight: 650; }
.apx-brand > img { width: 32px; height: 32px; object-fit: contain; }
.apx-brand-copy { display: grid; gap: 2px; line-height: 1; }
.apx-brand-copy strong { color: var(--apx-text); font-size: .96rem; letter-spacing: .015em; }
.apx-brand-copy small { color: var(--apx-muted); font-size: .52rem; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.apx-topnav { display: none; gap: .25rem; margin-left: 1.5rem; }
.apx-topnav a { color: var(--apx-muted); font-weight: 600; padding: .45rem .8rem; border-radius: 8px; font-size: .92rem; }
.apx-topnav a:hover { background: var(--apx-surface-2); text-decoration: none; color: var(--apx-text); }
.apx-topnav a.active { color: var(--apx-brand-ink); background: var(--apx-brand-soft); }
@media (min-width: 768px) { .apx-topnav { display: flex; } }
.apx-user-btn { display: flex; align-items: center; gap: .6rem; background: transparent; border: 0; padding: .25rem; border-radius: 999px; color: var(--apx-text); }
.apx-user-btn:hover { background: var(--apx-surface-2); }
.apx-user-btn .apx-user-name { display: none; font-weight: 600; font-size: .9rem; }
@media (min-width: 768px) { .apx-user-btn .apx-user-name { display: block; } .apx-user-btn { padding: .25rem .6rem .25rem .25rem; } }
.apx-shell { display: grid; grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem 0 3rem; }
.apx-sidebar { display: none; }
.apx-sidenav { display: grid; gap: .15rem; position: sticky; top: 76px; }
.apx-sidenav a { display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; border-radius: 10px; color: var(--apx-muted); font-weight: 600; font-size: .92rem; }
.apx-sidenav a:hover { background: var(--apx-surface-2); color: var(--apx-text); text-decoration: none; }
.apx-sidenav a.active { background: var(--apx-brand-soft); color: var(--apx-brand-ink); }
.apx-sidenav .apx-sidenav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--apx-faint); font-weight: 700; padding: .9rem .8rem .35rem; }
.apx-subnav { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -1rem .25rem; padding: 0 1rem .35rem; }
.apx-subnav::-webkit-scrollbar { display: none; }
.apx-subnav a { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: 999px; background: var(--apx-surface); border: 1px solid var(--apx-border); color: var(--apx-muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.apx-subnav a.active { background: var(--apx-brand-soft); border-color: transparent; color: var(--apx-brand-ink); }
.apx-subnav a:hover { text-decoration: none; }
@media (min-width: 992px) {
  .apx-shell { grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; padding: 2rem 0 4rem; }
  .apx-sidebar { display: block; }
  .apx-subnav { display: none; }
}
.apx-main { min-width: 0; }
.apx-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.apx-page-head h1 { font-size: 1.5rem; margin: 0; }
.apx-page-head p { color: var(--apx-muted); margin: .25rem 0 0; }
.apx-page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
@media (min-width: 768px) { .apx-page-head h1 { font-size: 1.75rem; } }
.apx-section + .apx-section { margin-top: 1.25rem; }
.apx-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; color: var(--apx-faint); font-size: .8rem; padding: 0 0 2rem; }
.apx-footer a { color: var(--apx-faint); }
.apx-parent-brand { display: inline-flex; align-items: center; gap: .38rem; }
.apx-parent-brand img { width: auto; height: 13px; opacity: .72; }
[data-bs-theme=dark] .apx-parent-brand img { filter: brightness(0) invert(1); }
.apx-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.apx-kv { display: grid; grid-template-columns: 1fr; gap: .5rem 1rem; font-size: .9rem; }
.apx-kv dt { color: var(--apx-muted); font-weight: 500; } .apx-kv dd { margin: 0 0 .35rem; word-break: break-word; }
@media (min-width: 576px) { .apx-kv { grid-template-columns: 160px 1fr; } .apx-kv dd { margin: 0; } }
.apx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--apx-radius); }
.apx-table-wrap .table-wide { min-width: 640px; }
.apx-legal { max-width: 760px; margin: 0 auto; }
.apx-legal h2 { font-size: 1.1rem; margin-top: 1.75rem; }
.apx-legal p, .apx-legal li { color: var(--apx-muted); }
.apx-legal-brand { display: flex; justify-content: center; padding: 1.5rem 0; }
.apx-legal-brand img { height: 30px; } [data-bs-theme=dark] .apx-legal-brand img { filter: brightness(0) invert(1); }
.apx-consent-scopes { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .5rem; }
.apx-consent-scopes li { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; }
.apx-consent-scopes .apx-icon { color: #198754; flex: none; margin-top: .1rem; }
.apx-app-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; border: 1px solid var(--apx-border); background: var(--apx-surface-2); }
@media (prefers-reduced-motion: no-preference) { .btn, .form-control, .apx-sidenav a, .apx-subnav a, .dropdown-item { transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; } }
.min-w-0 { min-width: 0; } .flex-none { flex: none; }
[data-bs-theme=dark] .apx-callout.is-warn { background: rgba(255, 193, 7, .1); } [data-bs-theme=dark] .apx-callout.is-warn .apx-icon { color: #ffd66b; }
[data-bs-theme=dark] .apx-stat-icon.is-warn { color: #ffd66b; } [data-bs-theme=dark] .apx-stat-icon.is-ok { color: #8fd7b0; }
.apx-stat-value.fs-6 { font-size: .95rem !important; }


/* ============================================================
   WiFiX additions
   ============================================================ */
.apx-auth-logo { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.apx-shell-single { padding: 1.25rem 0 3rem; }
@media (min-width: 992px) { .apx-shell-single { padding: 2rem 0 4rem; } }
.apx-back { display: inline-flex; align-items: center; gap: .35rem; color: var(--apx-muted); font-weight: 600; font-size: .85rem; margin-bottom: .75rem; }
.apx-subnav { margin-bottom: 1rem; }
.btn-lg { --bs-btn-padding-y: .85rem; --bs-btn-padding-x: 1.4rem; --bs-btn-font-size: 1.05rem; min-height: 52px; }
.apx-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 768px) { .apx-stat-grid { grid-template-columns: repeat(4, 1fr); } }
.apx-stat-icon.is-muted { background: var(--apx-surface-2); color: var(--apx-muted); }
.apx-row-icon.is-ok { color: #198754; background: rgba(25, 135, 84, .1); border-color: transparent; }
.apx-row-icon.is-bad { color: #b42335; background: rgba(220, 53, 69, .1); border-color: transparent; }
.badge.text-bg-danger { background: rgba(220, 53, 69, .12) !important; color: #b42335 !important; } [data-bs-theme=dark] .badge.text-bg-danger { color: #f5a3ad !important; }
.apx-guest-name { font-weight: 600; } .apx-guest-sub { color: var(--apx-muted); font-size: .82rem; }
.apx-icon-btn { border: 1px solid var(--apx-border-strong); background: var(--apx-surface); color: var(--apx-muted); width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.apx-icon-btn:hover { color: var(--apx-text); background: var(--apx-surface-2); }
.apx-icon-btn.is-danger:hover { color: #b42335; border-color: #b42335; }
.apx-table-actions { display: flex; gap: .3rem; justify-content: flex-end; }
.apx-filter-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.apx-filter-tabs a { padding: .4rem .8rem; border-radius: 999px; background: var(--apx-surface); border: 1px solid var(--apx-border); color: var(--apx-muted); font-weight: 600; font-size: .85rem; }
.apx-filter-tabs a.active { background: var(--apx-brand-soft); border-color: transparent; color: var(--apx-brand-ink); }
.apx-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.apx-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.apx-checklist li { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; }
.apx-checklist .apx-icon { flex: none; margin-top: .15rem; color: #a06f00; } .apx-checklist li.is-done .apx-icon { color: #198754; } .apx-checklist li.is-done { color: var(--apx-muted); }
.apx-choice-grid { display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 576px) { .apx-choice-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.apx-choice { position: relative; }
.apx-choice input { position: absolute; opacity: 0; inset: 0; }
.apx-choice label { display: flex; align-items: center; gap: .5rem; padding: .65rem .8rem; border: 1px solid var(--apx-border-strong); border-radius: var(--apx-radius-sm); background: var(--apx-surface); cursor: pointer; font-weight: 600; font-size: .92rem; width: 100%; }
.apx-choice input:checked + label { border-color: var(--apx-brand); background: var(--apx-brand-soft); color: var(--apx-brand-ink); }
.apx-choice input:focus-visible + label { box-shadow: 0 0 0 4px var(--apx-brand-soft); }
.apx-form-section { padding-top: 1.25rem; margin-top: 1.25rem; border-top: 1px solid var(--apx-border); }
.apx-form-section h2 { font-size: 1.05rem; margin-bottom: .25rem; } .apx-form-section > p { color: var(--apx-muted); font-size: .9rem; margin-bottom: 1rem; }
.apx-link-box { display: flex; gap: .5rem; align-items: center; }
.apx-link-box .form-control { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.apx-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.apx-legal-excerpt { color: var(--apx-muted); font-size: .85rem; line-height: 1.55; }
form[inert] { opacity: .75; }

/* Site header */
.apx-admin-strip { display: flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; color: var(--apx-brand-ink); background: var(--apx-brand-soft); padding: .35rem .75rem; border-radius: 999px; width: max-content; max-width: 100%; margin-bottom: .75rem; }
.apx-site-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.apx-site-kicker { display: flex; align-items: center; gap: .35rem; color: var(--apx-muted); font-size: .8rem; font-weight: 600; }
.apx-site-bar-title { font-weight: 700; font-size: 1.15rem; }
@media (max-width: 575px) { .apx-preview-label { display: none; } }

/* Dashboard */
.apx-org-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.apx-site-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 768px) { .apx-site-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .apx-site-grid { grid-template-columns: repeat(3, 1fr); } }
.apx-site-card { color: var(--apx-text); text-decoration: none; }
.apx-site-card:hover { text-decoration: none; color: var(--apx-text); border-color: var(--apx-brand); }
.apx-site-card .card-body { display: flex; align-items: center; gap: .9rem; }
.apx-site-card-logo { width: 52px; height: 52px; border-radius: 12px; background: var(--apx-surface-2); border: 1px solid var(--apx-border); display: flex; align-items: center; justify-content: center; color: var(--brand, var(--apx-brand)); flex: none; overflow: hidden; }
.apx-site-card-logo img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 4px; }
.apx-site-card-title { font-weight: 700; }
.apx-site-card-meta { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--apx-muted); margin: .15rem 0; }

/* Bar chart */
.apx-bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: .5rem; }
.apx-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.apx-bar span { display: block; width: 100%; max-width: 34px; background: var(--apx-brand); border-radius: 4px 4px 0 0; opacity: .85; transition: opacity .15s; }
.apx-bar:hover span { opacity: 1; }
.apx-bar small { font-size: .6rem; color: var(--apx-faint); margin-top: .35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 575px) { .apx-bar:nth-child(odd) small { visibility: hidden; } }

/* Branding page */
.apx-brand-images { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 576px) { .apx-brand-images { grid-template-columns: 1fr 1fr; } }
.apx-image-preview { height: 110px; border-radius: var(--apx-radius-sm); border: 1px dashed var(--apx-border-strong); background: var(--apx-surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.apx-image-preview img { max-width: 90%; max-height: 90%; object-fit: contain; }
.apx-image-preview.is-bg img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.apx-colour { display: flex; gap: .4rem; align-items: center; }
.apx-colour input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--apx-border-strong); border-radius: 8px; background: var(--apx-surface); flex: none; }

/* Form fields page */
.apx-field-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: start; padding: .9rem 0; border-top: 1px solid var(--apx-border); }
.apx-field-row:first-child { border-top: 0; padding-top: 0; }
.apx-field-row.is-fixed { color: var(--apx-muted); }
.apx-field-handle { display: flex; flex-direction: column; gap: .2rem; align-items: center; color: var(--apx-faint); padding-top: .2rem; }
.apx-field-handle .apx-icon-btn { width: 26px; height: 26px; font-size: .8rem; }
.apx-field-toggles { padding-top: .3rem; white-space: nowrap; }

/* Marketing */
.apx-mkt-nav { display: none; align-items: center; gap: 1.8rem; margin-left: auto; margin-right: 1.5rem; }
.apx-mkt-nav a { color: var(--apx-muted); font-size: .87rem; font-weight: 600; }
.apx-mkt-nav a:hover { color: var(--apx-text); text-decoration: none; }
@media (min-width: 768px) { .apx-mkt-nav { display: flex; } }
.apx-mkt-actions { display: flex; align-items: center; gap: .9rem; }
.apx-topbar.is-marketing { height: 68px; }
.apx-topbar.is-marketing .btn { min-height: 38px; padding: .5rem .9rem; font-size: .84rem; box-shadow: none; }
#how, #features { scroll-margin-top: 68px; }
.mkt-eyebrow { margin: 0 0 .85rem; color: var(--apx-brand-ink); font-size: .73rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.mkt-section-intro { max-width: 660px; margin-bottom: 2.5rem; }
.mkt-section-intro h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 720; line-height: 1.08; letter-spacing: -.04em; }
.mkt-hero { position: relative; overflow: hidden; padding: 4rem 0 4.5rem; background: var(--apx-surface); border-bottom: 1px solid var(--apx-border); }
.mkt-hero::before { position: absolute; inset: 0; content: ''; pointer-events: none; background-image: radial-gradient(circle at 80% 20%, rgba(11, 132, 243, .14), transparent 45%); }
.mkt-hero-grid { position: relative; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 992px) { .mkt-hero-grid { grid-template-columns: 1.1fr .9fr; } .mkt-hero { padding: 6rem 0; } }
.mkt-kicker { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.2rem; color: var(--apx-brand-ink); font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.mkt-kicker span { width: 23px; height: 2px; border-radius: 10px; background: var(--apx-brand); }
.mkt-hero h1 { max-width: 14ch; margin: 0 0 1.35rem; font-size: clamp(2.6rem, 5.5vw, 4.2rem); font-weight: 760; line-height: .98; letter-spacing: -.05em; }
.mkt-lead { max-width: 34rem; margin: 0; color: var(--apx-muted); font-size: 1.12rem; line-height: 1.65; }
.mkt-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.25rem; margin-top: 2rem; }
.mkt-text-link { padding: .75rem 0; border-bottom: 1px solid var(--apx-border-strong); color: var(--apx-text); font-size: .94rem; font-weight: 680; }
.mkt-text-link:hover { border-color: var(--apx-brand); color: var(--apx-brand-ink); text-decoration: none; }
.mkt-hero-note { display: flex; align-items: center; gap: .45rem; margin: 1.5rem 0 0; color: var(--apx-muted); font-size: .8rem; }
.mkt-hero-note .apx-icon { color: #16805a; }
.mkt-phone-wrap { display: flex; justify-content: center; }
.mkt-phone { width: 270px; padding: 8px; border: 1px solid var(--apx-border-strong); border-radius: 38px; background: #0f0b14; box-shadow: 0 38px 80px -30px rgba(0,0,0,.55); transform: rotate(-2deg); }
.mkt-phone-screen { overflow: hidden; border-radius: 30px; background: #f4f6fb; min-height: 480px; }
.mkt-phone-portal { padding: 2.6rem 1.1rem 1.5rem; display: grid; gap: .55rem; text-align: center; color: #17122b; }
.mkt-phone-logo { width: 48px; height: 48px; border-radius: 14px; background: rgba(11, 132, 243, .12); color: #0b84f3; display: grid; place-items: center; margin: 0 auto .4rem; }
.mkt-phone-portal strong { font-size: 1.25rem; letter-spacing: -.02em; }
.mkt-phone-portal > span { font-size: .72rem; color: #6f6a85; margin-bottom: .6rem; }
.mkt-phone-input { border: 1px solid #d2d8e4; border-radius: 9px; padding: .6rem .7rem; text-align: left; font-size: .68rem; color: #9a95ad; background: #fff; }
.mkt-phone-check { display: flex; align-items: center; gap: .4rem; font-size: .62rem; color: #6f6a85; text-align: left; }
.mkt-phone-check i { width: 13px; height: 13px; border: 1px solid #d2d8e4; border-radius: 3px; background: #fff; }
.mkt-phone-btn { background: #0b84f3; color: #fff; font-weight: 700; font-size: .75rem; padding: .7rem; border-radius: 9px; margin-top: .3rem; }
.mkt-how, .mkt-features { padding: 4.5rem 0; }
.mkt-features { background: var(--apx-surface); border-top: 1px solid var(--apx-border); }
.mkt-timeline { display: grid; gap: 2rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .mkt-timeline { grid-template-columns: repeat(3, 1fr); } }
.mkt-timeline li > span { display: block; margin-bottom: .7rem; color: var(--apx-faint); font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.mkt-step-icon { display: grid; width: 50px; height: 50px; margin-bottom: 1.2rem; place-items: center; border: 1px solid var(--apx-border); border-radius: 50%; background: var(--apx-surface); color: var(--apx-brand-ink); }
.mkt-timeline h3 { margin: 0 0 .55rem; font-size: 1.08rem; font-weight: 720; }
.mkt-timeline p { max-width: 340px; margin: 0; color: var(--apx-muted); font-size: .9rem; line-height: 1.65; }
.mkt-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .mkt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .mkt-grid { grid-template-columns: repeat(3, 1fr); } }
.mkt-feature { border: 1px solid var(--apx-border); border-radius: 18px; background: var(--apx-bg); padding: 1.5rem; }
.mkt-feature-icon { display: grid; width: 42px; height: 42px; margin-bottom: 1.2rem; place-items: center; border-radius: 11px; background: var(--apx-brand-soft); color: var(--apx-brand-ink); }
.mkt-feature h3 { margin: 0 0 .5rem; font-size: 1.05rem; font-weight: 720; }
.mkt-feature p { margin: 0; color: var(--apx-muted); font-size: .88rem; line-height: 1.6; }
.apx-mkt-footer { border-top: 1px solid var(--apx-border); padding: 2rem 0; }
.apx-mkt-footer .container-xl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.apx-mkt-footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; color: var(--apx-faint); font-size: .8rem; }
.apx-mkt-footer-links { display: flex; gap: 1rem; } .apx-mkt-footer-links a { color: var(--apx-faint); }

/* Tab bars (site + admin) on desktop: underline style, like RSVP's event tabs */
@media (min-width: 992px) {
  .apx-subnav { display: flex; margin: 0 0 1.25rem; padding: 0; }
  .apx-site-tabs, .apx-admin-subnav { gap: 1.5rem; overflow: visible; border-bottom: 1px solid var(--apx-border); }
  .apx-site-tabs a, .apx-admin-subnav a { position: relative; padding: .7rem 0 .85rem; border: 0; border-radius: 0; background: transparent; font-size: .82rem; }
  .apx-site-tabs a.active, .apx-admin-subnav a.active { background: transparent; color: var(--apx-text); }
  .apx-site-tabs a.active::after, .apx-admin-subnav a.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 99px 99px 0 0; background: var(--apx-brand); content: ''; }
}

/* Horizontal lockup (marketing header + footer); light/dark variants swapped by theme */
.apx-lockup { display: inline-flex; align-items: center; line-height: 0; }
.apx-lockup img { width: auto; height: 36px; }
.apx-lockup .is-dark { display: none; }
[data-bs-theme=dark] .apx-lockup .is-light { display: none; } [data-bs-theme=dark] .apx-lockup .is-dark { display: inline; }
.apx-mkt-footer .apx-lockup img { height: 30px; }
