/* =========================================
   LOANWARE - ESTILOS ÚNICOS "MI PERFIL"
   ========================================= */

/* --- 1. VARIABLES DE MARCA --- */
:root {
    --primary: #1a392a;     /* Verde institucional */
    --accent: #09FF00;      /* Verde neón */
    --light-bg: #f8fafc;    /* Fondo de página */
    --white: #ffffff;
    --text-dark: #334155;
    --border-color: #e2e8f0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* --- 2. BASE Y RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-h-screen: 100vh;
}

/* --- 3. HEADER Y LOGO --- */
.header-main {
    background-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i { color: var(--accent); font-size: 1.5rem; }
.logo h1 { color: var(--white); font-weight: 700; font-style: italic; letter-spacing: -0.05em; margin: 0; }
.logo h1 span { color: var(--accent); }

/* Asegúrate de que estas variables existan en el :root */
:root {
    --accent: #09FF00;
    --primary: #1a392a;
}

.btn-login-style {
    border: 2px solid var(--accent);
    color: var(--accent) !important; /* Forzamos el color para que no se vea morado/azul */
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    background: transparent;
}

.btn-login-style:hover {
    background: var(--accent);
    color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(9, 255, 0, 0.4);
}

/* --- 4. NAVEGACIÓN --- */
.main-nav a, 
.dropdown-btn {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 0;
    transition: color 0.3s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.main-nav a:hover, 
.main-nav a.active,
.dropdown-btn:hover { 
    color: var(--accent); 
}

/* Identificador de Usuario en el Header (Reemplaza al botón de login) */
.user-badge {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

/* --- 5. TÍTULOS Y ETIQUETAS --- */
.tag-label {
    color: var(--accent);
    background: var(--primary);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin-top: 15px;
    border-radius: 10px;
}

/* --- 6. TARJETAS DE ESTADÍSTICAS (Widgets de Información) --- */
.stat-card {
    background: var(--white);
    padding: 20px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
    transform: translateX(5px);
    border-color: var(--accent);
}

.stat-title {
    margin: 0 0 5px 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    margin: 0;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.stat-icon-wrapper {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(26, 57, 42, 0.05); /* Fondo suave verde oscuro */
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* --- 7. TARJETA DE SEGURIDAD (Formulario) --- */
.card-loanware {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.card-icon-box {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* Inputs de Contraseña */
input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-dark);
    background-color: var(--light-bg);
    transition: all 0.3s ease;
    outline: none;
}

input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(9, 255, 0, 0.15);
    background-color: var(--white);
}

/* Botón de Actualizar */
.btn-card-primary {
    background: var(--primary);
    color: var(--white);
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.btn-card-primary:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Enlace de Cerrar Sesión */
.logout-link {
    color: #ef4444; /* Rojo peligro */
    font-weight: 700;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.logout-link:hover {
    background-color: #fef2f2;
}

/* --- 8. FOOTER --- */
.footer-main {
    background-color: var(--primary);
    padding-top: 60px;
    color: var(--white);
    margin-top: auto;
}

.logo-footer span { color: var(--accent); }

.social-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    transition: 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom-bar {
    text-align: center;
    padding: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
    margin-top: 40px;
}

.accessibility-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000 !important;
}

.btn-access {
    width: 65px;
    height: 65px;
    background: #1a392a !important; 
    border: 2px solid #09FF00; 
    border-radius: 50%;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(9, 255, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: pulse-neon 2s infinite;
}

.btn-access i {
    color: #09FF00 !important;
    font-size: 1.8rem !important;
    text-shadow: 0 0 8px rgba(9, 255, 0, 0.6);
}

.btn-access:hover {
    transform: scale(1.1) rotate(5deg);
    background: #09FF00 !important;
}

.btn-access:hover i {
    color: #1a392a !important;
    text-shadow: none;
}

/* Menú de Accesibilidad */
.access-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 260px;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: none; /* Se activa con la clase .active desde tu JS */
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Esta es la clave para que tu JS funcione */
.access-menu.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

.access-section {
    background: rgba(26, 57, 42, 0.05);
    padding: 12px;
    border-radius: 15px;
}

/* --- ESTILOS PARA DALTONISMO (Sincronizado con tu JS) --- */

/* Protanopia (Rojo débil) */
.protanopia {
    filter: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><filter id="f"><feColorMatrix type="matrix" values="0.567, 0.433, 0, 0, 0, 0.558, 0.442, 0, 0, 0, 0, 0.242, 0.758, 0, 0, 0, 0, 0, 1, 0"/></filter></svg>#f');
}

/* Deuteranopia (Verde débil) */
.deuteranopia {
    filter: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><filter id="f"><feColorMatrix type="matrix" values="0.625, 0.375, 0, 0, 0, 0.7, 0.3, 0, 0, 0, 0, 0.3, 0.7, 0, 0, 0, 0, 0, 1, 0"/></filter></svg>#f');
}

/* Ceguera Total / Alto Contraste */
.ceguera-total {
    filter: grayscale(100%) contrast(150%);
}

/* --- ANIMACIONES --- */

@keyframes pulse-neon {
    0% { box-shadow: 0 0 0 0 rgba(9, 255, 0, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(9, 255, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(9, 255, 0, 0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}