:root {
    --primary-950: #063f42;
    --primary-900: #07575b;
    --primary-800: #0a686b;
    --primary-700: #0f766e;
    --primary-600: #0d9488;
    --primary-100: #ccfbf1;
    --primary-50: #f0fdfa;

    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;

    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;

    --white: #ffffff;
    --success: #047857;
    --success-bg: #ecfdf5;
    --error: #be123c;
    --error-bg: #fff1f2;

    --shadow-card: 0 28px 90px rgba(15, 23, 42, 0.13);
    --shadow-button: 0 16px 35px rgba(15, 118, 110, 0.24);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--slate-900);
    background:
        radial-gradient(circle at 3% 4%, rgba(37, 99, 235, 0.13), transparent 29rem),
        radial-gradient(circle at 96% 92%, rgba(13, 148, 136, 0.15), transparent 31rem),
        linear-gradient(145deg, #f8fafc 0%, #f0fdfa 48%, #eff6ff 100%);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    display: block;
}

.auth-page {
    min-height: 100vh;
    padding: 28px;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(430px, 1.05fr);
    width: min(1180px, 100%);
    min-height: calc(100vh - 56px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.auth-presentation {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 42px;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 20% 14%, rgba(255, 255, 255, 0.16), transparent 18rem),
        radial-gradient(circle at 84% 88%, rgba(96, 165, 250, 0.25), transparent 22rem),
        linear-gradient(145deg, var(--primary-950), var(--primary-700) 58%, var(--blue-700));
}

.auth-presentation::before,
.auth-presentation::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    pointer-events: none;
}

.auth-presentation::before {
    width: 320px;
    height: 320px;
    right: -180px;
    top: -130px;
}

.auth-presentation::after {
    width: 230px;
    height: 230px;
    left: -110px;
    bottom: -120px;
}

.brand-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    width: fit-content;
}

.brand-mark {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 17px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.13);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.18);
}

.brand-mark svg {
    width: 31px;
    height: 31px;
}

.brand-link strong,
.brand-link small {
    display: block;
}

.brand-link strong {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.brand-link small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.67);
    font-size: 0.74rem;
    font-weight: 650;
}

.presentation-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: auto 0;
    padding: 70px 0;
}

.presentation-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.87);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 850;
}

.presentation-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5eead4;
    box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.12);
}

.presentation-content h1 {
    margin: 26px 0 0;
    font-size: clamp(2.8rem, 5vw, 4.55rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.presentation-content h1 span {
    display: block;
    color: #99f6e4;
}

.presentation-content > p {
    max-width: 500px;
    margin: 23px 0 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 1rem;
    line-height: 1.75;
}

.presentation-list {
    display: grid;
    gap: 12px;
    margin: 31px 0 0;
    padding: 0;
    list-style: none;
}

.presentation-list li {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.88rem;
    font-weight: 750;
}

.presentation-list li span {
    display: grid;
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 9px;
    color: var(--primary-950);
    background: #99f6e4;
    font-size: 0.78rem;
    font-weight: 950;
}

.presentation-footer {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.72rem;
}

.auth-form-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 50px clamp(34px, 6vw, 82px) 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.86));
}

.auth-card {
    width: min(100%, 460px);
    margin: auto;
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 11px;
    margin-bottom: 30px;
}

.mobile-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-800), var(--blue-600));
    font-weight: 950;
}

.mobile-brand strong,
.mobile-brand small {
    display: block;
}

.mobile-brand strong {
    color: var(--slate-950);
    font-size: 1rem;
    font-weight: 900;
}

.mobile-brand small {
    color: var(--slate-500);
    font-size: 0.72rem;
}

.auth-card-header {
    margin-bottom: 31px;
}

.auth-eyebrow {
    margin: 0 0 10px;
    color: var(--primary-700);
    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-card-header h2 {
    margin: 0;
    color: var(--slate-950);
    font-size: clamp(2rem, 4vw, 2.55rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.auth-card-header > p:last-child {
    margin: 11px 0 0;
    color: var(--slate-500);
    font-size: 0.93rem;
}

.flash-message {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 14px;
    font-size: 0.84rem;
    font-weight: 750;
}

.flash-success {
    border-color: #a7f3d0;
    color: var(--success);
    background: var(--success-bg);
}

.flash-error {
    border-color: #fecdd3;
    color: var(--error);
    background: var(--error-bg);
}

.auth-form {
    display: grid;
    gap: 19px;
}

.form-field {
    display: block;
}

.form-field > span:first-child {
    display: block;
    margin-bottom: 8px;
    color: var(--slate-700);
    font-size: 0.82rem;
    font-weight: 850;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap > svg {
    position: absolute;
    left: 15px;
    width: 19px;
    height: 19px;
    color: var(--slate-400);
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    min-height: 54px;
    padding: 14px 48px 14px 46px;
    border: 1px solid var(--slate-300);
    border-radius: 15px;
    outline: 0;
    color: var(--slate-900);
    background: rgba(255, 255, 255, 0.94);
    font-size: 0.93rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.input-wrap input::placeholder {
    color: var(--slate-400);
}

.input-wrap input:focus {
    border-color: var(--primary-600);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.password-toggle {
    position: absolute;
    right: 10px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 11px;
    color: var(--slate-500);
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

.password-toggle svg {
    width: 19px;
    height: 19px;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: -4px;
    color: var(--slate-500);
    font-size: 0.75rem;
}

.form-options a {
    color: var(--primary-700);
    font-weight: 850;
}

.form-options a:hover {
    text-decoration: underline;
}

.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 14px 20px;
    border: 0;
    border-radius: 15px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-900), var(--primary-600));
    box-shadow: var(--shadow-button);
    font-weight: 900;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(15, 118, 110, 0.29);
    filter: saturate(1.08);
}

.login-button svg {
    width: 18px;
    height: 18px;
}

.register-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 25px;
    padding: 16px;
    border: 1px solid var(--slate-200);
    border-radius: 15px;
    color: var(--slate-500);
    background: rgba(248, 250, 252, 0.78);
    font-size: 0.81rem;
    text-align: center;
}

.register-box a {
    color: var(--primary-700);
    font-weight: 900;
}

.register-box a:hover {
    text-decoration: underline;
}

.restricted-note {
    margin: 20px 0 0;
    color: var(--slate-400);
    font-size: 0.7rem;
    text-align: center;
}

.auth-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    width: min(100%, 460px);
    margin: 34px auto 0;
    color: var(--slate-400);
    font-size: 0.72rem;
}

.auth-footer a {
    color: var(--slate-500);
    font-weight: 750;
}

.auth-footer a:hover {
    color: var(--primary-700);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 3px;
}

@media (max-width: 920px) {
    .auth-page {
        padding: 18px;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 36px);
    }

    .auth-presentation {
        display: none;
    }

    .auth-form-area {
        padding: 48px clamp(24px, 8vw, 70px) 28px;
    }

    .mobile-brand {
        display: flex;
    }
}

@media (max-width: 560px) {
    .auth-page {
        padding: 0;
    }

    .auth-layout {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-form-area {
        justify-content: flex-start;
        padding: 31px 20px 24px;
    }

    .auth-card {
        margin-top: 0;
    }

    .auth-card-header {
        margin-bottom: 26px;
    }

    .auth-card-header h2 {
        font-size: 2rem;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .register-box {
        align-items: center;
        flex-direction: column;
    }

    .auth-footer {
        align-items: center;
        flex-direction: column;
        margin-top: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}