:root {
    --ink: #10212f;
    --muted: #607282;
    --line: #d9e4ea;
    --paper: #f7fbfd;
    --white: #ffffff;
    --red: #df2339;
    --red-dark: #b31327;
    --teal: #0e9f9a;
    --blue: #1769aa;
    --navy: #0b2d4a;
    --deep: #061b2d;
    --shadow: 0 24px 60px rgba(16, 33, 47, 0.16);
    --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

body {
    font-family: var(--font);
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(223, 35, 57, 0.10), transparent 34%),
        linear-gradient(315deg, rgba(14, 159, 154, 0.13), transparent 35%),
        var(--paper);
}

a {
    color: inherit;
    text-decoration: none;
}

body > main {
    min-height: 100vh;
}

.login-shell {
    min-height: 100vh;
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.login-topbar {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.login-brand,
.login-home-link,
.login-points span,
.login-input,
.login-row,
.login-check,
.login-submit {
    display: flex;
    align-items: center;
}

.login-brand {
    gap: 10px;
}

.login-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.login-brand span {
    display: grid;
    gap: 2px;
}

.login-brand strong {
    color: var(--navy);
    font-size: 1.12rem;
    font-weight: 900;
}

.login-brand small {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 750;
}

.login-home-link {
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--navy);
    font-size: 0.86rem;
    font-weight: 850;
}

.login-home-link:hover {
    color: var(--red-dark);
    border-color: rgba(223, 35, 57, 0.32);
}

.login-main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(310px, 0.92fr) minmax(360px, 1fr);
    align-items: stretch;
    margin: 18px 0 54px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
}

.login-intro {
    min-height: 520px;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--white);
    background:
        linear-gradient(145deg, rgba(6, 27, 45, 0.97), rgba(11, 45, 74, 0.92)),
        url("/static/img/hero-emt-team.svg") center/cover no-repeat;
    position: relative;
}

.login-intro::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: linear-gradient(180deg, var(--red), var(--teal), var(--blue));
}

.login-logo-frame {
    width: 108px;
    height: 108px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.login-logo-frame img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.login-kicker {
    max-width: 420px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-transform: uppercase;
}

.login-intro h1 {
    margin: 12px 0 14px;
    color: var(--white);
    font-size: 3.6rem;
    font-weight: 950;
    line-height: 0.98;
    letter-spacing: 0;
}

.login-intro p {
    max-width: 430px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.7;
}

.login-points {
    display: grid;
    gap: 9px;
    margin-top: 28px;
}

.login-points span {
    gap: 9px;
    width: fit-content;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    font-weight: 800;
}

.login-card {
    width: 100%;
    max-width: 460px;
    align-self: center;
    justify-self: center;
    padding: 44px 38px;
}

.login-card__header {
    margin-bottom: 26px;
}

.login-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--red-dark);
    background: rgba(223, 35, 57, 0.09);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-card h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.72rem;
    font-weight: 950;
    line-height: 1.15;
}

.login-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.6;
}

.login-alerts {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.45;
}

.login-alert--error,
.login-alert--danger {
    color: #991b1b;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.login-alert--success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.login-alert--warning {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.login-alert--info {
    color: var(--navy);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

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

.login-field {
    display: grid;
    gap: 7px;
}

.login-field label {
    color: var(--ink);
    font-size: 0.73rem;
    font-weight: 950;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.login-input {
    min-height: 49px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.login-input:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(23, 105, 170, 0.13);
}

.login-input.is-invalid {
    border-color: var(--red);
}

.login-input > i {
    flex: 0 0 auto;
    padding: 0 12px;
    color: var(--blue);
}

.login-input input[type="text"],
.login-input input[type="password"],
.login-field-control {
    width: 100%;
    min-width: 0;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--ink);
    box-shadow: none !important;
    font: inherit;
    font-size: 0.93rem;
    padding: 12px 12px 12px 0;
}

.login-input input::placeholder {
    color: #94a3b8;
}

.login-eye {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 0 12px;
    cursor: pointer;
}

.login-eye:hover {
    color: var(--red-dark);
}

.login-field__error {
    margin: 0;
    color: var(--red-dark);
    font-size: 0.78rem;
    font-weight: 750;
}

.login-row {
    justify-content: space-between;
    gap: 14px;
}

.login-check {
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.login-check input,
.login-check-control {
    width: 16px;
    height: 16px;
    accent-color: var(--red);
}

.login-row a {
    color: var(--blue);
    font-size: 0.84rem;
    font-weight: 850;
}

.login-row a:hover {
    color: var(--red-dark);
    text-decoration: underline;
}

.login-submit {
    min-height: 50px;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 14px 30px rgba(223, 35, 57, 0.25);
    font: inherit;
    font-weight: 950;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.login-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(223, 35, 57, 0.31);
}

.login-submit:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

@keyframes login-spin {
    to { transform: rotate(360deg); }
}

.login-spin {
    display: inline-block;
    animation: login-spin 0.7s linear infinite;
}

.login-copy {
    margin: 24px 0 0;
    color: #8a9baa;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .login-shell {
        width: min(100% - 24px, 720px);
    }

    .login-main {
        grid-template-columns: 1fr;
        margin-top: 8px;
    }

    .login-intro {
        min-height: auto;
        padding: 30px 28px;
    }

    .login-logo-frame {
        width: 88px;
        height: 88px;
        margin-bottom: 18px;
    }

    .login-logo-frame img {
        width: 72px;
        height: 72px;
    }

    .login-intro h1 {
        font-size: 2.6rem;
    }

    .login-points {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .login-points span {
        width: auto;
    }

    .login-card {
        max-width: none;
        padding: 32px 28px;
    }
}

@media (max-width: 560px) {
    .login-topbar {
        min-height: 74px;
    }

    .login-brand small {
        display: none;
    }

    .login-home-link {
        padding: 9px 11px;
    }

    .login-intro {
        padding: 26px 20px;
    }

    .login-kicker {
        font-size: 0.68rem;
    }

    .login-intro h1 {
        font-size: 2.25rem;
    }

    .login-intro p {
        font-size: 0.92rem;
    }

    .login-points {
        display: none;
    }

    .login-card {
        padding: 28px 20px 24px;
    }

    .login-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}
