:root {
    --bg: #0f0d16;
    --bg-2: #15111f;
    --panel: rgba(23, 19, 33, 0.74);
    --panel-2: rgba(32, 26, 44, 0.92);
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #f7f4ff;
    --muted: rgba(247, 244, 255, 0.70);
    --accent: #8a6bff;
    --accent-2: #d5c5ff;
    --accent-3: #56d3c0;
    --ok: #56d39b;
    --warn: #ffca5a;
    --danger: #ff7a7a;
    --shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 18%),
        linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4338ca 60%, #6366f1 100%);
    font-family: "Segoe UI Variable", "Aptos", "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 78%);
    opacity: 0.08;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(138, 107, 255, 0.08), transparent 30%),
        linear-gradient(300deg, rgba(86, 211, 192, 0.08), transparent 26%);
    opacity: 0.28;
}

.auth-shell {
    width: min(560px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.auth-brand {
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 10px;
}

.auth-brand-mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.28);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.auth-brand-name {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.06em;
    color: #ffffff;
}

.auth-brand-sub {
    color: rgba(238, 242, 255, 0.82);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.auth-card {
    background: #ffffff;
    color: #1e293b;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.28);
}

.auth-title {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e1b4b;
    letter-spacing: -0.03em;
}

.auth-subtitle {
    margin: 0 0 1.5rem;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.6;
}

.auth-card .flash {
    margin-bottom: 1rem;
}

.auth-card .auth-grid,
.auth-card .plan-grid {
    gap: 12px;
}

.auth-card .field,
.auth-card .summary-box,
.auth-card .plan-card,
.auth-card .empty-state,
.auth-card .flash {
    border-color: #e2e8f0;
    background: #ffffff;
}

.auth-card .field {
    padding: 0;
    background: transparent;
    border: 0;
}

.auth-card .field label {
    margin-bottom: 0.375rem;
    color: #374151;
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

.auth-card .field input,
.auth-card .field select,
.auth-card .field textarea {
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #1e293b;
    border-radius: 10px;
    padding: 0.625rem 0.875rem;
}

.auth-card .field input:focus,
.auth-card .field select:focus,
.auth-card .field textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

.auth-card .form-actions {
    flex-direction: column;
    margin-top: 0.5rem;
}

.auth-card .btn,
.auth-card .btn-secondary,
.auth-card .btn-ghost {
    width: 100%;
    border-radius: 10px;
    padding: 0.75rem;
}

.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0.25rem 0 1.25rem;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
    cursor: pointer;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
}

.forgot-link {
    font-size: 0.8125rem;
    color: #6366f1;
    font-weight: 500;
}

.login-link,
.back-link {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(238, 242, 255, 0.9);
}

.login-link a,
.back-link a {
    color: #ffffff;
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    background: rgba(8, 7, 12, 0.94);
    backdrop-filter: blur(18px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-card {
    width: min(340px, calc(100% - 32px));
    padding: 26px;
    border-radius: 28px;
    border: 1px solid var(--line-strong);
    background:
        radial-gradient(circle at top, rgba(138, 107, 255, 0.22), transparent 50%),
        linear-gradient(180deg, rgba(38, 31, 54, 0.96), rgba(14, 11, 20, 0.98));
    box-shadow: var(--shadow);
    text-align: center;
}

.loader-card p {
    margin: 10px 0 0;
    color: var(--muted);
}

.spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent);
    border-right-color: var(--accent-3);
    animation: spin 0.9s linear infinite;
}

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

.page-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 22px;
    width: min(1460px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 36px;
    position: relative;
    z-index: 1;
}

.brand-panel,
.content-panel {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(35, 28, 48, 0.62), rgba(18, 14, 25, 0.82));
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(120%);
}

.brand-panel {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: "";
    position: absolute;
    inset: 24px 24px auto auto;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(86, 211, 192, 0.18), transparent 68%);
    filter: blur(2px);
    pointer-events: none;
}

.brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -120px -140px auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138, 107, 255, 0.30), transparent 70%);
    pointer-events: none;
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.brand-mark {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    font-weight: 800;
    box-shadow: 0 18px 42px rgba(138, 107, 255, 0.34);
}

.brand-text {
    display: flex;
    flex-direction: column;
    font-weight: 700;
}

.brand-text span {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.back-badge {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #f8f5ff;
    font-size: 0.88rem;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(14px);
}

.back-arrow {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.brand-visual {
    position: relative;
    flex: 1;
    min-height: 520px;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background:
        linear-gradient(180deg, rgba(112, 89, 199, 0.28), rgba(18, 14, 25, 0.86)),
        radial-gradient(circle at 20% 18%, rgba(184, 160, 255, 0.38), transparent 26%),
        radial-gradient(circle at 78% 20%, rgba(86, 211, 192, 0.18), transparent 18%),
        linear-gradient(160deg, #6f5aff 0%, #24183b 42%, #120f18 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 30px 60px rgba(0, 0, 0, 0.30);
}

.brand-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 76%, rgba(255,255,255,0.10), transparent 17%),
        radial-gradient(circle at 50% 52%, rgba(255,255,255,0.08), transparent 26%),
        linear-gradient(150deg, transparent 0 46%, rgba(255,255,255,0.08) 46% 48%, transparent 48% 100%);
    opacity: 0.7;
    pointer-events: none;
}

.brand-visual-sky {
    position: absolute;
    inset: 0 0 auto 0;
    height: 42%;
    background:
        radial-gradient(ellipse at center, rgba(255,255,255,0.16), transparent 50%),
        linear-gradient(180deg, rgba(156, 138, 255, 0.32), rgba(70, 56, 146, 0.12));
}

.brand-visual-dune {
    position: absolute;
    left: -8%;
    right: -8%;
    border-radius: 50%;
    filter: blur(0.2px);
}

.brand-visual-dune-a {
    bottom: 14%;
    height: 54%;
    background: linear-gradient(160deg, rgba(32, 23, 48, 0.05), rgba(20, 14, 27, 0.92) 58%, rgba(7, 6, 10, 1) 100%);
    transform: rotate(-4deg);
    box-shadow: 0 -18px 30px rgba(0,0,0,0.12);
}

.brand-visual-dune-b {
    bottom: 9%;
    height: 36%;
    left: -16%;
    right: 18%;
    background: linear-gradient(165deg, rgba(62, 44, 91, 0.92), rgba(20, 13, 26, 1));
    transform: rotate(-7deg);
}

.brand-visual-dune-c {
    bottom: 6%;
    height: 28%;
    left: 24%;
    right: -10%;
    background: linear-gradient(155deg, rgba(29, 20, 42, 0.90), rgba(8, 7, 12, 1));
    transform: rotate(6deg);
}

.brand-visual-glow {
    position: absolute;
    inset: auto 0 8% 0;
    height: 120px;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.24), rgba(255,255,255,0.02) 40%, transparent 65%);
    filter: blur(10px);
}

.brand-visual-caption {
    position: absolute;
    left: 32px;
    bottom: 30px;
    display: grid;
    gap: 4px;
    z-index: 1;
}

.brand-visual-caption strong {
    font-size: clamp(2rem, 2.4vw, 2.8rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.brand-visual-caption span {
    font-size: 0.9rem;
    color: rgba(247, 244, 255, 0.78);
    letter-spacing: 0.02em;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(138, 107, 255, 0.12);
    border: 1px solid rgba(138, 107, 255, 0.30);
    color: #e8ddff;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}

.topline h2 {
    margin: 12px 0 4px;
    letter-spacing: -0.055em;
    font-size: clamp(2rem, 2.6vw, 3rem);
}

.topline h1 {
    margin: 12px 0 6px;
    letter-spacing: -0.06em;
    font-size: clamp(2.2rem, 3vw, 3.6rem);
    line-height: 0.95;
}

.topline-subtitle {
    margin: 0;
    color: var(--muted);
    max-width: 54ch;
    font-size: 1rem;
}

.field,
.summary-box,
.plan-card,
.empty-state,
.flash {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.ghost-link {
    align-self: flex-start;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.summary-box {
    margin-bottom: 14px;
    border-radius: 22px;
    padding: 18px;
}

.summary-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.content-panel {
    padding: 36px;
    background:
        radial-gradient(circle at top right, rgba(138, 107, 255, 0.06), transparent 28%),
        linear-gradient(180deg, rgba(31, 24, 43, 0.78), rgba(16, 13, 21, 0.93));
}

.topline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.status-chip {
    padding: 10px 15px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(138, 107, 255, 0.20), rgba(86, 211, 192, 0.14));
    border: 1px solid rgba(138, 107, 255, 0.32);
    color: #f8f5ff;
    white-space: nowrap;
}

.flash {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
}

.flash-success { border-color: rgba(86, 211, 155, 0.3); color: var(--ok); }
.flash-error { border-color: rgba(255, 122, 122, 0.3); color: var(--danger); }
.flash-info { border-color: rgba(180, 156, 255, 0.3); color: var(--accent-2); }

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    border-radius: 22px;
    padding: 16px;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.field:hover {
    transform: translateY(-1px);
}

.field:focus-within {
    border-color: rgba(138, 107, 255, 0.42);
    box-shadow: 0 0 0 4px rgba(138, 107, 255, 0.10);
}

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

.field label {
    display: block;
    margin-bottom: 8px;
    color: rgba(247, 244, 255, 0.82);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
}

.field input:focus::placeholder,
.field textarea:focus::placeholder {
    color: rgba(247, 244, 255, 0.22);
}

.field input::placeholder,
.field textarea::placeholder {
    color: rgba(244, 241, 255, 0.35);
}

.field textarea {
    min-height: 110px;
    resize: vertical;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.btn,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-1px);
}

.btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    color: #fff;
    box-shadow: 0 18px 36px rgba(138, 107, 255, 0.28);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--line-strong);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--muted);
}

.btn:hover {
    box-shadow: 0 20px 40px rgba(86, 211, 192, 0.14), 0 18px 36px rgba(138, 107, 255, 0.22);
}

.btn-secondary:hover,
.btn-ghost:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.empty-state {
    border-radius: 22px;
    padding: 22px;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.plan-card {
    border-radius: 24px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.plan-card::before {
    content: "";
    position: absolute;
    inset: auto -20px -20px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138, 107, 255, 0.16), transparent 68%);
    pointer-events: none;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.18);
}

.plan-card.active {
    border-color: rgba(138, 107, 255, 0.45);
    background:
        radial-gradient(circle at top right, rgba(86, 211, 192, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(138, 107, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.plan-card h3,
.plan-card p {
    margin: 0 0 10px;
}

.plan-card h3 {
    font-size: 1.12rem;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.plan-card ul {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

.inline-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 1100px) {
    .page-shell {
        grid-template-columns: 1fr;
    }

    .brand-visual {
        min-height: 420px;
    }

    .back-badge {
        top: 18px;
        right: 18px;
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 24px, 100%);
        padding-top: 12px;
    }

    .brand-panel,
    .content-panel {
        padding: 22px;
    }

    .brand-visual {
        min-height: 320px;
        border-radius: 22px;
    }

    .brand-visual-caption {
        left: 20px;
        bottom: 20px;
    }

    .topline h1 {
        font-size: clamp(1.9rem, 8vw, 2.6rem);
    }

    .auth-grid,
    .plan-grid {
        grid-template-columns: 1fr;
    }

    .topline {
        flex-direction: column;
    }

    .field.full {
        grid-column: auto;
    }
}

.page-shell {
    grid-template-columns: 1fr;
    width: min(560px, calc(100% - 32px));
    gap: 18px;
    padding: 28px 0 36px;
    place-items: stretch;
    align-content: center;
}

.brand-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    overflow: visible;
    min-height: auto;
    gap: 12px;
}

.brand-panel::before,
.brand-panel::after,
.brand-visual {
    display: none;
}

.brand-top {
    justify-content: center;
}

.brand-text {
    align-items: center;
    color: #ffffff;
}

.content-panel {
    padding: 2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.97));
    color: #1e293b;
    border: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.28);
}

.topline {
    display: block;
    padding-bottom: 0;
    margin-bottom: 0;
    border: 0;
}

.topline h1 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #1e1b4b;
}

.topline-subtitle {
    margin: 0 0 1.5rem;
    color: #64748b;
}

.eyebrow,
.status-chip {
    display: none;
}

.field {
    padding: 0;
    border: 0;
    background: transparent;
}

.field label {
    margin-bottom: 0.375rem;
    color: #374151;
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

.field input,
.field select,
.field textarea {
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #1e293b;
    border-radius: 10px;
    padding: 0.625rem 0.875rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.btn,
.btn-secondary,
.btn-ghost {
    width: 100%;
    border-radius: 10px;
    padding: 0.75rem;
}

.plan-grid .form-actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
}

.plan-grid .form-actions .btn,
.plan-grid .form-actions .btn-secondary,
.plan-grid .form-actions .btn-ghost {
    width: auto;
    min-width: 180px;
}

.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0.25rem 0 1.25rem;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
    cursor: pointer;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
}

.forgot-link {
    font-size: 0.8125rem;
    color: #6366f1;
    font-weight: 500;
}

.login-link,
.back-link {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

.login-link a,
.back-link a {
    color: #6366f1;
    font-weight: 600;
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 24px, 100%);
        padding-top: 12px;
    }

    .content-panel {
        padding: 1.5rem;
    }

    .brand-mark {
        width: 48px;
        height: 48px;
    }

    .brand-text {
        font-size: 0.95rem;
    }

    .topline h1 {
        font-size: 1.15rem;
    }

    .plan-grid .form-actions {
        flex-direction: column;
    }

    .plan-grid .form-actions .btn,
    .plan-grid .form-actions .btn-secondary,
    .plan-grid .form-actions .btn-ghost {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .spinner {
        animation: none;
    }

    .loader {
        transition: none;
    }

    .btn,
    .btn-secondary,
    .btn-ghost {
        transition: none;
    }
}

body {
    min-height: 100vh;
    margin: 0;
    color: #f8fafc;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, 0.24), transparent 24%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 22%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.08), transparent 20%),
        linear-gradient(135deg, #09080f 0%, #11101b 42%, #171427 100%);
}

body::before {
    opacity: 0.10;
    background-size: 38px 38px;
}

body::after {
    opacity: 0.22;
}

.auth-shell {
    width: min(440px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.auth-shell-wide {
    width: min(960px, calc(100% - 32px));
}

.auth-brand {
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.auth-brand-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #8b5cf6, #4f46e5);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.32);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.auth-brand-name {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.06em;
    color: #ffffff;
}

.auth-brand-sub {
    color: rgba(226, 232, 240, 0.8);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.auth-card {
    background: linear-gradient(180deg, rgba(24, 20, 39, 0.98), rgba(15, 12, 24, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
}

.auth-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    line-height: 1.1;
    letter-spacing: -0.05em;
    color: #ffffff;
}

.auth-subtitle {
    margin: 0 0 1.45rem;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.94rem;
    line-height: 1.6;
}

.flash {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.flash-success {
    background: rgba(16, 185, 129, 0.12);
    color: #86efac;
}

.flash-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.flash-info {
    background: rgba(99, 102, 241, 0.12);
    color: #c4b5fd;
}

.auth-card .auth-grid,
.auth-card .plan-grid {
    gap: 12px;
}

.auth-card .field,
.auth-card .form-group {
    margin-bottom: 0;
}

.auth-card .field label,
.auth-card .form-label {
    display: block;
    margin-bottom: 0.4rem;
    color: rgba(226, 232, 240, 0.88);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.auth-card .field input,
.auth-card .field select,
.auth-card .field textarea,
.auth-card .form-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.04);
    outline: none;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.auth-card .field input::placeholder,
.auth-card .field textarea::placeholder,
.auth-card .form-input::placeholder {
    color: rgba(226, 232, 240, 0.34);
}

.auth-card .field input:focus,
.auth-card .field select:focus,
.auth-card .field textarea:focus,
.auth-card .form-input:focus {
    border-color: rgba(139, 92, 246, 0.75);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
    transform: translateY(-1px);
}

.auth-card .field textarea {
    min-height: 120px;
    resize: vertical;
}

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

.auth-card .field input[readonly],
.auth-card .form-input[readonly] {
    opacity: 0.88;
    cursor: default;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.btn,
.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 0.86rem 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.btn,
.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #4f46e5);
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(79, 70, 229, 0.25);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.btn-ghost {
    background: transparent;
    color: rgba(226, 232, 240, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-1px);
}

.btn:hover,
.btn-primary:hover {
    box-shadow: 0 22px 42px rgba(79, 70, 229, 0.30);
}

.btn-secondary:hover,
.btn-ghost:hover {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0.25rem 0 1.1rem;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.86rem;
    cursor: pointer;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #8b5cf6;
}

.forgot-link {
    color: #c4b5fd;
    font-size: 0.86rem;
    font-weight: 600;
}

.login-link,
.register-link,
.back-link {
    margin: 1.3rem 0 0;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(226, 232, 240, 0.72);
}

.login-link a,
.register-link a,
.back-link a {
    color: #c4b5fd;
    font-weight: 700;
}

body.auth-wide .form-actions {
    flex-direction: row;
    flex-wrap: wrap;
}

body.auth-wide .form-actions .btn,
body.auth-wide .form-actions .btn-primary,
body.auth-wide .form-actions .btn-secondary,
body.auth-wide .form-actions .btn-ghost {
    width: auto;
    min-width: 180px;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.plan-card {
    position: relative;
    display: block;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.plan-card::before {
    content: "";
    position: absolute;
    inset: auto -18px -18px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.16), transparent 68%);
    pointer-events: none;
}

.plan-card:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.38);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
}

.plan-card.active {
    border-color: rgba(139, 92, 246, 0.45);
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(139, 92, 246, 0.16), rgba(255, 255, 255, 0.05));
}

.plan-card h3,
.plan-card p {
    margin: 0 0 10px;
}

.plan-card h3 {
    font-size: 1.08rem;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.empty-state,
.summary-box {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    padding: 18px;
}

.summary-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 900px) {
    .auth-shell,
    .auth-shell-wide {
        width: min(100% - 24px, 100%);
        padding: 20px 0 28px;
    }

    .auth-card {
        padding: 1.5rem;
    }

    body.auth-wide .form-actions {
        flex-direction: column;
    }

    body.auth-wide .form-actions .btn,
    body.auth-wide .form-actions .btn-primary,
    body.auth-wide .form-actions .btn-secondary,
    body.auth-wide .form-actions .btn-ghost {
        width: 100%;
        min-width: 0;
    }

    .plan-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .auth-brand-name {
        font-size: 1.75rem;
    }

    .auth-brand-mark {
        width: 52px;
        height: 52px;
    }

    .auth-title {
        font-size: 1.2rem;
    }

    .remember-row {
        align-items: flex-start;
    }
}
