:root {
    --auth-brand: #70150f;
    --auth-brand-dark: #4f0f0b;
    --auth-accent: #8b4513;
    --auth-accent-hover: #6d3610;
    --auth-surface: #ffffff;
    --auth-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-shadow: 0 24px 48px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

body.auth-login-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1f2937;
    background: #f3f4f6;
}

.auth-login-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.auth-login-shell {
    display: flex;
    width: 100%;
    max-width: 1080px;
    min-height: 100vh;
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
}

.auth-login-brand {
    flex: 1 1 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 45%),
        linear-gradient(160deg, var(--auth-brand) 0%, var(--auth-brand-dark) 100%);
    text-align: center;
}

.auth-login-brand img {
    width: min(180px, 70vw);
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.auth-login-brand h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-login-brand p {
    margin: 0;
    max-width: 22rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
}

.auth-login-form-panel {
    flex: 1 1 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
}

.auth-login-card {
    width: 100%;
    max-width: 400px;
}

.auth-login-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.auth-login-card .auth-subtitle {
    margin: 0 0 1.75rem;
    color: var(--auth-muted);
    font-size: 0.95rem;
}

.auth-field {
    margin-bottom: 1.1rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.auth-input {
    width: 100%;
    min-height: 46px;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--auth-border);
    border-radius: 0.55rem;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.15);
}

.auth-captcha-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem 0.9rem;
    border: 1px dashed #d1d5db;
    border-radius: 0.55rem;
    background: #fafafa;
}

.auth-captcha-question {
    flex: 1 1 160px;
    font-size: 0.92rem;
    color: #374151;
}

.auth-captcha-input {
    flex: 0 1 110px;
    min-height: 42px;
    text-align: center;
    font-weight: 600;
}

.auth-hint {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--auth-muted);
}

.auth-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.25rem 0 1.5rem;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    color: #4b5563;
    user-select: none;
}

.auth-remember input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-accent);
}

.auth-btn-primary {
    width: 100%;
    min-height: 46px;
    border: none;
    border-radius: 0.55rem;
    background: var(--auth-accent);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.auth-btn-primary:hover {
    background: var(--auth-accent-hover);
}

.auth-btn-primary:active {
    transform: translateY(1px);
}

.auth-links {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-border);
    text-align: center;
}

.auth-links a {
    display: inline-block;
    margin: 0.25rem 0;
    color: var(--auth-accent);
    font-size: 0.875rem;
    text-decoration: none;
}

.auth-links a:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

.auth-links .auth-help {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--auth-muted);
}

.auth-alert {
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.55rem;
    font-size: 0.875rem;
}

.auth-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.auth-alert ul {
    margin: 0;
    padding-left: 1.1rem;
}

@media (max-width: 900px) {
    .auth-login-shell {
        flex-direction: column;
        max-width: 520px;
        min-height: auto;
        margin: 1rem;
        border-radius: 1rem;
        overflow: hidden;
    }

    .auth-login-brand {
        padding: 2rem 1.5rem 1.75rem;
    }

    .auth-login-brand p {
        display: none;
    }

    .auth-login-form-panel {
        padding: 1.75rem 1.5rem 2rem;
    }
}

@media (max-width: 480px) {
    .auth-login-shell {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .auth-row-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* --------------------------------------------------------------------------
   Registro de participante (formulario más ancho)
   -------------------------------------------------------------------------- */
.auth-register-page .auth-login-shell {
    max-width: 1120px;
}

.auth-register-page .auth-login-form-panel {
    flex: 1 1 62%;
    padding: 2rem 2.25rem;
    align-items: flex-start;
}

.auth-register-card {
    width: 100%;
    max-width: 720px;
}

.auth-register-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1.25rem;
}

@media (min-width: 640px) {
    .auth-register-grid {
        grid-template-columns: 1fr 1fr;
    }

    .auth-register-grid .auth-field-full {
        grid-column: 1 / -1;
    }
}

.auth-register-note {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.55rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-register-note strong {
    font-weight: 600;
}
