/* ==========================================================================
   BankController — multi-tenant bank onboarding console
   Hand written CSS, no framework required.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root {
    --navy-900: #070d1f;
    --navy-800: #0b1220;
    --navy-700: #121c33;
    --navy-600: #1c2942;

    --indigo-600: #4f46e5;
    --indigo-500: #6366f1;
    --violet-500: #8b5cf6;
    --cyan-400: #22d3ee;

    --emerald-500: #10b981;
    --emerald-50: #ecfdf5;
    --amber-500: #f59e0b;
    --amber-50: #fffbeb;
    --rose-500: #f43f5e;
    --rose-50: #fff1f2;

    --ink-900: #0f172a;
    --ink-700: #334155;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --line: #e2e8f0;
    --line-soft: #eef2f7;
    --surface: #ffffff;
    --canvas: #f4f6fb;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 2px 4px -2px rgba(15, 23, 42, .05);
    --shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, .18), 0 4px 12px -4px rgba(15, 23, 42, .08);
    --shadow-brand: 0 12px 28px -10px rgba(79, 70, 229, .55);

    --gradient-brand: linear-gradient(135deg, var(--indigo-600) 0%, var(--violet-500) 55%, #a855f7 100%);
    --gradient-panel: linear-gradient(160deg, #101a35 0%, #16224a 45%, #221a4d 100%);

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
    --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

/* ----------------------------------------------------------------- reset */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-900);
    background-color: var(--canvas);
    background-image:
        radial-gradient(900px 420px at 8% -8%, rgba(99, 102, 241, .12), transparent 65%),
        radial-gradient(760px 380px at 96% 4%, rgba(34, 211, 238, .10), transparent 60%);
    background-repeat: no-repeat;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.25;
    letter-spacing: -.02em;
    font-weight: 700;
}

p { margin: 0; }

a { color: var(--indigo-600); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

button { font-family: inherit; }

/* ---------------------------------------------------------------- layout */
.shell {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.page {
    padding: 34px 0 72px;
}

.stack-6 > * + * { margin-top: 6px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }

/* --------------------------------------------------------------- top nav */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(7, 13, 31, .88);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 66px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand__mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--gradient-brand);
    box-shadow: var(--shadow-brand);
    flex: 0 0 auto;
}
.brand__mark svg { width: 21px; height: 21px; }

.brand__name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
}
.brand__sub {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .52);
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 550;
    color: rgba(255, 255, 255, .70);
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease;
    white-space: nowrap;
}
.nav__link:hover {
    background: rgba(255, 255, 255, .09);
    color: #fff;
    text-decoration: none;
}
.nav__link[aria-current="page"] {
    background: rgba(99, 102, 241, .24);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .35);
}
.nav__link svg { width: 16px; height: 16px; opacity: .9; }

/* ---------------------------------------------------------- page heading */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px 5px 8px;
    border-radius: 999px;
    background: rgba(79, 70, 229, .09);
    color: var(--indigo-600);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--indigo-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .22);
}

.page-head h1 { font-size: clamp(25px, 3.2vw, 33px); }

.page-head__lead {
    margin-top: 8px;
    max-width: 62ch;
    color: var(--ink-500);
    font-size: 15px;
}

/* ---------------------------------------------------------------- alerts */
.alert {
    display: flex;
    gap: 13px;
    padding: 15px 17px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 14.5px;
    margin-bottom: 22px;
    animation: fade-up .34s ease both;
}
.alert__icon { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; }
.alert__body { min-width: 0; }
.alert strong { display: block; margin-bottom: 2px; font-weight: 650; }
.alert code {
    font-family: var(--mono);
    font-size: 12.5px;
    background: rgba(15, 23, 42, .07);
    padding: 2px 6px;
    border-radius: 5px;
    word-break: break-all;
}
.alert--success {
    background: var(--emerald-50);
    border-color: rgba(16, 185, 129, .32);
    color: #065f46;
}
.alert--success .alert__icon { color: var(--emerald-500); }
.alert--error {
    background: var(--rose-50);
    border-color: rgba(244, 63, 94, .3);
    color: #9f1239;
}
.alert--error .alert__icon { color: var(--rose-500); }
.alert--warn {
    background: var(--amber-50);
    border-color: rgba(245, 158, 11, .34);
    color: #92400e;
}
.alert--warn .alert__icon { color: var(--amber-500); }

.alert__close {
    margin-left: auto;
    flex: 0 0 auto;
    align-self: flex-start;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: .5;
    cursor: pointer;
    padding: 2px;
    border-radius: 6px;
    line-height: 0;
}
.alert__close:hover { opacity: 1; background: rgba(15, 23, 42, .07); }
.alert__close svg { width: 15px; height: 15px; }

/* ----------------------------------------------------------- stat cards */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat {
    position: relative;
    overflow: hidden;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--gradient-brand);
    opacity: .85;
}
.stat--active::after  { background: linear-gradient(90deg, #10b981, #34d399); }
.stat--pending::after { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat--month::after   { background: linear-gradient(90deg, #06b6d4, #22d3ee); }

.stat__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.stat__label {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-400);
}

.stat__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(79, 70, 229, .10);
    color: var(--indigo-600);
    flex: 0 0 auto;
}
.stat__icon svg { width: 17px; height: 17px; }
.stat--active  .stat__icon { background: rgba(16, 185, 129, .11); color: #059669; }
.stat--pending .stat__icon { background: rgba(245, 158, 11, .12); color: #d97706; }
.stat--month   .stat__icon { background: rgba(6, 182, 212, .11);  color: #0891b2; }

.stat__value {
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat__hint {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--ink-400);
}

/* ----------------------------------------------------------------- cards */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line-soft);
}
.card__head h2 { font-size: 17px; }
.card__head p { font-size: 13.5px; color: var(--ink-500); margin-top: 2px; }

.card__body { padding: 24px; }

/* ------------------------------------------------- onboarding split view */
.onboard {
    display: grid;
    grid-template-columns: minmax(300px, 400px) 1fr;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.onboard__aside {
    position: relative;
    padding: 34px 30px;
    color: #fff;
    background: var(--gradient-panel);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 26px;
}
.onboard__aside::before {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -130px;
    top: -110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, .55), transparent 68%);
    filter: blur(6px);
}
.onboard__aside::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    left: -110px;
    bottom: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, .32), transparent 68%);
}
.onboard__aside > * { position: relative; z-index: 1; }

.onboard__aside h2 {
    font-size: 22px;
    letter-spacing: -.025em;
}
.onboard__aside .lead {
    margin-top: 10px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, .68);
}

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
    display: flex;
    gap: 13px;
    padding: 11px 0;
}
.steps li + li { border-top: 1px solid rgba(255, 255, 255, .09); }
.steps__num {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
    font-size: 12.5px;
    font-weight: 700;
}
.steps__title { font-size: 14px; font-weight: 600; }
.steps__desc { font-size: 13px; color: rgba(255, 255, 255, .58); }

/* "what you get" list in the aside */
.perks {
    list-style: none;
    margin: 0;
    padding: 16px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .09);
    display: grid;
    gap: 11px;
}
.perks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .74);
    line-height: 1.45;
}
.perks svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: var(--cyan-400);
    opacity: .95;
}

/* live subdomain preview inside the aside */
.preview {
    margin-top: auto;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.preview__label {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 9px;
}
.preview__bar {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 9px;
    background: rgba(7, 13, 31, .55);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
}
.preview__dots { display: flex; gap: 4px; flex: 0 0 auto; margin-top: 6px; }
.preview__dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
}
.preview__url {
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.5;
    color: #a5f3fc;
    /* show the whole hostname rather than truncating it */
    overflow-wrap: anywhere;
    min-width: 0;
}
.preview__url .muted { color: rgba(255, 255, 255, .38); }

.onboard__main { padding: 32px 34px 36px; min-width: 0; }

/* ------------------------------------------------------------------ form */
.fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}
.fieldset + .fieldset {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px dashed var(--line);
}

.fieldset__legend {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin-bottom: 16px;
    padding: 0;
}
.fieldset__legend svg { width: 15px; height: 15px; color: var(--indigo-500); }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.grid-2 .span-2 { grid-column: 1 / -1; }

.field { min-width: 0; }

.field__label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 7px;
}
.field__label .req { color: var(--rose-500); margin-left: 2px; }
.field__counter {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-400);
    font-variant-numeric: tabular-nums;
}

.input,
.textarea,
.select {
    width: 100%;
    padding: 11px 13px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--ink-900);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.input::placeholder,
.textarea::placeholder { color: var(--ink-400); }

.input:hover,
.textarea:hover,
.select:hover { border-color: #cbd5e1; }

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, .16);
}

.textarea { resize: vertical; min-height: 92px; line-height: 1.55; }

.input--mono { font-family: var(--mono); letter-spacing: .045em; }
.input--upper { text-transform: uppercase; }

.select {
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 15px;
    cursor: pointer;
}

/* input with a fixed suffix, e.g.  hdfc | .bankcontroller.io */
.input-affix {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    overflow: hidden;
}
.input-affix:hover { border-color: #cbd5e1; }
.input-affix:focus-within {
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, .16);
}
.input-affix .input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-width: 0;
    flex: 1 1 auto;
}
.input-affix .input:focus { box-shadow: none; }
.input-affix__suffix {
    display: flex;
    align-items: center;
    padding: 0 13px;
    flex: 0 0 auto;
    background: #f8fafc;
    border-left: 1.5px solid var(--line-soft);
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink-500);
    white-space: nowrap;
}

.field__hint {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--ink-400);
}

.field__error {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 550;
    color: #e11d48;
}
.field__error svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* invalid state */
.field.is-invalid .input,
.field.is-invalid .textarea,
.field.is-invalid .select,
.field.is-invalid .input-affix {
    border-color: #fb7185;
    background-color: #fff7f8;
}
.field.is-invalid .input:focus,
.field.is-invalid .textarea:focus,
.field.is-invalid .select:focus,
.field.is-invalid .input-affix:focus-within {
    box-shadow: 0 0 0 3.5px rgba(244, 63, 94, .15);
}
.field.is-invalid .field__error { display: flex; }

/* segmented radio control */
.segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.segmented__option { position: relative; }
/* The radio stays in the layout (1px, transparent) so it remains focusable and
   clickable for assistive tech; the styled label is the visible control. */
.segmented__option input {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}
.segmented__option label {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    height: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.segmented__option label:hover { border-color: #c7d2fe; background: #fbfcff; }
.segmented__option input:checked + label {
    border-color: var(--indigo-500);
    background: rgba(99, 102, 241, .055);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.segmented__option input:focus-visible + label {
    outline: 2px solid var(--indigo-500);
    outline-offset: 2px;
}
.segmented__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #f1f5f9;
    color: var(--ink-500);
    transition: background-color .15s ease, color .15s ease;
}
.segmented__icon svg { width: 16px; height: 16px; }
.segmented__option input:checked + label .segmented__icon {
    background: var(--gradient-brand);
    color: #fff;
}
.segmented__title { font-size: 14px; font-weight: 620; }
.segmented__desc { font-size: 12.5px; color: var(--ink-500); }

/* ---------------------------------------------------------------- buttons */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
}
.form-actions__note {
    margin-right: auto;
    font-size: 12.5px;
    color: var(--ink-400);
    display: flex;
    align-items: center;
    gap: 7px;
}
.form-actions__note svg { width: 15px; height: 15px; color: var(--emerald-500); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 20px;
    font-size: 14.5px;
    font-weight: 620;
    font-family: inherit;
    border: 1.5px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .14s ease, box-shadow .16s ease, background-color .16s ease,
                border-color .16s ease, color .16s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }

.btn--primary {
    color: #fff;
    background: var(--gradient-brand);
    box-shadow: var(--shadow-brand);
}
.btn--primary:hover { filter: brightness(1.06); box-shadow: 0 16px 32px -12px rgba(79, 70, 229, .62); }

.btn--ghost {
    color: var(--ink-700);
    background: #fff;
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: #cbd5e1; background: #f8fafc; color: var(--ink-900); }

.btn--sm { padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }
.btn--sm svg { width: 15px; height: 15px; }

.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------------- toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search {
    position: relative;
    flex: 1 1 240px;
    min-width: 200px;
    max-width: 380px;
}
.search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--ink-400);
    pointer-events: none;
}
.search .input { padding-left: 36px; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink-500);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
    cursor: pointer;
}
.chip:hover { border-color: #cbd5e1; color: var(--ink-900); text-decoration: none; }
.chip[aria-pressed="true"] {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: #fff;
}
.chip__count {
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .07);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .chip__count { background: rgba(255, 255, 255, .18); }

/* ----------------------------------------------------------------- table */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 980px;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 14px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-400);
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}

.table tbody tr { transition: background-color .13s ease; }
.table tbody tr:hover { background: #fafbff; }
.table tbody tr:last-child td { border-bottom: 0; }

.cell-bank {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 196px;
}

.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--gradient-brand);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 5px 14px -6px rgba(79, 70, 229, .6);
}
.avatar--v2 { background: linear-gradient(135deg, #0ea5e9, #22d3ee); box-shadow: 0 5px 14px -6px rgba(14, 165, 233, .6); }
.avatar--v3 { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 5px 14px -6px rgba(16, 185, 129, .6); }
.avatar--v4 { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 5px 14px -6px rgba(245, 158, 11, .6); }
.avatar--v5 { background: linear-gradient(135deg, #ec4899, #f472b6); box-shadow: 0 5px 14px -6px rgba(236, 72, 153, .6); }

.cell-bank__name {
    font-weight: 620;
    color: var(--ink-900);
    line-height: 1.35;
}
.cell-bank__code {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-400);
    letter-spacing: .02em;
}

.cell-address {
    max-width: 260px;
    color: var(--ink-500);
    font-size: 13.5px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mono-cell {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: .02em;
    color: var(--ink-700);
    white-space: nowrap;
}

.domain-cell { min-width: 180px; max-width: 220px; }
.domain-cell__host {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--indigo-600);
    /* prefer breaking at the hyphens/dots already in the host name */
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.4;
}
.domain-cell__host svg { margin-top: 3px; }
.domain-cell__host svg { width: 13px; height: 13px; flex: 0 0 auto; opacity: .75; }
.domain-cell__type {
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--ink-400);
}

/* status + plan pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 620;
    white-space: nowrap;
    border: 1px solid transparent;
}
.pill i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}
.pill--active    { background: var(--emerald-50); color: #047857; border-color: rgba(16, 185, 129, .28); }
.pill--pending   { background: var(--amber-50);   color: #b45309; border-color: rgba(245, 158, 11, .3); }
.pill--suspended { background: var(--rose-50);    color: #be123c; border-color: rgba(244, 63, 94, .26); }

.pill--plan {
    background: #f1f5f9;
    color: var(--ink-700);
    border-color: var(--line);
    font-size: 12px;
}
.pill--enterprise { background: rgba(139, 92, 246, .1); color: #6d28d9; border-color: rgba(139, 92, 246, .26); }
.pill--growth     { background: rgba(14, 165, 233, .1); color: #0369a1; border-color: rgba(14, 165, 233, .26); }

/* ----------------------------------------------------------- empty state */
.empty {
    padding: 62px 24px;
    text-align: center;
}
.empty__art {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin: 0 auto 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(34, 211, 238, .14));
    color: var(--indigo-600);
}
.empty__art svg { width: 34px; height: 34px; }
.empty h3 { font-size: 18px; margin-bottom: 8px; }
.empty p {
    max-width: 46ch;
    margin: 0 auto 22px;
    color: var(--ink-500);
    font-size: 14.5px;
}

/* --------------------------------------------------------------- details */
.detail-toggle {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink-500);
    cursor: pointer;
    transition: all .15s ease;
}
.detail-toggle:hover { border-color: var(--indigo-500); color: var(--indigo-600); }
.detail-toggle svg { width: 15px; height: 15px; transition: transform .2s ease; }
.detail-toggle[aria-expanded="true"] {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: #fff;
}
.detail-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.detail-row > td {
    padding: 0 !important;
    background: #f8fafc;
    border-bottom: 1px solid var(--line) !important;
}
.detail-row[hidden] { display: none; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px 26px;
    padding: 22px 26px 24px;
    animation: fade-up .26s ease both;
}
.detail-grid__item { min-width: 0; }
.detail-grid__label {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin-bottom: 5px;
}
.detail-grid__value {
    font-size: 14px;
    color: var(--ink-900);
    line-height: 1.5;
    word-break: break-word;
}
.detail-grid__value.mono { font-family: var(--mono); font-size: 13px; }
/* Only multi-line values (the address) keep their newlines; applying this
   globally would also render the template's own indentation. */
.detail-grid__value--pre { white-space: pre-line; }

/* mobile stacked cards for the directory */
.tenant-cards {
    display: none;
    padding: 16px;
    gap: 14px;
    grid-template-columns: 1fr;
}

.tenant-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 16px;
}
.tenant-card__head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}
.tenant-card__meta { display: grid; gap: 10px; }
.tenant-card__row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 13.5px;
    padding-bottom: 9px;
    border-bottom: 1px dashed var(--line-soft);
}
.tenant-card__row:last-child { border-bottom: 0; padding-bottom: 0; }
.tenant-card__key { color: var(--ink-400); font-weight: 550; flex: 0 0 auto; }
.tenant-card__val { text-align: right; word-break: break-word; min-width: 0; }

/* visually hidden but available to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------- footer */
.footer {
    padding: 26px 0 34px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-400);
}
.footer strong { color: var(--ink-500); font-weight: 600; }

/* ------------------------------------------------------------ animations */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(9px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fade-up .42s ease both; }
.animate-in--2 { animation-delay: .07s; }
.animate-in--3 { animation-delay: .14s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ----------------------------------------------------------- responsive */
@media (max-width: 1000px) {
    .onboard { grid-template-columns: 1fr; }
    .onboard__aside { padding: 28px 26px; }
    .preview { margin-top: 8px; }
    .onboard__main { padding: 26px 24px 30px; }
}

@media (max-width: 760px) {
    .shell { padding: 0 16px; }
    .page { padding: 24px 0 56px; }

    .topbar__inner { min-height: 60px; }
    .brand__sub { display: none; }
    .nav__link span { display: none; }
    .nav__link { padding: 9px 11px; }

    .grid-2 { grid-template-columns: 1fr; }
    .segmented { grid-template-columns: 1fr; }

    .card__body { padding: 18px; }
    .card__head { padding: 16px 18px; }

    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .stat { padding: 15px 16px; }
    .stat__value { font-size: 25px; }

    /* swap the wide table for stacked cards */
    .table-wrap { display: none; }
    .tenant-cards { display: grid; }

    .form-actions { flex-direction: column-reverse; align-items: stretch; }
    .form-actions .btn { width: 100%; }
    .form-actions__note { margin-right: 0; justify-content: center; }

    .search { max-width: none; }
}

@media (max-width: 420px) {
    .stats { grid-template-columns: 1fr; }
}
