/* =========================================================
   LOGIN PAGE - POLTRADERS
   CSS COMPLETAMENTE RECONSTRUIDO
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #efb810;
    --primary-hover: #d4a00e;
    --bg-dark: #0a0a0b;
    --bg-card: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.55);
    --error: #ff6b6b;
    --radius: 20px;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #413920 #1d1608; /* Firefox */
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1d1a08;
}

::-webkit-scrollbar-thumb {
    background: #413e20;
    border: 1px solid #1d1908;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #efb810;
}

::-webkit-scrollbar-thumb:active {
    background: #efb810;
}

/* Fondo con glow sutil */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(239, 184, 16, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(239, 184, 16, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ======================
   LAYOUT PRINCIPAL
====================== */
.center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* ======================
   CARD PRINCIPAL
====================== */
.glassv2 {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Línea de brillo superior */
.glassv2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 184, 16, 0.4), transparent);
}

/* ======================
   TÍTULOS
====================== */
.text-gradient {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.glassv2 h2 {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* ======================
   ERROR MESSAGE
====================== */
.error {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.25);
    color: var(--error);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    text-align: center;
}

.success {
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.25);
    color: var(--success, #00e676);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    text-align: center;
}

/* ======================
   TOGGLE MOSTRAR/OCULTAR CONTRASEÑA
====================== */
.password-wrapper {
    position: relative;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--primary);
}

/* ======================
   FORMULARIO
====================== */
form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--text);
    font-size: 0.98rem;
    font-family: inherit;
    transition: all 0.25s ease;
    outline: none;
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(239, 184, 16, 0.15);
}

/* Botón principal */
button[type="submit"] {
    margin-top: 6px;
    padding: 15px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
}

button[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 184, 16, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* ======================
   RECORDARME
====================== */
.remember-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.remember-box input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ======================
   BOTÓN GOOGLE
====================== */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    margin-top: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.google-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.google-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* ======================
   LINKS INFERIORES
====================== */
.links {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.links p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.links a:hover {
    color: #ffd34d;
    text-decoration: underline;
}

/* ======================
   FOOTER
====================== */
footer {
    text-align: center;
    padding: 24px 20px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.82rem;
    position: relative;
    z-index: 1;
}

/* ======================
   WHATSAPP FLOTANTE
====================== */
.whatsapp-chat-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1000;
}

.whatsapp-float-btn {
    width: 62px;
    height: 62px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.whatsapp-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
}

.chat-bubble {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 310px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.96);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-bubble.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: #25D366;
    color: #000;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.whatsapp-icon {
    width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    color: #000;
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
    padding: 0 4px;
}

.close-btn:hover {
    opacity: 1;
}

.chat-body {
    padding: 18px;
    background: #0d0d0d;
}

.message.received {
    background: rgba(255, 255, 255, 0.06);
    color: #e0e0e0;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.55;
}

.message.received p {
    margin-bottom: 8px;
}

.message.received p:last-child {
    margin-bottom: 0;
}

.open-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: #25D366;
    color: #000;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.25s ease;
}

.open-chat-btn:hover {
    background: #20bd5a;
}

/* ======================
   RESPONSIVE
====================== */
@media (max-width: 480px) {
    .glassv2 {
        padding: 36px 24px;
        border-radius: 22px;
    }

    .text-gradient {
        font-size: 1.85rem;
    }

    .whatsapp-chat-float {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float-btn {
        width: 56px;
        height: 56px;
        font-size: 1.7rem;
    }

    .chat-bubble {
        width: 280px;
        right: -8px;
    }
}

/* Logo del login */
.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.login-logo img {
    height: 75px;          /* Tamaño ideal */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(239, 184, 16, 0.25));
    transition: transform 0.3s ease;
}

.login-logo img:hover {
    transform: scale(1.05);
}
