﻿

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color: var(--text);
    background: radial-gradient(circle at top left, #fff8f2 0%, rgba(255,248,242,0) 34%), radial-gradient(circle at bottom right, #edf5f7 0%, rgba(237,245,247,0) 34%), linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
}

    body.login-body {
        min-height: 100vh;
        position: relative;
        overflow-x: hidden;
    }

.login-background-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(10px);
    opacity: .65;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(183,121,93,.26) 0%, rgba(183,121,93,0) 72%);
    top: -80px;
    right: -90px;
}

.orb-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(31,95,116,.18) 0%, rgba(31,95,116,0) 72%);
    left: -130px;
    bottom: -120px;
}

.login-background-grid {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(31,95,116,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(31,95,116,.035) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 82%);
    pointer-events: none;
    z-index: 0;
}

.login-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 28px;
    align-items: center;
    padding: 28px;
}

.login-story-panel,
.login-form-panel {
    min-width: 0;
}

.story-card {
    min-height: 760px;
    height: calc(100vh - 56px);
    max-height: 860px;
    background: linear-gradient(160deg, rgba(255,255,255,.84) 0%, rgba(255,255,255,.72) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

    .story-card::before {
        content: "";
        position: absolute;
        inset: auto -40px -80px auto;
        width: 260px;
        height: 260px;
        border-radius: 999px;
        background: radial-gradient(circle, rgba(183,121,93,.16) 0%, rgba(183,121,93,0) 70%);
    }

.story-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.story-logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.story-logo {
    width: 300px;
    max-width: 100%;
    display: block;
    object-fit: contain;
    border-radius: 18px;
    background: radial-gradient(circle at top left, #fff8f2 0%, rgba(255,248,242,0) 34%), radial-gradient(circle at bottom right, #edf5f7 0%, rgba(237,245,247,0) 34%), linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
    padding: 10px;
    box-shadow: 0 8px 20px rgba(15,23,42,.08);
}

.story-brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.story-brand-sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.story-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(15,23,42,.08);
    color: var(--primary-2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
}

.story-main {
    display: flex;
    flex-direction: column;
    gap: 26px;;
    max-width: 640px;
}

    .story-main h1 {
        margin: 0;
        font-size: clamp(32px, 4vw, 54px);
        line-height: 1.02;
        letter-spacing: -.04em;
        font-weight: 800;
        letter-spacing: -0.03em;
        color: #172033;
    }

        .story-main h1 span {
            display: block;
            color: var(--primary);
        }

.story-lead {
    margin: 0;
    max-width: 560px;
    font-size: 18px;
    line-height: 1.75;
    color: #475569;
    font-weight: 500;
}

.story-points {
    display: grid;
    gap: 16px;
    max-width: 580px;
}

.story-point {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.62);
    border: 1px solid rgba(15,23,42,.07);
}

.story-point-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(31,95,116,.22);
}

.story-point strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.story-point span {
    display: block;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
    font-weight: 600;
}

.story-footer {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.story-stat {
    min-width: 130px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(15,23,42,.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.story-stat-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary-2);
    letter-spacing: -.03em;
}

.story-stat-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 800;
}

.login-form-panel {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    width: min(100%, 500px);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.88);
    border-radius: 30px;
    box-shadow: var(--shadow-xl);
    padding: 38px 34px 30px;
    position: relative;
}

    .login-card::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 30px;
        padding: 1px;
        background: linear-gradient(135deg, rgba(31,95,116,.22), rgba(183,121,93,.18), rgba(255,255,255,.4));
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
    }

.login-card-header {
    margin-bottom: 28px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-2);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.login-card-header h2 {
    margin: 0;
    font-size: 36px;
    line-height: 1.05;
    letter-spacing: -.04em;
    font-weight: 900;
    color: #162033;
}

.login-card-header p {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 600;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.validation-summary {
    border-radius: 16px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
}

    .validation-summary:empty {
        display: none;
    }

.form-group {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    gap: 8px;
}

    .form-group label {
        font-size: 13px;
        font-weight: 800;
        color: #334155;
        letter-spacing: .01em;
    }

.form-input {
    width: 100%;
    height: 54px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.12);
    background: rgba(255,255,255,.96);
    padding: 0 16px;
    font: inherit;
    font-size: 16px;
    color: #0f172a;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

    .form-input::placeholder {
        color: #94a3b8;
    }

    .form-input:focus {
        border-color: rgba(31,95,116,.48);
        box-shadow: 0 0 0 5px rgba(31,95,116,.10);
        transform: translateY(-1px);
    }

.field-validation {
    min-height: 18px;
    color: #be123c;
    font-size: 12px;
    font-weight: 700;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

    .remember-me input {
        width: 16px;
        height: 16px;
        accent-color: var(--primary);
    }

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

.login-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 6px;
}

.login-button,
.register-button {
    height: 54px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .01em;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease;
}
.register-button.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.login-button {
    border: none;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    box-shadow: 0 14px 28px rgba(31,95,116,.24);
}

    .login-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 32px rgba(31,95,116,.28);
    }

.register-button {
    border: 1px solid rgba(15,23,42,.10);
    color: #1f2937;
    background: #fff;
}

    .register-button:hover {
        background: #f8fafc;
        transform: translateY(-1px);
    }

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 14px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .14em;
}

    .login-divider::before,
    .login-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(15,23,42,.10);
    }

.login-bottom-note {
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    font-weight: 600;
}

@media (max-width: 1180px) {
    .login-shell {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .story-card {
        height: auto;
        min-height: auto;
        max-height: none;
    }
}

@media (max-width: 720px) {
    .login-shell {
        padding: 14px;
        gap: 18px;
    }

    .story-card,
    .login-card {
        border-radius: 24px;
        padding: 24px 20px;
    }

    .story-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .story-main h1 {
        font-size: 34px;
    }

    .story-lead {
        font-size: 16px;
        line-height: 1.65;
    }

    .login-card-header h2 {
        font-size: 30px;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.success-summary {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
}