@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;900&display=swap");

:root {
    --bg: #fafaf8;
    --surface: #ffffff;
    --sidebar: #e6d3b8;
    --sidebar-hover: #dcc6a6;
    --sidebar-active: #2b2b2b;
    --accent: #d6452e;
    --accent-dark: #b83a27;
    --accent-soft: #fbe7e1;
    --text: #2b2b2b;
    --text-soft: #4a4a4a;
    --muted: #7a7a7a;
    --muted-light: #b5b5b5;
    --border: #eceae6;
    --border-strong: #dedbd5;
    --positive: #1f7a4a;
    --positive-soft: #e6f2ec;
    --warning-soft: #f7ead2;
    --warning-text: #8a6914;

    --sidebar-w: 260px;
    --topbar-h: 72px;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 0 rgba(43, 43, 43, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-gutter: stable;
    overflow-y: scroll; /* always reserve scrollbar width — prevents text shift between pages */
}

html,
body {
    font-family:
        "Barlow",
        -apple-system,
        system-ui,
        sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}

a {
    color: inherit;
    text-decoration: none;
}
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* ============= LAYOUT ============= */
.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
}

/* ============= SIDEBAR ============= */
.sidebar {
    background: var(--sidebar);
    border-right: 1px solid var(--border-strong);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    position: fixed;      /* was: sticky */
    top: 0;
    left: 0;
    width: var(--sidebar-w);   /* needed now it's out of flow */
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;     /* if nav+user card ever exceed viewport, it scrolls internally */
}

.brand {
    padding: 4px 10px 20px;
    border-bottom: 1px solid rgba(43, 43, 43, 0.08);
}

.brand-mark {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.01em;
    line-height: 0.95;
    color: var(--text);
}

.brand-mark .accent {
    color: var(--accent);
    display: block;
}

.brand-sub {
    margin-top: 8px;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-soft);
    font-weight: 600;
}

.nav-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(43, 43, 43, 0.55);
    font-weight: 600;
    padding: 0 10px;
    margin: 18px 0 8px;
}
.nav-eyebrow:first-of-type {
    margin-top: 0;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition:
        background 120ms ease,
        color 120ms ease;
}
.nav-item:hover {
    background: var(--sidebar-hover);
}
.nav-item.active {
    background: var(--text);
    color: #fff;
}
.nav-item.active svg {
    color: var(--accent);
}
.nav-item svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    color: var(--text-soft);
}

.sidebar-spacer {
    flex: 1;
}

.user-card {
    border-top: 1px solid rgba(43, 43, 43, 0.08);
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.user-card-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
}
.user-meta {
    flex: 1;
    min-width: 0;
}
.user-name {
    font-size: 13px;
    font-weight: 600;
}
.user-role {
    font-size: 11px;
    color: var(--text-soft);
}
.user-brokerage {
    padding-top: 10px;
    border-top: 1px solid rgba(43, 43, 43, 0.08);
    font-size: 10.5px;
    color: var(--text-soft);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
    min-width: 0;
    letter-spacing: 0.01em;
}
.user-brokerage svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    color: var(--accent);
}
.user-brokerage-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.icon-btn {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: var(--text-soft);
}
.icon-btn:hover {
    background: var(--sidebar-hover);
    color: var(--text);
}
.icon-btn svg {
    width: 16px;
    height: 16px;
}

/* ============= MAIN ============= */
.main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar-h);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 5;
}
.topbar-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.topbar-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
}
.topbar-title {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.01em;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.01em;
    transition:
        background 120ms ease,
        color 120ms ease,
        transform 80ms ease;
    white-space: nowrap;
}
.btn:active {
    transform: translateY(1px);
}
.btn svg {
    width: 15px;
    height: 15px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
    background: var(--bg);
}

/* ============= CONTENT ============= */
.content {
    padding: 36px 40px 64px;
    max-width: 1480px;
    width: 100%;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
}
.page-head h1 {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 36px;
    letter-spacing: -0.02em;
    line-height: 1;
}
.page-head .subtitle {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

/* ============= STATS ============= */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 10px;
}
.dashboard-stat-grid
{
    grid-template-columns: repeat(5, 1fr) !important;
}
.stat {
    background: var(--surface);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}
.stat-label {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-label svg {
    width: 14px;
    height: 14px;
    color: var(--muted-light);
}
.stat-value {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 40px;
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--text);
}
.stat-value.accent {
    color: var(--accent);
}
.stat-value.positive {
    color: var(--positive);
}
.stat-meta {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-meta .delta {
    color: var(--positive);
    font-weight: 600;
}
.stat-meta .delta.down {
    color: var(--accent);
}

/* ============= CARDS ============= */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.card-head {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
.card-title {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.005em;
}
.card-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition:
        border-color 120ms ease,
        box-shadow 120ms ease;
    width: 100%;
}
.input:focus {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(43, 43, 43, 0.06);
}
.input-wrap {
    position: relative;
}
.input-wrap svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--muted);
}
.input-wrap .input {
    padding-left: 32px;
}

/* ============= TABLE ============= */
.table-wrap {
    overflow-x: auto;
}
table.app-table {
    width: 100%;
    border-collapse: collapse;
}
.app-table th {
    text-align: left;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--muted);
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    background: #fbfaf7;
}
.app-table td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}
.app-table tr:last-child td {
    border-bottom: none;
}
.app-table tr:hover td {
    background: #fcfbf8;
}

.biz-name {
    font-weight: 600;
    color: var(--text);
}
.biz-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.amount {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.pill.bca {
    color: #1a4d7a;
    background: #e6f0f9;
}
.pill.mca {
    color: #6b3a1a;
    background: #f5e8da;
}
.pill.sif {
    color: #4d2d6b;
    background: #eee5f5;
}

.stage {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}
.stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted-light);
    position: relative;
}
.stage.pre-checks .stage-dot {
    background: var(--warning-text);
}
.stage.pre-qualify .stage-dot {
    background: #c28419;
}
.stage.indicative-terms .stage-dot {
    background: #1a4d7a;
}
.stage.credit-decision .stage-dot {
    background: #2f6fb8;
}
.stage.pre-funding .stage-dot {
    background: #4d2d6b;
}
.stage.legal .stage-dot {
    background: #6b3a1a;
}
.stage.funding .stage-dot {
    background: var(--positive);
    box-shadow: 0 0 0 3px var(--positive-soft);
}
.stage.rejected .stage-dot {
    background: var(--accent);
}
/* legacy aliases for backwards compatibility */
.stage.underwriting .stage-dot {
    background: #2f6fb8;
}
.stage.approved .stage-dot {
    background: var(--positive);
}
.stage.funded .stage-dot {
    background: var(--positive);
    box-shadow: 0 0 0 3px var(--positive-soft);
}

.pill.funded {
    color: var(--positive);
    background: var(--positive-soft);
}
.pill.rejected {
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 0;
}
.toolbar-left {
    display: flex;
    gap: 12px;
    align-items: center;
}
.toolbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.amount-positive {
    color: var(--positive);
    font-weight: 700;
}
.amount-muted {
    color: var(--muted);
}

/* contact page hero icon block */
.contact-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
    margin-bottom: 36px;
}
.contact-info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
}
.contact-info-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.contact-info-row:last-child {
    border-bottom: none;
}
.contact-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.contact-info-icon svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}
.contact-info-block .label {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}
.contact-info-block .value {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 15px;
    margin-top: 3px;
}
.contact-info-block .sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* footer of card */
.card-foot {
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: #fbfaf7;
}
.pager, .card-foot .pagination {
    display: flex;
    gap: 4px;
}
.pager button, .card-foot .pagination li {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    font-size: 12px;
    color: var(--muted);
}
.pager button:hover {
    background: var(--bg);
    color: var(--text);
}
.pager button.active, .card-foot .pagination li.active {
    background: var(--accent);
    color: #fff;
}
.pager button svg {
    width: 12px;
    height: 12px;
}

/* ============= CONTACTS ============= */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.contact {
    background: var(--surface);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contact-role {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}
.contact-name {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.005em;
}
.contact-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-soft);
}
.contact-lines a:hover {
    color: var(--accent);
}
.contact-line {
    display: flex;
    align-items: center;
    gap: 8px;
}
.contact-line svg {
    width: 13px;
    height: 13px;
    color: var(--muted);
}

/* ============= TWO-COL GRID ============= */
.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-head h2 {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -0.01em;
}
.section-head .section-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

/* ============= COMMISSION CALCULATOR ============= */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: stretch;
}
.calc-grid > .card {
    display: flex;
    flex-direction: column;
}
.calc-grid > div:not(.card) {
    display: flex;
}
.calc-grid > div:not(.card) > .results {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.calc-formula-strip {
    grid-column: 1 / -1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 22px;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    flex-wrap: wrap;
}
.calc-formula-head {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    flex-shrink: 0;
}
.calc-formula-body {
    color: var(--text-soft);
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    align-items: center;
}
.calc-formula-body b {
    color: var(--accent);
    font-weight: 700;
}
.calc-formula-body .sep {
    color: var(--muted-light);
    font-weight: 400;
}

.tabs {
    display: inline-flex;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 3px;
    gap: 2px;
    margin-bottom: 10px;
}
.tab {
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition:
        background 120ms,
        color 120ms;
}
.tab svg {
    width: 14px;
    height: 14px;
}
.tab.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(43, 43, 43, 0.08);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
}
.field-label {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.field-label .hint {
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
    color: var(--muted-light);
}

.amount-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    transition:
        border-color 120ms,
        box-shadow 120ms;
}
.amount-input:focus-within {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(43, 43, 43, 0.06);
}
.amount-input .symbol {
    padding: 0 14px;
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--muted);
    border-right: 1px solid var(--border);
}
.amount-input input {
    flex: 1;
    border: none;
    outline: none;
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.01em;
    padding: 14px 16px;
    background: transparent;
    color: var(--text);
}

.slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.slider-track {
    position: relative;
    height: 6px;
    background: var(--border);
    border-radius: 999px;
}
.slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
}
input[type="range"].slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 22px;
    background: transparent;
    margin-top: -14px;
    position: relative;
    z-index: 2;
}
input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--accent);
    box-shadow: 0 1px 3px rgba(43, 43, 43, 0.18);
    cursor: pointer;
    transition: transform 120ms;
}
input[type="range"].slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}
input[type="range"].slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--accent);
    box-shadow: 0 1px 3px rgba(43, 43, 43, 0.18);
    cursor: pointer;
}
.slider-scale {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted-light);
    font-weight: 500;
}
.slider-current {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 20px;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* commission rate field */
.rate-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.rate-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
}
.rate-input input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 14px;
    background: transparent;
    color: var(--text);
}
.rate-input .suffix {
    padding: 0 14px;
    font-size: 14px;
    color: var(--muted);
    border-left: 1px solid var(--border);
}

/* results panel */
.results {
    background: var(--text);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
}
.results::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle at top right, rgba(214, 69, 46, 0.18), transparent 70%);
    pointer-events: none;
}
.results-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.results-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}
.results-title {
    margin-top: 12px;
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.commission-display {
    margin-top: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.commission-amount {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 64px;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--accent);
}
.commission-meta {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.breakdown {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
}
.breakdown-row .label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}
.breakdown-row .value {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.formula-card {
    margin-top: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
}
.formula-head {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 14px;
}
.formula-line {
    font-family: "Barlow", sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-soft);
    line-height: 1.6;
}
.formula-line .var {
    color: var(--accent);
    font-weight: 700;
}

/* ============= UTIL ============= */
.divider {
    height: 1px;
    background: var(--border);
    margin: 36px 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 18px;
    transition: color 120ms;
}
.back-link:hover {
    color: var(--accent);
}
.back-link svg {
    width: 13px;
    height: 13px;
}

/* ============= PRODUCT PICKER ============= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}
.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--text);
    box-shadow: 0 12px 28px -16px rgba(43, 43, 43, 0.18);
}
.product-card.featured {
    border-color: var(--accent);
    border-width: 1px;
}
.product-card .featured-tag {
    position: absolute;
    top: -10px;
    left: 24px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}
.product-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
}
.product-icon svg {
    width: 22px;
    height: 22px;
    color: var(--text);
}
.product-card.bca .product-icon {
    background: #e6f0f9;
    border-color: #d6e5f1;
}
.product-card.bca .product-icon svg {
    color: #1a4d7a;
}
.product-card.mca .product-icon {
    background: #f5e8da;
    border-color: #e8d6be;
}
.product-card.mca .product-icon svg {
    color: #6b3a1a;
}
.product-card.sif .product-icon {
    background: #eee5f5;
    border-color: #e0d2ee;
}
.product-card.sif .product-icon svg {
    color: #4d2d6b;
}

.product-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}
.product-name {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 26px;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-top: -4px;
}
.product-tag {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.5;
}
.product-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.product-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-soft);
}
.product-features li::before {
    content: "";
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    margin-top: 7px;
    flex-shrink: 0;
}
.product-meta {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.product-meta-block .meta-label {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}
.product-meta-block .meta-value {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 14px;
    margin-top: 3px;
}
.product-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    letter-spacing: 0.01em;
}
.product-cta svg {
    width: 14px;
    height: 14px;
    transition: transform 180ms;
}
.product-card:hover .product-cta {
    color: var(--accent);
}
.product-card:hover .product-cta svg {
    transform: translateX(3px);
}

/* ============= STEPPER ============= */
.stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 32px;
    max-width: 720px;
}
.stepper-step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.stepper-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    display: grid;
    place-items: center;
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--muted);
}
.stepper-circle svg {
    width: 13px;
    height: 13px;
    color: #fff;
}
.stepper-label {
    font-size: 12px;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: var(--muted);
}
.stepper-line {
    flex: 1;
    height: 1px;
    background: var(--border-strong);
    margin: 0 14px;
}
.stepper-step.active .stepper-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.stepper-step.active .stepper-label {
    color: var(--text);
}
.stepper-step.complete .stepper-circle {
    background: var(--text);
    border-color: var(--text);
}
.stepper-step.complete .stepper-label {
    color: var(--text);
}
.stepper-step.complete + .stepper-line {
    background: var(--text);
}

/* ============= FORM ============= */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.form-section {
    padding: 32px 36px;
}
.form-section + .form-section {
    border-top: 1px solid var(--border);
}
.form-section-head {
    margin-bottom: 24px;
}
.form-section-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}
.form-section-title {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.01em;
    margin-top: 4px;
}
.form-section-sub {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
}
.form-grid .full {
    grid-column: 1 / -1;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: 0.01em;
}
.form-field label .required {
    color: var(--accent);
    margin-left: 2px;
}

.form-field .input,
.form-field select,
.form-field textarea {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 11px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition:
        border-color 120ms,
        box-shadow 120ms;
    width: 100%;
}
.form-field textarea {
    min-height: 96px;
    resize: vertical;
    font-family: inherit;
}
.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237A7A7A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.form-field .input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(43, 43, 43, 0.06);
}
.form-field .helper {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.input-prefix {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
}
.input-prefix:focus-within {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(43, 43, 43, 0.06);
}
.input-prefix .prefix {
    padding: 0 14px;
    font-weight: 700;
    font-size: 14px;
    color: var(--muted);
    border-right: 1px solid var(--border);
}
.input-prefix input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    padding: 11px 14px;
    background: transparent;
    color: var(--text);
}

/* dropzone */
.dropzone {
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    background: #fbfaf7;
    transition:
        border-color 180ms,
        background 180ms;
    cursor: pointer;
}
.dropzone:hover,
.dropzone.dragover {
    border-color: var(--accent);
    background: #fcf1ee;
}
.dropzone svg {
    width: 28px;
    height: 28px;
    color: var(--muted);
    margin-bottom: 10px;
}
.dropzone-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}
.dropzone-sub {
    color: var(--muted);
    font-size: 12px;
}
.dropzone-files {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dropzone-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 13px;
}
.dropzone-file svg {
    width: 13px;
    height: 13px;
    color: var(--muted);
}
.dropzone-file .name {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropzone-file .remove {
    color: var(--muted);
    cursor: pointer;
}
.dropzone-file .remove:hover {
    color: var(--accent);
}

/* form actions */
.form-actions {
    background: #fbfaf7;
    border-top: 1px solid var(--border);
    padding: 18px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.form-actions .info {
    font-size: 12px;
    color: var(--muted);
}
.form-actions .actions {
    display: flex;
    gap: 10px;
}

/* Success state */
.success-state {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 64px 48px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--positive-soft);
    display: grid;
    place-items: center;
}
.success-icon svg {
    width: 30px;
    height: 30px;
    color: var(--positive);
}
.success-title {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 28px;
    letter-spacing: -0.01em;
}
.success-sub {
    color: var(--muted);
    max-width: 480px;
}
.success-ref {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 18px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Barlow", monospace;
    font-weight: 700;
    font-size: 14px;
}
.success-ref .label {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}
.success-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

/* ============= DETAIL HERO ============= */
.detail-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}
.detail-hero-left {
    flex: 1;
}
.detail-hero-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-hero-eyebrow .pill {
    margin-left: 4px;
    letter-spacing: 0.04em;
}
.detail-hero h1 {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 32px;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-top: 10px;
}
.detail-hero-meta {
    margin-top: 12px;
    display: flex;
    gap: 20px;
    color: var(--muted);
    font-size: 13px;
}
.detail-hero-meta .item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.detail-hero-meta .item svg {
    width: 13px;
    height: 13px;
}
.detail-hero-actions {
    display: flex;
    gap: 8px;
}

.app-docs-card
{
    margin-bottom: 5px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: stretch;
}

/* timeline */
.timeline {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 4px;
}
.timeline-item {
    position: relative;
    padding: 0 0 24px 28px;
    border-left: 1.5px solid var(--border-strong);
}
.timeline-item:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}
.timeline-item::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border-strong);
}
.timeline-item.done::before {
    background: var(--positive);
    border-color: var(--positive);
}
.timeline-item.active::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft);
}
.timeline-time {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}
.timeline-title {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 15px;
    margin-top: 4px;
}
.timeline-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

/* fact list */
.facts {
    display: flex;
    flex-direction: column;
}
.fact-row {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 18px;
}
.fact-row:last-child {
    border-bottom: none;
}
.fact-row .label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.fact-row .value {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-align: right;
    color: var(--text);
}

/* documents */
.doc-list {
    display: flex;
    flex-direction: column;
}
.doc-row {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
}
.doc-row:last-child {
    border-bottom: none;
}
.doc-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.doc-icon svg {
    width: 16px;
    height: 16px;
    color: var(--text-soft);
}
.doc-meta {
    flex: 1;
    min-width: 0;
}
.doc-name {
    font-weight: 600;
    font-size: 13px;
}
.doc-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

/* ============= API INTEGRATION ============= */
.api-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
}
.codeblock {
    background: var(--text);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
}
.codeblock-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.codeblock-head .lang {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
}
.codeblock-head .copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.codeblock-head .copy:hover {
    color: #fff;
}
.codeblock-head .copy svg {
    width: 13px;
    height: 13px;
}
pre.code {
    font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre;
    overflow-x: auto;
}
pre.code .k {
    color: #f7ad7e;
} /* keyword */
pre.code .s {
    color: #9ed88f;
} /* string */
pre.code .v {
    color: #9dc8f0;
} /* var */
pre.code .c {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.api-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 8px 8px 8px 14px;
}
.api-key-row .key-text {
    flex: 1;
    font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
    font-size: 13px;
    color: var(--text);
    letter-spacing: 0.02em;
    user-select: all;
}

/* toggle */
.toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}
.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle .slider-knob {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-strong);
    border-radius: 999px;
    transition: 180ms;
}
.toggle .slider-knob::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 180ms;
}
.toggle input:checked + .slider-knob {
    background: var(--accent);
}
.toggle input:checked + .slider-knob::before {
    transform: translateX(16px);
}

.api-row {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.api-row:last-child {
    border-bottom: none;
}
.api-row .label-block {
    flex: 1;
}
.api-row .label-block .name {
    font-weight: 600;
    font-size: 14px;
}
.api-row .label-block .desc {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

/* ============= DEBTOR REPEATER (SIF) ============= */
.debtor-row {
    display: grid;
    grid-template-columns: 1fr 1fr 36px;
    gap: 10px;
    margin-top: 8px;
    align-items: center;
}
.debtor-row .icon-btn {
    width: 36px;
    height: 36px;
}

/* ============= OPEN BANKING ACCOUNT LIST ============= */
.ob-account-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ob-account {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: #fbfaf7;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.ob-account.ob-pending {
    background: var(--warning-soft);
    border-color: #e8d09a;
}
.ob-bank {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.ob-bank > svg {
    width: 18px;
    height: 18px;
    color: var(--text-soft);
    flex-shrink: 0;
}
.ob-account.ob-pending .ob-bank > svg {
    color: var(--warning-text);
}
.ob-bank-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}
.ob-bank-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
}
.ob-time {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
}

/* ============= COMPACT PIPELINE TABLE ============= */
.app-table.compact th {
    padding: 11px 20px;
}
.app-table.compact td {
    padding: 11px 20px;
    font-size: 13px;
}
.app-table.compact .biz-name {
    font-size: 13px;
}
.app-table.compact .biz-sub {
    font-size: 11px;
}
.app-table.compact .amount {
    font-size: 13.5px;
}
.app-table.compact .stage {
    font-size: 12px;
}

/* ============= FILTER POPOVER ============= */
.filter-wrap {
    position: relative;
}
.filter-wrap .btn.has-count::after {
    content: attr(data-count);
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: 2px;
    min-width: 16px;
    text-align: center;
}
.filter-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px -12px rgba(43, 43, 43, 0.18);
    padding: 16px 18px;
    z-index: 10;
    display: none;
}
.filter-popover.open {
    display: block;
}
.filter-group + .filter-group {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.filter-group-head {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 10px;
}
.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.filter-chip {
    padding: 6px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
    transition:
        border-color 120ms,
        background 120ms,
        color 120ms;
}
.filter-chip:hover {
    border-color: var(--text);
}
.filter-chip.active {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.filter-popover-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.filter-clear {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
}
.filter-clear:hover {
    color: var(--accent);
}

/* ============= HORIZONTAL TIMELINE ============= */
.timeline-h {
    position: relative;
    padding: 12px 8px 4px;
}
.timeline-h-track {
    display: grid;
    grid-template-columns: repeat(var(--cols, 7), 1fr);
    position: relative;
}
.timeline-h-track::before {
    content: "";
    position: absolute;
    top: 13px;
    left: calc(100% / 14);
    right: calc(100% / 14);
    height: 2px;
    background: var(--border-strong);
    border-radius: 2px;
    z-index: 0;
}
.timeline-h-track::after {
    content: "";
    position: absolute;
    top: 13px;
    left: calc(100% / 14);
    height: 2px;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--positive), var(--accent));
    border-radius: 2px;
    z-index: 1;
    transition: width 300ms ease;
}
.timeline-h-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    text-align: center;
}
.timeline-h-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border-strong);
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    transition:
        background 180ms,
        border-color 180ms,
        box-shadow 180ms;
}
.timeline-h-dot svg {
    width: 13px;
    height: 13px;
    color: transparent;
}
.timeline-h-item.done .timeline-h-dot {
    background: var(--positive);
    border-color: var(--positive);
}
.timeline-h-item.done .timeline-h-dot svg {
    color: #fff;
}
.timeline-h-item.active .timeline-h-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 6px var(--accent-soft);
}
.timeline-h-item.active .timeline-h-dot::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}
.timeline-h-title {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -0.005em;
    color: var(--muted);
    line-height: 1.2;
    margin-bottom: 4px;
    min-height: 16px;
}
.timeline-h-item.done .timeline-h-title {
    color: var(--text);
}
.timeline-h-item.active .timeline-h-title {
    color: var(--accent);
}
.timeline-h-time {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-light);
    font-weight: 600;
    margin-bottom: 8px;
    min-height: 12px;
}
.timeline-h-item.done .timeline-h-time,
.timeline-h-item.active .timeline-h-time {
    color: var(--muted);
}
.timeline-h-note {
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--muted);
    padding: 0 4px;
}
.timeline-h-item.active .timeline-h-note {
    color: var(--text-soft);
}

@media (max-width: 1100px) {
    .timeline-h-track {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }
    .timeline-h-track::before,
    .timeline-h-track::after {
        display: none;
    }
    .timeline-h-item {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 12px;
        padding: 8px 0;
        border-left: 1.5px solid var(--border-strong);
        padding-left: 16px;
    }
    .timeline-h-item.done {
        border-left-color: var(--positive);
    }
    .timeline-h-item.active {
        border-left-color: var(--accent);
    }
    .timeline-h-dot {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .timeline-h-title,
    .timeline-h-time,
    .timeline-h-note {
        min-height: 0;
    }
}

/* ============= AGREEMENT BANNER ============= */
.agreement-banner {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    overflow: hidden;
}
.agreement-banner.needs-send {
    background: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 100%);
    color: #fff;
    border: 1px solid #000;
}
.agreement-banner.needs-send::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(214, 69, 46, 0.22), transparent 55%);
    pointer-events: none;
}
.agreement-banner.sent {
    background: var(--warning-soft);
    border: 1px solid #e8d09a;
    color: var(--warning-text);
}
.agreement-banner.signed {
    background: var(--positive-soft);
    border: 1px solid #bfe0cd;
    color: var(--positive);
}
.agreement-banner > * {
    position: relative;
    z-index: 1;
}
.agreement-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.agreement-banner.needs-send .agreement-icon {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 20px -6px rgba(214, 69, 46, 0.5);
}
.agreement-banner.sent .agreement-icon {
    background: #fff;
    color: var(--warning-text);
    border: 1px solid #e8d09a;
}
.agreement-banner.signed .agreement-icon {
    background: #fff;
    color: var(--positive);
    border: 1px solid #bfe0cd;
}
.agreement-icon svg {
    width: 26px;
    height: 26px;
}
.agreement-content {
    min-width: 0;
}
.agreement-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.agreement-banner.needs-send .agreement-eyebrow {
    color: var(--accent);
}
.agreement-banner.needs-send .agreement-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}
.agreement-title {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.agreement-banner.needs-send .agreement-title {
    color: #fff;
}
.agreement-sub {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 640px;
}
.agreement-banner.needs-send .agreement-sub {
    color: rgba(255, 255, 255, 0.7);
}
.agreement-meta {
    margin-top: 10px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 600;
}
.agreement-meta .item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.agreement-meta .item svg {
    width: 13px;
    height: 13px;
}
.agreement-banner.needs-send .btn-primary {
    box-shadow: 0 6px 20px -6px rgba(214, 69, 46, 0.6);
}

/* ============= MODAL ============= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.55);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-overlay.open {
    display: flex;
}
.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 620px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.45);
    animation: modalIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
    from {
        transform: translateY(12px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
.modal-head {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.modal-head .modal-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}
.modal-head .modal-title {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -0.01em;
    margin-top: 4px;
}
.modal-head .modal-sub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: var(--muted);
    flex-shrink: 0;
}
.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}
.modal-close svg {
    width: 16px;
    height: 16px;
}
.modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
}
.modal-foot {
    padding: 18px 28px;
    border-top: 1px solid var(--border);
    background: #fbfaf7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.modal-foot .info {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.modal-foot .info svg {
    width: 13px;
    height: 13px;
}

/* Companies House panel */
.ch-panel {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px 20px;
    margin-bottom: 22px;
}
.ch-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 14px;
}
.ch-panel-head svg {
    width: 13px;
    height: 13px;
    color: var(--accent);
}
.ch-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
}
.ch-row + .ch-row {
    border-top: 1px solid var(--border);
}
.ch-row .ch-label {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    padding-top: 1px;
}
.ch-row .ch-value {
    font-weight: 600;
    color: var(--text);
}

/* Director selection */
.director-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.director-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    transition:
        border-color 120ms,
        background 120ms;
}
.director-option:hover {
    border-color: var(--text);
    background: #fcfbf8;
}
.director-option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.director-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    flex-shrink: 0;
    position: relative;
    transition: border-color 120ms;
}
.director-option.selected .director-radio {
    border-color: var(--accent);
    border-width: 5px;
}
.director-info {
    flex: 1;
    min-width: 0;
}
.director-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}
.director-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.director-email {
    font-size: 12px;
    color: var(--text-soft);
    font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
    margin-top: 4px;
}

.field-label-block {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.field-label-block .hint {
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
    color: var(--muted-light);
    font-size: 11px;
}

/* Status list for sent/signed banner */
.agreement-status-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}
.agreement-action-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.agreement-action-time {
    font-size: 11px;
    font-weight: 600;
    color: var(--warning-text);
    opacity: 0.75;
    white-space: nowrap;
    letter-spacing: 0.02em;
    margin-right: 25px;
}
.agreement-banner.signed .agreement-action-time {
    color: var(--positive);
}
.agreement-status-list .item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.agreement-status-list .item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.agreement-status-list .item .time {
    color: var(--muted);
    font-size: 12px;
    margin-left: auto;
}
.agreement-banner.signed .agreement-status-list .item .time,
.agreement-banner.sent .agreement-status-list .item .time {
    opacity: 0.7;
}

@media (max-width: 700px) {
    .agreement-banner {
        grid-template-columns: auto 1fr;
    }
    .agreement-banner .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .api-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    .calc-grid {
        grid-template-columns: 1fr;
    }
}

/* ============= AUTH ============= */
.auth-body {
    background: var(--bg);
    min-height: 100vh;
}
.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    position: relative;
}
.auth-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 12% 18%, rgba(230, 211, 184, 0.55), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(214, 69, 46, 0.08), transparent 48%);
    pointer-events: none;
    z-index: 0;
}
.auth-wrap > * {
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 40px 44px 32px;
    box-shadow:
        0 1px 0 rgba(43, 43, 43, 0.04),
        0 24px 64px -32px rgba(43, 43, 43, 0.22);
}
.auth-card.wide {
    max-width: 520px;
}

.auth-brand {
    text-align: center;
    padding-bottom: 26px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.auth-brand .brand-mark {
    font-size: 24px;
}
.auth-brand .brand-sub {
    margin-top: 10px;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-soft);
    font-weight: 600;
}

.auth-title {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 28px;
    letter-spacing: -0.02em;
    line-height: 1;
}
.auth-sub {
    margin-top: 10px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 14px;
}

.auth-alt-link {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.auth-alt-link a {
    color: var(--accent);
    font-weight: 700;
}
.auth-alt-link a:hover {
    text-decoration: underline;
}

.auth-terms {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    margin-top: 16px;
    line-height: 1.6;
}
.auth-terms a {
    color: var(--accent);
    font-weight: 600;
}
.auth-terms a:hover {
    text-decoration: underline;
}

.auth-footer {
    margin-top: 22px;
    font-size: 12px;
    color: var(--muted-light);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.auth-footer a {
    color: var(--muted);
    font-weight: 500;
    transition: color 120ms;
}
.auth-footer a:hover {
    color: var(--accent);
}
.auth-footer .sep {
    color: var(--muted-light);
    opacity: 0.6;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
}

/* ============= PRODUCT GUIDE LINK (inside product cards) ============= */
.product-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    align-self: flex-start;
    padding: 4px 0;
    transition: color 160ms ease;
}
.product-guide-link:hover {
    color: var(--accent);
}
.product-guide-link svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* ============= HELP STRIP (new application page) ============= */
.help-strip {
    margin-top: 36px;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 16px;
}
.help-strip-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.help-strip-icon svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}
.help-strip-body {
    flex: 1;
    min-width: 0;
}
.help-strip-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}
.help-strip-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

@media (max-width: 900px) {
    .help-strip {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============= AGREEMENT GATING ============= */
.agreement-gated {
    opacity: 0.55;
    cursor: not-allowed !important;
}

/* ============= SIMULATION TOGGLE ============= */
.sim-toggle {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 50;
    background: var(--text);
    color: #fff;
    padding: 12px 16px 14px;
    border-radius: 10px;
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.45);
    font-size: 12px;
    user-select: none;
    min-width: 220px;
}
.sim-toggle-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 10px;
}
.sim-toggle-head svg {
    flex-shrink: 0;
}
.sim-toggle-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sim-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 0;
    font-weight: 500;
    line-height: 1.3;
}
.sim-toggle-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition:
        background 120ms,
        border-color 120ms;
}
.sim-toggle-row input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.6);
}
.sim-toggle-row input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M2.5 7.5L5.5 10.5L11.5 4' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 10px;
}
.sim-toggle-row input[type="checkbox"]:checked::after {
    content: "";
    width: 8px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

/* ============= AUTH CHECKBOX ============= */
.auth-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}
.auth-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-strong);
    border-radius: 4px;
    background: var(--surface);
    cursor: pointer;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition:
        border-color 120ms,
        background 120ms;
}
.auth-check input[type="checkbox"]:hover {
    border-color: var(--text);
}
.auth-check input[type="checkbox"]:checked {
    background-color: var(--accent);
    border-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M2.5 7.5L5.5 10.5L11.5 4' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
}
.auth-check-label {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.4;
}
.auth-check-label strong {
    color: var(--text);
    font-weight: 700;
}

/* ============= INLINE AUTH SUCCESS ============= */
.auth-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 0 4px;
}
.auth-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--positive-soft);
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}
.auth-success-icon svg {
    width: 26px;
    height: 26px;
    color: var(--positive);
}
.auth-success-title {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: -0.015em;
    line-height: 1.15;
    color: var(--text);
}
.auth-success-message {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    max-width: 360px;
}
.auth-success-email {
    font-weight: 700;
    color: var(--text);
}

/* ============= BRAND LOGO ============= */
.brand-logo {
    display: block;
    width: 150px;
    height: auto;
    user-select: none;
}
.auth-brand .brand-logo {
    width: 190px;
    margin: 0 auto;
}

.d-none
{
    display: none !important;
}
.w-100
{
    width: 100% !important;
}
.text-center
{
    text-align: center !important;
}

.otp-inputs
{
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}
.otp-inputs input
{
    width: 40px;
    height: 45px;
    text-align: center;
    font-size: 24px;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}
.otp-inputs input:focus
{
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}
.no-reg-add-name
{
    color: #ea3d38;
    font-size: 12px;
    font-weight: 600;
}
input:read-only, input:read-only
{
    background-color: #f8f9fa !important;
    opacity: 1;
}

.is-invalid
{
    border-color: #d03f3f !important;
    padding-right: calc(1.5em + .9rem) !important;
}
.invalid-feedback 
{
    width: 100%;
    margin-top: .25rem;
    font-size: .75rem;
    color: #d03f3f;
}

.modal > form {
    display: contents;
}

.screen-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.loader-gif {
    width: 30px;
    height: 30px;
}

.field-label-actions {
    display: flex;
    gap: 8px;
}
.field-label-actions .btn {
    padding: 4px 10px;
    font-size: 12px;
}

/* Don't let the DT wrapper itself be the scroll container */
.card .dataTables_wrapper {
    overflow-x: visible;
}

/* Only the column that actually holds the table scrolls horizontally */
.card .dataTables_wrapper .row > .col-sm-12:has(> table.dataTable),
.card .dataTables_wrapper .row > [class*="col-"]:has(> table.dataTable) {
    overflow-x: auto;
}

/* Belt-and-braces: pagination row never scrolls */
.card .card-foot {
    overflow: visible;
}

/* Stop the outer wrapper from being the scroll container */
.table-wrap {
    overflow: visible;
}

/* Scroll only the column that contains the table */
.table-wrap .dt-container > .row > .col-12 {
    overflow-x: auto;
}

.table-wrap:has(.dt-container) {
    overflow: visible;
}
.table-wrap .dt-container > .row > .col-12 {
    overflow-x: auto;
}

.bg-success {
    background-color: #b4fed2 !important;
    color: #0c5132;
}

.bg-warning {
    background-color: #d6452e !important;
    color: #fff;
}

.badge {
    padding: 0.5em 0.8em;
    font-size: 10px;
    border-radius: 5px;
}
.mt-1
{
    margin-top: 7px;
}

.ub-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 30, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.ub-modal.is-open {
    display: flex;
    opacity: 1;
}
.ub-modal-dialog {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.06);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.18s ease;
}
.ub-modal.is-open .ub-modal-dialog {
    transform: translateY(0) scale(1);
}
.ub-modal-header {
    padding: 22px 24px 18px;
    border-bottom: 1px solid #eef0f4;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.ub-modal-header .card-title {
    color: #0f172a !important;
    font-size: 17px;
    font-weight: 700;
}
.ub-modal-header .card-sub {
    color: #64748b !important;
    font-size: 13px;
}
.ub-modal-close {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.ub-modal-close:hover {
    color: #0f172a;
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.ub-modal-close svg { width: 16px; height: 16px; }
.ub-modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    flex: 1;
    background: #ffffff;
}
.ub-modal-body label {
    color: #64748b !important;
}
.ub-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eef0f4;
    background: #fafbfc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============= DROPZONE ============= */
.ub-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    color: #475569;
}
.ub-dropzone:hover {
    border-color: var(--accent, #3b82f6);
    background: #eff6ff;
    color: var(--accent, #3b82f6);
}
.ub-dropzone.has-files {
    padding: 18px;
}
.ub-dropzone-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}
.ub-dropzone:hover .ub-dropzone-title {
    color: var(--accent, #3b82f6);
}
.ub-dropzone-sub {
    font-size: 12px;
    color: #64748b;
}

/* ============= FILE LIST ============= */
.ub-file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ub-file-list:empty { display: none; }
.ub-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.ub-file-row svg {
    width: 18px;
    height: 18px;
    color: var(--accent, #3b82f6);
    flex-shrink: 0;
}
.ub-file-meta { flex: 1; min-width: 0; }
.ub-file-name {
    font-size: 13px;
    color: #0f172a;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ub-file-size {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

/* ============= FLASH / ALERT MESSAGES ============= */
.display-messages {
    width: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.alert-danger {
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-color: #f0c8be;
}

.alert-success {
    background: var(--positive-soft);
    color: var(--positive);
    border-color: #bfe0cd;
}











/* ============= MOBILE NAV (drawer controls) ============= */
.topbar-lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-left { min-width: 0; }
.topbar-title { min-width: 0; }

.nav-toggle {
    display: none;            /* shown only in the drawer breakpoint */
    place-items: center;
    width: 40px; height: 40px;
    border-radius: var(--radius);
    color: var(--text);
    flex-shrink: 0;
    border: 1px solid var(--border-strong);
    background: var(--surface);
}
.nav-toggle:hover { background: var(--bg); }
.nav-toggle svg { width: 20px; height: 20px; }

.sidebar-close {
    display: none;            /* shown only in the drawer breakpoint */
    place-items: center;
    position: absolute;
    top: 22px; right: 16px;
    width: 34px; height: 34px;
    border-radius: var(--radius);
    color: var(--text-soft);
    z-index: 2;
}
.sidebar-close:hover { background: var(--sidebar-hover); color: var(--text); }
.sidebar-close svg { width: 18px; height: 18px; }

.nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(43, 43, 43, 0.46);
    z-index: 55;
    opacity: 0; visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
    -webkit-tap-highlight-color: transparent;
}

.rate-input { min-width: 0; }
.rate-input input { min-width: 0; width: 100%; }
.amount-input input { min-width: 0; }

.dropzone-file {
    gap: 10px;
    text-align: left;          /* undo the centered dropzone text */
}
.dropzone-file .name {
    flex: 1;
    min-width: 0;              /* allow the row to shrink */
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropzone-file svg { flex-shrink: 0; }
.dropzone-file .fname {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;       /* long filename truncates instead of overflowing */
}
.dropzone-file .fsize { flex-shrink: 0; color: var(--muted); font-weight: 400; }
.dropzone-file .remove { flex-shrink: 0; white-space: nowrap; }
.ub-file-remove
{
    font-size: 30px;
}

/* =====================================================================
   RESPONSIVE — tablet & mobile
   1100px stats→2up | 1024px sidebar→drawer | 640px topbar/controls stack
   ===================================================================== */
@media (max-width: 1100px) {
    .stat-grid     { grid-template-columns: repeat(2, 1fr); }
    .contacts-grid { grid-template-columns: 1fr; }
    .calc-grid     { grid-template-columns: 1fr; }
}

/* ---- Sidebar becomes an off-canvas drawer ---- */
@media (max-width: 1024px) {
    .app { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; top: 0; left: 0;
        height: 100vh; height: 100dvh;
        width: 284px; max-width: 84vw;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 48px -8px rgba(43, 43, 43, 0.4);
        overflow-y: auto;
    }
    body.nav-open { overflow: hidden; }
    body.nav-open .sidebar      { transform: translateX(0); }
    body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }
    .nav-toggle   { display: grid; }
    .sidebar-close{ display: grid; }
    .topbar { padding: 0 24px; }
    .topbar-title { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .topbar-right .btn { padding: 9px 13px; }
    .content { padding: 28px 24px 56px; }
}

/* ---- Phones: action buttons wrap to their own row; controls stack ---- */
@media (max-width: 640px) {
    .topbar { flex-wrap: wrap; height: auto; min-height: 60px; padding: 11px 16px; gap: 10px; }
    .topbar-lead   { flex: 1 1 100%; }
    .topbar-eyebrow{ display: none; }
    .topbar-title  { font-size: 17px; }
    .topbar-right  { flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; gap: 8px; display: none; }
    .topbar-right .btn { flex: 0 1 auto; }

    .content { padding: 20px 16px 48px; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 16px; }
    .page-head h1 { font-size: 28px; }

    .section-head { flex-direction: column; align-items: stretch; gap: 14px; }
    .section-head .card-actions { width: 100%; flex-wrap: wrap; }
    .section-head .card-actions .input-wrap { width: 100% !important; flex: 1 1 100%; }
    .section-head .card-actions .filter-wrap,
    .section-head .card-actions .filter-wrap .btn { width: 100%; }
    .filter-popover { right: auto; left: 0; width: 100%; max-width: 320px; }

    .toolbar-left, .toolbar-right { flex-wrap: wrap; }
    .card-head { flex-wrap: wrap; gap: 12px; }

    .auth-card
    {
        padding: 40px 20px;
    }
    .auth-title, .auth-sub
    {
        text-align: center;
    }

    #filter-popover .btn-primary
    {
        width: 55px;
    }
    #rate, #sif-rate
    {
        width: 60px;
    }
    .stage-dot
    {
        width: 12px;
    }
    .commission-calculator-tabs
    {
        width: 100%;
    }
    .commission-calculator-tabs .tab
    {
        width: 50%;
    }
}

/* ---- Compact stat cards ---- */
@media (max-width: 600px) {
    .stat { padding: 18px; }
    .stat-value { font-size: 32px; }
}
@media (max-width: 460px) {
    .stat-grid { grid-template-columns: 1fr; }
}


/* =====================================================================
   RESPONSIVE — application form, application details, submitted pages
   ===================================================================== */

/* ---- Tablet & below ---- */
@media (max-width: 768px) {
    /* Application form: tighter padding */
    .form-section { padding: 24px 20px; }
    .form-actions { padding: 16px 20px; }

    /* Application details: hero stacks */
    .detail-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 22px 20px;
        gap: 18px;
    }
    .detail-hero h1 { font-size: 26px; }
    .detail-hero-actions { flex-wrap: wrap; }

    .app-docs-card
    {
        margin-bottom: 30px;
    }
}

/* ---- Phones ---- */
@media (max-width: 640px) {
    /* Form: single-column fields */
    .form-grid { grid-template-columns: 1fr; }

    /* Form: progress stepper collapses to a compact numbered strip
       (labels like "Owner / Director" overflow on narrow screens) */
    .stepper { margin-bottom: 24px; }
    .stepper-label { display: none; }
    .stepper-line { margin: 0 8px; }

    /* Form: action bar stacks, buttons go full width */
    .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .form-actions .actions { width: 100%; }
    .form-actions .actions .btn { flex: 1 1 auto; justify-content: center; }

    /* Details: hero meta wraps, action buttons fill width */
    .detail-hero-meta { flex-wrap: wrap; gap: 8px 16px; }
    .detail-hero-actions .btn { flex: 1 1 auto; justify-content: center; }

    /* Submitted: success card padding + stacked buttons */
    .success-state { padding: 40px 22px; }
    .success-title { font-size: 22px; }
    .success-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .success-actions .btn { justify-content: center; }
}

/* ---- Small phones ---- */
@media (max-width: 480px) {
    .debtor-row { grid-template-columns: 1fr 1fr 32px; gap: 8px; }
    .api-row { gap: 12px; }
}

@media (max-width: 380px) {
    .rate-row { grid-template-columns: 1fr; }
}

/* ----- Stage notes ABOVE the dots: active always shown, others on hover (desktop) ----- */
@media (min-width: 1101px) {
    .timeline-h-note {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(100% + 14px);
        width: 210px;
        padding: 10px 12px;
        text-align: left;
        background: var(--surface);          /* opaque — covers the heading behind it */
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: 0 12px 30px -10px rgba(43, 43, 43, 0.3);
        opacity: 0;
        visibility: hidden;
        transition: opacity 160ms ease;
        z-index: 20;                         /* paints above the card heading */
    }

    .timeline-h-item:hover .timeline-h-note {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 1100px) {
    .timeline-h-item { flex-wrap: wrap; cursor: pointer; }

    .timeline-h-note {
        display: none;
        flex-basis: 100%;
        width: 100%;
        margin-top: 4px;
    }

    /* every stage — including active — only on tap */
    .timeline-h-item.note-open .timeline-h-note { display: block; }
}


/* ============= DIRECTORS REPEATER ============= */
.directors-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.directors-title {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.005em;
    color: var(--text);
}
.directors-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}
.btn-add-director svg {
    width: 13px;
    height: 13px;
}
.director-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 22px 24px;
    margin-bottom: 16px;
}
.director-card:last-child {
    margin-bottom: 0;
}
.director-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.director-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    color: var(--text-soft);
}
.director-avatar svg {
    width: 16px;
    height: 16px;
}
.director-heading {
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
}
.director-remove {
    margin-left: auto;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--muted);
    transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}
.director-remove:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}
.director-remove svg {
    width: 15px;
    height: 15px;
}
.director-section-title {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin: 22px 0 14px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
@media (max-width: 640px) {
    .directors-head {
        flex-direction: column;
    }
    .director-card {
        padding: 18px 16px;
    }
}

/* ============= NOTES ACCORDION ============= */
.notes-accordion {
    margin-bottom: 20px;
}
.notes-accordion .accordion-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.notes-accordion .accordion-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--surface);
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.005em;
    color: var(--text);
    text-align: left;
    transition: background 120ms ease;
}
.notes-accordion .accordion-button:hover {
    background: #fcfbf8;
}
.notes-accordion .accordion-button::after {
    content: "";
    width: 14px;
    height: 9px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%232B2B2B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(180deg);
    transition: transform 180ms ease;
}
.notes-accordion .accordion-button.collapsed::after {
    transform: rotate(0deg);
}
.notes-accordion .accordion-collapse {
    border-top: 1px solid var(--border);
}
.notes-accordion .accordion-collapse.collapse:not(.show) {
    display: none;
}
.notes-accordion .accordion-body {
    padding: 16px 20px 18px;
}
.notes-accordion textarea.form-control {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 11px 14px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    min-height: 110px;
    resize: vertical;
    outline: none;
    transition: border-color 120ms, box-shadow 120ms;
}
.notes-accordion textarea.form-control::placeholder {
    color: var(--muted-light);
}
.notes-accordion textarea.form-control:focus {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(43, 43, 43, 0.06);
}
.notes-accordion .accordion-collapse { display: none; }
.notes-accordion .accordion-collapse.show { display: block; }

/* ============================================================
   FAQ / SUPPORT PAGE
   Append to your existing portal stylesheet — uses the same
   design tokens (--accent, --surface, --border, radii, Barlow).
   ============================================================ */
.faq-page {
    max-width: 880px;
}

/* section grouping label ("Getting started", "Commission", …) */
.faq-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    margin: 34px 0 14px;
}
.faq-section-head:first-of-type {
    margin-top: 8px;
}
.faq-section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ---------- accordion item ---------- */
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-item > summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: "Barlow", sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.005em;
    color: var(--text);
    transition: background 120ms ease;
    user-select: none;
}
.faq-item > summary::-webkit-details-marker { display: none; } /* Safari */
.faq-item > summary:hover { background: #fcfbf8; }
.faq-item > summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.faq-item[open] > summary {
    border-bottom: 1px solid var(--border);
}

.faq-q {
    flex: 1;
    min-width: 0;
}

.faq-chevron {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--muted);
    transition: transform 200ms ease, color 200ms ease;
}
.faq-item[open] > summary .faq-chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

/* ---------- answer body ---------- */
.faq-body {
    padding: 16px 20px 18px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-soft);
}
.faq-body > p { margin: 0; }
.faq-body > p + p { margin-top: 10px; }
.faq-body strong { color: var(--text); font-weight: 700; }
.faq-body a {
    color: var(--accent);
    font-weight: 600;
}
.faq-body a:hover { text-decoration: underline; }

/* ---------- "video" badge on a summary ---------- */
.faq-video-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 3px 9px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}
.faq-video-badge svg {
    width: 9px;
    height: 9px;
    fill: currentColor;
}

/* ---------- media inside answers ---------- */
.faq-video,
.faq-body .responsive-image {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.faq-video { background: #000; }

/* ---------- nested accordions (product-specific videos) ---------- */
.faq-body .faq-item {
    background: #fbfaf7;
    border-radius: var(--radius);
    margin-top: 12px;
    margin-bottom: 8px;
}
.faq-body .faq-item:last-child { margin-bottom: 0; }
.faq-body .faq-item > summary {
    padding: 12px 16px;
    font-size: 13.5px;
    font-weight: 700;
}
.faq-body .faq-item .faq-body {
    padding: 12px 16px 14px;
    font-size: 13.5px;
}
/* second level of nesting sits back on white so it stays legible */
.faq-body .faq-body .faq-item {
    background: var(--surface);
    border-color: var(--border-strong);
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
    .faq-item > summary { padding: 14px 16px; font-size: 14px; }
    .faq-body { padding: 14px 16px 16px; }
    .faq-video-badge { font-size: 9px; padding: 2px 7px; margin-left: 8px; }
}


/* ============= WELCOME / ANNOUNCEMENT BANNER ============= */
.welcome-banner {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 10px;
    overflow: hidden;
}
.welcome-banner::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(214, 69, 46, 0.10), transparent 62%);
    pointer-events: none;
}
.welcome-banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
}
.welcome-main {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.welcome-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.welcome-icon svg {
    width: 26px;
    height: 26px;
}
.welcome-content {
    flex: 1;
    min-width: 0;
    padding-right: 28px; /* keep text clear of the dismiss button */
}
.welcome-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.welcome-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.8s ease-in-out infinite;
}
.welcome-title {
    font-family: "Barlow", sans-serif;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--text);
}
.welcome-sub {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-soft);
    max-width: 720px;
}
.welcome-list {
    list-style: none;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.welcome-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-soft);
}
.welcome-list li svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 1px;
}
.welcome-list li strong {
    color: var(--text);
    font-weight: 700;
}
.welcome-list li a {
    color: var(--accent);
    font-weight: 700;
}
.welcome-list li a:hover {
    text-decoration: underline;
}
.welcome-dismiss {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: var(--muted);
}
.welcome-dismiss:hover {
    background: var(--bg);
    color: var(--text);
}
.welcome-dismiss svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .welcome-banner {
        padding: 22px 20px;
    }
    .welcome-main {
        flex-direction: column;
        gap: 16px;
    }
    .welcome-icon {
        width: 46px;
        height: 46px;
    }
    .welcome-title {
        font-size: 20px;
    }
    .welcome-content {
        padding-right: 20px;
    }
}

@media (min-width: 1025px) {
    .main { grid-column: 2; }
}