@font-face {
    font-family: "Segoe UI Local";
    src: url("fonts/segoeui.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Segoe UI Local";
    src: url("fonts/seguisb.ttf") format("truetype");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

:root {
    --navy-950: #071c30;
    --navy-900: #0a2948;
    --navy-800: #0c3b68;
    --blue-600: #0789c9;
    --blue-500: #08a4df;
    --blue-100: #e8f6fc;
    --slate-900: #172434;
    --slate-600: #627083;
    --slate-500: #7a8797;
    --slate-300: #c9d2dc;
    --slate-200: #e2e8ef;
    --slate-100: #f4f7fa;
    --danger-700: #a92e3b;
    --danger-100: #fff0f1;
    --white: #fff;
    --shadow: 0 28px 70px rgba(7, 28, 48, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: #edf2f6;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--slate-900);
    font-family: "Segoe UI Local", "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.login-page {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 42px 24px 26px;
    background:
        radial-gradient(circle at 10% 10%, rgba(8, 164, 223, 0.11), transparent 28%),
        radial-gradient(circle at 90% 85%, rgba(12, 59, 104, 0.09), transparent 30%),
        linear-gradient(135deg, #f6f9fb 0%, #e8eef3 100%);
}

.login-page::before,
.login-page::after {
    position: absolute;
    border: 1px solid rgba(12, 59, 104, 0.07);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.login-page::before {
    width: 440px;
    height: 440px;
    top: -270px;
    right: -140px;
}

.login-page::after {
    width: 300px;
    height: 300px;
    bottom: -210px;
    left: -80px;
}

.login-card {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 980px);
    min-height: 600px;
    grid-template-columns: 0.92fr 1.08fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.brand-panel {
    position: relative;
    display: flex;
    overflow: hidden;
    padding: 54px 46px;
    color: var(--white);
    background:
        linear-gradient(150deg, rgba(7, 28, 48, 0.05), rgba(8, 164, 223, 0.16)),
        linear-gradient(150deg, var(--navy-950) 0%, var(--navy-800) 72%, #075b8b 100%);
}

.brand-panel::before {
    position: absolute;
    width: 240px;
    height: 240px;
    right: -110px;
    bottom: -95px;
    border: 44px solid rgba(255, 255, 255, 0.045);
    border-radius: 50%;
    content: "";
}

.brand-panel__glow {
    position: absolute;
    border-radius: 50%;
    background: rgba(8, 164, 223, 0.18);
    filter: blur(1px);
}

.brand-panel__glow--one {
    width: 180px;
    height: 180px;
    top: -90px;
    left: -70px;
}

.brand-panel__glow--two {
    width: 90px;
    height: 90px;
    top: 84px;
    right: 48px;
    background: rgba(255, 255, 255, 0.035);
}

.brand-panel__content {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    flex-direction: column;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #69cdf2;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
}

.brand-panel h1 {
    max-width: 360px;
    margin: 42px 0 22px;
    font-size: clamp(2rem, 3.2vw, 2.65rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.13;
}

.brand-panel__content > p {
    max-width: 340px;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.98rem;
    line-height: 1.7;
}

.support-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 44px;
}

.support-badge__icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 14px;
    color: #81d6f5;
    background: rgba(255, 255, 255, 0.08);
}

.support-badge__icon svg {
    width: 24px;
}

.support-badge span:last-child {
    display: grid;
    gap: 3px;
}

.support-badge small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.74rem;
}

.support-badge strong {
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0.015em;
}

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 64px;
}

.form-panel__inner {
    width: 100%;
    max-width: 390px;
}

.logo {
    display: block;
    width: min(238px, 72%);
    height: auto;
    margin-bottom: 46px;
}

.eyebrow--dark {
    color: var(--blue-600);
}

.form-heading h2 {
    margin: 13px 0 8px;
    color: var(--slate-900);
    font-size: 1.78rem;
    font-weight: 600;
    letter-spacing: -0.028em;
}

.form-heading p {
    margin: 0 0 30px;
    color: var(--slate-600);
    font-size: 0.92rem;
    line-height: 1.55;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -9px 0 20px;
    padding: 12px 14px;
    border: 1px solid #f5cdd1;
    border-radius: 11px;
    color: var(--danger-700);
    background: var(--danger-100);
    font-size: 0.82rem;
    line-height: 1.45;
}

.alert[hidden] {
    display: none;
}

.alert svg {
    width: 18px;
    flex: 0 0 18px;
    margin-top: 1px;
}

.alert--shake {
    animation: shake 0.35s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-4px); }
    65% { transform: translateX(4px); }
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    margin: 0 0 8px;
    color: #344255;
    font-size: 0.82rem;
    font-weight: 600;
}

.field__control {
    position: relative;
    display: flex;
    align-items: center;
}

.field__control > svg {
    position: absolute;
    left: 16px;
    width: 20px;
    color: var(--slate-500);
    pointer-events: none;
    transition: color 0.2s ease;
}

.field__control input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 47px;
    outline: none;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    color: var(--slate-900);
    background: #fbfcfd;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field__control input::placeholder {
    color: #9ba6b3;
}

.field__control:focus-within > svg {
    color: var(--blue-600);
}

.field__control input:focus {
    border-color: rgba(7, 137, 201, 0.7);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(8, 164, 223, 0.1);
}

.password-toggle {
    position: absolute;
    right: 9px;
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: var(--slate-500);
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    outline: none;
    color: var(--navy-800);
    background: var(--slate-100);
}

.password-toggle svg {
    width: 20px;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open {
    display: none;
}

.password-toggle.is-visible .eye-closed {
    display: block;
}

.submit-button {
    position: relative;
    display: flex;
    width: 100%;
    height: 52px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 27px;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(110deg, var(--navy-800), #086b9f);
    box-shadow: 0 10px 24px rgba(8, 78, 119, 0.22);
    cursor: pointer;
    font-size: 0.91rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.submit-button::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.1), transparent 75%);
    content: "";
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.submit-button:hover:not(:disabled) {
    box-shadow: 0 13px 28px rgba(8, 78, 119, 0.3);
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.submit-button:hover:not(:disabled)::before {
    transform: translateX(100%);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.submit-button:focus-visible {
    outline: 3px solid rgba(8, 164, 223, 0.28);
    outline-offset: 3px;
}

.submit-button:disabled {
    cursor: wait;
    opacity: 0.82;
}

.submit-button__arrow {
    width: 18px;
}

.spinner {
    display: none;
    width: 19px;
    height: 19px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.submit-button.is-loading > span:first-child,
.submit-button.is-loading .submit-button__arrow {
    display: none;
}

.submit-button.is-loading .spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 22px 0 0;
    color: var(--slate-500);
    font-size: 0.72rem;
}

.security-note svg {
    width: 17px;
    color: var(--blue-600);
}

.login-page > footer {
    position: relative;
    z-index: 1;
    margin-top: 20px;
    color: #7c8997;
    font-size: 0.72rem;
    text-align: center;
}

@media (max-width: 800px) {
    .login-page {
        justify-content: flex-start;
        padding: 20px 16px;
    }

    .login-card {
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

    .brand-panel {
        min-height: 210px;
        padding: 31px 32px;
    }

    .brand-panel h1 {
        max-width: 460px;
        margin: 24px 0 12px;
        font-size: 1.9rem;
    }

    .brand-panel__content > p {
        max-width: 520px;
        font-size: 0.88rem;
        line-height: 1.55;
    }

    .support-badge {
        display: none;
    }

    .form-panel {
        padding: 38px 32px 36px;
    }

    .form-panel__inner {
        max-width: 460px;
    }

    .logo {
        width: 210px;
        margin-bottom: 34px;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 0;
        background: var(--white);
    }

    .login-card {
        width: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .brand-panel {
        min-height: 176px;
        padding: 25px 24px;
    }

    .brand-panel h1 {
        margin-top: 20px;
        font-size: 1.62rem;
    }

    .brand-panel__content > p {
        display: none;
    }

    .form-panel {
        padding: 32px 24px 36px;
    }

    .logo {
        width: 190px;
        margin-bottom: 30px;
    }

    .form-heading h2 {
        font-size: 1.55rem;
    }

    .login-page > footer {
        padding: 0 20px 22px;
        margin: 0;
        background: var(--white);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
