/**
 * DataPulseX — Shell público (auth, convite, recuperação)
 * Usa tokens.css — tema escuro fixo nas telas de entrada.
 */

html[data-theme="dark"] body.auth-page,
html[data-theme="dark"] body.dpx-auth-simple {
    --cyan: var(--accent, #2DD4A7);
    --cyan-dim: var(--accent-subtle, rgba(45, 212, 167, 0.12));
    --cyan-glow: rgba(var(--accent-rgb, 45, 212, 167), 0.35);
    --bg: var(--bg-page, #0A0E0D);
    --bg-panel: var(--bg-card, #10161A);
    --bg-card: var(--bg-card-nested, #161E1B);
    --border: var(--border-default, rgba(255, 255, 255, 0.06));
    --border-hover: rgba(var(--accent-rgb, 45, 212, 167), 0.32);
    --text: var(--text-primary, #F2F5F4);
    --text-dim: var(--text-muted, #8A9590);
    --text-muted: var(--text-muted, #8A9590);
    --text-secondary: var(--text-secondary, #A8B4AF);
    --error: var(--danger, #F87171);
    --error-bg: var(--danger-bg, rgba(248, 113, 113, 0.12));
    --glass-border: var(--border-strong, rgba(255, 255, 255, 0.12));
}

html[data-theme="dark"] body.auth-page,
html[data-theme="dark"] body.dpx-auth-simple {
    background: var(--bg) !important;
    color: var(--text) !important;
    font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
    -webkit-font-smoothing: antialiased;
}

/* Card simples — convite, recuperar senha, etc. */
body.dpx-auth-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 24px;
}

.dpx-auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-card, 12px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    position: relative;
    z-index: 2;
}

.dpx-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    border-radius: var(--radius-card, 12px) var(--radius-card, 12px) 0 0;
}

.dpx-auth-card__brand {
    text-align: center;
    margin-bottom: 28px;
}

.dpx-auth-card__brand img {
    max-height: 40px;
    width: auto;
}

.dpx-auth-card h1,
.dpx-auth-card h2 {
    font-family: var(--font-kpi, 'Sora', var(--font-ui));
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
    margin: 14px 0 8px;
    letter-spacing: -0.02em;
}

.dpx-auth-card__intro {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.dpx-auth-card__intro b { color: var(--text); }

.dpx-auth-alert {
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-control, 8px);
    font-size: 14px;
    line-height: 1.5;
}

.dpx-auth-alert--error {
    background: var(--error-bg);
    border-left: 3px solid var(--error);
    color: var(--error);
}

.dpx-auth-alert--success {
    background: var(--success-bg, rgba(74, 222, 128, 0.1));
    border-left: 3px solid var(--success, #4ADE80);
    color: var(--success, #4ADE80);
}

.dpx-auth-field {
    margin-bottom: 18px;
}

.dpx-auth-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.dpx-auth-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-control, 8px);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dpx-auth-field input:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb, 45, 212, 167), 0.45);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 45, 212, 167), 0.12);
}

.dpx-auth-dead-end {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    background: var(--bg-page, #0A0E0D);
    color: var(--text-primary, #F2F5F4);
    font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
}

.dpx-auth-dead-end h2 {
    font-family: var(--font-kpi, 'Sora', var(--font-ui));
    margin-bottom: 12px;
}

.dpx-auth-dead-end p {
    color: var(--text-secondary, #A8B4AF);
    margin-bottom: 20px;
}

.dpx-auth-dead-end a {
    color: var(--accent, #2DD4A7);
    text-decoration: none;
    font-weight: 600;
}

.dpx-auth-dead-end a:hover { text-decoration: underline; }
