:root {
    --primary: #188dcc;
    --primary-dark: #0870ae;
    --primary-light: #74d5ff;
    --ink: #142f41;
    --muted: #5b7180;
    --line: #d6e3ea;
    --danger: #ca3445;
    --danger-soft: #fff0f2;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: #fff;
    background: #071f31;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: auto;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    overflow: hidden;
    padding: 26px clamp(22px, 4vw, 64px) 20px;
    background:
        linear-gradient(145deg, rgba(6, 27, 43, 0.99), rgba(8, 48, 74, 0.97) 48%, rgba(10, 91, 133, 0.94)),
        #071f31;
}

.page-grid {
    position: absolute;
    inset: 0;
    z-index: -3;
    opacity: 0.06;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.48) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.48) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(circle at center, #000 0, transparent 75%);
}

.page-orb {
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    pointer-events: none;
}

.page-orb--one {
    width: 560px;
    height: 560px;
    inset: -280px -180px auto auto;
    background: radial-gradient(circle, rgba(87, 198, 246, 0.22), transparent 68%);
}

.page-orb--two {
    width: 760px;
    height: 760px;
    inset: auto auto -520px -260px;
    border: 1px solid rgba(120, 212, 250, 0.12);
    box-shadow:
        0 0 0 85px rgba(255, 255, 255, 0.018),
        0 0 0 175px rgba(255, 255, 255, 0.012);
}

.site-header {
    width: min(1180px, 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 auto;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.brand-logo__image {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    padding: 6px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 14, 25, 0.28);
}

.brand-logo__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-logo__text strong {
    font-size: 1.25rem;
    font-weight: 800;
}

.brand-logo__text small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 500;
}

.security-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.security-label svg {
    width: 16px;
    fill: none;
    stroke: var(--primary-light);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.login-stage {
    width: min(490px, 100%);
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    margin: 18px auto;
}

.intro {
    text-align: center;
}

.intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.72rem;
    font-weight: 600;
}

.intro-badge > span {
    width: 7px;
    height: 7px;
    background: #69d7ff;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(105, 215, 255, 0.1);
}

.intro h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    font-weight: 850;
    line-height: 1.42;
}

.intro h2 em {
    color: #83dcff;
    font-style: normal;
}

.intro p {
    margin: 10px auto 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.9;
}

.intro-points {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.69rem;
    font-weight: 600;
}

.intro-points span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.intro-points svg {
    width: 15px;
    fill: none;
    stroke: #72d8ff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.login-card {
    position: relative;
    overflow: hidden;
    padding: 28px 34px 25px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.985);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 25px;
    box-shadow:
        0 30px 75px rgba(0, 18, 31, 0.38),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.login-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #74d5ff, var(--primary-dark), #74d5ff);
    content: "";
}

.card-heading {
    margin-bottom: 20px;
    text-align: center;
}

.welcome-badge {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 750;
}

.card-heading h1 {
    margin: 0 0 5px;
    color: #102b3e;
    font-size: 1.62rem;
    font-weight: 850;
    line-height: 1.5;
}

.card-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 500;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 15px;
    padding: 10px 12px;
    color: #ad2c3a;
    background: var(--danger-soft);
    border: 1px solid rgba(202, 52, 69, 0.18);
    border-radius: 11px;
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.7;
}

.login-alert[hidden] {
    display: none;
}

.login-alert svg {
    width: 17px;
    flex: 0 0 auto;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.form-field {
    margin-bottom: 13px;
}

.form-field label {
    display: block;
    margin: 0 3px 6px 0;
    color: #263f50;
    font-size: 0.76rem;
    font-weight: 700;
}

.input-shell {
    position: relative;
}

.input-shell .form-control {
    height: 49px;
    padding: 0 46px 0 43px;
    color: var(--ink);
    background: #f5f9fb;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.input-shell .form-control::placeholder {
    color: #718691;
    opacity: 1;
}

.input-shell .form-control:hover {
    background: #fff;
    border-color: #bcd1dc;
}

.input-shell .form-control:focus {
    color: var(--ink);
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(24, 141, 204, 0.11);
}

.input-shell .form-control.is-invalid {
    padding-left: 43px;
    background-image: none;
    border-color: var(--danger);
}

.input-icon {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 16px;
    display: grid;
    color: #708896;
    transform: translateY(-50%);
    pointer-events: none;
    transition: color 160ms ease;
}

.input-icon svg {
    width: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
}

.input-shell:focus-within .input-icon {
    color: var(--primary);
}

.password-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 8px;
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #708896;
    background: transparent;
    border: 0;
    border-radius: 9px;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--primary-dark);
    background: #eaf6fc;
    outline: none;
}

.password-toggle svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open {
    display: none;
}

.password-toggle.is-visible .eye-closed {
    display: block;
}

.invalid-feedback {
    margin: 5px 3px 0 0;
    color: var(--danger);
    font-size: 0.69rem;
    font-weight: 500;
}

.login-button {
    width: 100%;
    height: 50px;
    margin-top: 4px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(110deg, #076ca7, #1995d4);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 13px 24px rgba(11, 116, 173, 0.25);
    font-size: 0.82rem;
    font-weight: 750;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-button:hover,
.login-button:focus-visible {
    color: #fff;
    box-shadow: 0 16px 29px rgba(11, 116, 173, 0.32);
    filter: brightness(1.04);
    transform: translateY(-2px);
}

.login-button:focus-visible {
    outline: 3px solid rgba(24, 141, 204, 0.22);
    outline-offset: 3px;
}

.login-button:active {
    color: #fff !important;
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.78;
    transform: none;
}

.button-label,
.button-loading {
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.button-label {
    display: flex;
}

.button-loading {
    display: none;
}

.button-label svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.login-button.is-loading .button-label {
    display: none;
}

.login-button.is-loading .button-loading {
    display: flex;
}

.login-help {
    margin: 16px 0 0;
    color: #657b88;
    font-size: 0.68rem;
    font-weight: 500;
    text-align: center;
}

.company-bar {
    width: min(1180px, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 11px 24px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.68rem;
    font-weight: 500;
}

.company-bar a,
.company-bar > span:not(.copyright) {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.company-bar a {
    text-decoration: none;
    transition: color 160ms ease;
}

.company-bar a:hover {
    color: #fff;
}

.company-bar svg {
    width: 15px;
    fill: none;
    stroke: #76d7ff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.copyright {
    padding-right: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-height: 820px) and (min-width: 641px) {
    .login-shell {
        padding-top: 18px;
        padding-bottom: 14px;
    }

    .brand-logo__image {
        width: 47px;
        height: 47px;
    }

    .login-stage {
        gap: 12px;
        margin: 10px auto;
    }

    .intro-badge,
    .intro p,
    .intro-points {
        display: none;
    }

    .intro h2 {
        font-size: 1.75rem;
    }

    .login-card {
        padding: 22px 30px 20px;
    }

    .card-heading {
        margin-bottom: 15px;
    }

    .form-field {
        margin-bottom: 10px;
    }

    .input-shell .form-control {
        height: 46px;
    }

    .login-button {
        height: 47px;
    }

    .login-help {
        margin-top: 12px;
    }
}

@media (max-width: 640px) {
    .login-shell {
        min-height: 100svh;
        overflow: auto;
        padding: 22px 19px 18px;
    }

    .site-header {
        align-items: flex-start;
    }

    .brand-logo__image {
        width: 47px;
        height: 47px;
        border-radius: 14px;
    }

    .brand-logo__text strong {
        font-size: 1.08rem;
    }

    .brand-logo__text small {
        max-width: 165px;
        font-size: 0.65rem;
    }

    .security-label {
        width: 38px;
        height: 38px;
        justify-content: center;
        padding: 0;
        font-size: 0;
    }

    .security-label svg {
        width: 17px;
    }

    .login-stage {
        width: 100%;
        flex: 0 0 auto;
        gap: 17px;
        margin: 38px auto 25px;
    }

    .intro-badge {
        margin-bottom: 9px;
        font-size: 0.68rem;
    }

    .intro h2 {
        font-size: 1.75rem;
    }

    .intro p {
        max-width: 340px;
        font-size: 0.72rem;
    }

    .intro-points {
        gap: 13px;
        font-size: 0.65rem;
    }

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

    .card-heading h1 {
        font-size: 1.48rem;
    }

    .company-bar {
        gap: 9px 18px;
        padding-top: 4px;
    }

    .company-address,
    .copyright {
        display: none !important;
    }
}

@media (max-width: 390px) {
    .login-stage {
        margin-top: 30px;
    }

    .intro p,
    .intro-points {
        display: none;
    }

    .intro h2 {
        font-size: 1.6rem;
    }

    .login-card {
        padding-right: 17px;
        padding-left: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
