:root {
    --ink: #172033;
    --muted: #667085;
    --line: #e3e7ee;
    --surface: #ffffff;
    --page: #f4f6f9;
    --brand: #b51f2e;
    --brand-dark: #8f1421;
    --success: #177451;
    --success-soft: #e9f7f1;
    --warning: #9a6500;
    --warning-soft: #fff7df;
    --danger-soft: #fff0f1;
    --shadow: 0 18px 50px rgba(23, 32, 51, .09);
    --radius: 18px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--page); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(181, 31, 46, .08), transparent 28rem),
        var(--page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

button, input, textarea, select { font: inherit; }

a { color: inherit; }

.page-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.site-header {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid rgba(23, 32, 51, .08);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--ink);
    border-radius: 13px;
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.04em;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }

.step-badge, .platform-badge, .status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.step-badge { padding: 8px 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); }

.main-content { flex: 1; padding: 56px 0 72px; }

.hero-card, .result-card, .installer-card {
    width: min(780px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 56px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero-copy { max-width: 620px; }

.eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(30px, 5vw, 45px); line-height: 1.08; letter-spacing: -.035em; }
h2 { line-height: 1.2; letter-spacing: -.02em; }
.hero-copy p, .page-heading p, .installer-card > p, .result-card > p { color: var(--muted); font-size: 17px; }

.email-form { margin-top: 34px; }
label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }

input, textarea, select {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cfd5df;
    border-radius: 10px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

textarea { min-height: 130px; padding-top: 14px; padding-bottom: 14px; resize: vertical; }
select { appearance: none; padding-right: 38px; background-image: linear-gradient(45deg, transparent 50%, #667085 50%), linear-gradient(135deg, #667085 50%, transparent 50%); background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(181, 31, 46, .1); }

.input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.form-help { margin: 11px 0 0; color: var(--muted); font-size: 13px; }
.hp-field { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(181, 31, 46, .25); outline-offset: 2px; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button-primary { color: #fff; background: var(--ink); }
.button-primary:hover { background: #25304a; }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button-secondary:hover { border-color: #b9c1cd; }
.button-danger { color: #fff; background: var(--brand); }
.button-danger:hover { background: var(--brand-dark); }
.button-block { width: 100%; }

.sent-state {
    margin: 32px 0 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--success-soft);
    border: 1px solid #c3ead9;
    border-radius: 14px;
}

.sent-state h2 { margin-bottom: 5px; font-size: 19px; }
.sent-state p { margin: 0; color: #365d4e; }
.sent-icon, .result-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--success);
    border-radius: 999px;
    font-weight: 900;
}
.sent-icon { width: 32px; height: 32px; }

.trust-grid {
    width: min(780px, 100%);
    margin: 20px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.trust-grid article { padding: 17px; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 14px; }
.trust-grid strong, .trust-grid span { display: block; }
.trust-grid strong { margin-bottom: 4px; font-size: 13px; }
.trust-grid span { color: var(--muted); font-size: 12px; }

.alert {
    width: min(100%, 1180px);
    margin: 0 auto 22px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 14px;
}
.alert-success { color: #185c42; background: var(--success-soft); border-color: #bfe4d3; }
.alert-error { color: #8c1d29; background: var(--danger-soft); border-color: #efc0c5; }
.alert-info { color: #5f490c; background: var(--warning-soft); border-color: #eedca5; }

.account-bar {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.account-bar .eyebrow { margin: 0 0 2px; font-size: 10px; }
.account-expiry { margin-left: auto; text-align: right; }
.account-expiry span, .account-expiry strong { display: block; }
.account-expiry span { color: var(--muted); font-size: 11px; }
.account-expiry strong { color: var(--brand); font-size: 13px; }
.text-link { color: var(--brand); font-size: 14px; font-weight: 750; text-decoration: none; }

.page-heading {
    margin-bottom: 26px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}
.page-heading h1 { margin-bottom: 6px; font-size: clamp(30px, 4vw, 42px); }
.page-heading p { margin-bottom: 0; }
.page-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.account-links { display: flex; align-items: center; gap: 22px; }
.customer-page-heading { padding: 10px 0 4px; }
.customer-page-heading > div:first-child { max-width: 720px; }
.customer-preview-note { color: #5b6473; background: #fff; border-color: var(--line); }

.customer-plan-section, .customer-invoice-section { margin-top: 38px; }
.customer-section-heading {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}
.customer-section-heading .eyebrow { margin-bottom: 5px; }
.customer-section-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); }
.customer-section-count {
    padding: 7px 11px;
    color: #475467;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.plan-grid {
    width: min(860px, 100%);
    display: grid;
    gap: 20px;
}
.plan-grid.is-multiple {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.plan-card {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 92% 8%, rgba(181, 31, 46, .76), transparent 15rem),
        linear-gradient(135deg, #111827 0%, #1c2941 100%);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 24px;
    box-shadow: 0 22px 55px rgba(23, 32, 51, .2);
}
.plan-card::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -105px;
    width: 230px;
    height: 230px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 999px;
}
.plan-card-content {
    min-height: 330px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: clamp(24px, 4vw, 36px);
}
.plan-card-main { display: flex; align-items: center; gap: 18px; }
.plan-card-main > div { min-width: 0; }
.plan-symbol {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--brand);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.05em;
}
.plan-kicker {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, .66);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.plan-card h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(23px, 3vw, 31px);
    overflow-wrap: anywhere;
}
.plan-facts {
    margin: 32px 0 26px;
    padding: 0 18px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 15px;
    backdrop-filter: blur(4px);
}
.plan-facts > div {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.plan-facts dt { color: rgba(255, 255, 255, .66); font-size: 13px; }
.plan-facts dd { margin: 0; text-align: right; color: #fff; font-size: 15px; font-weight: 800; }
.plan-card-actions { width: min(360px, 100%); margin-top: auto; }
.plan-card-actions .button { min-height: 52px; }
.plan-request-state {
    padding: 15px 16px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
}
.plan-request-state span, .plan-request-state strong, .plan-request-state small { display: block; }
.plan-request-state span { margin-bottom: 4px; font-size: 14px; font-weight: 850; }
.plan-request-state strong { margin-bottom: 8px; font-size: 12px; }
.plan-request-state small { color: rgba(255, 255, 255, .72); font-size: 11px; overflow-wrap: anywhere; }
.plan-request-state.is-success { background: rgba(23, 116, 81, .38); border-color: rgba(191, 228, 211, .42); }
.plan-request-state.is-processing { background: rgba(21, 91, 117, .42); border-color: rgba(189, 226, 238, .4); }
.plan-request-state.is-warning { background: rgba(154, 101, 0, .37); border-color: rgba(238, 220, 165, .4); }
.plan-select {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 11px;
    cursor: pointer;
}
.plan-select:hover { background: rgba(255, 255, 255, .15); }
.plan-select input[type="checkbox"] {
    width: 20px;
    min-height: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    accent-color: var(--brand);
    box-shadow: none;
}
.plan-select span { font-size: 14px; font-weight: 750; }
.customer-bulk-actions { width: 100%; justify-content: flex-start; }
.customer-empty-card {
    min-height: 120px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(23, 32, 51, .04);
}
.customer-empty-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--ink);
    border-radius: 999px;
    font-weight: 850;
}
.customer-empty-card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.invoice-list { width: min(900px, 100%); display: grid; gap: 12px; }
.invoice-row {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 7px 24px rgba(23, 32, 51, .045);
}
.invoice-date-block span, .invoice-date-block strong { display: block; }
.invoice-date-block span { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.invoice-date-block strong { color: var(--ink); font-size: 17px; }
.invoice-download { min-width: 170px; }

.subscription-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.invoice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.platform-section { margin-top: 38px; }
.platform-heading {
    margin-bottom: 16px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}
.platform-heading > div { display: flex; align-items: center; gap: 10px; }
.platform-heading h2 { margin: 0; font-size: 24px; }
.platform-count { color: var(--muted); font-size: 13px; font-weight: 700; }
.platform-stripe { color: #46368a; background: #efedff; }
.platform-message {
    padding: 22px 24px;
    background: #fff;
    border: 1px dashed #cfd5df;
    border-radius: var(--radius);
}
.platform-message p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.error-state-compact { background: var(--danger-soft); border-color: #efc0c5; }
.decision-note {
    margin: -6px 0 24px;
    padding: 14px 17px;
    color: #344054;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--ink);
    border-radius: 10px;
    font-size: 14px;
}

.subscription-card {
    display: flex;
    flex-direction: column;
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(23, 32, 51, .055);
}
.invoice-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(23, 32, 51, .05);
}
.invoice-card h2 { margin-bottom: 7px; font-size: 20px; overflow-wrap: anywhere; }
.invoice-card > p { min-height: 42px; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.invoice-card .subscription-details { margin-top: 8px; }
.invoice-card .button { margin-top: auto; }
.card-topline { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.platform-badge { padding: 6px 9px; color: #3f4b61; background: #edf1f7; }
.status-badge { padding: 6px 9px; }
.status-active { color: var(--success); background: var(--success-soft); }
.status-review { color: var(--warning); background: var(--warning-soft); }
.subscription-card h2 { margin-bottom: 8px; font-size: 22px; }
.subscription-description { margin-bottom: 20px; color: var(--muted); font-size: 14px; }

.subscription-details, .result-details { margin: 12px 0 24px; }
.subscription-details > div, .result-details > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f4;
}
.subscription-details dt, .result-details dt { color: var(--muted); font-size: 13px; }
.subscription-details dd, .result-details dd { margin: 0; text-align: right; font-size: 14px; font-weight: 750; }
.subscription-details .date-value { color: var(--brand); }
.cancel-form { margin-top: auto; }
.subscription-select {
    min-height: 52px;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--brand);
    background: var(--danger-soft);
    border: 1px solid #efc0c5;
    border-radius: 10px;
    cursor: pointer;
}
.subscription-select input[type="checkbox"] {
    width: 20px;
    min-height: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--brand);
    box-shadow: none;
}
.subscription-select span { font-size: 14px; font-weight: 750; }
.bulk-actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.no-subscription-request {
    margin-top: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.invoice-help-card {
    margin-top: 38px;
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
    gap: 34px;
    padding: clamp(24px, 4vw, 38px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(23, 32, 51, .04);
}
.invoice-help-card h2 { margin-bottom: 8px; }
.invoice-help-card p { margin: 0; color: var(--muted); }
.invoice-help-card textarea { width: 100%; margin-bottom: 14px; }
.no-subscription-request p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.existing-request-summary {
    margin-top: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
    align-items: center;
    gap: 28px;
    padding: 25px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 5px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(23, 32, 51, .04);
}
.existing-request-summary.is-success { border-left-color: var(--success); }
.existing-request-summary.is-processing { border-left-color: #155b75; }
.existing-request-summary.is-warning { border-left-color: var(--warning); }
.existing-request-summary h2 { margin-bottom: 6px; }
.existing-request-summary p { margin: 0; color: var(--muted); font-size: 14px; }
.existing-request-summary dl { margin: 0; }
.existing-request-summary dl > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 0;
    border-bottom: 1px solid #edf0f4;
}
.existing-request-summary dl > div:last-child { border-bottom: 0; }
.existing-request-summary dt { color: var(--muted); font-size: 12px; }
.existing-request-summary dd { margin: 0; text-align: right; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }

.confirmation-card {
    width: min(820px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 48px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.confirmation-card h1 { font-size: clamp(30px, 5vw, 42px); }
.confirmation-intro { color: var(--muted); font-size: 17px; }
.plan-list { margin: 26px 0; display: grid; gap: 12px; }
.plan-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 17px;
    background: #f8f9fb;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.plan-item strong, .plan-item span:not(.platform-badge) { display: block; }
.plan-item span:not(.platform-badge) { margin-top: 3px; color: var(--muted); font-size: 13px; }
.plan-alert { width: 100%; margin-top: 16px; margin-bottom: 0; }
.confirmation-actions { margin-top: 26px; display: flex; justify-content: flex-end; gap: 10px; }

.confirmation-account-bar { width: min(840px, 100%); margin: 0 auto 20px; }
.request-steps {
    width: min(650px, 100%);
    margin: 0 auto 22px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    list-style: none;
}
.request-steps li { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; color: #98a2b3; font-size: 12px; }
.request-steps li::before { content: ""; position: absolute; z-index: 0; top: 15px; right: 50%; width: 100%; height: 2px; background: #dfe4eb; }
.request-steps li:first-child::before { display: none; }
.request-steps span, .request-steps strong { position: relative; z-index: 1; }
.request-steps span { width: 31px; height: 31px; display: grid; place-items: center; color: #667085; background: #fff; border: 2px solid #dfe4eb; border-radius: 999px; font-weight: 850; }
.request-steps .is-complete, .request-steps .is-current { color: var(--ink); }
.request-steps .is-complete::before, .request-steps .is-current::before { background: var(--brand); }
.request-steps .is-complete span { color: #fff; background: var(--brand); border-color: var(--brand); }
.request-steps .is-current span { color: var(--brand); border-color: var(--brand); }

.customer-confirmation-card { width: min(840px, 100%); padding: clamp(28px, 5vw, 48px); }
.customer-confirmation-card > h1 { max-width: 650px; }
.customer-confirmation-card .confirmation-intro { max-width: 650px; color: var(--muted); font-size: 16px; }
.customer-review-list { display: grid; gap: 10px; margin-top: 26px; }
.customer-review-service { display: flex; align-items: center; gap: 16px; padding: 18px; background: #f8f9fb; border: 1px solid var(--line); border-radius: 14px; }
.customer-confirmation-card > .customer-review-service { margin-top: 26px; }
.customer-review-service > div { min-width: 0; }
.customer-review-service > div > span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.customer-review-service strong { display: block; overflow-wrap: anywhere; }
.customer-review-service p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.review-service-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: var(--ink); border-radius: 12px; font-family: Georgia, serif; font-size: 13px; font-weight: 800; }
.customer-date-summary { margin-top: 22px; padding: 22px; background: linear-gradient(135deg, #172033, #25324d); border-radius: 16px; color: #fff; }
.customer-date-summary .eyebrow { color: rgba(255,255,255,.64); }
.customer-date-summary h2 { margin-bottom: 18px; font-size: 19px; }
.customer-effective-date { display: block; color: #fff; font-size: clamp(24px, 4vw, 34px); letter-spacing: -.025em; }
.customer-date-summary p { margin: 7px 0 0; color: rgba(255,255,255,.72); font-size: 14px; }
.customer-review-notice { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 15px 17px; color: #6d4d03; background: var(--warning-soft); border: 1px solid #eedca5; border-radius: 12px; }
.customer-review-notice > span { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: var(--warning); border-radius: 999px; font-weight: 850; }
.customer-review-notice p { margin: 1px 0 0; font-size: 13px; }
.confirmation-consent { margin: 22px 0 0; color: var(--muted); font-size: 13px; }

.policy-summary {
    margin: 28px 0 0;
    padding: 22px;
    background: #f8f9fb;
    border: 1px solid var(--line);
    border-radius: 16px;
}
.policy-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.policy-heading .eyebrow { margin-bottom: 5px; }
.policy-heading h2 { margin: 0; font-size: 22px; }
.policy-details { margin-bottom: 18px; }
.policy-details .date-value { color: var(--brand); }
.policy-rule {
    margin-top: 12px;
    padding: 15px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
}
.policy-rule strong, .policy-rule span, .policy-rule small { display: block; }
.policy-rule span { margin-top: 3px; color: var(--ink); font-size: 14px; }
.policy-rule small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.policy-warning {
    margin-top: 10px;
    padding: 11px 13px;
    color: #8c1d29;
    background: var(--danger-soft);
    border: 1px solid #efc0c5;
    border-radius: 9px;
    font-size: 13px;
}
.local-preview {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 11px;
}
.local-preview strong, .local-preview span, .local-preview small { display: block; }
.local-preview span { margin-top: 4px; font-size: 13px; }
.local-preview small { margin-top: 6px; opacity: .84; font-size: 12px; }
.local-ready { color: #185c42; background: var(--success-soft); border-color: #bfe4d3; }
.local-review { color: #6d4d03; background: var(--warning-soft); border-color: #eedca5; }

.empty-state {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    background: #fff;
    border: 1px dashed #cfd5df;
    border-radius: var(--radius);
}
.empty-state > span { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 18px; color: #fff; background: var(--success); border-radius: 999px; font-size: 24px; font-weight: 800; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { max-width: 480px; color: var(--muted); }
.error-state > span { background: var(--brand); }

.confirm-dialog {
    width: min(470px, calc(100% - 28px));
    padding: 0;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 28px 90px rgba(23, 32, 51, .28);
}
.confirm-dialog::backdrop { background: rgba(15, 23, 42, .62); backdrop-filter: blur(3px); }
.dialog-content { padding: 30px; text-align: center; }
.dialog-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 18px; color: var(--brand); background: var(--danger-soft); border-radius: 999px; font-size: 22px; font-weight: 900; }
.dialog-content h2 { margin-bottom: 8px; }
.dialog-content p { color: var(--muted); }
.dialog-note { padding: 10px; background: var(--warning-soft); border-radius: 8px; font-size: 13px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }

.result-card { max-width: 680px; text-align: center; }
.result-icon { width: 58px; height: 58px; margin: 0 auto 22px; font-size: 25px; }
.result-card .result-details { text-align: left; }
.result-card .button { margin-top: 4px; }
.final-result-card { max-width: 720px; }
.request-reference { margin: 26px 0 22px; padding: 20px; color: #fff; background: linear-gradient(135deg, #172033, #25324d); border-radius: 15px; }
.request-reference span, .request-reference strong, .request-reference small { display: block; }
.request-reference span { color: rgba(255,255,255,.65); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.request-reference strong { margin: 5px 0; font-size: clamp(23px, 4vw, 31px); letter-spacing: .04em; }
.request-reference small { color: rgba(255,255,255,.7); }
.customer-result-details { margin-bottom: 20px; }
.customer-result-note { padding: 15px 17px; color: #185c42; background: var(--success-soft); border: 1px solid #bfe4d3; border-radius: 12px; font-size: 14px; text-align: left; }
.result-actions { margin-top: 22px; display: flex; justify-content: center; gap: 10px; }

.installer-card { max-width: 820px; }
.check-list { margin: 28px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.check-item > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; color: #fff; font-weight: 800; }
.check-item strong, .check-item small { display: block; }
.check-item strong { font-size: 13px; }
.check-item small { color: var(--muted); overflow-wrap: anywhere; }
.check-ok > span { background: var(--success); }
.check-fail > span { background: var(--brand); }
.installer-form { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.installer-form label span { color: var(--muted); font-weight: 500; }
.installer-form input { margin-bottom: 18px; }
.next-steps { margin: 22px 0; padding: 18px; background: #f7f8fa; border-radius: 12px; }
.next-steps ol { margin-bottom: 0; }
code { padding: 2px 5px; background: #edf0f4; border-radius: 4px; }

.admin-login-card { max-width: 700px; }
.admin-inline-alert { margin: 22px 0 0; }
.admin-nav { display: flex; gap: 8px; margin: -8px 0 26px; padding: 5px; background: #e9edf3; border-radius: 12px; }
.admin-nav a { padding: 10px 14px; color: #596274; border-radius: 8px; font-size: 13px; font-weight: 800; text-decoration: none; }
.admin-nav a:hover { color: var(--ink); background: rgba(255,255,255,.65); }
.admin-nav a.is-active { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(23, 32, 51, .08); }
.admin-toolbar {
    margin-bottom: 26px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}
.admin-toolbar h1 { margin-bottom: 7px; }
.admin-toolbar p { margin: 0; color: var(--muted); }
.admin-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.admin-review-card {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(23, 32, 51, .04);
}
.admin-review-card h2 { margin-bottom: 7px; }
.admin-review-card p { min-height: 48px; margin-bottom: 22px; color: var(--muted); font-size: 14px; }
.admin-review-card input { margin-bottom: 12px; }

.reconciliation-result {
    margin-top: 26px;
    padding: clamp(22px, 4vw, 32px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(23, 32, 51, .04);
}
.reconciliation-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.reconciliation-heading h2 { margin: 0; overflow-wrap: anywhere; }
.reconciliation-detail { margin: 12px 0 22px; color: var(--muted); }
.reconciliation-badge {
    display: inline-flex;
    align-items: center;
    max-width: 360px;
    padding: 7px 10px;
    border: 1px solid;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}
.reconciliation-success { color: #185c42; background: var(--success-soft); border-color: #bfe4d3; }
.reconciliation-danger { color: #8c1d29; background: var(--danger-soft); border-color: #efc0c5; }
.reconciliation-warning { color: #6d4d03; background: var(--warning-soft); border-color: #eedca5; }
.reconciliation-neutral { color: #3f4b61; background: #f1f3f7; border-color: #dfe4eb; }
.reconciliation-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    margin: 0;
}
.reconciliation-facts > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid #edf0f4;
}
.reconciliation-facts dt { color: var(--muted); font-size: 13px; }
.reconciliation-facts dd { margin: 0; text-align: right; font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.reconciliation-platforms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.reconciliation-platforms article { padding: 16px; background: #f8f9fb; border: 1px solid var(--line); border-radius: 11px; }
.reconciliation-platforms p { margin: 6px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.reconciliation-notes { margin-top: 14px; padding: 15px 17px; border: 1px solid; border-radius: 11px; }
.reconciliation-notes ul { margin: 8px 0 0; padding-left: 20px; }
.reconciliation-notes li { margin: 4px 0; font-size: 13px; }
.reconciliation-warning-box { color: #6d4d03; background: var(--warning-soft); border-color: #eedca5; }
.reconciliation-error-box { color: #8c1d29; background: var(--danger-soft); border-color: #efc0c5; }
.reconciliation-table-wrap { margin-top: 18px; overflow-x: auto; }
.reconciliation-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.reconciliation-table th, .reconciliation-table td { padding: 12px; text-align: left; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
.reconciliation-table th { color: var(--muted); background: #f8f9fb; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.reconciliation-table td small { display: block; margin-top: 3px; color: var(--muted); }
.reconciliation-table .reconciliation-badge { border-radius: 9px; }
.batch-next-form { margin-top: 18px; display: flex; justify-content: flex-end; }

.fixture-layout { display: grid; gap: 18px; }
.fixture-wide { grid-column: 1 / -1; }
.fixture-check-card { width: 100%; }
.fixture-check-card h2 { margin-bottom: 2px; }
.fixture-check-list { margin-bottom: 0; }
.fixture-check-list .check-item { background: #fff; }
.fixture-form-card { margin-top: 0; }
.fixture-form { display: grid; gap: 22px; }
.fixture-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.fixture-form-grid > div { min-width: 0; }
.fixture-field-wide { grid-column: 1 / -1; }
.fixture-form label, .fixture-confirmation label { font-size: 12px; }
.fixture-form input, .fixture-form select { min-height: 48px; }
.fixture-form small, .fixture-confirmation small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.fixture-confirmation { padding: 18px; background: var(--warning-soft); border: 1px solid #eedca5; border-radius: 12px; }
.fixture-confirmation input { margin-top: 6px; background: #fff; }
.fixture-form > .button { justify-self: start; }
.fixture-result { margin-top: 0; }
.fixture-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fixture-result-grid section { padding: 17px; background: #f8f9fb; border: 1px solid var(--line); border-radius: 11px; min-width: 0; }
.fixture-result-grid section > strong { display: block; margin-bottom: 10px; }
.fixture-result-grid dl { margin: 0; }
.fixture-result-grid dl > div { padding: 8px 0; border-bottom: 1px solid #e6eaf0; }
.fixture-result-grid dl > div:last-child { border-bottom: 0; }
.fixture-result-grid dt { color: var(--muted); font-size: 11px; }
.fixture-result-grid dd { margin: 3px 0 0; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }

.history-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.history-stats article { padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 7px 22px rgba(23, 32, 51, .04); }
.history-stats span, .history-stats strong { display: block; }
.history-stats span { color: var(--muted); font-size: 12px; font-weight: 700; }
.history-stats strong { margin-top: 5px; font-size: 27px; }
.history-stat-attention strong { color: var(--brand); }
.history-panel { padding: clamp(20px, 3vw, 30px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(23, 32, 51, .04); }
.history-filters { display: grid; grid-template-columns: minmax(210px, 1.4fr) repeat(3, minmax(145px, .8fr)) auto; align-items: end; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.history-filters label { font-size: 12px; }
.history-filters input, .history-filters select { min-height: 46px; }
.history-filter-actions { display: flex; gap: 8px; }
.history-filter-actions .button { min-height: 46px; }
.history-panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 25px 0 16px; }
.history-panel-heading .eyebrow { margin-bottom: 4px; }
.history-panel-heading h2 { margin: 0; }
.history-panel-heading > span { color: var(--muted); font-size: 12px; }
.history-list { display: grid; gap: 11px; }
.history-entry { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.history-entry-main { display: grid; grid-template-columns: 150px minmax(190px, 1.15fr) minmax(210px, 1.4fr) 155px auto; align-items: center; gap: 18px; padding: 18px; }
.history-entry-main span:not(.history-status), .history-entry-main small { display: block; color: var(--muted); font-size: 11px; }
.history-entry-main strong { display: block; margin: 2px 0; overflow-wrap: anywhere; }
.history-reference strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.history-customer a { display: block; color: var(--brand); font-size: 13px; overflow-wrap: anywhere; }
.history-products strong, .history-date strong { font-size: 13px; }
.history-status { display: inline-flex; justify-self: end; padding: 7px 10px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 850; text-align: center; }
.history-status-neutral { color: #3f4b61; background: #f1f3f7; border-color: #dfe4eb; }
.history-status-processing { color: #155b75; background: #e9f7fb; border-color: #bde2ee; }
.history-status-success { color: #185c42; background: var(--success-soft); border-color: #bfe4d3; }
.history-status-warning { color: #6d4d03; background: var(--warning-soft); border-color: #eedca5; }
.history-status-danger { color: #8c1d29; background: var(--danger-soft); border-color: #efc0c5; }
.history-details { border-top: 1px solid var(--line); background: #f8f9fb; }
.history-details summary { padding: 13px 18px; color: #475467; font-size: 12px; font-weight: 800; cursor: pointer; }
.history-details[open] summary { border-bottom: 1px solid var(--line); }
.history-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.history-detail-grid section, .history-service-detail { padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.history-detail-grid h3, .history-service-detail h3 { margin: 0 0 12px; font-size: 15px; }
.history-detail-grid dl { margin: 0; }
.history-detail-grid dl > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid #edf0f4; }
.history-detail-grid dl > div:last-child { border-bottom: 0; }
.history-detail-grid dt { color: var(--muted); font-size: 12px; }
.history-detail-grid dd { margin: 0; text-align: right; font-size: 12px; overflow-wrap: anywhere; }
.history-service-detail { margin: 0 18px 18px; }
.history-service-list { display: grid; gap: 9px; }
.history-service-list article { display: flex; align-items: flex-start; gap: 12px; padding: 12px; background: #f8f9fb; border-radius: 9px; }
.history-service-list strong, .history-service-list small { display: block; }
.history-service-list small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.history-details > .reconciliation-notes { margin: 0 18px 18px; }
.history-empty { margin-top: 12px; }
.history-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; }
.history-pagination span { color: var(--muted); font-size: 12px; }

.site-footer {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    border-top: 1px solid rgba(23, 32, 51, .08);
    font-size: 12px;
}

@media (max-width: 980px) {
    .history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .history-filter-actions { grid-column: 1 / -1; }
    .history-entry-main { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: flex-start; }
    .history-products { grid-column: 1 / -1; }
    .history-status { justify-self: start; }
}

@media (max-width: 760px) {
    .page-shell { width: min(100% - 22px, 1180px); }
    .main-content { padding: 32px 0 52px; }
    .site-header { min-height: 76px; }
    .step-badge { display: none; }
    .input-row, .subscription-grid, .invoice-grid, .plan-grid.is-multiple, .trust-grid, .check-list, .admin-review-grid,
    .reconciliation-facts, .reconciliation-platforms, .history-stats, .history-detail-grid,
    .fixture-form-grid, .fixture-result-grid { grid-template-columns: 1fr; }
    .fixture-field-wide { grid-column: auto; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .page-heading .button { align-self: flex-start; }
    .page-heading-actions { justify-content: flex-start; }
    .hero-card, .result-card, .installer-card { border-radius: 18px; }
    .platform-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .customer-section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
    .admin-toolbar, .reconciliation-heading { align-items: flex-start; flex-direction: column; }
    .no-subscription-request { align-items: stretch; flex-direction: column; }
    .invoice-help-card { grid-template-columns: 1fr; gap: 22px; }
    .existing-request-summary { grid-template-columns: 1fr; gap: 18px; }
    .invoice-row { align-items: stretch; flex-direction: column; gap: 16px; }
    .invoice-download { width: 100%; }
    .bulk-actions .button, .no-subscription-request .button { width: 100%; }
}

@media (max-width: 480px) {
    .brand small { display: none; }
    .hero-card, .result-card, .installer-card { padding: 24px 18px; }
    h1 { font-size: 31px; }
    .subscription-card { padding: 21px 18px; }
    .subscription-details > div, .result-details > div { align-items: flex-start; flex-direction: column; gap: 3px; }
    .subscription-details dd, .result-details dd { text-align: left; }
    .dialog-actions { grid-template-columns: 1fr; }
    .account-bar { align-items: flex-start; flex-wrap: wrap; }
    .account-links { width: 100%; justify-content: space-between; gap: 14px; }
    .account-expiry { width: 100%; margin-left: 0; text-align: left; order: 3; }
    .plan-card-content { min-height: 0; padding: 24px 19px; }
    .plan-card-main { align-items: flex-start; flex-direction: column; gap: 16px; }
    .plan-symbol { width: 56px; height: 56px; border-radius: 16px; }
    .plan-facts { margin: 26px 0 22px; padding: 0 15px; }
    .plan-facts > div { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; }
    .plan-facts dd { text-align: left; }
    .confirmation-card { padding: 25px 18px; }
    .policy-heading { flex-direction: column; }
    .policy-summary { padding: 18px 14px; }
    .reconciliation-facts > div { align-items: flex-start; flex-direction: column; gap: 3px; }
    .reconciliation-facts dd { text-align: left; }
    .confirmation-actions { flex-direction: column-reverse; }
    .confirmation-actions .button { width: 100%; }
    .request-steps strong { display: none; }
}

@media (max-width: 560px) {
    .admin-nav { flex-direction: column; }
    .history-filters, .history-entry-main { grid-template-columns: 1fr; }
    .history-filter-actions, .history-products { grid-column: auto; }
    .history-filter-actions { flex-direction: column; }
    .history-panel-heading { align-items: flex-start; flex-direction: column; }
    .history-detail-grid { padding: 12px; }
    .history-service-detail, .history-details > .reconciliation-notes { margin-right: 12px; margin-left: 12px; }
    .result-actions { flex-direction: column; }
    .result-actions .button { width: 100%; }
}
