:root {
    color-scheme: light;
    --login-primary: #2563eb;
    --login-primary-dark: #1d4ed8;
    --login-dark: #020617;
    --login-slate: #0f172a;
    --login-muted: #64748b;
    --login-border: #e2e8f0;
    --login-surface: #ffffff;
    --login-background: #f8fafc;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--login-background);
    color: var(--login-slate);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

.login-page {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
}

.login-presentation {
    position: relative;
    display: none;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(59, 130, 246, 0.28),
            transparent 36%
        ),
        linear-gradient(
            145deg,
            #020617 0%,
            #0f172a 52%,
            #172554 100%
        );
    color: #ffffff;
    padding: clamp(32px, 5vw, 72px);
}

.login-presentation-grid {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px
        );
    background-size: 48px 48px;
    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 92%
    );
}

.login-presentation-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(18px);
    pointer-events: none;
}

.login-presentation-glow-one {
    top: 16%;
    right: -160px;
    width: 420px;
    height: 420px;
    background: rgba(37, 99, 235, 0.22);
}

.login-presentation-glow-two {
    bottom: -190px;
    left: -150px;
    width: 430px;
    height: 430px;
    background: rgba(14, 165, 233, 0.13);
}

.login-brand,
.login-presentation-content,
.login-presentation-footer {
    position: relative;
    z-index: 2;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-brand-icon,
.login-mobile-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.login-brand-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(
        135deg,
        #3b82f6,
        #2563eb
    );
    color: #ffffff;
    font-size: 24px;
    box-shadow:
        0 12px 30px rgba(37, 99, 235, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.login-brand-title,
.login-brand-subtitle {
    margin: 0;
}

.login-brand-title {
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.login-brand-subtitle {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 12px;
}

.login-presentation-content {
    max-width: 660px;
    margin: auto 0;
    padding: 70px 0;
}

.login-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #bfdbfe;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(14px);
}

.login-presentation-content h1 {
    max-width: 650px;
    margin: 24px 0 0;
    color: #ffffff;
    font-size: clamp(38px, 4.4vw, 64px);
    font-weight: 850;
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.login-presentation-content h1 span {
    color: #93c5fd;
}

.login-presentation-content > p {
    max-width: 570px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.85;
}

.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.login-feature-grid article {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    padding: 15px;
    backdrop-filter: blur(12px);
}

.login-feature-grid article > span {
    display: flex;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

.login-feature-grid strong,
.login-feature-grid small {
    display: block;
}

.login-feature-grid strong {
    color: #f8fafc;
    font-size: 13px;
}

.login-feature-grid small {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.55;
}

.login-presentation-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.login-form-section {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(219, 234, 254, 0.72),
            transparent 30%
        ),
        #f8fafc;
    padding: 24px;
}

.login-form-container {
    width: 100%;
    max-width: 460px;
}

.login-mobile-brand {
    display: flex;
    width: 100%;
    max-width: 460px;
    align-items: center;
    gap: 11px;
    margin-bottom: 22px;
}

.login-mobile-brand-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(
        135deg,
        #3b82f6,
        #1d4ed8
    );
    color: #ffffff;
    font-size: 21px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.23);
}

.login-mobile-brand strong,
.login-mobile-brand small {
    display: block;
}

.login-mobile-brand strong {
    color: var(--login-slate);
    font-size: 15px;
}

.login-mobile-brand small {
    margin-top: 2px;
    color: var(--login-muted);
    font-size: 11px;
}

.login-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.94);
    padding: clamp(26px, 5vw, 42px);
    box-shadow:
        0 28px 70px rgba(15, 23, 42, 0.1),
        0 3px 12px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(18px);
}

.login-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        #2563eb,
        #60a5fa,
        #2563eb
    );
    content: "";
}

.login-card-header {
    margin-bottom: 28px;
}

.login-card-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 22px;
}

.login-eyebrow {
    margin: 22px 0 0;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-card h2 {
    margin: 7px 0 0;
    color: #020617;
    font-size: clamp(26px, 5vw, 33px);
    font-weight: 850;
    letter-spacing: -0.04em;
}

.login-description {
    margin: 10px 0 0;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.7;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border-radius: 14px;
    margin-bottom: 20px;
    padding: 13px 14px;
    font-size: 13px;
}

.login-alert i {
    margin-top: 1px;
}

.login-form {
    display: grid;
    gap: 20px;
}

.login-label {
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 750;
}

.login-input-group {
    position: relative;
}

.login-input-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 16px;
    color: #94a3b8;
    font-size: 17px;
    transform: translateY(-50%);
    pointer-events: none;
}

.login-input {
    min-height: 54px;
    border: 1px solid var(--login-border);
    border-radius: 14px;
    background: #f8fafc;
    padding: 12px 16px 12px 48px;
    color: #0f172a;
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.login-password-input {
    padding-right: 52px;
}

.login-input::placeholder {
    color: #a8b2c1;
}

.login-input:hover {
    border-color: #cbd5e1;
}

.login-input:focus {
    border-color: #60a5fa;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(219, 234, 254, 0.9);
}

.login-input.is-invalid {
    padding-right: 52px;
}

.login-password-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 8px;
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #64748b;
    transform: translateY(-50%);
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
    background: #e2e8f0;
    color: #0f172a;
}

.login-field-error {
    margin-top: 7px;
    font-size: 12px;
}

.login-remember {
    display: inline-flex;
    cursor: pointer;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-size: 13px;
}

.login-remember .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-color: #cbd5e1;
    margin: 0;
}

.login-remember .form-check-input:checked {
    border-color: #2563eb;
    background-color: #2563eb;
}

.login-remember .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(219, 234, 254, 0.9);
}

.login-submit-button {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        #2563eb,
        #1d4ed8
    );
    color: #ffffff;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.login-submit-button:hover {
    background: linear-gradient(
        135deg,
        #1d4ed8,
        #1e40af
    );
    color: #ffffff;
    box-shadow: 0 17px 32px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.login-submit-button:active {
    transform: translateY(0);
}

.login-submit-button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.login-submit-content,
.login-submit-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.login-submit-content i {
    transition: transform 0.2s ease;
}

.login-submit-button:hover .login-submit-content i {
    transform: translateX(3px);
}

.login-monitoring-message {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    margin: 20px auto 0;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

.login-monitoring-message i {
    margin-top: 1px;
}

@media (min-width: 992px) {
    .login-page {
        grid-template-columns:
            minmax(480px, 1.15fr)
            minmax(420px, 0.85fr);
    }

    .login-presentation {
        display: flex;
    }

    .login-mobile-brand {
        display: none;
    }

    .login-form-section {
        padding: 48px;
    }
}

@media (min-width: 1400px) {
    .login-page {
        grid-template-columns:
            minmax(620px, 1.3fr)
            minmax(460px, 0.7fr);
    }
}

@media (max-width: 575.98px) {
    .login-form-section {
        justify-content: flex-start;
        padding: 20px 16px 28px;
    }

    .login-mobile-brand {
        margin-top: 8px;
    }

    .login-card {
        border-radius: 24px;
        padding: 26px 20px;
    }

    .login-card-icon {
        width: 43px;
        height: 43px;
    }
}

@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;
    }
}
