* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #33414f;
}

.container { width: 100%; max-width: 400px; }

.card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #eef2f6;
    padding: 40px 40px 30px;
}

h1 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* фирменная точка — перекликается с точками-иконками баз на главной панели */
.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3182ce;
    flex-shrink: 0;
}

.subtitle {
    color: #8b9bab;
    font-size: 0.95em;
    margin-bottom: 28px;
    text-align: center;
}

.alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9em;
    margin-bottom: 20px;
    text-align: center;
}

label {
    display: block;
    color: #4a5568;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 6px;
    text-align: center;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dbe2ea;
    border-radius: 6px;
    font-size: 1em;
    margin-bottom: 18px;
    color: #33414f;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

button {
    width: 100%;
    padding: 13px;
    background: #3182ce;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 4px;
}

button:hover { background: #2c5282; }

.footer {
    margin-top: 22px;
    text-align: center;
    color: #b0bcc7;
    font-size: 0.85em;
}

.footer a { color: #b0bcc7; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* OTP: крупное поле кода */
input.otp-code {
    font-size: 1.6em;
    text-align: center;
    letter-spacing: 8px;
}

/* Переключатель темы — как на главной панели портала */
.theme-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1000;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #cbd5e0;
    background: #ffffff;
    color: #33414f;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.theme-toggle:hover { border-color: #3182ce; color: #2c5282; }

/* Тёмная тема (та же палитра, что у главной панели portal.ps1) */
body[data-theme="dark"] { background: #0f172a; color: #cbd5e1; }
body[data-theme="dark"] .card { background: #1e293b; border-color: #334155; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); }
body[data-theme="dark"] h1 { color: #e2e8f0; }
body[data-theme="dark"] .subtitle { color: #94a3b8; }
body[data-theme="dark"] .alert { background: #451a1a; border-color: #7f1d1d; color: #fca5a5; }
body[data-theme="dark"] label { color: #cbd5e1; }
body[data-theme="dark"] input[type="text"], body[data-theme="dark"] input[type="password"] {
    background: #0f172a;
    border-color: #475569;
    color: #cbd5e1;
}
body[data-theme="dark"] button { background: #3b82f6; }
body[data-theme="dark"] button:hover { background: #2563eb; }
body[data-theme="dark"] .footer { color: #64748b; }
body[data-theme="dark"] .footer a { color: #64748b; }
body[data-theme="dark"] .theme-toggle { background: #1e293b; border-color: #475569; color: #e2e8f0; }
body[data-theme="dark"] .theme-toggle:hover { border-color: #60a5fa; color: #93c5fd; }
