/* НейроГейт — tenant-specific overrides
 *
 * Loaded LAST after Fallout's modular styles. Three jobs:
 *   1. Override CSS vars so --green (Fallout neon) becomes NG indigo
 *   2. Add login-form-password styling (NG-specific section vault-go core lacks)
 *   3. Drop terminal-monospace fonts in favour of Inter for product chrome
 *
 * Scoped via :root + data-theme so dark/light/midnight all share the indigo
 * palette without touching base.css.
 */

:root {
    --green: #6366f1;
    --green-rgb: 99, 102, 241;
    --green-dim: rgba(99, 102, 241, 0.6);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f1f5f9;
    --muted: #94a3b8;
    --bg: #0b1120;
    --panel: #131a2e;
    --panel-2: #1e293b;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="light"] {
    --bg: #ffffff;
    --panel: #f8fafc;
    --panel-2: #f1f5f9;
    --line: rgba(15, 23, 42, 0.08);
    --text: #0f172a;
    --muted: #64748b;
    --green: #6366f1;
    --green-rgb: 99, 102, 241;
}

[data-theme="midnight"] {
    --bg: #030712;
    --panel: #0a0f1a;
    --panel-2: #111827;
    --line: rgba(148, 163, 184, 0.1);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --green: #818cf8;
    --green-rgb: 129, 140, 248;
}

/* ── Login: brand mark (inline SVG «Н» из neural nodes) ── */

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.login-brand-mark {
    color: var(--green);
    filter: drop-shadow(0 0 16px rgba(var(--green-rgb), 0.35));
    transition: transform 0.4s ease;
}

.login-brand:hover .login-brand-mark {
    transform: scale(1.04);
}

/* ── Login: email/password form (NG-specific section) ── */

.login-form-password {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 12px 0 4px;
}

.login-form-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-field-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    opacity: 0.85;
    letter-spacing: 0.01em;
    margin-bottom: -2px;
    margin-top: 6px;
}

.login-password-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: -2px;
    margin-top: 6px;
}

.login-password-row .login-field-label {
    margin: 0;
}

.login-forgot-link {
    font-size: 13px;
    color: var(--green);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.login-forgot-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.login-form-password input[type="email"],
.login-form-password input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-form-password input[type="email"]:focus,
.login-form-password input[type="password"]:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(var(--green-rgb), 0.18);
}

.login-form-password input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.login-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.login-hint {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin-top: 4px;
}

.login-hint a {
    color: var(--green);
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
}

.login-hint a:hover {
    border-bottom-style: solid;
}

/* ── Refine login button so it stays usable across themes ── */

.login-btn-enter {
    background: var(--green);
    color: #fff;
    border: 1px solid var(--green);
    text-shadow: none;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 10px;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.login-btn-enter:hover {
    background: var(--green-dim);
    box-shadow: 0 6px 18px rgba(var(--green-rgb), 0.32);
    text-shadow: none;
}

.login-btn-enter:active {
    transform: translateY(1px);
}

.login-btn-enter:disabled {
    background: rgba(var(--green-rgb), 0.45);
    cursor: not-allowed;
}

/* ── Subtle grid pattern on body (background, behind card) ── */

body {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(var(--green-rgb), 0.12), transparent 70%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: auto, 48px 48px, 48px 48px;
    background-attachment: fixed;
}

[data-theme="light"] body {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(var(--green-rgb), 0.10), transparent 70%),
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: auto, 48px 48px, 48px 48px;
}

/* ── Login card: max-width на desktop ── */

.login-panel {
    max-width: 420px;
    width: 100%;
}

/* ── Login page: better vertical centering with breathing room ── */

.login-page {
    min-height: 100vh;
    padding: 32px 20px;
}

/* ── Footer subdued, no neon glow ── */

.login-footer {
    color: var(--muted);
    text-shadow: none;
    font-family: var(--font-body);
}

.login-logo {
    text-shadow: none;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
}

.login-subtitle {
    color: var(--muted);
}

/* ── Auth divider line: subtle, not neon ── */

.auth-divider {
    color: var(--muted);
}

.auth-divider::before,
.auth-divider::after {
    background: var(--line);
}

/* ── Body / global chrome: Inter not monospace ── */

body {
    font-family: var(--font-body);
}
