:root {
    --ink: #1a0f0c;
    --ink-soft: #6b4a42;
    --paper: #fff7f5;
    --paper-2: #f3e4df;
    --panel: #ffffff;
    --line: #ecd5ce;
    --brand: #dc2626;
    --brand-deep: #b91c1c;
    --brand-dark: #451a03;
    --brand-soft: #fecaca;
    --accent: #be123c;
    --danger: #9b1c1c;
    --ok: #15803d;
    --shadow: 0 20px 50px rgba(185, 28, 28, 0.12);
    --radius: 16px;
    --font-display: "Plus Jakarta Sans", "Arial Black", sans-serif;
    --font-body: "Inter", "Segoe UI", sans-serif;
    --font-nav: "Inter", "Segoe UI", sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(220, 38, 38, 0.16), transparent 34%),
        radial-gradient(circle at 88% 0%, rgba(69, 26, 3, 0.08), transparent 28%),
        linear-gradient(180deg, #fff9f7 0%, var(--paper) 42%, #f8ebe7 100%);
    min-height: 100dvh;
    line-height: 1.55;
}

a {
    color: var(--brand-deep);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.12;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.muted { color: var(--ink-soft); }
.center { text-align: center; }

.brand {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--brand);
    text-decoration: none;
}

.brand-center {
    display: block;
    text-align: center;
    margin-bottom: 1.5rem;
}

.brand-light { color: #ffe4e6; }

.marketing-top {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 0.85rem 0 0;
    backdrop-filter: blur(10px);
    background: linear-gradient(180deg, rgba(255, 249, 247, 0.96), rgba(255, 249, 247, 0.82));
}

.site-header,
.site-footer,
.section,
.hero-inner {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.85rem;
    background: var(--brand);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(185, 28, 28, 0.28);
    animation: rise 500ms ease both;
    font-family: var(--font-nav);
}

.site-header .brand {
    color: #ffe4e6;
    font-family: var(--font-display);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    align-items: center;
    font-family: var(--font-nav);
}

.site-nav a {
    text-decoration: none;
    color: #fecaca;
    font-family: var(--font-nav);
    font-weight: 500;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
}

.site-nav a:hover { color: #fff; }

.site-nav .btn-primary {
    background: var(--brand-dark);
    color: #fff;
    font-family: var(--font-nav);
    font-weight: 600;
}

.site-nav .btn-primary:hover {
    background: #2a1002;
}

.nav-toggle {
    display: none;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #ffe4e6;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-family: var(--font-nav);
    font-weight: 600;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover { background: var(--brand-deep); }

.btn-secondary {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.btn-on-red {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 0;
    padding-inline: 0;
}

.btn-block { width: 100%; }

/* ——— Marketing landing (Audit4U) ——— */
body.page-marketing {
    background: #140806;
    color: #1a0f0c;
    font-family: var(--font-nav);
}

body.page-marketing h1,
body.page-marketing h2,
body.page-marketing h3 {
    font-family: var(--font-display);
}

.m-wrap {
    width: min(1100px, calc(100% - 2rem));
    margin-inline: auto;
}

.m-nav-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 1rem 0 0;
}

.m-nav {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(20, 8, 6, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    animation: rise 450ms ease both;
}

.m-nav-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.03em;
}

.m-nav .site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1rem;
}

.m-nav .site-nav a {
    color: rgba(255, 228, 230, 0.88);
    text-decoration: none;
    font-family: var(--font-nav);
    font-size: 0.9rem;
    font-weight: 500;
}

.m-nav .site-nav a:hover { color: #fff; }

.btn-nav-cta {
    background: #fff !important;
    color: #b91c1c !important;
    border: 0 !important;
    font-family: var(--font-nav) !important;
    font-weight: 600 !important;
    min-height: 40px;
    padding: 0.45rem 1rem;
}

.btn-nav-cta:hover { background: #ffe4e6 !important; }

.m-nav .nav-toggle {
    display: none;
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.m-hero {
    position: relative;
    min-height: 100dvh;
    display: grid;
    align-items: end;
    overflow: hidden;
    color: #fff;
}

.m-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(20, 8, 6, 0.25) 0%, rgba(20, 8, 6, 0.55) 45%, rgba(20, 8, 6, 0.92) 100%),
        radial-gradient(ellipse 80% 60% at 70% 20%, rgba(220, 38, 38, 0.55), transparent 55%),
        linear-gradient(145deg, #7f1d1d 0%, #dc2626 38%, #9f1239 68%, #451a03 100%);
    animation: m-bg-shift 12s ease-in-out infinite alternate;
}

.m-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, #000 20%, transparent 90%);
}

.m-hero-content {
    position: relative;
    z-index: 1;
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 8rem 0 4.5rem;
    animation: rise 700ms ease both;
}

.m-kicker,
.m-label {
    margin: 0 0 0.85rem;
    font-family: var(--font-nav);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fecaca;
}

.m-logo {
    margin: 0;
    font-size: clamp(4rem, 14vw, 7.5rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.92;
    color: #fff;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.m-tagline {
    margin: 1.25rem 0 0;
    max-width: 28rem;
    font-size: clamp(1.1rem, 2.4vw, 1.35rem);
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 228, 230, 0.92);
}

.m-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.btn-hero-light {
    background: #fff;
    color: #9f1239;
    border: 0;
    font-family: var(--font-nav);
    font-weight: 600;
}

.btn-hero-light:hover { background: #ffe4e6; }

.btn-hero-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-family: var(--font-nav);
    font-weight: 600;
}

.btn-hero-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.m-section {
    padding: 5rem 0;
    background: #fffaf8;
}

.m-section-head {
    max-width: 34rem;
    margin-bottom: 2.75rem;
}

.m-section-head-center {
    margin-inline: auto;
    text-align: center;
}

.m-section-head h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #1a0f0c;
    margin-bottom: 0.75rem;
}

.m-section-head p,
.m-about-copy p {
    color: #6b4a42;
    font-size: 1.05rem;
    margin: 0.5rem 0 0;
}

.m-label { color: #dc2626; }

.m-feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid #ecd5ce;
}

.m-feature-list article {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.6rem 1.25rem 1.6rem 0;
    border-bottom: 1px solid #ecd5ce;
    animation: rise 550ms ease both;
}

.m-feature-list article:nth-child(odd) {
    padding-right: 1.75rem;
    border-right: 1px solid #ecd5ce;
}

.m-feature-list article:nth-child(even) {
    padding-left: 1.75rem;
}

.m-num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    color: #dc2626;
    letter-spacing: -0.03em;
}

.m-feature-list h3 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    color: #1a0f0c;
}

.m-feature-list p {
    margin: 0;
    color: #6b4a42;
}

.m-packages {
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.1), transparent 35%),
        #fff5f3;
}

.m-price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.m-price {
    background: #fff;
    border: 1px solid #ecd5ce;
    border-radius: 20px;
    padding: 1.6rem;
    display: grid;
    gap: 0.7rem;
    align-content: start;
    box-shadow: 0 16px 40px rgba(69, 26, 3, 0.06);
}

.m-price-hot {
    background: linear-gradient(180deg, #fff 0%, #fff1f2 100%);
    border-color: #dc2626;
    box-shadow: 0 22px 50px rgba(185, 28, 28, 0.16);
    transform: translateY(-10px);
}

.m-badge {
    margin: 0;
    width: fit-content;
    background: #dc2626;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-family: var(--font-nav);
}

.m-amount {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    color: #b91c1c;
    letter-spacing: -0.03em;
}

.m-amount span {
    font-family: var(--font-nav);
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b4a42;
}

.m-price-desc {
    margin: 0;
    color: #6b4a42;
}

.m-price ul {
    margin: 0.25rem 0 0.75rem;
    padding-left: 1.1rem;
    color: #6b4a42;
}

.m-price li { margin: 0.35rem 0; }

.m-about {
    background: #140806;
    color: #ffe4e6;
}

.m-about .m-label { color: #fda4af; }

.m-about h2 { color: #fff; }

.m-about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2rem;
    align-items: start;
}

.m-about-copy p {
    color: rgba(254, 202, 202, 0.9);
    font-size: 1.12rem;
    line-height: 1.65;
}

.m-cta {
    background:
        linear-gradient(120deg, #dc2626 0%, #9f1239 55%, #451a03 100%);
    color: #fff;
    padding: 4.5rem 0;
    text-align: center;
}

.m-cta-inner h2 {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.65rem;
}

.m-cta-inner > p {
    margin: 0 auto;
    max-width: 28rem;
    color: #fecaca;
}

.m-cta .m-hero-cta {
    justify-content: center;
}

.m-footer {
    background: #0c0504;
    color: #fecaca;
    padding: 3rem 0 1.5rem;
}

.m-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.m-footer-brand { color: #fff; display: inline-block; margin-bottom: 0.5rem; }

.m-footer h3 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.65rem;
    font-family: var(--font-nav);
    font-weight: 600;
}

.m-footer a {
    display: block;
    color: #fecaca;
    text-decoration: none;
    margin: 0.35rem 0;
    font-size: 0.95rem;
}

.m-footer a:hover { color: #fff; }

.m-footer-note {
    margin: 0 auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(254, 202, 202, 0.65);
    font-size: 0.88rem;
}

@keyframes m-bg-shift {
    from { filter: saturate(1) brightness(1); }
    to { filter: saturate(1.08) brightness(1.05); }
}

@media (max-width: 900px) {
    .m-feature-list,
    .m-price-grid,
    .m-about-grid,
    .m-footer-grid {
        grid-template-columns: 1fr;
    }

    .m-feature-list article:nth-child(odd),
    .m-feature-list article:nth-child(even) {
        padding-left: 0;
        padding-right: 0;
        border-right: 0;
    }

    .m-price-hot { transform: none; }

    .m-nav .nav-toggle { display: inline-flex; }

    .m-nav {
        flex-wrap: wrap;
        border-radius: 22px;
    }

    .m-nav .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 0.75rem;
    }

    .m-nav.is-open .site-nav { display: flex; }

    .m-hero-content { padding: 7rem 0 3.5rem; }
}

.hero-red {
    position: relative;
    overflow: hidden;
    min-height: calc(100dvh - 5.5rem);
    display: grid;
    align-items: center;
    background:
        linear-gradient(135deg, #dc2626 0%, #9f1239 55%, #451a03 100%);
    color: #fff;
    margin-top: 1rem;
}

.hero-glow {
    position: absolute;
    inset: auto -10% -30% 40%;
    height: 70%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 60%);
    pointer-events: none;
    animation: pulse 5s ease-in-out infinite;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 4.5rem 0 5rem;
    animation: rise 700ms ease both;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fecaca;
    margin: 0 0 0.85rem;
}

.hero-brand {
    font-size: clamp(3.4rem, 11vw, 6.4rem);
    font-weight: 800;
    margin: 0 0 0.85rem;
    color: #fff;
}

.hero-red .lede {
    color: #ffe4e6;
    font-size: 1.2rem;
    max-width: 36rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.hero-red .btn-primary {
    background: #fff;
    color: var(--brand-deep);
}

.hero-red .btn-primary:hover {
    background: #ffe4e6;
}

.section {
    padding: 4.5rem 0 1rem;
}

.section-head {
    max-width: 40rem;
    margin-bottom: 2rem;
}

.section-head h2,
.section h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.section-lede {
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.feature-grid,
.package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-grid article {
    padding: 1.35rem 1.25rem;
    border-top: 3px solid var(--brand);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 0 0 var(--radius) var(--radius);
    animation: rise 600ms ease both;
}

.feature-grid article:nth-child(2) { animation-delay: 60ms; }
.feature-grid article:nth-child(3) { animation-delay: 120ms; }
.feature-grid article:nth-child(4) { animation-delay: 180ms; }
.feature-grid article:nth-child(5) { animation-delay: 240ms; }
.feature-grid article:nth-child(6) { animation-delay: 300ms; }

.feature-grid h3 {
    color: var(--brand-deep);
    font-size: 1.15rem;
}

.feature-grid p {
    margin: 0.4rem 0 0;
    color: var(--ink-soft);
}

.section-packages {
    padding-bottom: 2rem;
}

.package {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: grid;
    gap: 0.85rem;
    align-content: start;
    box-shadow: var(--shadow);
}

.package-featured {
    border-color: var(--brand);
    background: linear-gradient(180deg, #fff 0%, #fff5f5 100%);
    transform: translateY(-6px);
}

.package-tag {
    margin: 0;
    display: inline-flex;
    width: fit-content;
    background: var(--brand);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
}

.package-price {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--brand);
    margin: 0;
}

.package-price span {
    font-size: 0.95rem;
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-weight: 600;
}

.package ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--ink-soft);
}

.package li { margin: 0.35rem 0; }

.about-panel {
    background: linear-gradient(135deg, #fff 0%, #ffe4e6 100%);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 4px);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow);
    max-width: 48rem;
}

.about-panel p {
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.section-cta {
    margin: 3rem auto 4rem;
    padding: 3rem 1.5rem;
    border-radius: calc(var(--radius) + 8px);
    background: linear-gradient(135deg, #dc2626, #9f1239 60%, #451a03);
    color: #fff;
    text-align: center;
}

.section-cta h2 { color: #fff; }
.section-cta .section-lede {
    color: #fecaca;
    margin-inline: auto;
}

.section-cta .hero-actions {
    justify-content: center;
}

.section-cta .btn-primary {
    background: #fff;
    color: var(--brand-deep);
}

.site-footer {
    padding: 3rem 0 2rem;
    color: #fecaca;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1.5rem;
    background: #451a03;
    border-radius: var(--radius);
    padding: 1.75rem;
}

.footer-grid h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.65rem;
}

.footer-grid a {
    display: block;
    color: #fecaca;
    text-decoration: none;
    margin: 0.35rem 0;
}

.footer-grid p { margin: 0.5rem 0 0; }

.footer-note {
    margin: 1rem 0 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.guest-shell {
    width: min(420px, calc(100% - 2rem));
    margin: 4rem auto;
}

.auth-card,
.panel,
.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-card { padding: 1.75rem; }

.stack-form {
    display: grid;
    gap: 1rem;
    margin: 1.25rem 0;
}

.stack-form label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
}

.stack-form input,
.stack-form select {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    font: inherit;
    background: #fff;
}

.field-error {
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 500;
    min-height: 1.1em;
}

.app-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100dvh;
}

.app-sidebar {
    background: linear-gradient(180deg, #7f1d1d, #451a03);
    color: #ffe4e6;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.app-sidebar .brand { color: #fff; }

.app-sidebar nav { display: grid; gap: 0.35rem; }

.app-sidebar nav a {
    color: #fecaca;
    text-decoration: none;
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.app-sidebar nav a.is-active,
.app-sidebar nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sidebar-logout { margin-top: auto; }
.sidebar-logout .btn-ghost { color: #fecaca; }

.app-main { padding: 1.25rem 1.5rem 2rem; }

.app-topbar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat { padding: 1.1rem 1.2rem; }

.stat h2 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin: 0.35rem 0 0;
    color: var(--brand-deep);
}

.panel { padding: 1.25rem; }

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.empty { color: var(--ink-soft); }
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--paper-2);
}

.toast-root {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: grid;
    gap: 0.5rem;
    z-index: 1000;
}

.toast {
    background: var(--ink);
    color: #fff;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    min-width: 240px;
    box-shadow: var(--shadow);
    animation: rise 200ms ease;
}

.toast.is-error { background: var(--danger); }

.auth-card-wide {
    max-width: 560px;
    width: min(560px, 100%);
}

.guest-shell:has(.auth-card-wide) {
    width: min(560px, calc(100% - 2rem));
}

.wizard-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    margin: 1.25rem 0 1rem;
}

.wizard-step {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    min-height: 40px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
}

.wizard-step.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.wizard-panel {
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.wizard-panel legend {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.check-row {
    display: flex !important;
    align-items: flex-start;
    gap: 0.65rem;
    font-weight: 500 !important;
}

.check-row input {
    margin-top: 0.25rem;
    min-height: auto;
    width: 1.1rem;
    height: 1.1rem;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.banner {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.banner-warn {
    background: #fff4e5;
    border: 1px solid #e8c48a;
    color: #6a3b00;
}

.banner-ok {
    background: #ffe4e6;
    border: 1px solid #fda4af;
    color: #9f1239;
}

.org-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.org-bar label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
    flex: 1;
    min-width: 220px;
}

.org-bar select {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font: inherit;
    background: #fff;
}

.small { font-size: 0.92rem; }

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

@media (max-width: 900px) {
    .feature-grid,
    .package-grid,
    .stats-grid,
    .app-shell,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .package-featured { transform: none; }

    .nav-toggle { display: inline-flex; }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 0 0.25rem;
    }

    .site-header {
        flex-wrap: wrap;
        border-radius: 22px;
    }

    .site-header.is-open .site-nav { display: flex; }

    .hero-red { min-height: auto; }
    .hero-inner { padding: 3rem 0 3.5rem; }

    .app-sidebar {
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }

    .app-sidebar nav { grid-auto-flow: column; }
    .sidebar-logout { margin-top: 0; margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ===== SPLIT AUTH LAYOUT ===== */
body.page-guest {
    background: #fafafa;
    font-family: var(--font-body);
    min-height: 100dvh;
    margin: 0;
}

.auth-split {
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: 100dvh;
}

.auth-panel {
    background:
        linear-gradient(160deg, #dc2626 0%, #9f1239 55%, #450a0a 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-panel::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -25%;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 65%);
}

.auth-panel::after {
    content: "";
    position: absolute;
    bottom: -10%;
    left: -20%;
    width: 60%;
    height: 50%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 65%);
}

.auth-panel-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 2.5rem 2rem;
    min-height: 100dvh;
}

.auth-panel-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.03em;
}

.auth-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 0;
}

.auth-panel-headline {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 0.85rem;
}

.auth-panel-sub {
    color: rgba(255, 228, 230, 0.88);
    font-size: 0.94rem;
    line-height: 1.6;
    margin: 0 0 2rem;
}

.auth-panel-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.auth-panel-perks li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.91rem;
    color: rgba(255, 228, 230, 0.92);
    line-height: 1.45;
}

.perk-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    margin-top: 1px;
}

.auth-panel-ledger {
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 1rem 1.25rem;
}

.ledger-row-sm {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    font-size: 0.87rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 228, 230, 0.82);
}

.ledger-row-sm:last-child { border-bottom: 0; }

.ledger-row-sm strong {
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ledger-accent strong { color: #86efac; }

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 2rem;
}

.auth-form-inner {
    width: 100%;
    max-width: 400px;
}

.auth-mobile-brand {
    display: none;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--brand);
    text-decoration: none;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

.auth-form-inner h1 {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
}

.auth-sub {
    color: #64748b;
    font-size: 0.93rem;
    margin: 0 0 1.75rem;
}

.auth-form {
    display: grid;
    gap: 1.1rem;
    margin-bottom: 1.25rem;
}

.form-field { display: grid; gap: 0.4rem; }

.form-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.field-hint {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.78rem;
}

.field-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--brand);
    text-decoration: none;
}

.field-link:hover { text-decoration: underline; }

.form-field input {
    height: 48px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 0.9rem;
    font: inherit;
    font-size: 0.95rem;
    color: #0f172a;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease;
    outline: none;
}

.form-field input::placeholder { color: #cbd5e1; }

.form-field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.11);
}

.field-error {
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 500;
    min-height: 1em;
}

.btn-auth-submit {
    height: 50px;
    width: 100%;
    border-radius: 12px;
    border: 0;
    background: var(--brand);
    color: #fff;
    font-family: var(--font-nav);
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background 160ms ease, transform 120ms ease;
}

.btn-auth-submit:hover {
    background: var(--brand-deep);
    transform: translateY(-1px);
}

.btn-auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.auth-switch {
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

.auth-switch a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover { text-decoration: underline; }

@media (max-width: 860px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-panel { display: none; }
    .auth-mobile-brand { display: block; }
    .auth-form-side {
        min-height: 100dvh;
        padding: 2.5rem 1.25rem;
        align-items: flex-start;
    }
    .auth-form-inner { padding-top: 1rem; }
}

/* ===== ONBOARDING FULL REDESIGN ===== */
body.page-onboarding {
    margin: 0;
    background: #f8f9fb;
    font-family: var(--font-body);
}

.ob-shell {
    display: grid;
    grid-template-columns: 340px 1fr;
    height: 100dvh;
    overflow: hidden;
}

/* ── Sidebar ── */
.ob-sidebar {
    background: linear-gradient(170deg, #c81e1e 0%, #7f1d1d 55%, #3b0a0a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.75rem;
    height: 100dvh;
    overflow: hidden;       /* sidebar never scrolls — content is sized to fit */
}

.ob-sidebar::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -30%;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 60%);
    pointer-events: none;
}

.ob-sidebar-brand {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
}

.ob-sidebar-mid {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.75rem 0;
    position: relative;
    z-index: 1;
}

.ob-sidebar-kicker {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #fca5a5;
    margin: 0 0 0.65rem;
}

.ob-sidebar-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin: 0 0 0.65rem;
    color: #fff;
}

.ob-sidebar-body {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(254, 202, 202, 0.82);
    margin: 0 0 2rem;
}

/* Step track */
.ob-tracklist {
    display: flex;
    flex-direction: column;
}

.ob-track {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.ob-track > div:last-child {
    padding-top: 1px;
}

.ob-track strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 228, 230, 0.55);
    line-height: 1.3;
    transition: color 200ms;
}

.ob-track span {
    display: block;
    font-size: 0.77rem;
    color: rgba(255, 228, 230, 0.38);
    margin-top: 0.15rem;
    transition: color 200ms;
}

.ob-track-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    transition: all 220ms ease;
}

.ob-track-line {
    width: 2px;
    height: 22px;
    background: rgba(255, 255, 255, 0.14);
    margin-left: 12px;
}

.ob-track.is-active .ob-track-dot {
    background: #fff;
    border-color: #fff;
    color: #b91c1c;
}

.ob-track.is-active strong { color: #fff; }
.ob-track.is-active span { color: rgba(255, 228, 230, 0.7); }

.ob-track.is-done .ob-track-dot {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.ob-track.is-done strong { color: rgba(255, 228, 230, 0.7); }

/* Sidebar bottom card */
.ob-sidebar-card {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.9rem 1rem;
    position: relative;
    z-index: 1;
}

.ob-sidebar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    font-size: 0.83rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(254, 202, 202, 0.75);
}

.ob-sidebar-row:last-child { border-bottom: 0; }
.ob-sidebar-row strong { color: #fff; font-weight: 600; }
.ob-sidebar-row strong.ok { color: #86efac; }

/* ─ Main right side ─ */
.ob-main {
    display: flex;
    flex-direction: column;
    background: #f8f9fb;
    height: 100dvh;         /* must match shell height so overflow kicks in */
    overflow-y: auto;       /* form scrolls independently of sidebar */
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.ob-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

.ob-mobile-brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--brand);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.ob-mobile-steps {
    display: flex;
    gap: 0.4rem;
}

.ob-mobile-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 160ms;
}

.ob-mobile-step.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.ob-mobile-step.is-done {
    background: #ffe4e6;
    border-color: #fca5a5;
    color: var(--brand-deep);
}

/* Form fills the scrollable ob-main */
.ob-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.ob-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 3rem 3.5rem 3rem 4rem;
    width: 100%;
    max-width: 680px;
    min-height: 100dvh;     /* each step takes at least full viewport height */
    animation: rise 250ms ease both;
}

.ob-step-head {
    margin-bottom: 2rem;
}

.ob-step-num {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand);
    margin: 0 0 0.5rem;
}

.ob-step-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.035em;
    margin: 0 0 0.4rem;
    line-height: 1.15;
}

.ob-step-sub {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    line-height: 1.55;
}

/* Input grid */
.ob-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
    flex: 1;
    align-content: start;
}

.ob-field-full { grid-column: 1 / -1; }

.ob-field { display: grid; gap: 0.45rem; }

.ob-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.ob-label-aside {
    font-weight: 400;
    font-size: 0.78rem;
    color: #94a3b8;
}

.ob-field input,
.ob-field select {
    height: 50px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 1rem;
    font: inherit;
    font-size: 0.95rem;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color 160ms, box-shadow 160ms;
}

.ob-field input::placeholder { color: #cbd5e1; }

.ob-field input:focus,
.ob-field select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Toggle cards (step 3) */
.ob-toggle-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    flex: 1;
    align-content: start;
}

.ob-toggle-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 160ms, box-shadow 160ms, background 160ms;
}

.ob-toggle-card input[type="checkbox"] { display: none; }

.ob-toggle-card:has(input:checked) {
    border-color: var(--brand);
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.ob-toggle-icon {
    font-size: 1.4rem;
    width: 42px;
    height: 42px;
    background: #f8f9fb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 160ms;
}

.ob-toggle-card:has(input:checked) .ob-toggle-icon {
    background: #ffe4e6;
}

.ob-toggle-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.ob-toggle-text span {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 0.15rem;
    display: block;
}

.ob-toggle-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #fff;
    transition: all 160ms;
    position: relative;
}

.ob-toggle-card:has(input:checked) .ob-toggle-check {
    background: var(--brand);
    border-color: var(--brand);
}

.ob-toggle-card:has(input:checked) .ob-toggle-check::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #fff;
}

/* Consent (step 4) */
.ob-consent-notice {
    display: flex;
    gap: 0.75rem;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.5rem;
    font-size: 0.87rem;
    color: #6b4a42;
    line-height: 1.6;
}

.ob-consent-notice svg { flex-shrink: 0; margin-top: 1px; }
.ob-consent-notice p { margin: 0; }

.ob-consent-checks {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    flex: 1;
    align-content: start;
}

.ob-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    cursor: pointer;
    transition: border-color 160ms, box-shadow 160ms;
}

.ob-consent-row:has(input:checked) {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.ob-consent-row input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--brand);
    cursor: pointer;
}

.ob-consent-text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
}

.ob-consent-text span {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 0.2rem;
    display: block;
}

/* Buttons */
.ob-actions {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.ob-actions-split {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.ob-btn-next,
.ob-btn-submit {
    flex: 1;
    height: 52px;
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 13px;
    font: inherit;
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
    transition: background 160ms, transform 120ms;
}

.ob-btn-next:hover,
.ob-btn-submit:hover {
    background: var(--brand-deep);
    transform: translateY(-1px);
}

.ob-btn-next:disabled,
.ob-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.ob-btn-back {
    height: 52px;
    padding: 0 1.1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 13px;
    background: #fff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    transition: border-color 160ms, color 160ms;
}

.ob-btn-back:hover { border-color: #cbd5e1; color: #334155; }

@media (max-width: 860px) {
    .ob-shell { grid-template-columns: 1fr; }
    .ob-sidebar { display: none; }
    .ob-mobile-header { display: flex; }
    .ob-step {
        padding: 1.75rem 1.25rem;
        max-width: 100%;
    }
    .ob-grid { grid-template-columns: 1fr; }
    .ob-field-full { grid-column: 1; }
}
