/**
 * CRM 5x86 — Auth CSS
 * Login / Reset / Forgot — sin rastros de WordPress
 */

:root {
    --auth-primary: #1B3A6B;
    --auth-primary-2: #2E6CB8;
    --auth-surface: #F5F8FC;
    --auth-white: #FFFFFF;
    --auth-text: #1C1C1E;
    --auth-muted: #6B7280;
    --auth-border: #D1DCF0;
    --auth-success: #2E7D52;
    --auth-error: #C0392B;
    --auth-radius: 8px;
}

/* Reset total */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

.crm5x86-auth-body {
    min-height: 100vh;
    background: var(--auth-surface);
    display: flex;
    align-items: stretch;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--auth-text);
}

/* ── Contenedor principal ────────────────────────────────────────────────── */
.crm5x86-auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── Panel izquierdo (branding) ──────────────────────────────────────────── */
.crm5x86-auth-brand {
    flex: 0 0 42%;
    background: var(--auth-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.crm5x86-auth-brand-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 70%, rgba(74, 159, 212, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(46, 108, 184, 0.2) 0%, transparent 50%);
}

/* Líneas decorativas */
.crm5x86-auth-brand::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    border: 40px solid rgba(255,255,255,0.04);
    border-radius: 50%;
}

.crm5x86-auth-brand::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -80px;
    width: 400px;
    height: 400px;
    border: 50px solid rgba(255,255,255,0.03);
    border-radius: 50%;
}

.crm5x86-auth-brand-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.crm5x86-auth-brand-logo {
    margin-bottom: 16px;
}

.crm5x86-auth-brand-logo img {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.crm5x86-auth-brand-logo span {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    display: block;
}

.crm5x86-auth-brand-tagline {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Panel derecho (formulario) ──────────────────────────────────────────── */
.crm5x86-auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--auth-white);
}

.crm5x86-auth-form-inner {
    width: 100%;
    max-width: 400px;
}

/* ── Header del formulario ───────────────────────────────────────────────── */
.crm5x86-auth-header {
    margin-bottom: 32px;
}

.crm5x86-auth-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--auth-primary);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.crm5x86-auth-header p {
    color: var(--auth-muted);
    font-size: 14px;
}

/* ── Campos ──────────────────────────────────────────────────────────────── */
.crm5x86-auth-field {
    margin-bottom: 20px;
}

.crm5x86-auth-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.crm5x86-auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--auth-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.crm5x86-auth-field-header label {
    margin-bottom: 0;
}

.crm5x86-auth-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    font-size: 15px;
    color: var(--auth-text);
    background: var(--auth-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.crm5x86-auth-field input:focus {
    border-color: var(--auth-primary-2);
    box-shadow: 0 0 0 3px rgba(46,108,184,0.12);
    background: var(--auth-white);
}

.crm5x86-auth-link {
    font-size: 12px;
    color: var(--auth-primary-2);
    text-decoration: none;
    font-weight: 500;
}

.crm5x86-auth-link:hover { text-decoration: underline; }

/* ── Remember ────────────────────────────────────────────────────────────── */
.crm5x86-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--auth-muted);
    cursor: pointer;
    margin-bottom: 24px;
    user-select: none;
}

.crm5x86-auth-remember input { width: auto; margin: 0; }

/* ── Botón ───────────────────────────────────────────────────────────────── */
.crm5x86-auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--auth-primary);
    color: #fff;
    border: none;
    border-radius: var(--auth-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.crm5x86-auth-btn:hover { background: var(--auth-primary-2); }
.crm5x86-auth-btn:active { transform: scale(0.99); }
.crm5x86-auth-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* ── Feedback ────────────────────────────────────────────────────────────── */
.crm5x86-auth-feedback {
    margin-top: 12px;
    font-size: 13px;
    min-height: 20px;
    text-align: center;
}

.crm5x86-auth-feedback.error   { color: var(--auth-error); }
.crm5x86-auth-feedback.success { color: var(--auth-success); }

/* ── Notices ─────────────────────────────────────────────────────────────── */
.crm5x86-auth-notice {
    padding: 12px 16px;
    border-radius: var(--auth-radius);
    font-size: 14px;
    margin-bottom: 20px;
}

.crm5x86-auth-notice-success {
    background: rgba(46,125,82,0.1);
    border: 1px solid rgba(46,125,82,0.3);
    color: var(--auth-success);
}

.crm5x86-auth-notice-error {
    background: rgba(192,57,43,0.08);
    border: 1px solid rgba(192,57,43,0.25);
    color: var(--auth-error);
}

/* ── Footer link ─────────────────────────────────────────────────────────── */
.crm5x86-auth-footer-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
}

.crm5x86-auth-footer-link a {
    color: var(--auth-primary-2);
    text-decoration: none;
}

.crm5x86-auth-footer-link a:hover { text-decoration: underline; }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.crm5x86-auth-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .crm5x86-auth-brand { display: none; }
    .crm5x86-auth-form-panel { padding: 32px 20px; }
}
