/* Versalynx SMS — design tokens and components (Bootstrap 5.3 base). */
:root, [data-bs-theme="light"] {
  --vx-navy-950: #041024; --vx-navy-900: #071a33; --vx-navy-800: #0b2447; --vx-navy-700: #12325f;
  --vx-teal-500: #14c3b0; --vx-teal-700: #0f766e; --vx-teal-50: #e7f9f6;
  --vx-bg: #f5f8fc; --vx-surface: #ffffff; --vx-surface-2: #f8fafc; --vx-line: #e2e8f0; --vx-control: #8090a6;
  --vx-ink: #0f1b2d; --vx-body: #334155; --vx-muted: #5b6b80;
  --vx-primary: #1d4ed8; --vx-primary-hover: #1e40af; --vx-primary-soft: #e8efff;
  --vx-success: #15803d; --vx-success-soft: #e8f6ee; --vx-warning: #b45309; --vx-warning-soft: #fff4e5;
  --vx-danger: #b91c1c; --vx-danger-soft: #fdecec; --vx-info: #0369a1; --vx-info-soft: #e6f3fb;
  --vx-radius: 10px; --vx-radius-sm: 6px; --vx-shadow: 0 1px 2px rgba(15,27,45,.06), 0 1px 3px rgba(15,27,45,.08);
  --vx-shadow-lg: 0 10px 30px rgba(15,27,45,.12); --vx-sidebar-w: 248px; --vx-topbar-h: 60px;
  --bs-body-bg: var(--vx-bg); --bs-body-color: var(--vx-body); --bs-border-color: var(--vx-line);
  --bs-link-color: var(--vx-primary); --bs-link-color-rgb: 29,78,216; --bs-link-hover-color: var(--vx-primary-hover);
  --bs-primary: var(--vx-primary); --bs-primary-rgb: 29,78,216; --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Arial, sans-serif;
  --bs-body-font-size: .9375rem; --bs-border-radius: var(--vx-radius-sm);
}
[data-bs-theme="dark"] {
  --vx-bg: #0b1220; --vx-surface: #111a2b; --vx-surface-2: #0f1727; --vx-line: #24324a; --vx-control: #66789a;
  --vx-ink: #e8eef8; --vx-body: #c8d3e3; --vx-muted: #93a3ba;
  --vx-primary: #6c9cff; --vx-primary-hover: #8eb3ff; --vx-primary-soft: #18264a;
  --vx-success: #4ade80; --vx-success-soft: #0f2a1c; --vx-warning: #fbbf24; --vx-warning-soft: #2c2210;
  --vx-danger: #f87171; --vx-danger-soft: #2f1416; --vx-info: #38bdf8; --vx-info-soft: #0d2333; --vx-teal-50: #0d2a29;
  --vx-shadow: 0 1px 2px rgba(0,0,0,.4); --vx-shadow-lg: 0 10px 30px rgba(0,0,0,.5);
  --bs-body-bg: var(--vx-bg); --bs-body-color: var(--vx-body); --bs-border-color: var(--vx-line);
  --bs-link-color: var(--vx-primary); --bs-link-color-rgb: 108,156,255; --bs-link-hover-color: var(--vx-primary-hover);
  --bs-primary-rgb: 108,156,255; --bs-tertiary-bg: var(--vx-surface-2); --bs-secondary-bg: var(--vx-surface-2);
}
html { -webkit-text-size-adjust: 100%; }
body { background: var(--vx-bg); color: var(--vx-body); line-height: 1.55; min-height: 100dvh; }
h1, h2, h3, h4, h5, h6, .vx-ink { color: var(--vx-ink); letter-spacing: -.01em; }
h1, .h1 { font-size: 1.625rem; font-weight: 650; line-height: 1.25; text-wrap: balance; } h2, .h2 { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; } h3, .h3 { font-size: 1rem; font-weight: 600; }
.text-muted, .vx-muted { color: var(--vx-muted) !important; }
.tabular, .table td.num, .table th.num, .vx-kpi-value { font-variant-numeric: tabular-nums; }
a { text-underline-offset: 2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--vx-primary) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus { box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--vx-primary) 30%, transparent); border-color: var(--vx-primary); }
.vx-skip { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--vx-surface); padding: .5rem 1rem; border-radius: var(--vx-radius-sm); box-shadow: var(--vx-shadow-lg); }
.vx-skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Buttons */
.btn { min-height: 40px; font-weight: 500; border-radius: var(--vx-radius-sm); transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out, box-shadow .15s ease-out; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn-sm { min-height: 34px; } .btn-lg { min-height: 48px; }
.btn-primary { --bs-btn-bg: var(--vx-primary); --bs-btn-border-color: var(--vx-primary); --bs-btn-hover-bg: var(--vx-primary-hover); --bs-btn-hover-border-color: var(--vx-primary-hover); --bs-btn-active-bg: var(--vx-primary-hover); --bs-btn-disabled-bg: var(--vx-primary); --bs-btn-disabled-border-color: var(--vx-primary); }
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #071a33; --bs-btn-hover-color: #071a33; --bs-btn-active-color: #071a33; --bs-btn-disabled-color: #071a33; }
.btn-outline-secondary { --bs-btn-color: var(--vx-body); --bs-btn-border-color: var(--vx-line); --bs-btn-hover-bg: var(--vx-surface-2); --bs-btn-hover-color: var(--vx-ink); --bs-btn-hover-border-color: var(--vx-muted); }
.btn[aria-busy="true"] { pointer-events: none; opacity: .75; }
.btn[aria-busy="true"]::before { content: ""; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: vx-spin .7s linear infinite; }
@keyframes vx-spin { to { transform: rotate(360deg); } }

/* Shell */
.vx-shell { display: flex; min-height: 100dvh; }
.vx-sidebar { width: var(--vx-sidebar-w); background: var(--vx-navy-900); color: #c9d6ea; flex-shrink: 0; display: flex; flex-direction: column; }
@media (min-width: 992px) { .vx-sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; } }
.vx-sidebar .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,.08); }
.vx-brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 650; font-size: 1.05rem; padding: 1rem 1.25rem; }
.vx-brand img { width: 32px; height: 32px; }
.vx-brand small { display: block; font-weight: 500; font-size: .72rem; color: var(--vx-teal-500); letter-spacing: .06em; text-transform: uppercase; }
.vx-nav { list-style: none; padding: .25rem .75rem 1rem; margin: 0; }
.vx-nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8ea3c2; padding: 1rem .75rem .35rem; }
.vx-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; min-height: 40px; border-radius: 8px; color: #c9d6ea; text-decoration: none; font-weight: 500; transition: background-color .15s ease-out, color .15s ease-out; }
.vx-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.vx-nav a[aria-current="page"] { background: rgba(20,195,176,.16); color: #fff; font-weight: 600; }
.vx-nav a[aria-current="page"] .bi { color: var(--vx-teal-500); opacity: 1; }
.vx-nav .bi { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .9; }
.vx-nav .badge { margin-left: auto; }
.vx-sidebar-foot { margin-top: auto; padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; color: #8ea3c2; }
.vx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vx-topbar { height: var(--vx-topbar-h); background: var(--vx-surface); border-bottom: 1px solid var(--vx-line); display: flex; align-items: center; gap: .75rem; padding: 0 1rem; position: sticky; top: 0; z-index: 1020; }
@media (min-width: 768px) { .vx-topbar { padding: 0 1.5rem; } }
.vx-topbar .vx-icon-btn { width: 40px; height: 40px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--vx-body); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.vx-topbar .vx-icon-btn:hover { background: var(--vx-surface-2); border-color: var(--vx-line); }
.vx-dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--vx-danger); color: #fff; font-size: .68rem; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.vx-balance { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem; border-radius: 999px; background: var(--vx-teal-50); color: var(--vx-teal-700); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-bs-theme="dark"] .vx-balance { color: var(--vx-teal-500); }
.vx-balance.is-low { background: var(--vx-warning-soft); color: var(--vx-warning); }
.vx-org-switch { max-width: 260px; }
.vx-org-switch .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; text-align: left; }
.vx-content { padding: 1.25rem 1rem 3rem; width: 100%; max-width: 1400px; }
@media (min-width: 768px) { .vx-content { padding: 1.75rem 1.75rem 3rem; } }
.vx-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.vx-page-head p { margin: .2rem 0 0; color: var(--vx-muted); }
.vx-crumbs { font-size: .82rem; margin-bottom: .35rem; } .vx-crumbs a { color: var(--vx-muted); text-decoration: none; } .vx-crumbs a:hover { color: var(--vx-primary); }
.vx-admin .vx-sidebar { background: #10141f; } .vx-admin .vx-nav a[aria-current="page"] { background: rgba(245,158,11,.14); }
.vx-admin .vx-nav a[aria-current="page"] .bi { color: #f59e0b; }
.vx-admin .vx-brand small { color: #f59e0b; }

/* Cards and KPIs */
.card { --bs-card-bg: var(--vx-surface); --bs-card-border-color: var(--vx-line); border-radius: var(--vx-radius); box-shadow: var(--vx-shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--vx-line); padding: .9rem 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1.0625rem; }
.card-body { padding: 1.1rem; }
.vx-kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 1.25rem; }
.vx-kpi { background: var(--vx-surface); border: 1px solid var(--vx-line); border-radius: var(--vx-radius); padding: 1rem 1.1rem; box-shadow: var(--vx-shadow); }
.vx-kpi-label { font-size: .8rem; color: var(--vx-muted); font-weight: 500; display: flex; align-items: center; gap: .4rem; }
.vx-kpi-value { font-size: 1.55rem; font-weight: 650; color: var(--vx-ink); margin-top: .2rem; line-height: 1.2; }
.vx-kpi-sub { font-size: .8rem; color: var(--vx-muted); margin-top: .2rem; }
.vx-kpi .bi { color: var(--vx-teal-700); } [data-bs-theme="dark"] .vx-kpi .bi { color: var(--vx-teal-500); }

/* Tables */
.table { --bs-table-bg: transparent; --bs-table-color: var(--vx-body); --bs-table-hover-bg: var(--vx-surface-2); margin: 0; }
.table > thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--vx-muted); font-weight: 600; background: var(--vx-surface-2); border-bottom-color: var(--vx-line); white-space: nowrap; padding: .65rem .9rem; }
.table > tbody td { padding: .7rem .9rem; vertical-align: middle; border-color: var(--vx-line); }
.table td.num, .table th.num { text-align: right; }
.vx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vx-row-link { cursor: pointer; }
@media (max-width: 767.98px) {
  .vx-stack thead { display: none; }
  .vx-stack tr { display: block; border-bottom: 1px solid var(--vx-line); padding: .5rem 0; }
  .vx-stack td { display: block; border: 0 !important; padding: .3rem .9rem !important; text-align: right !important; overflow-wrap: anywhere; }
  .vx-stack td::after { content: ""; display: table; clear: both; }
  .vx-stack td::before { content: attr(data-label); float: left; margin-right: 1rem; color: var(--vx-muted); font-size: .8rem; text-align: left; font-weight: 500; }
}

/* Status badges: always text + colour */
.vx-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--vx-surface-2); color: var(--vx-body); border: 1px solid var(--vx-line); }
.vx-badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.vx-badge.ok { background: var(--vx-success-soft); color: var(--vx-success); border-color: transparent; }
.vx-badge.warn { background: var(--vx-warning-soft); color: var(--vx-warning); border-color: transparent; }
.vx-badge.bad { background: var(--vx-danger-soft); color: var(--vx-danger); border-color: transparent; }
.vx-badge.info { background: var(--vx-info-soft); color: var(--vx-info); border-color: transparent; }
.vx-badge.muted { color: var(--vx-muted); }
.vx-tag { display: inline-block; padding: .1rem .5rem; border-radius: 4px; background: var(--vx-surface-2); border: 1px solid var(--vx-line); font-size: .75rem; margin: 0 .25rem .25rem 0; }

/* Forms */
.form-label { font-weight: 500; color: var(--vx-ink); margin-bottom: .3rem; }
.form-label .req { color: var(--vx-danger); margin-left: .15rem; }
legend.form-label { font-size: 1rem; float: none; width: auto; }
.form-control, .form-select { min-height: 42px; border-color: var(--vx-line); background-color: var(--vx-surface); color: var(--vx-ink); }
textarea.form-control { min-height: 120px; }
.form-text { color: var(--vx-muted); }
.invalid-feedback { display: block; color: var(--vx-danger); font-weight: 500; }
.vx-fieldset { border: 1px solid var(--vx-line); border-radius: var(--vx-radius); padding: 1rem 1.1rem; margin-bottom: 1rem; background: var(--vx-surface); }
.vx-fieldset > legend { float: none; width: auto; font-size: .95rem; font-weight: 600; color: var(--vx-ink); padding: 0 .4rem; margin: 0 0 .25rem -.4rem; }
.vx-choice { display: block; border: 1px solid var(--vx-line); border-radius: var(--vx-radius-sm); padding: .75rem .9rem .75rem 2.4rem; cursor: pointer; position: relative; background: var(--vx-surface); transition: border-color .15s ease-out, background-color .15s ease-out; }
.vx-choice:hover { border-color: var(--vx-muted); }
.vx-choice input { position: absolute; left: .9rem; top: 1rem; }
.vx-choice:has(input:checked) { border-color: var(--vx-primary); background: var(--vx-primary-soft); }
.vx-choice strong { display: block; color: var(--vx-ink); } .vx-choice span { font-size: .85rem; color: var(--vx-muted); }
.vx-sticky-actions { position: sticky; bottom: 0; background: var(--vx-bg); padding: .75rem 0; border-top: 1px solid var(--vx-line); display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; z-index: 5; }

/* Composer */
.vx-counter { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .82rem; color: var(--vx-muted); margin-top: .35rem; font-variant-numeric: tabular-nums; }
.vx-counter strong { color: var(--vx-ink); }
.vx-phone { max-width: 340px; margin: 0 auto; border: 1px solid var(--vx-line); border-radius: 28px; padding: 1.25rem 1rem 1.5rem; background: var(--vx-surface-2); }
.vx-phone-head { text-align: center; font-size: .8rem; color: var(--vx-muted); margin-bottom: .75rem; }
.vx-bubble { background: var(--vx-surface); border: 1px solid var(--vx-line); border-radius: 16px 16px 16px 4px; padding: .7rem .85rem; white-space: pre-wrap; word-break: break-word; color: var(--vx-ink); font-size: .92rem; min-height: 2.5rem; }
.vx-vars { display: flex; flex-wrap: wrap; gap: .35rem; }
.vx-vars .btn { min-height: 30px; font-size: .78rem; padding: .15rem .55rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Inbox */
.vx-inbox { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 992px) { .vx-inbox { grid-template-columns: 340px 1fr; } }
.vx-conv-list a { display: block; padding: .8rem 1rem; border-bottom: 1px solid var(--vx-line); text-decoration: none; color: var(--vx-body); }
.vx-conv-list a:hover, .vx-conv-list a[aria-current="true"] { background: var(--vx-surface-2); }
.vx-conv-list .unread { font-weight: 650; color: var(--vx-ink); }
.vx-thread { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; max-height: 60vh; overflow-y: auto; }
.vx-msg { max-width: 78%; padding: .55rem .8rem; border-radius: 14px; white-space: pre-wrap; word-break: break-word; }
.vx-msg.in { background: var(--vx-surface-2); border: 1px solid var(--vx-line); align-self: flex-start; border-bottom-left-radius: 4px; }
.vx-msg.out { background: var(--vx-primary-soft); align-self: flex-end; border-bottom-right-radius: 4px; color: var(--vx-ink); }
.vx-msg small { display: block; color: var(--vx-muted); font-size: .72rem; margin-top: .2rem; }

/* Misc */
.vx-empty { text-align: center; padding: 2.5rem 1rem; color: var(--vx-muted); }
.vx-empty .bi { font-size: 2rem; color: var(--vx-teal-700); display: block; margin-bottom: .5rem; }
.vx-empty h3 { color: var(--vx-ink); font-size: 1.05rem; }
.vx-steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.25rem; flex-wrap: wrap; counter-reset: step; }
.vx-steps li { counter-increment: step; display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--vx-muted); padding-right: .75rem; }
.vx-steps li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--vx-line); background: var(--vx-surface); font-weight: 600; }
.vx-steps li.done::before { content: "\F26E"; font-family: "bootstrap-icons"; font-size: .9rem; background: var(--vx-success-soft); color: var(--vx-success); border-color: transparent; }
.vx-steps li[aria-current="step"] { color: var(--vx-ink); font-weight: 600; }
.vx-steps li[aria-current="step"]::before { background: var(--vx-primary); border-color: var(--vx-primary); color: #fff; }
.vx-progress { height: 10px; border-radius: 5px; background: var(--vx-surface-2); border: 1px solid var(--vx-line); overflow: hidden; display: flex; }
.vx-progress > span { display: block; height: 100%; }
.vx-progress .p-ok { background: var(--vx-success); } .vx-progress .p-wait { background: var(--vx-info); } .vx-progress .p-bad { background: var(--vx-danger); }
.vx-secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; background: var(--vx-surface-2); border: 1px dashed var(--vx-muted); border-radius: var(--vx-radius-sm); padding: .75rem; color: var(--vx-ink); }
.vx-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; background: var(--vx-navy-950); color: #d7e3f4; border-radius: var(--vx-radius-sm); padding: 1rem; overflow-x: auto; white-space: pre; }
.vx-dl { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .45rem 1rem; margin: 0; }
.vx-dl dt { color: var(--vx-muted); font-weight: 500; } .vx-dl dd { margin: 0; color: var(--vx-ink); word-break: break-word; }
.vx-chart { position: relative; height: 280px; } .vx-chart.sm { height: 200px; }
.vx-mock-banner { background: repeating-linear-gradient(45deg, var(--vx-warning-soft), var(--vx-warning-soft) 10px, transparent 10px, transparent 20px); color: var(--vx-warning); font-weight: 600; text-align: center; padding: .35rem; font-size: .82rem; border-bottom: 1px solid var(--vx-line); }
.dropdown-menu { --bs-dropdown-bg: var(--vx-surface); --bs-dropdown-border-color: var(--vx-line); box-shadow: var(--vx-shadow-lg); border-radius: var(--vx-radius); }
.dropdown-item { min-height: 38px; display: flex; align-items: center; gap: .5rem; }
.vx-notif { width: 340px; max-width: calc(100vw - 2rem); }
.vx-notif .dropdown-item { white-space: normal; align-items: flex-start; flex-direction: column; gap: .1rem; }
.alert { border-radius: var(--vx-radius); }
.pagination { --bs-pagination-bg: var(--vx-surface); --bs-pagination-border-color: var(--vx-line); }

/* Auth pages */
.vx-auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .vx-auth { grid-template-columns: 1.05fr 1fr; } }
.vx-auth-aside { display: none; background: radial-gradient(1200px 500px at 10% 0%, rgba(20,195,176,.18), transparent 60%), linear-gradient(160deg, var(--vx-navy-800), var(--vx-navy-950)); color: #c9d6ea; padding: 3rem; flex-direction: column; justify-content: space-between; }
@media (min-width: 992px) { .vx-auth-aside { display: flex; } }
.vx-auth-aside h2 { color: #fff; font-size: 1.9rem; line-height: 1.25; max-width: 30ch; }
.vx-auth-aside ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.vx-auth-aside li { display: flex; gap: .7rem; align-items: flex-start; } .vx-auth-aside li .bi { color: var(--vx-teal-500); font-size: 1.2rem; }
.vx-auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.vx-auth-card { width: 100%; max-width: 420px; }
.vx-auth-card .vx-brand { color: var(--vx-ink); padding: 0 0 1.5rem; }
/* Bootstrap's .offcanvas-lg sets a transparent background at ≥992px; keep the navy sidebar. */
.vx-sidebar.offcanvas-lg { background-color: var(--vx-navy-900) !important; color: #c9d6ea; --bs-offcanvas-bg: var(--vx-navy-900); --bs-offcanvas-width: var(--vx-sidebar-w); }
.vx-admin .vx-sidebar.offcanvas-lg { background-color: #10141f !important; --bs-offcanvas-bg: #10141f; }
@media (max-width: 575.98px) {
  .vx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .vx-kpi { padding: .8rem .85rem; }
  .vx-kpi-value { font-size: 1.2rem; }
  .vx-mock-banner { font-size: .75rem; }
}

/* ---- polish pass ---- */
::selection { background: color-mix(in srgb, var(--vx-primary) 22%, transparent); color: var(--vx-ink); }
html { accent-color: var(--vx-primary); scrollbar-color: var(--vx-control) transparent; }
input, textarea { caret-color: var(--vx-primary); }
/* Control boundaries at >=3:1 (WCAG 1.4.11); dividers keep the softer line colour. */
.form-control, .form-select { border-color: var(--vx-control); }
.form-control::placeholder { color: var(--vx-muted); opacity: 1; }
.form-check-input { border-color: var(--vx-control); }
.form-check-input:checked { background-color: var(--vx-primary); border-color: var(--vx-primary); }
.form-control-sm, .form-select-sm { min-height: 34px; font-size: .875rem; }
.form-label + .form-text { margin-top: -.15rem; }
/* Section tabs: show where you are. */
.nav-underline { --bs-nav-underline-gap: 1.25rem; border-bottom: 1px solid var(--vx-line); }
.nav-underline .nav-link { color: var(--vx-muted); font-weight: 500; padding: .5rem 0; min-height: 40px; display: flex; align-items: center; }
.nav-underline .nav-link:hover { color: var(--vx-ink); border-bottom-color: var(--vx-line); }
.nav-underline .nav-link[aria-current="page"] { color: var(--vx-ink); font-weight: 600; border-bottom-color: var(--vx-primary); }
/* Dense tables: links read as names, underline on hover/focus. */
.table td a:not(.btn) { text-decoration: none; font-weight: 500; }
.table td a:not(.btn):hover, .table td a:not(.btn):focus-visible { text-decoration: underline; }
.list-group-item a.fw-semibold, .vx-conv-list a { text-decoration: none; }
/* Choice cards: values in ink, supporting text muted. */
.vx-choice .vx-choice-value { display: block; color: var(--vx-ink); font-size: 1.125rem; font-weight: 650; font-variant-numeric: tabular-nums; margin: .15rem 0; white-space: nowrap; }
.vx-choice .vx-choice-meta { display: block; font-size: .85rem; color: var(--vx-muted); }
.vx-empty .vx-empty-title { color: var(--vx-ink); font-size: 1.0625rem; font-weight: 600; margin-bottom: .25rem; }
/* Sign-in pages use the same title size as the app. */
.vx-auth-card h1 { font-size: 1.625rem; }
.vx-mock-banner .vx-long { display: none; }
@media (min-width: 768px) { .vx-mock-banner .vx-long { display: inline; } .vx-mock-banner .vx-short { display: none; } }

/* SchoolSoft class groups */
.vx-class-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.vx-class-chips a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; padding: .45rem .75rem; border: 1px solid var(--vx-line); border-radius: var(--vx-radius-sm); background: var(--vx-surface); color: var(--vx-ink); text-decoration: none; transition: border-color .15s ease-out, background-color .15s ease-out; }
.vx-class-chips a:hover { border-color: var(--vx-control); background: var(--vx-surface-2); }
.vx-class-chips a[aria-current="true"] { border-color: var(--vx-primary); background: var(--vx-primary-soft); }
.vx-class-name { font-weight: 600; }
.vx-class-count { font-size: .8rem; color: var(--vx-muted); background: var(--vx-surface-2); border-radius: 999px; padding: .05rem .5rem; }
.vx-seg { display: inline-flex; border: 1px solid var(--vx-control); border-radius: var(--vx-radius-sm); overflow: hidden; }
.vx-seg a { padding: .3rem .7rem; min-height: 34px; display: flex; align-items: center; color: var(--vx-body); text-decoration: none; font-variant-numeric: tabular-nums; }
.vx-seg a + a { border-left: 1px solid var(--vx-control); }
.vx-seg a[aria-current="page"] { background: var(--vx-primary); color: #fff; }
[data-bs-theme="dark"] .vx-seg a[aria-current="page"] { color: #071a33; }

/* Toggle chips (groups): selected = brand tint with readable text, not Bootstrap's grey fill. */
.btn-check:checked + .btn-outline-secondary { background: var(--vx-primary-soft); border-color: var(--vx-primary); color: var(--vx-ink); }
.btn-check:checked + .btn-outline-secondary .text-muted { color: var(--vx-body) !important; }
.btn-check:checked + .btn-outline-secondary::before { content: "\F26E"; font-family: "bootstrap-icons"; color: var(--vx-primary); margin-right: .1rem; }
.btn-check:focus-visible + .btn { outline: 3px solid color-mix(in srgb, var(--vx-primary) 55%, transparent); outline-offset: 2px; }
#recipients-preview summary { flex-wrap: wrap; gap: .25rem .5rem; }

/* Recipient preview on Send SMS */
.vx-recipients { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--vx-line); border-radius: var(--vx-radius-sm); }
.vx-recipients table { margin: 0; font-size: .85rem; }
.vx-recipients td { padding: .35rem .6rem; }

/* ---- Web Interface Guidelines pass ---- */
:root, [data-bs-theme="light"] { color-scheme: light; }
[data-bs-theme="dark"] { color-scheme: dark; }
html { scroll-padding-top: calc(var(--vx-topbar-h) + 1rem); -webkit-tap-highlight-color: color-mix(in srgb, var(--vx-primary) 18%, transparent); }
html:has(.vx-sticky-actions) { scroll-padding-bottom: 5.5rem; } /* keep focused fields clear of the sticky action bar */
@media (pointer: fine) { html { overscroll-behavior: none; } }
a, button, .btn, input, select, textarea, label, summary, [role="button"] { touch-action: manipulation; }
h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
select option { background-color: var(--vx-surface); color: var(--vx-ink); } /* Windows dark mode */
.vx-sidebar, .dropdown-menu, .vx-thread, .vx-table-wrap { overscroll-behavior: contain; }
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
/* Checkbox cells: the whole cell is the hit target. */
.vx-hit { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -.6rem -.5rem; cursor: pointer; }
/* Touch screens: 44px targets and 16px inputs (no iOS zoom). */
@media (pointer: coarse) {
  .btn, .btn-sm, .vx-icon-btn, .form-control, .form-select, .form-control-sm, .form-select-sm, .nav-underline .nav-link, .dropdown-item, .page-link { min-height: 44px; }
  .vx-icon-btn { width: 44px; }
  .vx-nav a { min-height: 44px; }
  .form-control-sm, .form-select-sm { font-size: 1rem; }
  .page-link { display: flex; align-items: center; }
}
