/* =========================================
   VARIABLES Y ESTILOS BASE (GLASSMORPHISM)
   ========================================= */
:root {
    --color-primario: #3b82f6;
    --color-oscuro: #0f172a;
    --fondo-suave: #f1f5f9;
    --blanco: #ffffff;
    --texto-titulos: #1e293b;
    --texto-oscuro: #64748b;
    --borde-tarjeta: #cbd5e1;
}

.dark-mode, body.dark-mode {
    --color-primario: #58a6ff;
    --color-oscuro: #010409;
    --fondo-suave: #0d1117;
    --blanco: #161b22;
    --texto-titulos: #e6edf3;
    --texto-oscuro: #8b949e;
    --borde-tarjeta: #30363d;
}

body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    background-color: var(--fondo-suave);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s;
}

.main-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* =========================================
   PANEL IZQUIERDO: PAISAJE ABSTRACTO (60%)
   ========================================= */
.left-panel {
    width: 60%;
    background: linear-gradient(180deg, #bbdefb 0%, #e3f2fd 40%, #c8e6c9 100%);
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    position: relative; 
    color: #1e293b; 
    overflow: hidden;
    transition: background 0.3s ease;
}

body.dark-mode .left-panel {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 60%, #064e3b 100%);
    color: white;
}

.left-panel::before, .left-panel::after {
    content: ""; position: absolute; width: 200%; height: 100%;
    top: 65%; left: -50%; border-radius: 42%; z-index: 1;
}
.left-panel::before { background-color: rgba(34, 197, 94, 0.4); animation: wave 20s infinite linear; }
.left-panel::after { background-color: rgba(59, 130, 246, 0.3); top: 70%; animation: wave 25s infinite linear; }

@keyframes wave {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sun-glow {
    position: absolute; top: 10%; left: 10%;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(253, 224, 71, 0.6) 0%, rgba(253, 224, 71, 0) 70%);
    filter: blur(30px);
}

.welcome-content { position: relative; z-index: 10; text-align: center; }
.welcome-content h1 { font-size: 3.5rem; margin: 0; font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
.welcome-content p { font-size: 1.2rem; margin-top: 15px; opacity: 0.9; font-weight: 500; }

/* =========================================
   PANEL DERECHO: FORMULARIO (40%)
   ========================================= */
.right-panel {
    width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Luces Orbes tras la tarjeta para potenciar refracción */
.bg-glow-1 {
    position: absolute; top: -50px; left: -50px; width: 300px; height: 300px;
    background: rgba(52, 211, 153, 0.2); border-radius: 50%; filter: blur(70px); z-index: 1; pointer-events: none;
}
.bg-glow-2 {
    position: absolute; bottom: -50px; right: -50px; width: 300px; height: 300px;
    background: rgba(59, 130, 246, 0.2); border-radius: 50%; filter: blur(70px); z-index: 1; pointer-events: none;
}
body.dark-mode .bg-glow-1 { background: rgba(52, 211, 153, 0.08); }
body.dark-mode .bg-glow-2 { background: rgba(59, 130, 246, 0.1); }

/* 🔥 TARJETA ESTILO CRISTAL GRIS 3D 🔥 */
.login-card {
    background: rgba(217, 217, 217, 0.4) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 2rem;
    width: 100%;
    max-width: 380px;
    padding: 40px 35px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.06) !important;
    text-align: center;
    z-index: 20;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode .login-card {
    background: rgba(22, 27, 34, 0.58) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.55), 0 10px 20px rgba(0, 0, 0, 0.35) !important;
}

.login-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18), 0 8px 20px rgba(0, 0, 0, 0.1) !important;
}
body.dark-mode .login-card:hover { border-color: rgba(96, 165, 250, 0.3) !important; }

.mini-logo { width: 70px; margin-bottom: 0.5rem; }
.login-card h2 { color: var(--texto-titulos); font-size: 1.8rem; font-weight: 800; margin-bottom: 1.5rem; margin-top: 0; }

/* MENSAJES */
.msg { padding: 12px; border-radius: 12px; margin-bottom: 20px; font-size: 0.85rem; font-weight: 600; border: 1px solid; backdrop-filter: blur(4px); }
.msg.error { background: rgba(254, 226, 226, 0.6); color: #991b1b; border-color: #ef4444; }
body.dark-mode .msg.error { background: rgba(153, 27, 27, 0.2); color: #f87171; border-color: #dc2626; }

/* INPUTS BRUTALISTAS REDISEÑADOS A CRISTAL */
.input-group { margin-bottom: 1.2rem; text-align: left; }
.input-group label {
    display: block; font-size: 0.85rem; font-weight: 700;
    margin-bottom: 0.4rem; color: var(--texto-titulos);
}

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper i { position: absolute; left: 1rem; color: var(--texto-oscuro); z-index: 5; }

/* 🔥 INPUTS TRASLÚCIDOS 3D 🔥 */
.input-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 0.8rem;
    color: var(--texto-titulos);
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04) !important;
}

body.dark-mode .input-wrapper input {
    background: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}

.input-wrapper input:focus {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: #3b82f6 !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
}

body.dark-mode .input-wrapper input:focus {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: #60a5fa !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(96, 165, 250, 0.15) !important;
}

.toggle-password { position: absolute; right: 1rem; cursor: pointer; color: var(--texto-oscuro); left: auto !important; z-index: 5; }

/* BOTÓN REGISTRAR */
.btn-submit {
    width: 100%; padding: 0.9rem;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6) !important; color: white !important;
    border: none; border-radius: 40px; font-weight: 700; font-size: 1rem;
    cursor: pointer; margin-top: 1.2rem; transition: all 0.3s ease;
    display: flex; justify-content: center; align-items: center; gap: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45) !important; filter: brightness(1.1); }
body.dark-mode .btn-submit { background: linear-gradient(135deg, #1f6feb, #388bfd) !important; }

/* DIVISOR */
.divider { text-align: center; margin: 1.5rem 0; position: relative; }
.divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--borde-tarjeta); }
.divider span { position: relative; background: rgba(225, 225, 225, 0.9); padding: 0 10px; color: var(--texto-oscuro); font-size: 0.8rem; font-weight: 600; border-radius: 4px; }
body.dark-mode .divider span { background: #161b22; }

/* 🔥 REDISEÑO: BOTÓN GOOGLE COMPLETO ESTILO CRISTAL SUTIL 🔥 */
.btn-google {
    width: 100%; padding: 0.8rem;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 40px; display: flex; align-items: center; justify-content: center; gap: 10px;
    font-weight: 700; cursor: pointer; transition: all 0.3s ease; color: var(--texto-titulos); font-size: 0.95rem;
    text-decoration: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
body.dark-mode .btn-google { background: rgba(22, 27, 34, 0.4) !important; border-color: rgba(255, 255, 255, 0.1) !important; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }

.btn-google:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: #94a3b8 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
body.dark-mode .btn-google:hover { background: rgba(30, 41, 59, 0.6) !important; border-color: #60a5fa !important; box-shadow: 0 8px 16px rgba(0,0,0,0.5); }

.btn-google i { font-size: 1.2rem; color: #ea4335; transition: transform 0.3s; }
.btn-google:hover i { transform: scale(1.15); }

.footer-text { margin-top: 20px; font-size: 0.9rem; color: var(--texto-oscuro); text-align: center; font-weight: 500; }
.footer-text a { color: var(--color-primario); text-decoration: none; font-weight: 700; }
.footer-text a:hover { text-decoration: underline; }

/* RESPONSIVO */
@media (max-width: 900px) {
    .left-panel { display: none; } 
    .right-panel { width: 100%; }
}