* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    background-color: #f4f7f6;
    color: #333;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    background-color: #1a2a33;
    color: white;
    padding: 20px;
    position: fixed;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo h2 { color: #4caf50; letter-spacing: 2px; }
.logo p { font-size: 0.8rem; opacity: 0.7; }

.sidebar ul { list-style: none; }
.sidebar ul li { margin: 15px 0; }

.sidebar ul li a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: 8px;
    transition: 0.3s;
}

.sidebar ul li a:hover, .sidebar ul li a.active {
    background-color: #4caf50;
}

.user-info {
    position: absolute;
    bottom: 20px;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 80%;
    padding-top: 10px;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    padding: 40px;
    width: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.btn-pdf {
    background-color: #ff5722;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* Cards */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.number {
    font-size: 2rem;
    font-weight: bold;
    color: #4caf50;
    margin: 10px 0;
}

/* Table */
.table-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.healthy { background: #e8f5e9; color: #2e7d32; }
.medical { background: #fff3e0; color: #ef6c00; }

/* AI Assistant Widget */
.ai-assistant {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    overflow: hidden;
}

.chat-header {
    background: #1a2a33;
    color: white;
    padding: 15px;
    font-size: 0.9rem;
    text-align: center;
}

.chat-body {
    height: 200px;
    padding: 15px;
    font-size: 0.85rem;
    overflow-y: auto;
}

.ai-assistant input {
    width: 100%;
    padding: 10px;
    border: none;
    border-top: 1px solid #eee;
    outline: none;
}
.ai-assistant.collapsed .chat-body,
.ai-assistant.collapsed input {
    display: none;
}
/* ==========================================
   ESTILOS DE LA PÁGINA DE LOGIN
   ========================================== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    /* Imagen de fondo de un refugio con efecto cubierto */
    background: url('https://images.unsplash.com/photo-1606440905963-0514a391c0e3?auto=format&fit=crop&q=80') no-repeat center center/cover;
    position: relative;
}

/* El efecto borroso (blur) del fondo */
.login-body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(6px);
    z-index: 1;
}

.login-container {
    position: relative;
    z-index: 2;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-header .login-logo {
    width: 110px;
    margin-bottom: 10px;
}

.login-header h1 {
    color: #295540; /* Verde oscuro del diseño */
    font-size: 2.5rem;
    margin-bottom: 0px;
    font-weight: 700;
}

.login-header p {
    color: #777;
    font-size: 0.85rem;
    margin-bottom: 30px;
    font-weight: 600;
}

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: #4caf50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.2);
}

.forgot-password {
    text-align: right;
    margin-bottom: 25px;
}

.forgot-password a {
    color: #4caf50;
    text-decoration: none;
    font-size: 0.85rem;
}

.btn-login {
    width: 100%;
    background-color: #44a06b;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-login:hover {
    background-color: #388a5a;
}

.login-footer {
    margin-top: 35px;
    position: relative;
}

.login-footer hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

/* El pequeño circulo en la línea gris */
.login-footer::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 2px solid #ddd;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.login-footer a {
    color: #44a06b;
    text-decoration: none;
    font-size: 0.85rem;
}
/* --- DISEÑO LOGIN (IDÉNTICO A LA IMAGEN) --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    /* Imagen de fondo tipo clínica/refugio */
    background: url('https://images.unsplash.com/photo-1516733725897-1aa73b87c8e8?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    overflow: hidden;
}

/* El efecto borroso del fondo */
.login-body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.2); /* Capa clara */
    backdrop-filter: blur(8px); /* Desenfoque */
    z-index: 1;
}

.login-container {
    position: relative;
    z-index: 2;
    background: white;
    padding: 30px 40px;
    border-radius: 30px; /* Bordes muy redondeados como la imagen */
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 380px;
    text-align: center;
}

.logo-circle {
    width: 100px;
    height: 100px;
    background: #fff;
    margin: 0 auto 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-circle img {
    width: 80px;
}

.login-header h1 {
    color: #2e4d3d; /* Verde oscuro */
    font-size: 2.2rem;
    margin: 0;
    font-weight: 700;
}

.subtitle {
    color: #8da397;
    font-size: 0.8rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    outline: none;
    font-size: 0.9rem;
}

.forgot-password {
    text-align: right;
    margin-bottom: 20px;
}

.forgot-password a {
    color: #4caf50;
    text-decoration: none;
    font-size: 0.8rem;
}

.btn-login {
    width: 100%;
    background: #5db084; /* Verde de tu botón */
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

.btn-login:hover {
    background: #4a946d;
}

.login-footer .divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0;
}

.login-footer .divider span {
    height: 1px;
    background: #eee;
    flex: 1;
}

.login-footer .dot {
    width: 8px;
    height: 8px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin: 0 10px;
}

.admin-help {
    color: #5db084;
    text-decoration: none;
    font-size: 0.8rem;
}
/* --- ESTILOS DEL MODAL DE AYUDA --- */
.modal-overlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Fondo oscuro transparente */
    backdrop-filter: blur(4px); /* Desenfoque de fondo */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 25px;
    cursor: pointer;
    color: #999;
}

.modal-header i {
    font-size: 3rem;
    color: #5db084;
    margin-bottom: 15px;
}

.modal-header h2 {
    color: #2e4d3d;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
}

.contact-item i { color: #5db084; }

.horario {
    font-size: 0.8rem;
    color: #888;
    margin-top: 20px;
}

.btn-entendido {
    margin-top: 25px;
    background: #5db084;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Clase para mostrar el modal desde JS */
.modal-active {
    display: flex;
}
/* ==========================================
   ESTILOS DE LA PÁGINA DE SOPORTE/AYUDA
   ========================================== */
.soporte-container {
    position: relative;
    z-index: 10; /* <-- Esto lo saca de la niebla borrosa */
    background: #ffffff; /* <-- Esto le da el fondo blanco sólido */
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 420px;
    text-align: center;
    margin: 0 auto; /* Por si las moscas, para centrarlo */
}


/* Animación para que la tarjeta suba suavemente */
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.soporte-container i.fa-headset {
    font-size: 3.5rem;
    color: #5db084;
    margin-bottom: 15px;
}

.soporte-container h2 {
    color: #2e4d3d;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.soporte-container p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.soporte-container .contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #444;
    font-size: 1.1rem;
}

.soporte-container .contact-item i {
    color: #5db084;
    font-size: 1.3rem;
}

.soporte-container .horario {
    font-size: 0.85rem;
    color: #888;
    margin-top: 25px;
    margin-bottom: 10px;
}

.soporte-container .btn-entendido {
    background: #5db084;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.soporte-container .btn-entendido:hover {
    background: #4a946d;
}
