:root {
    --page-blue: #0356ad;
    --deep-blue: #093d82;
    --panel-blue: #0a4e99;
    --card-blue: rgba(56, 138, 237, 0.34);
    --card-line: rgba(255, 255, 255, 0.14);
    --text: #f7fbff;
    --muted: rgba(255, 255, 255, 0.78);
    --input-bg: rgba(255, 255, 255, 0.95);
    --button-bg: #0c3d79;
    --button-hover: #072d5c;
    --shadow: 0 24px 70px rgba(0, 20, 56, 0.32);
}

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

body.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Outfit", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top center, rgba(68, 173, 255, 0.4), transparent 18%),
        linear-gradient(180deg, var(--page-blue), var(--deep-blue));
    overflow: hidden;
}

.auth-scene {
    position: relative;
    min-height: 100vh;
    padding: 3rem 1.5rem;
}

.auth-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: calc(100vh - 6rem);
}

.auth-shell {
    position: relative;
    width: min(1368px, 100%);
    min-height: 770px;
    border-radius: 26px;
    background: rgba(10, 66, 132, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.auth-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(412px, calc(100% - 2rem));
    padding: 2.3rem 3rem 2.1rem;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
        var(--card-blue);
    border: 1px solid var(--card-line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.reveal-card {
    animation: floatIn 0.85s ease-out both;
}

.auth-brand {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.auth-card h1 {
    margin: 0 0 1.25rem;
    font-size: 2.1rem;
    font-weight: 700;
}

.auth-form {
    display: grid;
    gap: 0.8rem;
}

.auth-message {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.45;
}

.auth-message-success {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(134, 239, 172, 0.35);
    color: #ecfdf3;
}

.auth-message-error {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(252, 165, 165, 0.35);
    color: #fef2f2;
}

.auth-message-info {
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(147, 197, 253, 0.35);
    color: #eff6ff;
}

.auth-form label {
    font-size: 0.98rem;
}

.auth-form input {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 7px;
    padding: 0 1rem;
    font: inherit;
    color: #22426b;
    background: var(--input-bg);
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(7, 36, 77, 0.06);
}

.auth-form input::placeholder {
    color: #b7c0cc;
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #bcc9d7;
    font-size: 1rem;
    cursor: pointer;
}

.helper-link {
    margin-top: 0.15rem;
    color: var(--text);
    font-size: 0.98rem;
}

.helper-link:hover,
.auth-footer a:hover {
    text-decoration: underline;
}

.primary-action {
    margin-top: 1rem;
    height: 56px;
    border: 0;
    border-radius: 9px;
    background: var(--button-bg);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: transform 0.24s ease, background-color 0.24s ease, box-shadow 0.24s ease;
}

.primary-action:disabled {
    cursor: wait;
    opacity: 0.78;
    transform: none;
    box-shadow: none;
}

.primary-action:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(6, 28, 60, 0.28);
}

.auth-divider {
    margin: 1.4rem 0 1.25rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.98rem;
}

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

.social-btn {
    display: grid;
    place-items: center;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    color: #244064;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 24, 64, 0.12);
    transition: transform 0.2s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn.google { color: #ea4335; }
.social-btn.github { color: #111827; }
.social-btn.facebook { color: #1877f2; }

.auth-footer {
    margin: 1.45rem 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--text);
    font-weight: 700;
}

.shape {
    position: absolute;
    pointer-events: none;
}

.accent {
    opacity: 0.48;
    filter: blur(0.2px);
}

.accent-left {
    width: 188px;
    height: 94px;
    left: 21%;
    top: 28%;
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(198, 227, 255, 0.95), rgba(93, 173, 255, 0.85));
    box-shadow: 0 14px 24px rgba(0, 17, 55, 0.25);
    transform: rotate(-45deg);
}

.accent-left::after {
    content: "";
    position: absolute;
    width: 112px;
    height: 54px;
    left: 6px;
    bottom: -84px;
    border-radius: 999px;
    background: inherit;
    transform: rotate(0deg);
}

.accent-center {
    width: 330px;
    height: 330px;
    right: 20%;
    top: 10%;
    border-radius: 50%;
    border: 38px solid rgba(10, 86, 180, 0.22);
    border-right-color: rgba(10, 86, 180, 0.45);
    border-bottom-color: rgba(10, 86, 180, 0.45);
}

.accent-right {
    width: 210px;
    height: 210px;
    right: 16%;
    top: 35%;
    border-radius: 46%;
    border: 42px solid rgba(7, 53, 117, 0.52);
    border-left-color: transparent;
    border-bottom-color: transparent;
    transform: rotate(24deg);
}

.shape-ring {
    width: 144px;
    height: 144px;
    left: 34%;
    top: 4%;
    border-radius: 50%;
    border: 24px solid rgba(7, 55, 136, 0.6);
    border-top-color: rgba(39, 219, 255, 0.62);
    border-right-color: rgba(39, 219, 255, 0.62);
}

.shape-blob {
    width: 420px;
    height: 176px;
    right: -54px;
    bottom: 6%;
    border-radius: 120px;
    background: linear-gradient(90deg, rgba(132, 204, 255, 0.7), rgba(196, 230, 255, 0.35));
    filter: blur(0.2px);
}

.shape-blob::before,
.shape-blob::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: inherit;
}

.shape-blob::before {
    width: 166px;
    height: 166px;
    left: -26px;
    top: 4px;
}

.shape-blob::after {
    width: 150px;
    height: 150px;
    right: -14px;
    top: 15px;
}

.shape-ribbon {
    width: 330px;
    height: 330px;
    left: -48px;
    bottom: -34px;
    border-radius: 34%;
    border: 34px solid rgba(103, 172, 255, 0.12);
    border-right-color: transparent;
    transform: rotate(18deg);
}

.shape-ribbon::after {
    content: "";
    position: absolute;
    width: 136px;
    height: 136px;
    left: 74px;
    top: 82px;
    border-radius: 34%;
    border: 22px solid rgba(103, 172, 255, 0.08);
    border-left-color: transparent;
}

.shape-wave {
    width: 168px;
    height: 48px;
    right: 20%;
    bottom: 22%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(214, 235, 255, 0.86), rgba(129, 193, 255, 0.74));
    filter: blur(0.2px);
}

.shape-wave::before,
.shape-wave::after {
    content: "";
    position: absolute;
    width: 62px;
    height: 32px;
    border-radius: 999px;
    background: inherit;
}

.shape-wave::before {
    left: -24px;
    top: -12px;
}

.shape-wave::after {
    right: -18px;
    bottom: -8px;
}

.shape-dash {
    width: 126px;
    height: 34px;
    left: 59%;
    bottom: 26%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(222, 240, 255, 0.92), rgba(111, 184, 255, 0.78));
}

.shape-dash::before,
.shape-dash::after {
    content: "";
    position: absolute;
    width: 54px;
    height: 26px;
    border-radius: 999px;
    background: inherit;
}

.shape-dash::before {
    left: 18px;
    top: 42px;
}

.shape-dash::after {
    right: -20px;
    top: 42px;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 26px));
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 980px) {
    .auth-shell {
        min-height: 680px;
    }

    .accent-left,
    .accent-center,
    .accent-right,
    .shape-ribbon,
    .shape-blob {
        opacity: 0.28;
    }
}

@media (max-width: 640px) {
    .auth-scene {
        padding: 1rem;
    }

    .auth-stage {
        min-height: calc(100vh - 2rem);
    }

    .auth-shell {
        min-height: auto;
        padding: 1.5rem 0;
    }

    .auth-card {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0 auto;
        padding: 2rem 1.4rem 1.6rem;
    }

    .reveal-card {
        animation: mobileIn 0.75s ease-out both;
    }

    .social-row {
        gap: 0.75rem;
    }

    .shape-ring,
    .shape-ribbon,
    .accent-left,
    .accent-center,
    .accent-right,
    .shape-dash {
        display: none;
    }
}

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