/* ─── Экран логина ──────────────────────────────────────────────────────── */

#login-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

#login-screen.hidden {
    display: none;
}

.login-card {
    width: 360px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 36px 36px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

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

.login-logo-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.login-logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.login-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.login-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.login-field input {
    height: 36px;
    padding: 0 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
}

.login-field input:focus {
    border-color: var(--accent);
}

.login-error {
    font-size: 12px;
    color: var(--danger);
    min-height: 18px;
    margin-bottom: 14px;
}

.login-btn {
    width: 100%;
    height: 36px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}

.login-btn:hover { opacity: 0.88; }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Скрываем SPA до авторизации */
.app-layout { display: none; }
.app-layout.authed { display: flex; }
