/*
    Login and account pages (Winsora DMC design, from winsoradmc.lovable.app).
    Used only by Views/Shared/_LayoutAccount.cshtml, which does not load the Bootstrap/Vexel theme,
    so rem stays 16px here and nothing below leaks into the rest of the app.
*/

.acc-body {
    --radius: .75rem;
    --background: oklch(98.5% .008 250);
    --foreground: oklch(27% .09 269);
    --card: oklch(99.5% .004 250 / .94);
    --primary: oklch(30% .17 269);
    --primary-foreground: oklch(98.5% .005 250);
    --secondary: oklch(95% .015 250);
    --muted-foreground: oklch(50% .05 262);
    --destructive: oklch(57.7% .245 27.325);
    --border: oklch(90% .02 255);
    --input: oklch(91% .02 255);
    --teal: oklch(73% .13 184);
    --azure: oklch(55% .21 262);
    --gold: oklch(72% .12 80);
    --success: oklch(50% .11 170);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    --shadow-elevated: 0 24px 60px -20px oklch(20% .12 268 / .55);
    --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
    --font-display: "Sora", "Inter", ui-sans-serif, system-ui, sans-serif;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    background: var(--primary);
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
}

/* Reset rules sit in :where() so they carry no weight against the component classes below. */
:where(.acc-body) *,
:where(.acc-body) *::before,
:where(.acc-body) *::after {
    box-sizing: border-box;
}

:where(.acc-body) :where(h1, h2, p, ul) {
    margin: 0;
}

:where(.acc-body) img {
    display: block;
    max-width: 100%;
}

:where(.acc-body) :where(button, input) {
    font: inherit;
    color: inherit;
}

/* The component classes set display, which would otherwise beat the hidden attribute. */
:where(.acc-body) [hidden] {
    display: none !important;
}

/* ---------- Page ---------- */

.acc-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.acc-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 80rem;
    min-height: 100vh;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/*
    Desktop: header across the top, text left, card right, footer across the bottom. The intro wrapper
    only exists for the phone animation, so here its children join the grid directly. Paddings use vh
    so the whole page fits common laptop heights (Udara's 1498x760) without scrolling.
*/
@media (min-width: 1024px) {
    .acc-shell {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto 1fr auto;
        column-gap: 3rem;
        padding: clamp(1rem, 3.2vh, 2.5rem) 3rem;
    }

    .acc-intro {
        display: contents;
    }

    .acc-header {
        grid-column: 1 / -1;
    }

    .acc-pitch {
        grid-column: 1;
        grid-row: 2;
        align-self: center;
        max-width: 36rem;
    }

    .acc-main {
        grid-column: 2;
        grid-row: 2;
        align-self: center;
        justify-self: end;
        width: 100%;
        max-width: 28rem;
        padding: clamp(.75rem, 3vh, 3rem) 0;
    }

    .acc-footer {
        grid-column: 1 / -1;
        grid-row: 3;
    }
}

/* ---------- Background ---------- */

.acc-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.acc-bg__glow {
    position: absolute;
    border-radius: 9999px;
    animation: acc-aurora 18s ease-in-out infinite;
}

.acc-bg__glow--teal {
    top: -12rem;
    left: -10rem;
    width: 38rem;
    height: 38rem;
    background: color-mix(in oklab, var(--teal) 35%, transparent);
    filter: blur(140px);
}

.acc-bg__glow--azure {
    right: -10rem;
    bottom: -14rem;
    width: 42rem;
    height: 42rem;
    background: color-mix(in oklab, var(--azure) 45%, transparent);
    filter: blur(150px);
    animation-delay: -6s;
}

.acc-bg__glow--gold {
    top: 33.333%;
    left: 50%;
    width: 26rem;
    height: 26rem;
    background: color-mix(in oklab, var(--gold) 15%, transparent);
    filter: blur(130px);
    animation-delay: -12s;
}

.acc-bg__dot {
    position: absolute;
    width: .375rem;
    height: .375rem;
    border-radius: 9999px;
    animation: acc-float 7s ease-in-out infinite;
}

.acc-bg__dot--1 { top: 16%; left: 10%; background: color-mix(in oklab, var(--teal) 60%, transparent); }
.acc-bg__dot--2 { top: 72%; left: 7%; background: color-mix(in oklab, var(--gold) 50%, transparent); animation-delay: -2.2s; }
.acc-bg__dot--3 { top: 28%; left: 44%; background: color-mix(in oklab, var(--teal) 40%, transparent); animation-delay: -4.1s; }
.acc-bg__dot--4 { top: 82%; left: 38%; background: color-mix(in oklab, var(--azure) 60%, transparent); animation-delay: -1.3s; }
.acc-bg__dot--5 { top: 20%; left: 86%; background: color-mix(in oklab, var(--gold) 40%, transparent); animation-delay: -3.4s; }
.acc-bg__dot--6 { top: 64%; left: 92%; background: color-mix(in oklab, var(--teal) 50%, transparent); animation-delay: -5.2s; }

.acc-bg__grid {
    position: absolute;
    inset: 0;
    opacity: .7;
    background-image:
        linear-gradient(to right, color-mix(in oklab, var(--primary-foreground) 5%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, color-mix(in oklab, var(--primary-foreground) 5%, transparent) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(120% 90% at 50% 20%, black 40%, transparent 100%);
    mask-image: radial-gradient(120% 90% at 50% 20%, black 40%, transparent 100%);
}

.acc-bg__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 100% at 50% 0%, transparent 30%, oklch(16% .09 269 / .75));
}

/* The network of hexagons, spokes and orbiting icon tiles, centred behind the text column. */
.acc-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    opacity: .5;
}

@media (min-width: 640px) {
    .acc-orbit {
        opacity: .7;
    }
}

@media (min-width: 1024px) {
    .acc-orbit {
        left: 27%;
        opacity: 1;
    }
}

.acc-orbit__pulse,
.acc-orbit__hex,
.acc-orbit__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
}

.acc-orbit__pulse {
    width: 14rem;
    height: 14rem;
    border-radius: 9999px;
    background: color-mix(in oklab, var(--azure) 30%, transparent);
    filter: blur(80px);
    animation: acc-pulse 6s ease-in-out infinite;
}

.acc-orbit__hex--teal {
    width: 30rem;
    height: 30rem;
    color: color-mix(in oklab, var(--teal) 40%, transparent);
    animation: acc-spin 64s linear infinite;
}

.acc-orbit__hex--azure {
    width: 42rem;
    height: 42rem;
    color: color-mix(in oklab, var(--azure) 25%, transparent);
    animation: acc-spin-reverse 96s linear infinite;
}

.acc-orbit__hex--gold {
    width: 20rem;
    height: 20rem;
    color: color-mix(in oklab, var(--gold) 30%, transparent);
    animation: acc-spin 64s linear infinite;
}

.acc-orbit__ring {
    width: 24rem;
    height: 24rem;
    border: 1px solid color-mix(in oklab, var(--primary-foreground) 10%, transparent);
    border-radius: 9999px;
    animation: acc-spin 52s linear infinite;
}

@media (min-width: 640px) {
    .acc-orbit__pulse { width: 20rem; height: 20rem; }
    .acc-orbit__hex--teal { width: 44rem; height: 44rem; }
    .acc-orbit__hex--azure { width: 62rem; height: 62rem; }
    .acc-orbit__hex--gold { width: 28rem; height: 28rem; }
    .acc-orbit__ring { width: 34rem; height: 34rem; }
}

@media (min-width: 1024px) {
    .acc-orbit__hex--teal { width: 54rem; height: 54rem; }
    .acc-orbit__hex--azure { width: 76rem; height: 76rem; }
    .acc-orbit__hex--gold { width: 34rem; height: 34rem; }
    .acc-orbit__ring { width: 44rem; height: 44rem; }
}

.acc-orbit__spokes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: color-mix(in oklab, var(--primary-foreground) 15%, transparent);
}

.acc-orbit__spokes line {
    stroke: currentColor;
    stroke-width: .25;
    stroke-dasharray: 1.5 1.5;
    animation: acc-dash-flow 2.6s linear infinite;
}

.acc-orbit__node {
    position: absolute;
}

.acc-orbit__node--top { top: -22px; left: calc(50% - 22px); }
.acc-orbit__node--right { top: calc(50% - 22px); left: calc(100% - 22px); }
.acc-orbit__node--bottom { top: calc(100% - 22px); left: calc(50% - 22px); }
.acc-orbit__node--left { top: calc(50% - 22px); left: -22px; }

/* Turns against the ring at the same speed, so the icons stay upright while they travel. */
.acc-orbit__tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid color-mix(in oklab, var(--primary-foreground) 20%, transparent);
    border-radius: 1rem;
    background: color-mix(in oklab, var(--primary-foreground) 10%, transparent);
    color: var(--teal);
    box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    animation: acc-spin-reverse 52s linear infinite;
}

.acc-orbit__tile svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ---------- Header ---------- */

.acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.acc-header__logo {
    width: auto;
    height: 4rem;
    filter: drop-shadow(0 8px 24px oklch(30% .17 269 / .6));
    animation: acc-float 7s ease-in-out infinite;
}

@media (min-width: 1024px) {
    .acc-header__logo {
        height: clamp(2.75rem, 7vh, 4rem);
    }
}

.acc-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .375rem 1rem;
    border: 1px solid color-mix(in oklab, var(--primary-foreground) 20%, transparent);
    border-radius: 9999px;
    background: color-mix(in oklab, var(--primary-foreground) 10%, transparent);
    font-size: .75rem;
    line-height: 1rem;
    font-weight: 500;
    letter-spacing: .025em;
    color: color-mix(in oklab, var(--primary-foreground) 90%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.acc-pill svg {
    width: .875rem;
    height: .875rem;
    color: var(--teal);
}

/* ---------- Text column ---------- */

.acc-pitch {
    padding: 3rem 0;
}

@media (min-width: 1024px) {
    .acc-pitch {
        padding: clamp(.75rem, 3vh, 3rem) 0;
    }
}

.acc-eyebrow {
    font-size: .75rem;
    line-height: 1rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--gold);
}

.acc-headline {
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-size: 1.875rem;
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -.025em;
    color: var(--primary-foreground);
}

@media (min-width: 640px) {
    .acc-headline {
        font-size: 2.25rem;
    }
}

/* Scales with the width so "One login for every" stays on one line in the narrower two-column layouts. */
@media (min-width: 1024px) {
    .acc-headline {
        font-size: clamp(2.125rem, 3.3vw, 3rem);
    }
}

.acc-lead {
    margin-top: 1.25rem;
    font-size: 1rem;
    line-height: 1.625;
    color: color-mix(in oklab, var(--primary-foreground) 85%, transparent);
}

.acc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
    margin-top: 2rem;
}

.acc-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .375rem .875rem;
    border: 1px solid color-mix(in oklab, var(--primary-foreground) 20%, transparent);
    border-radius: 9999px;
    background: color-mix(in oklab, var(--primary-foreground) 10%, transparent);
    font-size: .75rem;
    line-height: 1rem;
    color: color-mix(in oklab, var(--primary-foreground) 90%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.acc-chip:hover {
    transform: translateY(-.125rem);
    border-color: color-mix(in oklab, var(--teal) 60%, transparent);
    background: color-mix(in oklab, var(--primary-foreground) 15%, transparent);
}

.acc-chip svg {
    width: .875rem;
    height: .875rem;
    color: var(--teal);
}

/* ---------- Card ---------- */

/* Phone-only copy of the logo, shown above the white panel. */
.acc-brand {
    display: none;
}

.acc-card {
    position: relative;
    padding: 2rem;
    border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
    border-radius: 1.5rem;
    background: var(--card);
    box-shadow: var(--shadow-elevated);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}

@media (min-width: 640px) {
    .acc-card {
        padding: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .acc-card {
        padding: clamp(1.5rem, 4.2vh, 2.5rem) 2.5rem;
    }
}

.acc-card__shimmer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.acc-card__shimmer span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -33.333%;
    width: 33.333%;
    background: linear-gradient(to right, transparent, color-mix(in oklab, var(--teal) 15%, transparent), transparent);
    animation: acc-shimmer 3.4s ease-in-out infinite;
}

.acc-card__body {
    position: relative;
}

.acc-card__logo {
    width: auto;
    height: 6.5rem;
    margin: 0 auto;
    transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}

.acc-card__logo:hover {
    transform: scale(1.05);
}

@media (min-width: 1024px) {
    .acc-card__logo {
        height: clamp(4rem, 12vh, 6.5rem);
    }

    /* A message box or field errors add rows; a smaller logo keeps the card inside one laptop screen. */
    .acc-card:has(.acc-alert:not([hidden], .validation-summary-valid), .acc-field-error:not([hidden], :empty)) .acc-card__logo {
        height: clamp(2.75rem, 6vh, 6.5rem);
    }
}

.acc-title {
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 600;
    text-align: center;
    color: var(--foreground);
}

@media (min-width: 1024px) {
    .acc-title {
        margin-top: clamp(.75rem, 2vh, 1.25rem);
    }
}

.acc-subtitle {
    margin-top: .25rem;
    font-size: .875rem;
    line-height: 1.25rem;
    text-align: center;
    color: var(--muted-foreground);
}

/* ---------- Form ---------- */

.acc-form,
.acc-actions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 2rem;
}

@media (min-width: 1024px) {
    .acc-form,
    .acc-actions {
        gap: clamp(.875rem, 2.4vh, 1.25rem);
        margin-top: clamp(1.25rem, 3.4vh, 2rem);
    }
}

.acc-field {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.acc-label {
    font-size: .875rem;
    line-height: 1;
    font-weight: 500;
    color: var(--foreground);
}

.acc-required {
    color: var(--destructive);
}

.acc-input-wrap {
    position: relative;
}

.acc-input {
    display: flex;
    width: 100%;
    height: 2.75rem;
    padding: .25rem .75rem;
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 2px);
    background: color-mix(in oklab, var(--secondary) 60%, transparent);
    font-size: 1rem;
    line-height: 1.5rem;
    color: var(--foreground);
    box-shadow: var(--shadow-sm);
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

@media (min-width: 768px) {
    .acc-input {
        font-size: .875rem;
        line-height: 1.25rem;
    }
}

.acc-input::placeholder {
    color: var(--muted-foreground);
}

.acc-input:focus-visible {
    outline: none;
    background: var(--secondary);
    box-shadow: 0 0 0 1px var(--teal), var(--shadow-sm);
}

.acc-input--password {
    padding-right: 3rem;
}

.acc-eye {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color .15s;
}

.acc-eye:hover {
    color: var(--primary);
}

.acc-eye:focus-visible {
    outline: none;
    border-radius: calc(var(--radius) - 2px);
    box-shadow: inset 0 0 0 1px var(--teal);
}

.acc-eye svg {
    width: 1rem;
    height: 1rem;
    pointer-events: none;
}

.acc-eye__off,
.acc-eye[aria-pressed="true"] .acc-eye__on {
    display: none;
}

.acc-eye[aria-pressed="true"] .acc-eye__off {
    display: block;
}

.acc-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    line-height: 1.25rem;
    color: var(--muted-foreground);
    cursor: pointer;
}

.acc-check input {
    appearance: none;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin: 0;
    border: 1px solid var(--primary);
    border-radius: .25rem;
    background: transparent;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.acc-check input:checked {
    background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / .75rem no-repeat;
}

.acc-check input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px var(--teal);
}

.acc-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 3rem;
    padding: .5rem 2rem;
    border: 0;
    border-radius: calc(var(--radius) - 2px);
    background: linear-gradient(to right, var(--azure), var(--primary));
    font-size: .875rem;
    line-height: 1.25rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--primary-foreground);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.acc-submit:hover {
    transform: translateY(-.125rem);
    background: linear-gradient(to right, var(--teal), var(--azure));
}

.acc-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px var(--teal), var(--shadow-sm);
}

.acc-submit svg {
    width: 1rem;
    height: 1rem;
    margin-left: .25rem;
    transition: transform .15s;
}

.acc-submit:hover svg {
    transform: translateX(.25rem);
}

a.acc-submit {
    text-decoration: none;
}

.acc-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(to right, var(--azure), var(--primary));
}

.acc-submit:disabled svg {
    transform: none;
}

.acc-note {
    margin-top: 1.5rem;
    font-size: .75rem;
    line-height: 1rem;
    text-align: center;
    color: var(--muted-foreground);
}

@media (min-width: 1024px) {
    .acc-note {
        margin-top: clamp(1rem, 2.6vh, 1.5rem);
    }
}

.acc-note a {
    font-weight: 500;
    color: var(--azure);
    text-decoration: none;
}

.acc-note a:hover {
    text-decoration: underline;
}

/* ---------- Validation (not in the Lovable design; drawn in its style) ---------- */

.acc-alert {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    padding: .75rem 1rem;
    border: 1px solid color-mix(in oklab, var(--destructive) 30%, transparent);
    border-radius: calc(var(--radius) - 2px);
    background: color-mix(in oklab, var(--destructive) 7%, var(--background));
    font-size: .875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: var(--destructive);
}

.acc-alert svg {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-top: .125rem;
}

.acc-alert ul {
    padding: 0;
    list-style: none;
}

.acc-field-error {
    font-size: .75rem;
    line-height: 1rem;
    font-weight: 500;
    color: var(--destructive);
}

/* A ModelOnly summary still renders (with one hidden empty li) when only field errors come back from the server. */
.acc-body .validation-summary-valid,
.acc-body .field-validation-valid,
.acc-alert:has(> ul > li:only-child:empty) {
    display: none;
}

.acc-input.input-validation-error {
    border-color: color-mix(in oklab, var(--destructive) 55%, transparent);
    background: color-mix(in oklab, var(--destructive) 4%, var(--background));
}

.acc-input.input-validation-error:focus-visible {
    box-shadow: 0 0 0 1px var(--destructive), var(--shadow-sm);
}

.acc-alert--success {
    border-color: color-mix(in oklab, var(--success) 35%, transparent);
    background: color-mix(in oklab, var(--success) 8%, var(--background));
    color: var(--success);
}

/* ---------- Password pages (not in the Lovable design; drawn in its style) ---------- */

/* Two columns keep the checklist short, so the set-password card still fits a laptop screen. */
.acc-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .375rem .75rem;
    padding: 0;
    list-style: none;
    font-size: .75rem;
    line-height: 1rem;
    color: var(--muted-foreground);
}

.acc-rule {
    display: flex;
    align-items: center;
    gap: .375rem;
    transition: color .2s;
}

.acc-rule svg {
    flex-shrink: 0;
    width: .875rem;
    height: .875rem;
}

.acc-rule__met,
.acc-rule.is-met .acc-rule__unmet {
    display: none;
}

.acc-rule.is-met {
    color: var(--success);
}

.acc-rule.is-met .acc-rule__met {
    display: block;
}

/* ---------- Footer ---------- */

.acc-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-size: .75rem;
    line-height: 1rem;
    color: color-mix(in oklab, var(--primary-foreground) 60%, transparent);
}

.acc-footer__tagline {
    letter-spacing: .2em;
    text-transform: uppercase;
}

/* ---------- Motion (CSS only) ---------- */

.acc-rise {
    animation: acc-rise .85s cubic-bezier(.22, 1, .36, 1) both;
}

.acc-rise--d120 { animation-delay: 120ms; }
.acc-rise--d180 { animation-delay: 180ms; }
.acc-rise--d220 { animation-delay: 220ms; }
.acc-rise--d300 { animation-delay: 300ms; }

@media (min-width: 1024px) {
    .acc-footer {
        animation: acc-rise .85s cubic-bezier(.22, 1, .36, 1) both;
    }
}

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

@keyframes acc-aurora {
    0%, 100% { transform: translate(0) scale(1); }
    33% { transform: translate(6%, -8%) scale(1.12); }
    66% { transform: translate(-5%, 6%) scale(.94); }
}

@keyframes acc-pulse {
    0%, 100% { opacity: .55; transform: scale(1); }
    50% { opacity: .95; transform: scale(1.08); }
}

@keyframes acc-spin {
    to { transform: rotate(360deg); }
}

@keyframes acc-spin-reverse {
    to { transform: rotate(-360deg); }
}

@keyframes acc-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes acc-dash-flow {
    to { stroke-dashoffset: -24px; }
}

/* No skew: on the Lovable page the moving transform replaces it, so the band travels upright. */
@keyframes acc-shimmer {
    from { transform: translateX(-120%); }
    to { transform: translateX(220%); }
}

/*
    ---------- Phone and tablet (below the two-column width) ----------
    Same flow as Winsora One: first the header and text fill the screen. After a pause they move up out
    of view while the form slides up from the bottom as a white panel, with the logo riding just above
    the panel. The panel stays in the page flow, so the keyboard never covers a field.
*/
@media (max-width: 1023.98px) {
    .acc-page {
        --sheet-top: clamp(120px, 25vh, 240px);
        --sheet-bg: oklch(99.5% .004 250);
        /* Gentle start and soft landing; text and panel share it so they move as one. */
        --sheet-motion: 1.1s cubic-bezier(.45, 0, .2, 1) 1.2s both;
        min-height: 100vh;
        min-height: 100svh;
    }

    .acc-shell {
        display: grid;
        grid-template-rows: var(--sheet-top) 1fr auto;
        max-width: none;
        min-height: 100vh;
        min-height: 100svh;
        padding: 0;
    }

    .acc-intro {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 5;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100svh;
        padding: 1.5rem 1.5rem 2rem;
        animation: acc-content-out var(--sheet-motion);
        will-change: transform;
    }

    .acc-pitch {
        margin: auto 0;
    }

    /* Blur behind moving chips is costly on phones and barely visible here. */
    .acc-chip,
    .acc-pill {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .acc-main,
    .acc-footer {
        position: relative;
        z-index: 20;
        background: var(--sheet-bg);
        animation: acc-sheet-up var(--sheet-motion);
        will-change: transform;
    }

    .acc-main {
        grid-row: 2;
        min-height: 0;
        margin-top: -1.5rem;
        border-radius: 1.75rem 1.75rem 0 0;
        box-shadow: 0 -14px 34px -16px oklch(20% .12 268 / .35);
    }

    .acc-footer {
        grid-row: 3;
        justify-content: center;
        padding: .75rem 1.5rem;
        color: var(--muted-foreground);
        text-align: center;
    }

    /* Narrower tracking keeps the tagline on one line on phones. */
    .acc-footer__tagline {
        font-size: .6875rem;
        letter-spacing: .12em;
    }

    .acc-brand {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        height: calc(var(--sheet-top) - 1.5rem);
    }

    .acc-brand__logo {
        width: auto;
        height: min(4.75rem, 70%);
        filter: drop-shadow(0 8px 24px oklch(20% .12 268 / .5));
    }

    .acc-card {
        max-width: 28rem;
        margin: 0 auto;
        padding: clamp(1.25rem, 3.5vh, 1.75rem) 1.5rem 1rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        animation: none;
    }

    .acc-card__shimmer,
    .acc-card__logo {
        display: none;
    }

    .acc-title {
        margin-top: 0;
    }

    .acc-form,
    .acc-actions {
        gap: clamp(.875rem, 2.2vh, 1.25rem);
        margin-top: clamp(1.25rem, 3vh, 2rem);
    }

    .acc-note {
        margin-top: clamp(.875rem, 2.2vh, 1.5rem);
    }
}

@media (min-width: 640px) and (max-width: 1023.98px) {
    .acc-intro {
        padding: 2.5rem;
    }

    .acc-brand__logo {
        height: min(5.5rem, 70%);
    }
}

/* A full screen, so the logo riding above the panel also starts out of view. */
@keyframes acc-sheet-up {
    from { transform: translateY(100vh); }
    to { transform: translateY(0); }
}

/* Its own full height, so it leaves the top of the screen completely. */
@keyframes acc-content-out {
    from { transform: translateY(0); }
    to { transform: translateY(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .acc-body *,
    .acc-body *::before,
    .acc-body *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Without motion the phone text would never move away, so start at the final view. */
@media (prefers-reduced-motion: reduce) and (max-width: 1023.98px) {
    .acc-intro {
        display: none;
    }
}

/* Page came back with errors, or was reached mid-task (set by _LayoutAccount): phones open straight on the form. */
@media (max-width: 1023.98px) {
    .acc-body--no-intro .acc-intro {
        display: none;
    }

    .acc-body--no-intro .acc-main,
    .acc-body--no-intro .acc-footer {
        animation: none;
    }
}
