:root {
    --canvas: #f5f7fb;
    --surface: #ffffff;
    --surface-muted: #edf3f6;
    --ink: #172f45;
    --muted: #66798a;
    --line: #d9e2e8;
    --violet: #7658d9;
    --violet-strong: #5d43be;
    --teal: #178f88;
    --teal-soft: #e0f3ee;
    --gold: #b57209;
    --gold-soft: #fff3dc;
    --red: #bd3f51;
    --red-soft: #fdebed;
    --shadow: 0 12px 32px rgba(23, 47, 69, 0.08);
}

* { box-sizing: border-box; }

html { min-width: 0; background: var(--canvas); scrollbar-gutter: stable; }

body {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0;
    overflow-x: hidden;
}

button,
input,
select,
textarea { font: inherit; letter-spacing: 0; }

button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 { color: var(--ink); line-height: 1.18; }

h1 { margin-bottom: 0; font-size: 28px; font-weight: 730; }

h2 { margin-bottom: 0; font-size: 21px; font-weight: 720; }

h3 { margin-bottom: 4px; font-size: 17px; font-weight: 700; }

small { color: var(--muted); }

code {
    overflow: hidden;
    color: #344b5f;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eyebrow {
    margin-bottom: 5px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    text-transform: uppercase;
}

.muted-copy { margin-bottom: 0; color: var(--muted); }

.text-link { color: var(--violet-strong); font-weight: 650; }

.text-link:hover { color: var(--teal); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid var(--violet);
    border-radius: 6px;
    color: #ffffff;
    background: var(--violet);
    box-shadow: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover { border-color: var(--violet-strong); background: var(--violet-strong); }

.button:active { transform: translateY(1px); }

.button--secondary { border-color: #cdd8e3; color: var(--ink); background: var(--surface); }

.button--secondary:hover { border-color: var(--teal); color: var(--teal); background: var(--surface); }

.google-sign-in {
    border-color: #cdd8e3;
    color: var(--ink);
    background: #ffffff;
}

.google-sign-in:hover { border-color: #9fb1c0; color: var(--ink); background: #f8fafc; }

.google-sign-in__mark { flex: 0 0 auto; width: 18px !important; height: 18px !important; }

.button--danger { border-color: #a93647; background: var(--red); }

.button--danger:hover { border-color: #90293a; background: #a93647; }

.button--wide { width: 100%; }

.button--small { min-height: 34px; padding: 7px 10px; font-size: 12px; }

.button svg { width: 16px; height: 16px; }

.icon-button {
    display: inline-grid;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.icon-button:hover { border-color: var(--line); color: var(--violet-strong); background: var(--surface); }

.icon-button svg { width: 18px; height: 18px; }

.notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #405466;
    background: var(--surface);
    font-size: 14px;
}

.notice ul { margin: 0; padding-left: 18px; }

.notice--success { border-color: #a6d9cd; color: #176258; background: var(--teal-soft); }

.notice--error { border-color: #efb6be; color: #8d2634; background: var(--red-soft); }

.notice--warning { border-color: #efd39c; color: #79500c; background: var(--gold-soft); }

.notice--info { border-color: #c9d8e8; color: #2d587a; background: #edf6fd; }

.pending-review-banner {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #efacc0;
    border-left: 4px solid #c54970;
    border-radius: 8px;
    color: #70243e;
    background: #fff0f5;
}

.pending-review-banner__icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    color: #922746;
    background: #fde0e9;
}

.pending-review-banner__icon svg { width: 17px; height: 17px; }

.pending-review-banner__eyebrow {
    margin: 0 0 4px;
    color: #922746;
    font-size: 11px;
    font-weight: 760;
    line-height: 1.2;
    text-transform: uppercase;
}

.pending-review-banner__title { margin: 0 0 5px; font-size: 16px; }

.pending-review-banner__copy { margin: 0; color: inherit; font-size: 13px; }

label { display: grid; gap: 6px; color: #3e5466; font-size: 13px; font-weight: 680; }

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid #bfccd6;
    border-radius: 6px;
    outline: none;
    color: var(--ink);
    background: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea { min-height: 96px; resize: vertical; }

input:focus,
select:focus,
textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(118, 88, 217, 0.13); }

input:disabled { color: var(--muted); background: var(--surface-muted); }

.field-note { color: var(--muted); font-size: 11px; font-weight: 600; }

.stacked-form { display: grid; gap: 16px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.form-grid__full { grid-column: 1 / -1; }

.checkbox-field { grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 9px; color: var(--muted); font-weight: 500; }

.checkbox-field input { width: 18px; min-height: 18px; margin-top: 1px; padding: 0; accent-color: var(--violet); }

.trap-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.guest-page { min-height: 100vh; background: #e9f5f4; }

.guest-layout {
    display: grid;
    grid-template-columns: minmax(0, 560px);
    gap: 26px;
    justify-content: center;
    min-height: 100vh;
    padding: 52px 22px 28px;
}

.guest-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.guest-brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 11px;
    color: #406071;
    font-size: 13px;
    font-weight: 720;
}

.guest-brand img { width: 180px; max-height: 50px; object-fit: contain; object-position: left center; }

.guest-brand span { padding-left: 11px; border-left: 1px solid #aac5c3; }

.locale-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-left: auto;
    padding: 4px 5px 4px 8px;
    border: 1px solid #d8e2e8;
    border-radius: 7px;
    color: #547080;
    background: #ffffff;
}

.locale-switcher > svg { flex: 0 0 auto; width: 15px; height: 15px; }

.locale-switcher select {
    width: 132px;
    min-height: 27px;
    padding: 2px 21px 2px 2px;
    border: 0;
    border-radius: 4px;
    color: #3f5969;
    background-color: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
}

.locale-switcher select:focus { box-shadow: none; outline: 2px solid rgba(118, 88, 217, .36); outline-offset: 1px; }

.locale-switcher__submit {
    min-height: 25px;
    padding: 2px 7px;
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    background: var(--violet);
    font: inherit;
    font-size: 11px;
    font-weight: 720;
}

.locale-switcher__submit:hover { background: var(--violet-strong); }

.locale-switcher--guest { margin-left: 0; background: rgba(255, 255, 255, .72); }

.auth-panel {
    padding: 31px;
    border: 1px solid #d5e5e3;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-panel__header { margin-bottom: 26px; }

.auth-switch { margin: 3px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

.onboarding-session-actions { justify-self: center; }

.onboarding-session-actions__button {
    padding: 2px 4px;
    border: 0;
    border-radius: 4px;
    color: #547080;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #b6c4cd;
    text-underline-offset: 2px;
}

.onboarding-session-actions__button:hover { color: var(--violet-strong); }

.onboarding-session-actions__button:focus-visible {
    outline: 3px solid rgba(118, 88, 217, .28);
    outline-offset: 2px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #7a8f9d;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .08em;
}

.auth-divider::before,
.auth-divider::after { flex: 1; height: 1px; background: #d8e3e8; content: ''; }

.guest-footer { display: flex; flex-wrap: wrap; gap: 18px; color: #547080; font-size: 12px; }

.guest-footer a:hover { color: var(--violet-strong); }

.guest-intro { display: grid; gap: 22px; }

.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

.button-row .button { flex: 1 1 180px; }

.pending-state { display: grid; justify-items: start; gap: 20px; }

.pending-state__icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 8px;
    color: var(--gold);
    background: var(--gold-soft);
}

.pending-state__icon svg { width: 24px; height: 24px; }

.terms-copy { display: grid; gap: 16px; color: #405466; }

.terms-copy p { margin: 0; }

.portal-page { min-height: 100vh; }

.portal-shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100vh; }

.portal-sidebar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 20;
    flex-direction: column;
    height: 100vh;
    padding: 20px 13px 16px;
    border-right: 1px solid #d8e2e8;
    background: #faffff;
    overflow-y: auto;
}

.sidebar-top { display: flex; align-items: flex-start; justify-content: space-between; padding: 2px 7px 26px; }

.portal-brand { display: grid; gap: 4px; min-width: 0; color: #587080; font-size: 11px; font-weight: 730; text-transform: uppercase; }

.portal-brand img { width: 172px; max-height: 48px; object-fit: contain; object-position: left center; }

.sidebar-close { display: none; }

.portal-nav { display: grid; gap: 3px; }

.portal-nav__item {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 40px;
    gap: 11px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #536b7b;
    font-size: 14px;
    font-weight: 650;
}

.portal-nav__item svg { flex: 0 0 auto; width: 17px; height: 17px; }

.portal-nav__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.portal-nav__item:hover { color: var(--violet-strong); background: #f2effd; }

.portal-nav__item.is-active { border-color: #d7cef9; color: var(--violet-strong); background: #eeeaff; }

.portal-nav__section { padding: 23px 10px 5px; color: #8497a5; font-size: 10px; font-weight: 760; text-transform: uppercase; }

.sidebar-bottom { display: grid; gap: 3px; margin-top: auto; }

.portal-nav__button { width: 100%; border: 1px solid transparent; background: transparent; text-align: left; }

.portal-main { min-width: 0; }

.portal-header {
    display: flex;
    align-items: center;
    min-height: 104px;
    gap: 20px;
    padding: 23px clamp(22px, 4vw, 56px);
    border-bottom: 1px solid #dce5eb;
    background: #ffffff;
}

.portal-header__title { min-width: 0; }

.portal-header__title .eyebrow { margin-bottom: 4px; }

.portal-header__title h1 { overflow-wrap: anywhere; }

.mobile-menu { display: none; }

.portal-header__actions { display: flex; align-items: center; min-width: 0; gap: 14px; margin-left: auto; }

.user-menu { display: flex; align-items: center; min-width: 0; gap: 9px; }

.user-avatar { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #ffffff; background: var(--teal); font-size: 13px; font-weight: 780; }

.user-menu__copy { display: grid; min-width: 0; }

.user-menu__copy strong { overflow: hidden; max-width: 210px; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.user-menu__copy small { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.header-notification {
    display: inline-flex;
    align-items: center;
    min-width: 30px;
    min-height: 26px;
    gap: 3px;
    padding: 4px 6px;
    border: 1px solid #d7cef9;
    border-radius: 6px;
    color: var(--violet-strong);
    background: #f6f4ff;
    font-size: 11px;
    font-weight: 760;
}

.header-notification svg { width: 15px; height: 15px; }

.portal-content { display: grid; gap: 32px; max-width: 1440px; margin: 0 auto; padding: 36px clamp(22px, 4vw, 56px) 56px; }

.referral-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border: 1px solid #bcded8;
    border-radius: 8px;
    background: #ebf8f5;
}

.referral-hero h2 { margin-bottom: 6px; }

.copy-row { display: flex; align-items: center; min-width: min(100%, 500px); max-width: 560px; gap: 8px; }

.copy-row code { display: block; min-width: 0; flex: 1; padding: 10px 12px; border: 1px solid #c5dcd9; border-radius: 6px; background: #ffffff; }

.copy-row--compact { min-width: min(100%, 380px); max-width: 480px; }

.primary-link-panel .copy-row { flex-wrap: wrap; max-width: none; }

.primary-link-panel .copy-row code { flex-basis: 100%; }

.primary-link-panel .copy-row .button { width: auto; }

.copy-button.is-copied { border-color: #96d5ca; color: #176258; background: var(--teal-soft); }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

.metric-card { display: grid; min-width: 0; min-height: 154px; align-content: start; gap: 5px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; }

.metric-card__icon { display: grid; width: 32px; height: 32px; margin-bottom: 5px; place-items: center; border-radius: 6px; color: var(--violet-strong); background: #f0edff; }

.metric-card__icon svg { width: 17px; height: 17px; }

.metric-card p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 650; }

.metric-card strong { overflow-wrap: anywhere; font-size: 24px; line-height: 1.18; }

.metric-card small { font-size: 11px; line-height: 1.35; }

.management-alert { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid #d7cef9; border-radius: 6px; color: var(--violet-strong); background: #f6f4ff; font-size: 14px; font-weight: 700; }

.management-alert svg:first-child { width: 18px; height: 18px; }

.management-alert svg:last-child { width: 17px; height: 17px; margin-left: auto; }

.content-section { min-width: 0; }

.content-section--narrow { max-width: 600px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }

.section-heading--with-copy { align-items: center; }

.section-heading h2 { margin: 0; }

.section-heading .eyebrow { margin-bottom: 4px; }

.section-heading > .muted-copy { max-width: 450px; font-size: 13px; text-align: right; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; }

.table-wrap:focus-visible { outline: 3px solid rgba(118, 88, 217, 0.28); outline-offset: 2px; }

table { width: 100%; min-width: 680px; border-spacing: 0; border-collapse: collapse; text-align: left; }

th { padding: 12px 14px; border-bottom: 1px solid var(--line); color: #718494; background: #f8fafc; font-size: 11px; font-weight: 760; line-height: 1.2; text-transform: uppercase; white-space: nowrap; }

td { max-width: 240px; padding: 13px 14px; border-bottom: 1px solid #e8eef2; color: #3d5365; font-size: 13px; vertical-align: middle; }

td strong, td small { display: block; }

tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover td { background: #fbfcfd; }

.status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 740; line-height: 1; white-space: nowrap; }

.status-badge--success { color: #176258; background: var(--teal-soft); }

.status-badge--warning { color: #81570f; background: var(--gold-soft); }

.status-badge--danger { color: #972a3a; background: var(--red-soft); }

.status-badge--neutral { color: #536b7b; background: var(--surface-muted); }

.empty-state { display: grid; justify-items: start; gap: 7px; min-height: 164px; align-content: center; padding: 22px 0; color: var(--muted); }

.empty-state > svg { width: 27px; height: 27px; color: var(--teal); }

.empty-state h2, .empty-state h3 { margin: 4px 0 0; }

.empty-state p { max-width: 440px; margin: 0; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr); align-items: start; gap: 34px; }

.context-panel { min-width: 0; padding: 20px; border-left: 3px solid var(--teal); background: #edf7f5; }

.context-panel .eyebrow { margin-bottom: 7px; }

.context-panel strong { display: block; margin-bottom: 6px; font-size: 17px; }

.context-panel .muted-copy { font-size: 13px; }

.link-list { display: grid; border-top: 1px solid var(--line); }

.link-item { display: grid; grid-template-columns: minmax(140px, 0.45fr) minmax(260px, 1fr); align-items: center; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }

.link-item strong, .link-item small { display: block; }

.link-item strong { margin-bottom: 2px; }

.link-actions { display: grid; min-width: 0; gap: 6px; justify-items: start; }

.additional-link-builder { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; }

.additional-link-builder > summary { display: grid; gap: 4px; cursor: pointer; color: var(--ink); font-weight: 760; }

.additional-link-builder > summary small { color: var(--muted); font-size: 13px; font-weight: 500; }

.additional-link-builder[open] > summary { margin-bottom: 22px; }

.referral-faq__list { display: grid; gap: 10px; }

.referral-faq__item {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.referral-faq__item > summary {
    padding: 15px 18px;
    cursor: pointer;
    color: var(--ink);
    font-size: 14px;
    font-weight: 760;
}

.referral-faq__item > summary::marker { color: var(--teal); }

.referral-faq__item > p {
    max-width: 850px;
    margin: 0;
    padding: 0 18px 17px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.payout-review-form { display: grid; min-width: 250px; gap: 7px; }

.payout-review-form select,
.payout-review-form input { min-height: 34px; padding: 5px 7px; font-size: 12px; }

.payout-payment-fields { display: grid; gap: 7px; }

.payout-payment-fields[hidden] { display: none; }

.text-button {
    min-height: 28px;
    padding: 0;
    border: 0;
    color: var(--violet-strong);
    background: transparent;
    font-size: 12px;
    font-weight: 700;
}

.text-button:hover { color: var(--teal); }

.hero-icon { flex: 0 0 auto; width: 38px; height: 38px; color: var(--teal); }

.security-panel { display: grid; min-width: 0; gap: 15px; }

.security-panel h2 { margin: 0; }

.totp-setup { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }

.qr-preview {
    display: grid;
    width: 180px;
    aspect-ratio: 1;
    place-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
}

.qr-preview svg { display: block; width: 100%; height: 100%; }

.secret-code {
    display: block;
    max-width: min(100%, 310px);
    overflow: visible;
    padding: 8px 10px;
    border: 1px solid #c5dcd9;
    border-radius: 6px;
    background: #ffffff;
    overflow-wrap: anywhere;
    white-space: normal;
}

.inline-action-form { display: grid; max-width: 420px; gap: 12px; }

.recovery-codes { display: grid; gap: 16px; }

.recovery-code-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

.recovery-code-list code {
    overflow: visible;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    text-align: center;
}

.notification-list { display: grid; border-top: 1px solid var(--line); }

.notification-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.notification-item > div { min-width: 0; }

.notification-item strong, .notification-item small { display: block; }

.notification-item p { margin: 3px 0 5px; color: var(--muted); font-size: 13px; }

.notification-item.is-unread { padding-left: 11px; border-left: 3px solid var(--teal); }

.outbox-list { display: grid; gap: 10px; }

.outbox-message {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.outbox-message > div { min-width: 0; }

.outbox-message strong, .outbox-message small { display: block; }

.outbox-message pre {
    max-width: 100%;
    margin: 8px 0 0;
    overflow-wrap: anywhere;
    color: #405466;
    font: 12px/1.5 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.partner-review-table {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.partner-review-table__table { min-width: 0; table-layout: fixed; }

.partner-review-table__applicant { width: 18%; }

.partner-review-table__company { width: 14%; }

.partner-review-table__code { width: 12%; }

.partner-review-table__channel { width: 16%; }

.partner-review-table__email { width: 8%; }

.partner-review-table__status { width: 10%; }

.partner-review-table__actions { width: 22%; }

.partner-review-table__table th,
.partner-review-table__table td { overflow-wrap: anywhere; word-break: break-word; }

.partner-review-table__table td:last-child { max-width: none; }

.partner-review-table__table code { display: block; min-width: 0; }

.partner-review-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }

.partner-review-actions form { margin: 0; }

.partner-review-actions .text-button { min-height: 34px; }

.partner-review-actions__waiting { color: var(--muted); font-size: 12px; line-height: 1.35; }

.partner-review-actions__danger { color: #a93647; }

.partner-review-actions__danger:hover { color: #90293a; }

.materials-grid { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.materials-grid--logo-banners + .materials-grid--campaign-creatives { margin-top: 40px; }

.material-card { display: flex; min-width: 0; overflow: hidden; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 8px 22px rgba(23, 47, 69, 0.05); }

.material-card--wide { grid-column: span 2; }

.material-card__preview { position: relative; display: grid; overflow: hidden; min-height: 0; aspect-ratio: 6 / 5; place-items: center; border-bottom: 1px solid var(--line); background: #102f46; }

.material-card--wide .material-card__preview { aspect-ratio: 12 / 5; }

.material-card__preview::after { position: absolute; inset: 0; pointer-events: none; content: ''; background: linear-gradient(125deg, rgba(9, 35, 57, 0.08), transparent 55%, rgba(118, 88, 217, 0.12)); }

.material-card__preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }

.material-card--wide .material-card__preview img { object-position: right center; }

.material-card__preview:hover img { transform: scale(1.025); }

.material-card--logo .material-card__preview { background: #ffffff; }

.material-card--logo.material-card--wide { grid-column: span 1; }

.material-card--logo .material-card__preview { height: 88px; aspect-ratio: auto; }

.material-card--logo .material-card__preview::after { display: none; }

.material-card--logo .material-card__preview img { position: absolute; inset: 0; box-sizing: border-box; width: 100%; height: 100%; padding: 10px 16px; object-fit: contain; object-position: center; }

.material-card--logo-cropped .material-card__preview img { object-fit: cover; object-position: center 47%; }

.material-card--logo .material-card__preview:hover img { transform: none; }

.material-card--logo .material-card__body { min-height: 52px; padding: 9px 12px; }

.material-card--logo.material-card--transparent .material-card__preview {
    background-color: #eef3f6;
    background-image: linear-gradient(45deg, rgba(122, 145, 160, 0.14) 25%, transparent 25%), linear-gradient(-45deg, rgba(122, 145, 160, 0.14) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(122, 145, 160, 0.14) 75%), linear-gradient(-45deg, transparent 75%, rgba(122, 145, 160, 0.14) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.material-card__body { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 67px; padding: 13px; }

.material-card__body > div { min-width: 0; }

.material-card__body strong, .material-card__body small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.material-card__body strong { margin-bottom: 3px; font-size: 13px; }

.inline-form { display: flex; align-items: center; min-width: 190px; gap: 5px; }

.inline-form select { min-height: 34px; padding: 5px 7px; font-size: 12px; }

.inline-form .icon-button { width: 34px; height: 34px; }

.provider-action-form {
    display: grid;
    grid-template-columns: minmax(148px, 1fr) auto;
    min-width: 230px;
    gap: 6px;
}

.provider-action-form select { min-height: 34px; padding: 5px 7px; font-size: 12px; }

.provider-state-actions { display: flex; flex-wrap: wrap; min-width: 178px; gap: 6px; }

.provider-state-actions form { margin: 0; }

.coupon-provider-copy { min-width: 188px; }

.coupon-provider-copy + .coupon-provider-copy { margin-top: 7px; }

.coupon-provider-copy summary { cursor: pointer; color: var(--ink); font-size: 12px; }

.coupon-provider-copy[open] summary { margin-bottom: 8px; }

.coupon-provider-chooser {
    width: min(520px, calc(100vw - 32px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 24px 72px rgba(18, 44, 65, 0.28);
    background: #ffffff;
}

.coupon-provider-chooser::backdrop { background: rgba(20, 43, 60, 0.44); }

.coupon-provider-chooser .stacked-form { padding: 24px; }

.provider-sync-pending { display: inline-flex; align-items: center; min-width: 174px; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }

.provider-sync-pending svg { width: 15px; height: 15px; color: var(--gold); }

.policy-checks { display: grid; gap: 8px; }

.partner-terms-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(76px, 1fr)) 34px;
    min-width: 410px;
    gap: 6px;
}

.partner-terms-form input { min-width: 0; min-height: 34px; padding: 5px 7px; font-size: 12px; }

.partner-terms-form .icon-button { width: 34px; height: 34px; }

.compliance-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.compliance-status-grid .metric-card strong { display: block; min-height: 24px; }

.compliance-status-grid .metric-card small { overflow-wrap: anywhere; }

.compliance-action-form { margin-top: 7px; }

.compliance-review-form {
    display: grid;
    grid-template-columns: minmax(102px, auto) minmax(132px, 1fr) 34px;
    align-items: center;
    min-width: 315px;
    gap: 6px;
}

.compliance-review-form select,
.compliance-review-form input { min-width: 0; min-height: 34px; padding: 5px 7px; font-size: 12px; }

.compliance-review-form .icon-button { width: 34px; height: 34px; }

.compliance-review-form--actions {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
}

.compliance-reveal { padding: 20px; border: 1px solid #d7cef9; border-radius: 8px; background: #f8f7ff; }

.compliance-detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; }

.compliance-detail-list div { min-width: 0; }

.compliance-detail-list dt { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 760; text-transform: uppercase; }

.compliance-detail-list dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 14px; line-height: 1.45; }

.portal-page.qr-drawer-open { overflow: hidden; }

.qr-drawer {
    position: fixed;
    z-index: 40;
    inset: 0;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 180ms;
}

.qr-drawer[hidden] { display: none; }

.qr-drawer.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }

.qr-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 47, 69, 0.42);
    opacity: 0;
    transition: opacity 180ms ease;
}

.qr-drawer__panel {
    display: grid;
    position: absolute;
    top: 0;
    right: 0;
    align-content: start;
    gap: 18px;
    width: min(440px, 100vw);
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    box-shadow: -18px 0 42px rgba(23, 47, 69, 0.18);
    transform: translateX(100%);
    transition: transform 180ms ease;
}

.qr-drawer.is-open .qr-drawer__backdrop { opacity: 1; }

.qr-drawer.is-open .qr-drawer__panel { transform: translateX(0); }

.qr-drawer__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.qr-drawer__header h2,
.qr-drawer__label { margin-bottom: 0; }

.qr-drawer__preview {
    display: grid;
    width: min(320px, 100%);
    aspect-ratio: 1;
    margin: 4px auto;
    padding: 14px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.qr-drawer__preview svg { display: block; width: 100%; height: 100%; }

.qr-drawer__label { color: var(--ink); font-weight: 700; }

.qr-drawer__value {
    display: block;
    overflow-wrap: anywhere;
    white-space: normal;
}

.portal-overlay { display: none; }

@media (max-width: 1120px) {
    .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .materials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .referral-hero { align-items: flex-start; flex-direction: column; }
    .copy-row { width: 100%; max-width: none; }
}

@media (max-width: 880px) {
    .portal-shell { grid-template-columns: minmax(0, 1fr); }
    .portal-sidebar { position: fixed; width: min(290px, calc(100vw - 28px)); visibility: hidden; pointer-events: none; transform: translateX(-110%); transition: transform 180ms ease, visibility 0s linear 180ms; box-shadow: var(--shadow); }
    .portal-page.menu-open { overflow: hidden; }
    .portal-page.menu-open .portal-sidebar { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
    .portal-page.menu-open .portal-overlay { display: block; position: fixed; z-index: 15; inset: 0; background: rgba(23, 47, 69, 0.38); }
    .sidebar-close { display: grid; }
    .mobile-menu { display: grid; }
    .portal-header { min-height: 88px; padding: 18px 24px; }
    .portal-content { gap: 29px; padding: 29px 24px 48px; }
    .split-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .context-panel { border-top: 3px solid var(--teal); border-left: 0; }
    .portal-sidebar { overflow-y: auto; }
}

@media (max-width: 760px) {
    .partner-review-table { border: 0; background: transparent; }
    .partner-review-table__table,
    .partner-review-table__table tbody,
    .partner-review-table__table tr,
    .partner-review-table__table td { display: block; width: 100%; }
    .partner-review-table__table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }
    .partner-review-table__table tbody { display: grid; gap: 12px; }
    .partner-review-table__table tr { border: 1px solid var(--line); border-radius: 8px; background: #ffffff; }
    .partner-review-table__table td {
        display: grid;
        grid-template-columns: minmax(104px, 0.42fr) minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        max-width: none;
        padding: 10px 13px;
        border-bottom: 1px solid #e8eef2;
    }
    .partner-review-table__table td::before {
        content: attr(data-label);
        color: #718494;
        font-size: 11px;
        font-weight: 760;
        line-height: 1.3;
        text-transform: uppercase;
    }
    .partner-review-table__table td:last-child { border-bottom: 0; }
    .partner-review-actions { justify-content: flex-start; }
}

@media (max-width: 620px) {
    h1 { font-size: 24px; }
    h2 { font-size: 19px; }
    .guest-layout { gap: 20px; padding: 30px 15px 22px; }
    .guest-topbar { align-items: flex-start; gap: 10px; }
    .guest-brand { align-items: flex-start; flex-direction: column; gap: 7px; }
    .guest-brand img { width: 170px; }
    .guest-brand span { padding: 0; border: 0; }
    .auth-panel { padding: 22px 18px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .portal-header { align-items: flex-start; gap: 12px; padding: 16px 16px; }
    .portal-content { gap: 26px; padding: 25px 16px 42px; }
    .pending-review-banner { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 13px; }
    .pending-review-banner__icon { width: 28px; height: 28px; }
    .portal-header__title { flex: 1; }
    .portal-header__actions { gap: 7px; }
    .locale-switcher { gap: 4px; padding: 3px 4px 3px 6px; }
    .locale-switcher > svg { display: none; }
    .locale-switcher select { width: 107px; min-height: 26px; font-size: 11px; }
    .locale-switcher__submit { min-height: 24px; padding: 2px 5px; font-size: 10px; }
    .user-menu__copy { display: none; }
    .user-avatar { width: 32px; height: 32px; }
    .referral-hero { gap: 17px; padding: 18px; }
    .metrics-grid { grid-template-columns: minmax(0, 1fr); }
    .compliance-status-grid { grid-template-columns: minmax(0, 1fr); }
    .compliance-detail-list { grid-template-columns: minmax(0, 1fr); }
    .metric-card { min-height: 133px; }
    .section-heading, .section-heading--with-copy { align-items: flex-start; flex-direction: column; gap: 9px; }
    .section-heading > .muted-copy { max-width: none; text-align: left; }
    .copy-row { align-items: stretch; }
    .copy-row code { max-width: calc(100vw - 112px); }
    .primary-link-panel .copy-row code { max-width: none; }
    .primary-link-panel .copy-row .button { width: 100%; }
    .link-item { grid-template-columns: minmax(0, 1fr); gap: 11px; }
    .link-item .copy-row { min-width: 0; }
    .link-actions { width: 100%; }
    .materials-grid { grid-template-columns: minmax(0, 1fr); }
    .material-card--wide { grid-column: span 1; }
    .button { width: 100%; }
    .button--small { width: auto; }
    .management-alert { align-items: flex-start; }
    .button-row { display: grid; grid-template-columns: minmax(0, 1fr); }
    .button-row .button { width: 100%; }
    .hero-icon { width: 30px; height: 30px; }
    .totp-setup { align-items: flex-start; flex-direction: column; }
    .qr-preview { width: min(180px, 100%); }
    .qr-drawer__panel {
        width: 100vw;
        padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    }
    .recovery-code-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .notification-item { gap: 9px; }
    .outbox-message { padding: 12px; }
    .provider-action-form { min-width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
    .qr-drawer,
    .qr-drawer__backdrop,
    .qr-drawer__panel { transition: none; }
}
