.app-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-selector {
    min-width: 210px;
}

.company-selector label {
    display: block;
    margin-bottom: 2px;
    color: var(--muted-color);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.company-selector .form-select {
    min-height: 34px;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 12px;
}

.global-context {
    padding: 8px 11px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: var(--muted-color);
    font-size: 11px;
}

.auth-body {
    min-height: 100vh;
    background: #f3f6fb;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
}

.auth-brand-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 46px;
    background:
        radial-gradient(
            circle at top right,
            rgba(74, 113, 255, 0.32),
            transparent 34%
        ),
        linear-gradient(145deg, #14213b, #0d1830);
    color: #ffffff;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 760;
}

.auth-message {
    max-width: 520px;
    margin: auto 0;
}

.auth-kicker {
    display: inline-block;
    margin-bottom: 18px;
    color: #9db3ff;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.auth-message h1 {
    margin: 0 0 20px;
    font-size: clamp(36px, 4vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.auth-message p {
    max-width: 460px;
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.7;
}

.auth-version {
    color: #94a3b8;
    font-size: 12px;
}

.auth-form-panel,
.company-selection-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 34px;
}

.auth-card,
.company-selection-card {
    width: min(100%, 470px);
    padding: 34px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

.company-selection-card {
    width: min(100%, 560px);
}

.auth-card-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.auth-card-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 13px;
    background: var(--sidebar-color);
    color: #ffffff;
    font-weight: 800;
}

.auth-card-heading h1,
.auth-card-heading h2 {
    margin: 0 0 4px;
    font-size: 23px;
    font-weight: 760;
    letter-spacing: -0.025em;
}

.auth-card-heading p {
    margin: 0;
    color: var(--muted-color);
    font-size: 13px;
}

.auth-security-note {
    margin: 18px 0 0;
    color: var(--muted-color);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.company-options {
    display: grid;
    gap: 11px;
}

.company-option {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #ffffff;
    text-align: left;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.company-option:hover {
    border-color: #9db1ff;
    box-shadow: 0 8px 20px rgba(49, 94, 251, 0.10);
    transform: translateY(-1px);
}

.company-option-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e9efff;
    color: var(--primary-color);
    font-weight: 800;
}

.company-option-info strong,
.company-option-info small {
    display: block;
}

.company-option-info small {
    margin-top: 3px;
    color: var(--muted-color);
    font-size: 11px;
}

.company-option-arrow {
    color: var(--primary-color);
    font-size: 18px;
}

.empty-company-message {
    padding: 24px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    text-align: center;
}

.empty-company-message h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.empty-company-message p {
    margin: 0 0 18px;
    color: var(--muted-color);
    font-size: 13px;
    line-height: 1.6;
}

.forbidden-card {
    max-width: 620px;
    margin: 70px auto;
    padding: 38px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 15px 38px var(--shadow-color);
    text-align: center;
}

.forbidden-code {
    display: inline-block;
    margin-bottom: 12px;
    color: #dc2626;
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.06em;
}

.forbidden-card h2 {
    margin: 0 0 10px;
}

.forbidden-card p {
    max-width: 480px;
    margin: 0 auto 22px;
    color: var(--muted-color);
    line-height: 1.6;
}

@media (max-width: 1050px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 30px;
    }

    .auth-message {
        margin: 70px 0;
    }

    .auth-version {
        display: none;
    }
}

@media (max-width: 820px) {
    .company-selector,
    .global-context {
        display: none;
    }

    .app-header-actions {
        margin-left: auto;
    }
}

@media (max-width: 600px) {
    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel,
    .company-selection-shell {
        padding: 18px;
    }

    .auth-card,
    .company-selection-card {
        padding: 24px;
    }

    .app-header-actions .app-user {
        display: none;
    }
}
