﻿* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
            background-color: #d1d1d1ff;
            position: relative;
            /* Fondo patrón de puntos (Modo Claro) */
            background-image: 
                radial-gradient(var(--primary-color) 3%, transparent 6%),
                radial-gradient(var(--primary-color) 3%, transparent 6%);
            background-size: 60px 60px;
            background-position: 0 0, 30px 30px;
        }

        .login-container {
            position: relative;
            width: 100%;
            max-width: 520px; /* aumentado para pantallas de escritorio */
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            overflow: visible;
            border: 1px solid var(--primary-color, #8059d4ff);
            animation: fadeIn 0.5s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        a {
  text-decoration: none;
  color: inherit;
}

a i {
  margin-right: 6px; /* separa el icono del texto */
}

        .login-header {
            border-top-left-radius: 16px;
            border-top-right-radius: 16px;
            padding-bottom: 10px;
            padding-top: 10px;
            text-align: center;
            background: var(--primary-color, #8059d4ff);
            color: #ffffff;
        }

        .login-back-btn {
            position: absolute;
            top: -16px;
            left: -16px;
            font-size: 24px;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            background: var(--primary-color);
            border: 2px solid #ffffff;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
            z-index: 3;
            transition: all 0.2s ease;
        }

        .login-back-btn:hover {
            background: var(--primary-color);
            transform: scale(1.1);
        }

        .login-back-btn:focus-visible {
            outline: 2px solid #ffffff;
            outline-offset: 2px;
        }

        .login-header h1 {
            font-size: 28px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 10px;
        }

        .login-header p {
            opacity: 0.9;
            font-size: 14px;
        }

        .login-header img {
            width: 60px;   /* ajusta el tamaÃ±o segÃºn tu logo */
            height: auto;  /* mantiene proporciÃ³n */
        }

        .login-body {
            padding: 30px;
        }

        .form-group {
            margin-bottom: 20px;
            position: relative;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #333;
        }

        .form-input {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s ease;
            background-color: #fff; /* Asegurar fondo blanco en modo claro */
            color: #333; /* Asegurar texto oscuro en modo claro */
        }

        .form-input:focus {
            outline: 2px solid var(--primary-color, #8059d4ff); /* Cambio: Reemplazar outline: none por un outline visible para accesibilidad */
            outline-offset: 2px;
            border-color: var(--primary-color, #8059d4ff);
            transform: scale(1.02);
        }

        /* Cambio: AÃ±adir focus visible para botones y pestaÃ±as */
        .btn:focus-visible, .tab:focus-visible {
            outline: 2px solid var(--primary-color, #8059d4ff);
            outline-offset: 2px;
        }

        .input-icon {
            position: relative;
        }

        .input-icon i {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--primary-color, #8059d4ff);
            z-index: 2; /* Asegura que el icono esté sobre el input */
            pointer-events: none; /* Permite hacer clic a través del icono al input */
            font-size: 16px;
        }

        .input-icon input,
        .input-icon select {
            padding-left: 50px;
        }

        .btn {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-primary {
            background: var(--primary-color, #8059d4ff);
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px #00000071;
        }

        .btn-google {
            background: white;
            color: #333;
            border: 1px solid #ddd;
            margin-bottom: 15px;
        }

        .btn-google:hover {
            background: #f8f9fa;
        }

        .login-footer {
            text-align: center;
            padding: 20px;
            border-top: 1px solid rgba(0, 0, 0, 0.1);
            font-size: 14px;
        }

        .login-footer a {
            color: var(--primary-color, #8059d4ff); /* Morado oscuro para modo claro */
            text-decoration: none;
            font-weight: 500;
        }

        .login-footer p {
            color: #666; /* Color oscuro para el texto del footer en modo claro */
        }

        .login-footer a:hover {
            text-decoration: underline;
        }

        .tabs {
            display: flex;
            margin-bottom: 25px;
            border-bottom: 1px solid rgba(102, 126, 234, 0.2);
        }

        .tab {
            flex: 1;
            text-align: center;
            padding: 12px;
            cursor: pointer;
            color: #666; /* Color oscuro para modo claro */
            font-weight: 500;
            transition: all 0.3s ease;
            border-bottom: 3px solid transparent;
            background: transparent; /* Para los botones */
            border-top: none;
            border-left: none;
            border-right: none;
            font-family: inherit;
            font-size: inherit;
        }

        .tab.active {
            color: var(--primary-color, #8059d4ff); /* Morado oscuro para modo claro */
            border-bottom-color: var(--primary-color, #8059d4ff);
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }
        
        .error-message {
            color: var(--primary-color, #8059d4ff); /* Morado oscuro para modo claro */
            font-size: 13px;
            margin-top: 5px;
            text-align: center;
            padding: 8px;
            background: rgba(231, 76, 60, 0.1); /* Fondo rojo claro */
            border-radius: 4px;
            display: none;
        }
        
        .error-message.show {
            display: block;
        }

        .success-message {
            color: #27ae60; /* Verde oscuro para modo claro */
            font-size: 13px;
            margin-top: 5px;
            margin-bottom: 15px;
            text-align: center;
            padding: 12px;
            background: rgba(46, 204, 113, 0.1); /* Fondo verde claro */
            border-radius: 4px;
            display: none;
            border-left: 4px solid #27ae60;
            animation: slideDown 0.3s ease;
        }
        
        .success-message.show {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .success-message i {
            font-size: 16px;
        }

        /* Success message within form groups */
        .form-group .success-message {
            margin-bottom: 0;
            margin-top: 8px;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Responsive */
        @media (max-width: 480px) {
            .login-container {
                border-radius: 12px;
            }
            
            .login-header, .login-body {
                padding: 20px;
            }
        }

                /* ðŸŒ™ Dark Mode */
body.dark {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    line-height: 1.6;
    min-height: 100vh;
    background-color: #25212cff;
    /* Fondo patrón de puntos (Modo Oscuro) */
    background-image: 
        radial-gradient(var(--primary-color) 3%, transparent 6%),
        radial-gradient(var(--primary-color) 3%, transparent 6%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}

body.dark .login-container {
            width: 100%;
            max-width: 520px; /* mantener el mismo ancho en modo oscuro */
             background: #25212cff;
             backdrop-filter: blur(10px);
             border-radius: 16px;
             box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
             overflow: visible;
             border: 1px solid var(--primary-color, #8059d4ff);
             animation: fadeIn 0.5s ease;
         }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        body.dark .login-header {
            padding: 30px;
            text-align: center;
            background: #25212cff;
            color: rgb(255, 255, 255);
        }

body.dark .login-back-btn {
    top: -16px;
    left: -16px;
    background: #1a1620;
    border-color: var(--primary-color, #8059d4ff);
    color: var(--primary-color, #8059d4ff);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body.dark .login-back-btn:hover {
    background: #2a2330;
    border-color: var(--primary-color, #8059d4ff);
    color: var(--primary-color, #8059d4ff);
}

        /* Logo switching for light/dark modes */
.logo-light {
    display: block;
}
.logo-dark {
    display: none;
}

/* Dark mode logo switch */
body.dark .logo-light {
    display: none;
}
body.dark .logo-dark {
    display: block;
}

/* Add this new rule for form labels in dark mode */
body.dark .form-label {
    color: #b39ddb; /* Purple color to match theme, aclarado para contraste */
}

body.dark .form-input {
    background-color: #332d3b;
    border-color: #4a4056;
    color: #e0e0e0;
}

body.dark .form-input:focus {
    border-color: var(--primary-color);
    outline-color: var(--primary-color);
}

body.dark .input-icon i {
    color: var(--primary-color);
}

body.dark .tab {
    color: #cccccc;
}

body.dark .tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

body.dark .login-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark .login-footer a {
    color: var(--primary-color);
}

body.dark .error-message {
    background: rgba(231, 76, 60, 0.2);
    color: #ff8a80; /* Rojo claro para contraste en modo oscuro */
}

body.dark .success-message {
    background: rgba(46, 204, 113, 0.2);
    color: #5edb7d; /* Verde claro para contraste en modo oscuro */
    border-left-color: #5edb7d;
}

/* Estilos extraÃ­dos de login.php */
.tab-button {
    background: transparent;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit; /* Asegurar que herede el color correcto */
}

.form-title {
    text-align: center;
    margin: 15px 0;
    color: #666; /* Color oscuro para modo claro */
    font-size: 14px;
    font-weight: normal;
}

.form-title-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.forgot-password-container {
    text-align: right;
    margin-bottom: 20px;
}

.forgot-password-link {
    color: var(--primary-color, #8059d4ff);
    font-size: 13px;
    text-decoration: none;
}

.btn-google-custom {
    margin-top: 10px;
    background: #fff;
    color: #444;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-google-icon {
    color: #db4437;
    font-size: 16px;
}

.terms-container {
    font-size: 13px;
    color: #666;
}

.terms-link {
    color: #667eea;
}

/* Estilos del Modal de Logout */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 30px 20px;
    border-radius: 10px;
    max-width: 350px;
    margin: auto;
    text-align: center;
    box-shadow: 0 2px 10px #0002;
}

.modal-title {
    margin-bottom: 15px;
    color: var(--primary-color, #8059d4ff);
}

.modal-text {
    margin-bottom: 25px;
    color: #444;
}

.btn-modal {
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
}

.btn-modal-yes {
    background: var(--primary-color, #8059d4ff);
    color: #fff;
    margin-right: 10px;
}

.btn-modal-no {
    background: #eee;
    color: var(--primary-color, #8059d4ff);
}

/* ðŸŒ™ Dark Mode para los nuevos elementos */
body.dark .form-title {
    color: #aaa; /* Gris claro para modo oscuro */
}

body.dark .login-footer p {
    color: #aaa; /* Gris claro para el texto del footer en modo oscuro */
}

body.dark .forgot-password-link {
    color: var(--primary-color); /* Morado mÃ¡s claro para mejor contraste */
}

body.dark .btn-google-custom {
    background: #332d3b;
    color: #e0e0e0;
    border-color: #4a4056;
}

body.dark .btn-google-custom:hover {
    background: #40384a;
}

body.dark .terms-container {
    color: #aaa;
}

body.dark .terms-link {
    color: #8c9eff; /* Azul mÃ¡s claro para mejor contraste */
}

body.dark .modal-content {
    background: #25212cff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color, #8059d4ff);
}

body.dark .modal-title {
    color: #b39ddb;
}

body.dark .modal-text {
    color: #e0e0e0;
}

body.dark .btn-modal-yes {
    background: #673ab7; /* Morado ligeramente diferente para el botÃ³n */
}

body.dark .btn-modal-no {
    background: #332d3b;
    color: #b39ddb;
}

/* Toggle Password Button */
.input-icon {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #333;
}

.toggle-password i {
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    margin: 0;
}

body.dark .toggle-password {
    color: #999;
}

body.dark .toggle-password:hover {
    color: #ccc;
}

.form-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

body.dark .form-text {
    color: #aaa;
}

