/* Веб-клиент AI Lapin, этап Q2: вход и проверка сессии.
   Тёмная и светлая тема — автоматически по системной настройке. */

:root {
    --bg: #f4f5f7;
    --card: #ffffff;
    --text: #1f2430;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-text: #ffffff;
    --border: #e5e7eb;
    --error: #b91c1c;
    --shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1218;
        --card: #1a1f28;
        --text: #e8eaf0;
        --muted: #9aa2b1;
        --accent: #3b82f6;
        --accent-text: #ffffff;
        --border: #2b313d;
        --error: #f87171;
        --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    }
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    -webkit-text-size-adjust: 100%;
}

.card {
    width: 100%;
    max-width: 380px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 28px 24px;
}

h1 {
    margin: 0 0 4px;
    font-size: 1.45rem;
    line-height: 1.25;
}

.muted {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.95rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 0.85rem;
    color: var(--muted);
}

input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 10px;
    font: inherit;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

button {
    width: 100%;
    padding: 12px 16px;
    margin-top: 8px;
    font: inherit;
    font-weight: 600;
    color: var(--accent-text);
    background: var(--accent);
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: default;
}

button.secondary {
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
    font-weight: 500;
}

.error {
    margin: 10px 0 0;
    color: var(--error);
    font-size: 0.9rem;
}

.status-icon {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 12px;
}
