/* ============================================================
   login.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=DM+Mono:wght@500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── TEMA POR DEFECTO (claro) ── */
:root {
    --bg:       #f0ede8;
    --card:     #faf9f7;
    --border:   #ddd9d2;
    --text:     #1a1916;
    --muted:    #7a7670;
    --accent:   #2563eb;
    --accent-h: #1d4ed8;
    --radius:   10px;
    --dot:      #c9c4bc;
}

/* ── TEMA NARANJA ── */
body.tema-naranja {
    --bg:       #fff3e0;
    --card:     #fffde7;
    --border:   #ffe0b2;
    --text:     #2e1c00;
    --muted:    #bf6c00;
    --accent:   #e65100;
    --accent-h: #bf360c;
    --dot:      #ffcc80;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: background 0.4s;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, var(--dot) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.4s;
}

/* ── Botón de cambio de tema ── */
.btn-tema {
    position: fixed;
    top: 16px;
    right: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 8px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    z-index: 999;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-tema:hover { background: var(--border); }

/* Circulito que muestra el color del tema actual */
.btn-tema .tema-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
    transition: background 0.3s;
}

/* ── Caja exterior ── */
.cajafuera {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* ── Tarjeta principal ── */
.formulariocaja {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    width: 340px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.07);
    transition: background 0.4s, border-color 0.4s;
}

/* ── Barra de pestañas ── */
.botondeintercambiar {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.25rem;
    position: relative;
    transition: background 0.4s, border-color 0.4s;
}

#btnvai {
    position: absolute;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--accent);
    border-radius: 7px;
    left: 4px;
    top: 4px;
    transition: left 0.3s ease, background 0.4s;
    z-index: 0;
}

.botoncambiarcaja {
    flex: 1;
    padding: 8px 0;
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color 0.2s;
    border-radius: 7px;
}

/* ── Wrapper que recorta los formularios ── */
.slides-wrapper {
    overflow: hidden;
    position: relative;
    transition: height 0.4s ease;
}

/* ── Formularios ── */
.grupo-entradas {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: absolute;
    width: 100%;
    top: 0;
    transition: left 0.4s ease;
}

#frmlogin     { left: 0; }
#frmregistrar { left: 100%; }

/* ── Imagen de usuario ── */
.logovai {
    text-align: center;
    margin-bottom: 1rem;
}
.logovai img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

/* ── Labels ── */
.grupo-entradas b {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-top: 4px;
    transition: color 0.4s;
}

/* ── Inputs ── */
.cajaentradatexto {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.4s, color 0.4s;
}
.cajaentradatexto:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* ── Fila captcha ── */
.filacaptcha {
    display: flex;
    gap: 8px;
    align-items: center;
}
.cajaentradarecaptcha {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.4s, color 0.4s;
}
.cajaentradarecaptcha:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.fondorecaptcha {
    font-family: 'DM Mono', monospace;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 4px;
    background: var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    user-select: none;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, background 0.4s, color 0.4s;
}
.fondorecaptcha:hover { opacity: 0.7; }

/* ── Botón enviar ── */
.botonenviar {
    width: 100%;
    padding: 11px;
    margin-top: 8px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.botonenviar:hover  { background: var(--accent-h); }
.botonenviar:active { transform: scale(0.98); }