/*
 * Страница входа backoffice (@YolkaBackoffice/security/login.html.twig) — как вход в yolka.ecom-front (AuthShell):
 * графитовая бренд-панель #101820 с жёлтыми «бликами» слева, форма на белом справа; Nunito, жёлтый #ffc600
 * для кнопок с тёмным текстом, ссылки — тёмный янтарь. Тема — системная или из data-theme на <html>.
 */
:root {
    --primary: #ffc600;
    --primary-hover: #ebb400;
    --primary-ring: rgb(255 198 0 / 0.35);
    --ink: #101820;

    --bg: #ffffff;
    --text: #242a31;
    --text-strong: #101820;
    --text-muted: #6b737d;
    --text-faint: #99a0a9;
    --border: #c6cad0;
    --field-bg: #ffffff;
    --field-disabled-bg: #eeeff1;
    --secondary-hover-bg: #f6f7f8;
    --link: #8a6400;
    --link-hover: #6b4b00;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --error-text: #dc2626;
    --logo-light: block;
    --logo-dark: none;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-hover: #ffcf26;
        --bg: #101820;
        --text: #eeeff1;
        --text-strong: #ffffff;
        --text-muted: #99a0a9;
        --text-faint: #6b737d;
        --border: #363c44;
        --field-bg: #181e25;
        --field-disabled-bg: #242a31;
        --secondary-hover-bg: #242a31;
        --link: #ffcf26;
        --link-hover: #ffd74d;
        --error-bg: rgb(239 68 68 / 0.16);
        --error-border: rgb(185 28 28 / 0.36);
        --error-text: #f87171;
        --logo-light: none;
        --logo-dark: block;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --primary-hover: #ffcf26;
    --bg: #101820;
    --text: #eeeff1;
    --text-strong: #ffffff;
    --text-muted: #99a0a9;
    --text-faint: #6b737d;
    --border: #363c44;
    --field-bg: #181e25;
    --field-disabled-bg: #242a31;
    --secondary-hover-bg: #242a31;
    --link: #ffcf26;
    --link-hover: #ffd74d;
    --error-bg: rgb(239 68 68 / 0.16);
    --error-border: rgb(185 28 28 / 0.36);
    --error-text: #f87171;
    --logo-light: none;
    --logo-dark: block;
    color-scheme: dark;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 Nunito, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    font-weight: 600;
    text-decoration: none;
}

a:hover {
    color: var(--link-hover);
}

:focus-visible {
    outline: 2px solid var(--primary-hover);
    outline-offset: 2px;
}

.page {
    display: grid;
    min-height: 100vh;
}

@media (min-width: 1024px) {
    .page {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    }
}

/* ── Бренд-панель ─────────────────────────────────────────────────────────────────────────────────── */

.promo {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
    overflow: hidden;
    padding: 3rem;
    background: var(--ink);
    color: #ffffff;
}

@media (min-width: 1024px) {
    .promo {
        display: flex;
    }
}

:root[data-theme="dark"] .promo {
    box-shadow: inset -1px 0 0 rgb(255 255 255 / 0.1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .promo {
        box-shadow: inset -1px 0 0 rgb(255 255 255 / 0.1);
    }
}

.glow {
    position: absolute;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    filter: blur(64px);
    pointer-events: none;
}

.glow--top {
    top: -8rem;
    right: -8rem;
    background: rgb(255 198 0 / 0.25);
}

.glow--bottom {
    bottom: -10rem;
    left: -6rem;
    background: rgb(255 198 0 / 0.1);
}

.promo > :not(.glow) {
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: auto;
    height: 2.5rem;
}

.brand-badge,
.auth-top-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.5;
    white-space: nowrap;
}

.brand-badge {
    background: rgb(255 255 255 / 0.1);
    color: #ffffff;
}

.promo-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.1);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.promo h1 {
    margin: 0;
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
}

@media (min-width: 1280px) {
    .promo h1 {
        font-size: 3rem;
    }
}

.promo-lead {
    margin: 1rem 0 0;
    max-width: 32rem;
    color: #dfe1e5;
    font-size: 1.125rem;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
    color: #dfe1e5;
    list-style: none;
}

.features li {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: rgb(255 255 255 / 0.1);
    color: var(--primary);
}

.feature-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.promo-foot {
    margin: 0;
    color: #99a0a9;
    font-size: 0.875rem;
}

/* ── Форма ───────────────────────────────────────────────────────────────────────────────────────── */

.auth-side {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.auth-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 4rem;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .auth-top {
        padding: 0 2rem;
    }
}

.auth-top-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .auth-top-brand {
        display: none;
    }
}

.auth-top-logo {
    width: auto;
    height: 2rem;
}

.auth-top-logo--light {
    display: var(--logo-light);
}

.auth-top-logo--dark {
    display: var(--logo-dark);
}

.auth-top-badge {
    background: var(--field-disabled-bg);
    color: var(--text-strong);
}

.auth-top-note {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

@media (max-width: 1023px) {
    .auth-top-note {
        display: none;
    }
}

.auth {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}

@media (min-width: 768px) {
    .auth {
        padding: 2.5rem 2rem;
    }
}

.card {
    width: 100%;
    max-width: 28rem;
}

.card-head {
    margin-bottom: 2rem;
}

.card h2 {
    margin: 0 0 0.5rem;
    color: var(--text-strong);
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.card-lead {
    margin: 0;
    color: var(--text-muted);
}

.alert {
    margin: 0 0 1.25rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--error-border);
    border-radius: 0.375rem;
    background: var(--error-bg);
    color: var(--error-text);
    font-size: 0.875rem;
    font-weight: 600;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
}

.field label {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    height: 3rem;
    padding: 0 0.875rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--field-disabled-bg);
    color: var(--text-faint);
    font: inherit;
    font-size: 1.125rem;
    cursor: not-allowed;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:enabled {
    background: var(--field-bg);
    color: var(--text-strong);
    cursor: text;
}

.field input:enabled:hover {
    border-color: var(--text-faint);
}

.field input:enabled:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px var(--primary-ring);
    outline: none;
}

.locked-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: -0.25rem 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.locked-note svg {
    flex: none;
    width: 1rem;
    height: 1rem;
    margin-top: 0.125rem;
}

.btn-gitlab,
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    height: 3rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    background: var(--primary);
    color: var(--ink);
    font: inherit;
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn-gitlab:hover,
.btn-submit:hover {
    background: var(--primary-hover);
    color: var(--ink);
}

.btn-gitlab svg {
    width: 1.375rem;
    height: 1.375rem;
}

.btn-gitlab--secondary {
    border-color: var(--border);
    background: transparent;
    color: var(--text-strong);
}

.btn-gitlab--secondary:hover {
    background: var(--secondary-hover-bg);
    color: var(--text-strong);
}

.gitlab-host {
    margin: 0.75rem 0 0;
    color: var(--text-faint);
    font-size: 0.8125rem;
    text-align: center;
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    color: var(--text-faint);
    font-size: 0.8125rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--border);
}
