/* Pro Wash DMV Email Manager: design system.
   Layout patterns follow Mailchimp's admin UI (white nav, serif page titles,
   pill buttons, quiet tables); colors are the Pro Wash brand palette. */

:root {
    --navy: #0A1E3D;
    --navy-2: #132D54;
    --red: #B33A34;
    --red-2: #9A322D;
    --sky: #E8F1FA;

    --ink: #16213A;
    --ink-2: #3D4757;
    --muted: #667085;
    --line: #E4E7EC;
    --line-2: #D0D5DD;
    --bg: #F6F6F4;
    --surface: #FFFFFF;
    --hover: #F2F4F7;
    --link: #1B4F8F;
    --link-2: #123A6B;

    --ok-bg: #E6F4EA;   --ok-fg: #1E6B3A;
    --warn-bg: #FFF4DB; --warn-fg: #8A5A00;
    --bad-bg: #FBE9E8;  --bad-fg: #9A2C26;
    --info-bg: #E8F1FA; --info-fg: #1B4F8F;
    --neutral-bg: #EEF0F3; --neutral-fg: #475467;

    --sidebar-w: 248px;
    --topbar-h: 56px;
    --radius: 10px;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
html, body { font-family: var(--sans); }
body { background: var(--bg); color: var(--ink); font-size: .925rem; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-2); }
h1, h2, h3, h4, h5, h6 { color: var(--ink); }
h2 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; letter-spacing: -.01em; }
h5, .h5 { font-weight: 600; font-size: 1.02rem; }
h6, .h6 { font-weight: 600; }
.text-muted { color: var(--muted) !important; }
hr { border-color: var(--line); opacity: 1; }
code { color: var(--red-2); }
::selection { background: rgba(179, 58, 52, .15); }

/* Brand stripe across the very top, like Mailchimp's yellow bar */
.brand-stripe { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--red); z-index: 1060; }

/* ---------- App shell ---------- */
.app-sidebar {
    position: fixed; top: 3px; bottom: 0; left: 0; width: var(--sidebar-w);
    background: var(--surface); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; z-index: 1030;
}
.app-sidebar .sb-brand { height: calc(var(--topbar-h) - 3px); display: flex; align-items: center; padding: 0 1.1rem; flex: 0 0 auto; }
.app-sidebar .sb-brand img { max-height: 38px; max-width: 180px; }
.app-sidebar .sb-create { padding: .75rem 1rem .5rem; flex: 0 0 auto; }
.app-sidebar .sb-create .btn { width: 100%; justify-content: center; }
.app-sidebar .sb-scroll { flex: 1 1 auto; overflow-y: auto; padding: .25rem .6rem 1rem; scrollbar-width: thin; }
.app-sidebar .sb-foot { flex: 0 0 auto; border-top: 1px solid var(--line); padding: .5rem .6rem; }

.sb-link, .sb-group-toggle {
    display: flex; align-items: center; gap: .7rem; width: 100%;
    padding: .55rem .7rem; margin: 1px 0; border-radius: 6px;
    color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9rem;
    background: none; border: 0; text-align: left;
}
.sb-link i, .sb-group-toggle > i:first-child { font-size: 1.05rem; color: var(--ink-2); width: 1.1rem; text-align: center; }
.sb-link:hover, .sb-group-toggle:hover { background: var(--hover); color: var(--ink); }
.sb-link.active { background: var(--sky); color: var(--navy); font-weight: 600; }
.sb-link.active i { color: var(--navy); }
.sb-group-toggle .chev { margin-left: auto; font-size: .8rem; color: var(--muted); transition: transform .15s; }
.sb-group-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.sb-group-toggle.has-active { font-weight: 600; }
.sb-sub { padding: 2px 0 6px; }
.sb-sub .sb-link { padding: .4rem .7rem .4rem 2.55rem; font-size: .85rem; font-weight: 400; color: var(--ink-2); }
.sb-sub .sb-link.active { color: var(--navy); font-weight: 600; }

.app-topbar {
    position: fixed; top: 3px; left: var(--sidebar-w); right: 0; height: calc(var(--topbar-h) - 3px);
    background: var(--surface); border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; z-index: 1020;
}
.app-topbar .tb-menu { display: none; background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--ink); padding: 0; }
.app-topbar .tb-logo { display: none; }
.app-topbar .tb-logo img { height: 32px; }
.app-topbar .tb-spacer { flex: 1 1 auto; }
.tb-pill {
    display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px;
    padding: .3rem .8rem; font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.tb-pill.paused { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid #F3D9A0; }
.tb-pill.live { background: var(--ok-bg); color: var(--ok-fg); }
.tb-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tb-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
    font-family: var(--serif); font-size: 1rem; border: 0;
}

.app-main { margin-left: var(--sidebar-w); padding-top: var(--topbar-h); min-height: 100vh; }
.app-content { padding: 1.75rem 2rem 3rem; max-width: 1320px; }
.app-flash { padding: 1rem 2rem 0; max-width: 1320px; }
.app-flash .alert { margin-bottom: .5rem; }

/* Page header band: white, serif title, actions on the right */
.page-header {
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 1.5rem 2rem; display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
}
.page-header .page-title { font-family: var(--serif); font-weight: 500; font-size: 1.85rem; line-height: 1.2; margin: 0; letter-spacing: -.015em; }
.page-header .page-title small, .page-header .page-title .sub { font-family: var(--sans); font-size: .95rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.page-header .page-subtitle { color: var(--muted); margin: .3rem 0 0; font-size: .9rem; }
.page-header .page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.page-header .back-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; text-decoration: none; margin-bottom: .35rem; }
.page-header + .app-content { padding-top: 1.75rem; }

.sidebar-overlay { display: none; }

/* ---------- Components ---------- */
.card {
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
    box-shadow: none;
}
.card.shadow-sm, .card.shadow { box-shadow: none !important; }
.card-header {
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem; border-radius: var(--radius) var(--radius) 0 0 !important;
}
.card-header h5, .card-header .h5 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; }
.card-header h6 { font-weight: 600; }
.card-body { padding: 1.25rem; }
.card-footer { background: #FAFAFA; border-top: 1px solid var(--line); }
.card-title { font-weight: 600; }

.card-feature { border-left: 4px solid var(--red); }

/* Section heading used inside cards (Mailchimp "Summary" style) */
.section-title { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin: 0; }
.section-sub { color: var(--muted); font-size: .82rem; margin: .15rem 0 0; }

/* Metric strip: columns separated by rules, dashed-underlined labels */
.metric-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.metric { padding: .25rem 1.25rem; text-decoration: none; color: inherit; display: block; }
.metric + .metric { border-left: 1px solid var(--line); }
a.metric:hover .metric-value { color: var(--link); }
.metric-label { font-size: .85rem; font-weight: 500; color: var(--ink-2); border-bottom: 1px dashed var(--line-2); display: inline-block; padding-bottom: 1px; }
.metric-value { font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1.15; margin-top: .4rem; color: var(--ink); }
.metric-note { font-size: .8rem; color: var(--muted); margin-top: .15rem; }

/* Stat cards (legacy class used on several pages) become quiet tiles */
.stat-card { border: 1px solid var(--line) !important; border-left: 1px solid var(--line) !important; transition: border-color .15s; }
a:hover > .stat-card, .stat-card:hover { border-color: var(--line-2) !important; transform: none; box-shadow: none; }
.stat-card h6 { font-size: .82rem; font-weight: 500; color: var(--ink-2) !important; border-bottom: 1px dashed var(--line-2); display: inline-block; padding-bottom: 1px; }
.stat-card h2, .stat-card h3 { font-family: var(--serif); font-weight: 500; margin-bottom: 0; }

/* Buttons: pills */
.btn {
    border-radius: 999px; font-weight: 600; font-size: .875rem; padding: .5rem 1.15rem;
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem; line-height: 1.3;
}
.btn-sm { padding: .32rem .85rem; font-size: .8rem; }
.btn-lg { padding: .7rem 1.5rem; font-size: 1rem; }
.btn-group > .btn { border-radius: 999px; }
.btn-group > .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active { background: var(--navy-2) !important; border-color: var(--navy-2) !important; color: #fff; }
.btn-outline-primary { color: var(--navy); border-color: var(--navy); background: var(--surface); }
.btn-outline-primary:hover, .btn-outline-primary.active, .btn-check:checked + .btn-outline-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-secondary { background: var(--ink-2); border-color: var(--ink-2); }
.btn-outline-secondary { color: var(--ink); border-color: var(--line-2); background: var(--surface); }
.btn-outline-secondary:hover, .btn-outline-secondary.active, .btn-check:checked + .btn-outline-secondary { background: var(--hover); color: var(--ink); border-color: var(--line-2); }
.btn-danger { background: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-2); border-color: var(--red-2); }
.btn-outline-danger { color: var(--red); border-color: #E3B4B1; background: var(--surface); }
.btn-outline-danger:hover { background: var(--bad-bg); color: var(--red-2); border-color: #E3B4B1; }
.btn-success { background: #1E7A45; border-color: #1E7A45; }
.btn-outline-success { color: #1E6B3A; border-color: #A9D5B8; background: var(--surface); }
.btn-outline-success:hover { background: var(--ok-bg); color: #1E6B3A; border-color: #A9D5B8; }
.btn-outline-info { color: var(--link); border-color: #B7CCE6; background: var(--surface); }
.btn-outline-info:hover, .btn-outline-info.active { background: var(--info-bg); color: var(--link-2); border-color: #B7CCE6; }
.btn-outline-warning { color: var(--warn-fg); border-color: #EBCB85; background: var(--surface); }
.btn-outline-warning:hover, .btn-outline-warning.active { background: var(--warn-bg); color: var(--warn-fg); border-color: #EBCB85; }
.btn-outline-dark { background: var(--surface); }
.btn-info, .btn-warning { color: var(--ink); }
.btn-link { border-radius: 6px; font-weight: 600; color: var(--link); text-decoration: none; }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(10, 30, 61, .2); }
.btn-quiet {
    border: none; background: transparent; color: var(--muted); padding: 4px 8px; border-radius: 6px;
    font-size: .85rem; line-height: 1.4; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem;
}
.btn-quiet:hover { background: var(--hover); color: var(--ink); }
.btn-quiet.danger:hover { background: var(--bad-bg); color: var(--red-2); }

/* Badges: soft status pills */
.badge { font-weight: 600; font-size: .72rem; border-radius: 999px; padding: .32em .7em; letter-spacing: .01em; }
.badge.bg-success, .badge.text-bg-success { background: var(--ok-bg) !important; color: var(--ok-fg) !important; }
.badge.bg-warning, .badge.text-bg-warning { background: var(--warn-bg) !important; color: var(--warn-fg) !important; }
.badge.bg-danger, .badge.text-bg-danger { background: var(--bad-bg) !important; color: var(--bad-fg) !important; }
.badge.bg-info, .badge.text-bg-info, .badge.bg-primary, .badge.text-bg-primary { background: var(--info-bg) !important; color: var(--info-fg) !important; }
.badge.bg-secondary, .badge.text-bg-secondary, .badge.bg-light, .badge.text-bg-light { background: var(--neutral-bg) !important; color: var(--neutral-fg) !important; }
.badge.bg-dark, .badge.text-bg-dark { background: var(--navy) !important; color: #fff !important; }

.tag-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 4px;
    background: #F0F1F3; border: 1px solid #DADDE2; color: var(--ink); font-size: .78rem; font-weight: 500; line-height: 1.55;
}
.tag-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }

/* Tables: quiet, roomy rows */
.table { font-size: .875rem; color: var(--ink); --bs-table-hover-bg: #F8F9FB; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .8rem .75rem; border-bottom-color: var(--line); vertical-align: middle; }
.table th, .table thead td {
    font-weight: 600; font-size: .78rem; color: var(--ink-2); text-transform: none; letter-spacing: 0;
    background: #FAFAFB; border-bottom: 1px solid var(--line);
}
.table thead th:first-child { border-top-left-radius: 6px; }
.table thead th:last-child { border-top-right-radius: 6px; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table-sm > :not(caption) > * > * { padding: .5rem .6rem; }
.table-responsive { border-radius: 6px; }
.card-body > .table, .card-body > .table-responsive > .table { margin-bottom: 0; }
.table a:not(.btn) { text-decoration: none; font-weight: 500; }
.table a:not(.btn):hover { text-decoration: underline; }

/* Forms */
.form-label, label.form-label { font-weight: 600; font-size: .85rem; color: var(--ink); margin-bottom: .35rem; }
.form-control, .form-select {
    border: 1px solid var(--line-2); border-radius: 6px; padding: .55rem .8rem; font-size: .9rem; color: var(--ink); background-color: var(--surface);
}
.form-control-sm, .form-select-sm { padding: .35rem .65rem; font-size: .82rem; }
.form-control:focus, .form-select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(10, 30, 61, .12); }
.form-text { color: var(--muted); font-size: .8rem; }
.form-check-input:checked { background-color: var(--navy); border-color: var(--navy); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(10, 30, 61, .12); border-color: var(--navy); }
.input-group-text { background: #F7F8FA; border-color: var(--line-2); color: var(--ink-2); }

/* Tabs: underline style */
.nav-tabs { border-bottom: 1px solid var(--line); gap: .25rem; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs .nav-link {
    border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--ink-2);
    font-weight: 500; padding: .7rem .9rem; margin-bottom: -1px; white-space: nowrap; background: none;
}
.nav-tabs .nav-link:hover { color: var(--ink); border-bottom-color: var(--line-2); }
.nav-tabs .nav-link.active { color: var(--navy); border-bottom-color: var(--red); font-weight: 600; background: none; }
.nav-pills .nav-link { border-radius: 999px; color: var(--ink-2); font-weight: 500; }
.nav-pills .nav-link.active { background: var(--navy); }

/* Alerts: Mailchimp-style tips with a colored left rule */
.alert {
    border-radius: 6px; font-size: .875rem; background: var(--surface); color: var(--ink);
    border: 1px solid var(--line); border-left: 4px solid var(--ink-2);
}
.alert-success { border-left-color: #2E8B57; background: #F6FBF8; }
.alert-danger { border-left-color: var(--red); background: #FEF8F7; }
.alert-warning { border-left-color: #E0A100; background: #FFFBF0; }
.alert-info, .alert-primary { border-left-color: var(--link); background: #F6FAFE; }
.alert-secondary, .alert-light { border-left-color: var(--line-2); }
.alert .alert-link { color: var(--link); }
.alert-heading { font-weight: 600; font-size: 1rem; }

.list-group-item { border-color: var(--line); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(16, 24, 40, .1); padding: .35rem; font-size: .875rem; }
.dropdown-item { border-radius: 5px; padding: .45rem .75rem; color: var(--ink); }
.dropdown-item:hover { background: var(--hover); }
.dropdown-item.active, .dropdown-item:active { background: var(--sky); color: var(--navy); }
.dropdown-header { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.modal-content { border: 0; border-radius: 12px; }
.modal-header { border-bottom-color: var(--line); }
.modal-title { font-family: var(--serif); font-weight: 500; }
.modal-footer { border-top-color: var(--line); }
.pagination .page-link { color: var(--ink); border-color: var(--line); }
.pagination .page-item.active .page-link { background: var(--navy); border-color: var(--navy); color: #fff; }
.progress { background: var(--neutral-bg); border-radius: 999px; }
.progress-bar { background: var(--navy); }
.accordion-button:not(.collapsed) { background: var(--sky); color: var(--navy); }
.accordion-button:focus { box-shadow: 0 0 0 3px rgba(10, 30, 61, .12); }

/* Explainer panels */
.info-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.info-panel .info-col { padding: .25rem 1.25rem; }
.info-panel .info-col + .info-col { border-left: 1px solid var(--line); }

/* Empty states */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2rem; color: var(--line-2); display: block; margin-bottom: .5rem; }
.empty-state h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; color: var(--ink); }

/* Key/value detail rows (Mailchimp report style) */
.kv-row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--ink-2); }
.kv-row .v { font-weight: 600; text-align: right; }

/* Sequence journey (Mailchimp customer-journey style) */
.journey-canvas { background: var(--bg); border-radius: 0 0 var(--radius) var(--radius); padding: 1.5rem 1rem; }
.journey-node, .journey-cap { max-width: 520px; margin: 0 auto; position: relative; }
.journey-node {
    display: flex; align-items: flex-start; background: var(--surface); border: 1px solid var(--line);
    border-left: 4px solid var(--line-2); border-radius: 8px; padding: .75rem .9rem; margin-top: 28px;
}
.journey-node::before, .journey-cap.end::before {
    content: ""; position: absolute; left: 50%; top: -29px; height: 28px; border-left: 1px solid var(--line-2);
}
.journey-node.type-send_email { border-left-color: #2E8B57; }
.journey-node.type-wait { border-left-color: #E0A100; }
.journey-node.type-condition { border-left-color: var(--link); }
.journey-node.type-add_tag, .journey-node.type-remove_tag { border-left-color: var(--navy); }
.journey-num {
    width: 26px; height: 26px; border-radius: 50%; background: var(--sky); color: var(--navy);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem;
}
.journey-cap {
    text-align: center; font-size: .85rem; font-weight: 600; color: var(--ink-2); background: var(--surface);
    border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; width: fit-content; text-transform: capitalize;
}
.journey-cap.end { margin-top: 28px; color: var(--muted); font-weight: 500; }

/* ---------- Auth (signed-out) pages ---------- */
.auth-page { min-height: 100vh; display: flex; background: var(--surface); padding-top: 3px; }
.auth-aside {
    flex: 0 0 42%; background: var(--navy); color: #fff; padding: 3rem; display: flex;
    flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-aside::after {
    content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px;
    border-radius: 50%; border: 60px solid rgba(232, 241, 250, .06);
}
.auth-aside .aside-title { font-family: var(--serif); font-weight: 500; font-size: 2.3rem; line-height: 1.15; color: #fff; max-width: 420px; }
.auth-aside .aside-copy { color: #B9C7DB; max-width: 400px; margin-top: 1rem; }
.auth-aside .aside-foot { color: #8FA3BF; font-size: .82rem; }
.auth-aside img { max-height: 54px; }
.auth-main { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.auth-form { width: 100%; max-width: 400px; }
.auth-form h1 { font-family: var(--serif); font-weight: 500; font-size: 2.1rem; margin-bottom: .4rem; letter-spacing: -.015em; }
.auth-form .lead-sub { color: var(--muted); margin-bottom: 1.75rem; }
.auth-form .btn-primary { width: 100%; padding: .7rem; }
.auth-form .auth-alt { margin-top: 1.5rem; font-size: .875rem; color: var(--muted); }
.auth-flash { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 1070; width: 90%; max-width: 500px; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); transition: transform .22s ease; z-index: 1050; top: 0; box-shadow: none; }
    .app-sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(16, 24, 40, .25); }
    .sidebar-overlay.show { display: block; position: fixed; inset: 0; background: rgba(10, 30, 61, .45); z-index: 1045; }
    .app-topbar { left: 0; padding: 0 1rem; }
    .app-topbar .tb-menu, .app-topbar .tb-logo { display: inline-flex; align-items: center; }
    .app-main { margin-left: 0; }
}
@media (max-width: 767.98px) {
    body { font-size: .9rem; }
    .page-header { padding: 1.15rem 1rem; }
    .page-header .page-title { font-size: 1.5rem; }
    .page-header .page-actions { width: 100%; }
    .app-content { padding: 1.1rem 1rem 2.5rem; }
    .app-flash { padding: .75rem 1rem 0; }
    .card-body { padding: 1rem; }
    .metric + .metric { border-left: 0; }
    .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1rem; }
    .metric { padding: .25rem .5rem; }
    .metric-value { font-size: 1.6rem; }
    .info-panel .info-col + .info-col { border-left: 0; border-top: 1px solid var(--line); padding-top: 1rem; }
    /* Filter button groups scroll sideways instead of widening the page */
    .app-content .btn-group { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .app-content .btn-group > .btn { flex: 0 0 auto; }
    .badge { white-space: normal; text-align: left; }
    /* Wide tables scroll inside their card instead of the page */
    .app-content table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .auth-page { flex-direction: column; }
    .auth-aside { flex: none; padding: 1.5rem; }
    .auth-aside .aside-title { font-size: 1.5rem; }
    .auth-aside .aside-copy, .auth-aside .aside-foot, .auth-aside::after { display: none; }
    .auth-main { padding: 2rem 1.25rem; align-items: flex-start; }
}
