:root {
    color-scheme: light;
    --primary-950: #08143d;
    --primary-900: #0b1c5a;
    --primary-700: #1b53d8;
    --surface: #ffffff;
    --surface-soft: #f7f9fd;
    --border: #e1e7f0;
    --text: #172033;
    --muted: #6b7280;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --shadow: 0 30px 80px rgba(8, 20, 61, 0.11);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--text);
    background: var(--surface-soft);
}

button,
input {
    font: inherit;
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
    gap: 18px;
    padding: max(18px, env(safe-area-inset-top))
             max(18px, env(safe-area-inset-right))
             max(18px, env(safe-area-inset-bottom))
             max(18px, env(safe-area-inset-left));
}

.login-card,
.login-aside {
    border-radius: 30px;
}

.login-card {
    align-self: center;
    width: min(100%, 500px);
    margin: 0 auto;
    padding: clamp(24px, 5vw, 42px);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.login-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.logo-box {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    background: #f4f7ff;
    border: 1px solid var(--border);
    border-radius: 22px;
}

.logo-box img {
    width: 58px;
    height: 58px;
    border-radius: 18px;
}

.title-block {
    min-width: 0;
}

.eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-700);
    font-size: 0.76rem;
    font-weight: 700;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    color: var(--primary-950);
    font-size: clamp(1.45rem, 4vw, 2rem);
}

.title-block p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.field {
    display: grid;
    gap: 9px;
}

.field label {
    color: var(--primary-950);
    font-size: 0.9rem;
    font-weight: 700;
}

.field input {
    width: 100%;
    min-height: 54px;
    padding: 12px 15px;
    color: var(--text);
    background: #fbfcff;
    border: 1px solid var(--border);
    border-radius: 16px;
    outline: none;
    transition: border-color 160ms ease,
                box-shadow 160ms ease,
                background-color 160ms ease;
}

.field input:focus {
    background: #ffffff;
    border-color: var(--primary-700);
    box-shadow: 0 0 0 4px rgba(27, 83, 216, 0.11);
}

.login-button {
    min-height: 56px;
    margin-top: 4px;
    color: #ffffff;
    background: var(--primary-950);
    border: 0;
    border-radius: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(8, 20, 61, 0.17);
}

.login-footer {
    display: flex;
    justify-content: center;
    margin-top: 22px;
    color: var(--muted);
    font-size: 0.78rem;
}

.alert {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    line-height: 1.8;
}

.alert-error {
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid #fecdca;
}

.login-aside {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    min-height: calc(100dvh - 36px);
    padding: clamp(32px, 6vw, 74px);
    color: #ffffff;
    background: linear-gradient(145deg, #07143f 0%, #10358f 58%, #2e6bf0 100%);
    isolation: isolate;
}

.aside-content {
    position: relative;
    z-index: 2;
    width: min(100%, 680px);
}

.aside-tag {
    display: inline-flex;
    margin-bottom: 22px;
    padding: 8px 13px;
    color: #dbe7ff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.login-aside h2 {
    max-width: 12ch;
    margin-bottom: 18px;
    font-size: clamp(2.25rem, 6vw, 4.6rem);
    line-height: 1.25;
}

.login-aside p {
    max-width: 56ch;
    margin-bottom: 34px;
    color: #d5e2ff;
    line-height: 2;
}

.aside-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mini-card {
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    backdrop-filter: blur(12px);
}

.mini-card strong {
    font-size: 0.95rem;
}

.mini-card span {
    color: #cad9fb;
    font-size: 0.78rem;
    line-height: 1.7;
}

.aside-orb {
    position: absolute;
    z-index: 1;
    border-radius: 50%;
}

.aside-orb-one {
    width: 350px;
    height: 350px;
    top: -120px;
    left: -100px;
    background: rgba(88, 147, 255, 0.24);
}

.aside-orb-two {
    width: 240px;
    height: 240px;
    right: -80px;
    bottom: -70px;
    background: rgba(255, 255, 255, 0.11);
}

@media (max-width: 980px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-aside {
        display: none;
    }
}

@media (max-width: 560px) {
    .login-page {
        padding: max(12px, env(safe-area-inset-top))
                 max(12px, env(safe-area-inset-right))
                 max(12px, env(safe-area-inset-bottom))
                 max(12px, env(safe-area-inset-left));
    }

    .login-card {
        width: 100%;
        padding: 22px 18px;
        border-radius: 24px;
    }

    .login-header {
        align-items: flex-start;
        margin-bottom: 26px;
    }

    .logo-box {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }

    .logo-box img {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }
}

@media (max-width: 370px) {
    .login-header {
        flex-direction: column;
    }
}
