/* =========================================
   BOX DENTAL KIDS - MASTER STYLES V30.0 (FINAL MOBILE OPTIMIZED)
   ========================================= */

:root { 
    --primary: #00C4B4; 
    --primary-dark: #009688; 
    --accent: #FF5E78; 
    --success: #88D64C; 
    --error: #FF4757; 
    --text-main: #2d3436;
    --bg-gradient: linear-gradient(135deg, #E0F7FA 0%, #E8F5E9 100%); 
    --shadow: 0 12px 24px -6px rgba(0, 196, 180, 0.25); 
    --radius: 25px; 
}

/* --- 1. BASE Y ANIMACIONES --- */
body { 
    font-family: 'Quicksand', sans-serif; 
    background: linear-gradient(-45deg, #e0f7fa, #e8f5e9, #fff3e0, #fce4ec);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    margin: 0; padding: 0; min-height: 100vh; color: var(--text-main); 
    overflow-x: hidden;
}
@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
body.ready { visibility: visible; }
h1, h2, h3 { font-family: 'Fredoka One', cursive; color: var(--primary-dark); text-align: center; margin-top: 0; }

/* --- 2. COMPONENTES GLOBALES --- */
.container { max-width: 500px; margin: 30px auto; background: rgba(255,255,255,0.9); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); }
.wide-container { max-width: 1100px; margin: 0 auto; padding: 20px; }

/* Botones y Enlaces */
.nav-btn { background: var(--accent); color: white; padding: 10px 20px; border-radius: 50px; font-family: 'Fredoka One'; border: none; cursor: pointer; transition: 0.2s; font-size: 0.95em; }
.nav-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.action-btn { width: 100%; padding: 15px; background: var(--primary); color: white; border: none; border-radius: 50px; font-family: 'Fredoka One'; font-size: 1.2em; cursor: pointer; margin-top: 10px; transition: 0.3s; }
.action-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

.btn-small { padding: 8px 15px; font-size: 0.9em; width: auto; margin-top: 0; border-radius: 15px; }

.btn-outline { background: transparent; color: var(--primary-dark); border: 2px solid var(--primary); padding: 8px 25px; border-radius: 50px; font-family: 'Fredoka One'; font-size: 0.9em; text-decoration: none; display: inline-block; cursor: pointer; transition: 0.2s; margin: 15px 0; }
.btn-outline:hover { background: var(--primary); color: white; }

.link { background: none !important; border: none !important; padding: 0 !important; color: var(--primary) !important; font-weight: bold; font-family: 'Fredoka One', cursive; cursor: pointer; font-size: 1em; text-decoration: none; display: inline-block; }
.link:hover { color: var(--accent) !important; text-decoration: underline; }

/* Inputs y Tablas */
input, select, textarea { width: 100%; padding: 12px 20px; margin: 8px 0; border: 2px solid #b2dfdb; border-radius: 50px; background: #fff; box-sizing: border-box; font-family: 'Quicksand'; color: #333; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 8px rgba(0, 196, 180, 0.2); }
/* FIX: Wrapper de Contraseña */
.password-wrapper { 
    position: relative; 
    width: 100%; 
    display: flex; 
    align-items: center; 
}

.password-wrapper input { 
    padding-right: 45px !important; /* Espacio para que el texto no toque el ojo */
}

.toggle-password {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: var(--primary);
    z-index: 10;
    transition: 0.2s;
    font-size: 1.1em;
}

.toggle-password:hover {
    color: var(--primary-dark);
    transform: scale(1.1);
}
.hidden { display: none !important; }

.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: 15px; overflow: hidden; table-layout: fixed; margin-top:20px; }
.admin-table th { background: var(--primary); color: white; padding: 15px 5px; text-align: center; white-space: nowrap; overflow: hidden; }
.admin-table td { padding: 12px 5px; border-bottom: 1px solid #eee; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-icon { background: none; border: none; cursor: pointer; padding: 5px; transition: transform 0.2s; }
.btn-icon:hover { transform: scale(1.1); }

/* TABS Y TOGGLES (VITAL PARA PANELES INTERNOS) */
.tab-container { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; background: #f0f0f0; padding: 5px; border-radius: 50px; max-width: 600px; margin-left: auto; margin-right: auto; }
.tab-btn { flex: 1; padding: 10px 20px; border: none; background: transparent; cursor: pointer; font-weight: 700; color: #888; border-radius: 50px; transition: all 0.3s ease; font-family: 'Quicksand', sans-serif; }
.tab-btn.active { background: white; color: var(--primary); box-shadow: 0 4px 10px rgba(0,0,0,0.1); transform: scale(1.02); }

.toggle-container { display: flex; background: #f0f0f0; border-radius: 50px; padding: 5px; margin-bottom: 20px; }
.toggle-btn { flex: 1; border: none; background: transparent; padding: 12px; border-radius: 50px; font-weight: 700; color: #777; cursor: pointer; transition: all 0.3s ease; }
.toggle-btn.active { background: white; color: var(--primary); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

.file-upload-wrapper { position: relative; width: 100%; height: 120px; background: #f9f9f9; border: 2px dashed #ccc; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; overflow: hidden; margin-top: 10px; }

/* --- 3. NAVBARS (LANDING VS INTERNO) --- */

/* A. BARRA FLOTANTE (Landing - Modo Cápsula) */
header.navbar-floating:not(.navbar-internal) {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 1100px;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 10px 20px; border-radius: 50px;
    display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 1000; border: 1px solid rgba(0,0,0,0.05); transition: all 0.3s ease;
}

/* B. BARRA INTERNA (Dashboard - Barra Blanca Fija) */
header.navbar-internal {
    position: sticky !important; top: 0 !important; left: 0 !important; transform: none !important; width: 100% !important; max-width: 100% !important;
    border-radius: 0 !important; margin: 0 !important; background: #ffffff !important; border-bottom: 1px solid #e0e0e0 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important; padding: 10px 30px !important; display: flex !important; justify-content: space-between !important;
    align-items: center !important; z-index: 5000 !important;
}

/* Elementos Comunes del Navbar */
.nav-logo { cursor: pointer; display: flex; align-items: center; }
.nav-logo img { height: 45px; width: auto; }

.nav-links-center { display: flex; gap: 30px; }
.navbar-internal .nav-links-center { display: none !important; } /* Ocultar links landing en interno */

.nav-links-center a { color: #555; font-weight: 600; cursor: pointer; text-decoration: none; font-size: 1em; position: relative; transition: color 0.3s; }
.nav-links-center a:hover { color: var(--primary); }

.nav-actions-right { display: flex; align-items: center; gap: 10px; position: relative; }

/* Botón de Usuario (Perfil) - Estilo Base */
.user-btn { 
    background: #f0fcfc; color: var(--primary-dark); border: 2px solid var(--primary); 
    padding: 5px 15px 5px 5px; border-radius: 50px; cursor: pointer; font-weight: bold; 
    display: flex; align-items: center; gap: 10px; font-size: 0.9em; min-width: 120px;
}
.user-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: white; }

/* FIX: Perfil Específico para Barra Interna (Sin cortes) */
header.navbar-internal .user-btn {
    background: #f8fcfc !important; border: 2px solid var(--primary) !important; color: var(--primary-dark) !important;
    padding: 4px 15px 4px 4px !important; height: auto !important; min-height: 42px; margin: 5px 0 !important; 
    box-sizing: border-box !important; box-shadow: none !important; display: flex !important; align-items: center !important;
    gap: 10px !important; border-radius: 50px !important;
}
header.navbar-internal .user-avatar { width: 34px !important; height: 34px !important; border: 1px solid rgba(0,0,0,0.1); }

/* Dropdown (Menú desplegable) */
.dropdown-content { display: none; position: absolute; background-color: #fff; min-width: 180px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-radius: 15px; overflow: hidden; z-index: 5001; border: 1px solid #eee; }
header:not(.navbar-internal) .dropdown-content { top: 55px; right: 0; }
header.navbar-internal .dropdown-content { top: 100%; right: 0; margin-top: 10px; }
.dropdown-content a { color: #555; padding: 12px 16px; text-decoration: none; display: block; cursor: pointer; text-align: left; }
.dropdown-content a:hover { background-color: #f9f9f9; color: var(--primary); }
.show { display: block !important; }

/* Elementos Nuevos Header (Buscador y Tips) */
.nav-search-container { flex: 1; display: flex; justify-content: center; margin: 0 20px; }
.nav-search-box { background: #f1f3f4; border-radius: 50px; padding: 8px 20px; display: flex; align-items: center; width: 100%; max-width: 400px; transition: 0.3s; border: 1px solid transparent; }
.nav-search-box:focus-within { background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1); border-color: var(--primary); }
.nav-search-box input { border: none; background: transparent; outline: none; width: 100%; padding: 0 10px; font-size: 0.95em; color: #555; margin: 0 !important; }

.header-extras { display: flex; align-items: center; gap: 15px; margin-right: 15px; border-right: 1px solid #eee; padding-right: 15px; }
.date-widget { text-align: right; line-height: 1.2; }
.date-day { font-weight: bold; color: var(--text-main); font-size: 0.9em; }
.date-full { font-size: 0.75em; color: #888; }
.notification-btn { background: white; border: none; cursor: pointer; position: relative; padding: 8px; border-radius: 50%; transition: 0.3s; color: #666; }
.notification-btn:hover { background: #f0f0f0; color: var(--primary); }
/* EN STYLES.CSS - REEMPLAZA EL BLOQUE .badge-dot EXISTENTE */
.badge-dot {
    position: absolute;
    top: -6px;   /* Un poco más arriba */
    right: -8px; /* Un poco más a la derecha para que no tape la campana */
    min-width: 18px; /* Ancho mínimo para que un solo dígito se vea bien */
    height: 18px;    /* Altura fija */
    padding: 2px 5px; /* Espacio interno */
    background: var(--error); /* Color rojo de tu paleta */
    color: white;
    border-radius: 12px; /* Forma de píldora redondeada */
    border: 2px solid white; /* Borde blanco para separarlo del icono y que resalte */
    font-size: 0.75em; /* Letra pequeña pero legible */
    font-weight: bold;
    font-family: 'Fredoka One', cursive; /* Usar tu fuente de títulos para los números */
    display: flex;           /* Magia para centrar el texto */
    align-items: center;     /* Centrado vertical */
    justify-content: center; /* Centrado horizontal */
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Pequeña sombra para darle profundidad */
}

.patient-header-pill { flex: 1; display: flex; justify-content: center; align-items: center; text-align: center; background: #fff8e1; color: #f57f17; border: 1px dashed #fdd835; padding: 8px 20px; border-radius: 50px; max-width: 450px; margin: 0 auto; font-size: 0.95em; font-weight: bold; box-shadow: 0 2px 5px rgba(0,0,0,0.05); animation: fadeIn 0.5s ease-in; }
.patient-header-pill i { margin-right: 10px; font-size: 1.2em; }

/* Ajustes de Padding del Cuerpo */
body.internal-mode #view-patient-home, body.internal-mode #view-admin-dashboard, body.internal-mode #view-admin-agenda, body.internal-mode #view-admin-socios, body.internal-mode #view-admin-finances, body.internal-mode #view-admin-doctors, body.internal-mode #view-profile, body.internal-mode #view-patient-history, body.internal-mode #view-patient-finances, body.internal-mode #view-patient-agendar, body.internal-mode #view-admin-agendar, body.internal-mode #view-admin-requests, body.internal-mode #view-admin-satisfaction {
    padding-top: 40px !important; margin-top: 0 !important;
}

/* --- 4. DASHBOARD TARJETAS (ESTILO VIVO) --- */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin-top: 20px; }

.welcome-card { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: 25px; padding: 40px; color: white; position: relative; overflow: hidden; grid-column: 1 / -1; box-shadow: 0 10px 30px rgba(0, 196, 180, 0.3); display: flex; align-items: center; justify-content: space-between; min-height: 200px; }
.welcome-text h1 { color: white !important; text-align: left; margin-bottom: 10px; font-size: 2.5em; } .welcome-text p { font-size: 1.1em; opacity: 0.9; max-width: 600px; }
.welcome-img { position: absolute; right: -20px; bottom: -20px; height: 120%; opacity: 0.2; transform: rotate(-10deg); pointer-events: none; }

.action-card { background: white; border-radius: 20px; padding: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; border: 1px solid #f0f0f0; display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; justify-content: center; position: relative; overflow: hidden; }
.action-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: var(--primary); }
.action-card i { font-size: 3em; margin-bottom: 15px; color: var(--primary); background: #f0fcfc; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.action-card h3 { font-size: 1.2em; margin-bottom: 5px; color: var(--text-main); } .action-card p { font-size: 0.9em; color: #777; margin: 0; }

.info-card { background: white; border-radius: 20px; padding: 20px; display: flex; align-items: center; gap: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.03); border-left: 5px solid var(--accent); }
.info-number { font-size: 2.5em; font-weight: bold; color: var(--text-main); font-family: 'Fredoka One'; } .info-label { color: #666; font-size: 0.9em; text-transform: uppercase; letter-spacing: 1px; }

/* Botones Grandes de Paciente */
.dashboard-actions-patient { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; margin-top: 20px; }
.dash-btn-patient { flex: 1; min-width: 200px; max-width: 300px; padding: 20px; border-radius: 20px; border: none; cursor: pointer; font-family: 'Fredoka One', cursive; font-size: 1.1em; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); color: white; text-decoration: none; }
.dash-btn-patient:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.btn-new-cita { background: var(--primary); } .btn-mi-historial { background: #FFA500; } .btn-mis-finanzas { background: var(--accent); }
.patient-sections-wrapper { margin-top: 60px; border-top: 2px dashed #e0f2f1; padding-top: 40px; }

/* --- 5. LANDING PAGE & ESTILOS ORIGINALES --- */
.hero-section { display: flex; flex-direction: column-reverse; align-items: center; padding: 140px 5% 0 5%; gap: 30px; text-align: center; max-width: 1100px; margin: 0 auto; }
@media (min-width: 900px) { .hero-section { flex-direction: row; text-align: left; min-height: 80vh; align-items: center; padding-top: 100px; } .hero-content { flex: 1.2; padding-right: 20px; } .hero-image { flex: 0.8; display: flex; justify-content: flex-end; } .hero-section h1 { font-size: 3.2em; text-align: left; margin-bottom: 15px; line-height: 1.1; } .hero-section p { font-size: 1.1em; max-width: 500px; margin-bottom: 25px; } }
.hero-image img { width: 100%; max-width: 450px; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; box-shadow: 20px 20px 0px rgba(0, 196, 180, 0.1); animation: float 6s ease-in-out infinite; }
.hero-buttons { display: flex; flex-direction: row; gap: 20px; justify-content: center; margin-top: 25px; flex-wrap: wrap; align-items: center; } @media (min-width: 900px) { .hero-buttons { justify-content: flex-start; } }
.btn-hero, .btn-hero-secondary { width: auto !important; height: 54px; padding: 0 30px; font-size: 1.05em; margin-top: 0 !important; border-radius: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; font-family: 'Fredoka One'; cursor: pointer; transition: 0.2s; }
.btn-hero { background: var(--primary); color: white; border: 2px solid var(--primary); box-shadow: 0 10px 20px rgba(0, 196, 180, 0.3); } .btn-hero:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0, 196, 180, 0.4); }
.btn-hero-secondary { background: white; border: 2px solid var(--primary); color: var(--primary-dark); box-shadow: 0 5px 15px rgba(0,0,0,0.05); } .btn-hero-secondary:hover { background: #f0fcfc; transform: translateY(-3px); }
.wave-container { line-height: 0; width: 100%; margin-bottom: -1px; margin-top: -20px; } .wave-container svg { display: block; width: 100%; height: 80px; } @media (min-width: 900px) { .wave-container svg { height: 120px; } }
.services-section { background: white; padding: 50px 5%; position: relative; z-index: 10; } .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 25px; max-width: 1100px; margin: 0 auto; }
.service-card { background: #fff; border-radius: 20px; padding: 25px 20px; text-align: center; border: 1px solid #f0f0f0; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.03); } .service-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.icon-box { font-size: 2.5em; margin-bottom: 15px; background: #e0f2f1; width: 70px; height: 70px; line-height: 70px; border-radius: 50%; margin: 0 auto 15px auto; }
.interactive-card { cursor: pointer; transition: 0.3s; position: relative; overflow: hidden; } .interactive-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 196, 180, 0.15); }
.service-details { margin-top: 15px; text-align: left; animation: fadeIn 0.5s; font-size: 0.95em; color: #555; line-height: 1.6; } .btn-text-toggle { background: none; border: none; color: var(--primary); font-weight: bold; font-size: 0.9em; margin-top: 10px; cursor: pointer; font-family: 'Fredoka One'; }
.about-section { display: flex; flex-direction: column; padding: 60px 5%; max-width: 1000px; margin: 0 auto; gap: 40px; align-items: center; } @media (min-width: 900px) { .about-section { flex-direction: row; text-align: left; align-items: center; } .about-image { flex: 1; } .about-text { flex: 1.2; } .about-text h3 { text-align: left; } }
.about-image img { width: 100%; border-radius: 20px; box-shadow: -15px 15px 0 #ffe0e6; } .about-text h3 { font-size: 1.8em; color: var(--accent); margin-bottom: 15px; } .stats-row { display: flex; gap: 30px; margin-top: 25px; border-top: 1px solid #eee; padding-top: 20px; }
.location-section { background-color: #f0fcfc; padding: 60px 0; position: relative; border-top: 1px dashed #b2dfdb; } .location-card-wrapper { background: white; border-radius: 30px; padding: 40px; box-shadow: 0 15px 30px rgba(0, 196, 180, 0.15); display: flex; align-items: center; gap: 40px; border: 1px solid #e0f2f1; }
.loc-text-col { flex: 1; text-align: left; } .btn-map { display: inline-flex; align-items: center; gap: 10px; margin-top: 25px; background: white; color: var(--primary-dark); border: 2px solid var(--primary); width: auto; padding: 12px 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); } .btn-map:hover { background: var(--primary); color: white; transform: translateY(-3px); }
.loc-img-col { flex: 1; position: relative; } .consultorio-img { width: 100%; border-radius: 20px; box-shadow: 10px 10px 0px rgba(255, 94, 120, 0.2); transition: 0.3s; object-fit: cover; max-height: 350px; } .consultorio-img:hover { transform: scale(1.02); }
.insta-section { background: #fafafa; padding: 60px 0; border-top: 1px solid #dbdbdb; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; } .insta-title-wrapper { text-align: center; margin-bottom: 40px; } .insta-container { max-width: 935px; margin: 0 auto; padding: 0 20px; } .insta-header { display: grid; grid-template-columns: 290px 1fr; margin-bottom: 44px; } .insta-avatar { width: 150px; height: 150px; border-radius: 50%; padding: 2px; background: white; border: 1px solid #dbdbdb; } .insta-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; } .insta-info { display: flex; flex-direction: column; justify-content: flex-start; } .insta-top-row { display: flex; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; } .insta-username { font-weight: 300; font-size: 28px; color: #262626; margin: 0; line-height: 32px; } .insta-btn-primary { background-color: #0095f6; color: white; border: none; border-radius: 4px; padding: 5px 20px; font-weight: 600; font-size: 14px; cursor: pointer; } .insta-btn-secondary { background-color: #efefef; color: black; border: none; border-radius: 4px; padding: 5px 15px; font-weight: 600; font-size: 14px; cursor: pointer; } .insta-more { font-size: 1.5em; cursor: pointer; margin-left: 5px; } .insta-stats { list-style: none; padding: 0; margin: 0 0 20px 0; display: flex; gap: 40px; font-size: 16px; color: #262626; } .insta-bio-container { font-size: 16px; line-height: 24px; color: #262626; text-align: left; } .bio-name { font-weight: 600; } .bio-category { color: #8e8e8e; } .bio-link { color: #00376b; text-decoration: none; font-weight: 600; } .insta-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; } .ig-post { position: relative; display: block; aspect-ratio: 1 / 1; background: #efefef; cursor: pointer; } .ig-post img { width: 100%; height: 100%; object-fit: cover; display: block; } .ig-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); display: flex; justify-content: center; align-items: center; color: white; font-size: 1.5em; opacity: 0; transition: 0.2s; } .ig-post:hover .ig-overlay { opacity: 1; }

/* Footer Pop-Out */
.boxdental-footer-wrapper { position: relative; background-color: var(--primary-dark); color: white; margin-top: 150px; padding-top: 220px; padding-bottom: 30px; font-family: 'Quicksand', sans-serif; z-index: 10; }
.contact-floating-card { background: white; width: 90%; max-width: 900px; position: absolute; top: -80px; left: 50%; transform: translateX(-50%); border-radius: 25px; box-shadow: 0 15px 35px rgba(0, 150, 136, 0.25); padding: 10px; display: flex; align-items: center; z-index: 20; }
.card-content { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 30px; gap: 20px; }
.card-avatar { width: 230px; height: 230px; flex-shrink: 0; border-radius: 50%; overflow: hidden; border: 8px solid white; box-shadow: 0 15px 35px rgba(0,0,0,0.2); background: white; margin-top: -90px; margin-left: -20px; margin-right: 15px; position: relative; z-index: 50; }
.card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.card-text { flex: 1; text-align: left; } .card-text h3 { color: var(--primary-dark); font-family: 'Fredoka One'; font-size: 1.6em; margin: 0 0 5px 0; text-align: left; } .card-text p { color: #666; margin: 0; font-size: 1.05em; font-weight: 600; }
.btn-whatsapp-brand { background: var(--success); color: white; padding: 12px 30px; border-radius: 50px; font-weight: bold; text-decoration: none; display: flex; align-items: center; gap: 10px; font-size: 1.1em; transition: transform 0.2s, box-shadow 0.2s; white-space: nowrap; } .btn-whatsapp-brand:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(76, 175, 80, 0.3); }
.footer-bottom-area { text-align: center; max-width: 1000px; margin: 0 auto; } .footer-links-grid { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; flex-wrap: wrap; } .footer-links-grid a { color: rgba(255,255,255,0.8); text-decoration: none; font-weight: bold; cursor: pointer; transition: color 0.3s; } .footer-links-grid a:hover { color: white; text-decoration: underline; } .footer-brand-copy { border-top: 1px solid rgba(255,255,255,0.2); padding-top: 20px; color: rgba(255,255,255,0.6); }

/* 6. OTROS & NOTIFICACIONES */
.profile-card { background: white; padding: 20px; border-radius: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); margin-bottom: 15px; border: 1px solid #f0f0f0; }
.profile-card .btn-outline { width: 100%; text-align: center; margin-top: 5px; box-sizing: border-box; }
.mood-widget { background: white; padding: 30px; border-radius: 25px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-bottom: 30px; border-top: 5px solid var(--accent); }
.mood-emoji { font-size: 4em; display: block; margin-bottom: 10px; animation: float 3s ease-in-out infinite; }
.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); z-index:9000; display:flex; justify-content:center; align-items:center; visibility:hidden; opacity:0; transition:0.3s; } .modal-overlay.active { visibility:visible; opacity:1; }
.modal-box { background:white; padding:30px; border-radius: 25px; text-align:center; max-width:400px; width:90%; transform:scale(0.8); transition:0.3s; max-height: 90vh; overflow-y: auto; } .modal-overlay.active .modal-box { transform:scale(1); }
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: white; padding: 15px 20px; border-radius: 50px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 9500; display:flex; gap:10px; align-items:center; }
#loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.9); z-index: 9999; display: flex; justify-content: center; align-items: center; visibility: hidden; opacity: 0; transition: 0.3s; } #loading-overlay.active { visibility: visible; opacity: 1; }
.spinner-main { width: 50px; height: 50px; border: 5px solid #f3f3f3; border-top: 5px solid var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }

.notification-panel { position: absolute; top: 60px; right: 20px; width: 320px; background: white; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); border: 1px solid #eee; z-index: 6000; overflow: hidden; animation: slideDown 0.3s ease; }
.notif-header { background: #f8f9fa; padding: 15px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; } .notif-header h4 { margin: 0; color: var(--primary-dark); font-size: 1.1em; } .notif-header button { background: none; border: none; font-size: 0.8em; color: var(--primary); cursor: pointer; text-decoration: underline; }
.notif-list { max-height: 350px; overflow-y: auto; }
.notif-item { padding: 15px; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: 0.2s; display: flex; gap: 15px; align-items: flex-start; } .notif-item:hover { background: #f0fcfc; } .notif-item.unread { background: #e3f2fd; } .notif-item.unread:hover { background: #bbdefb; }
.notif-icon { width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-content p { margin: 0; font-size: 0.9em; color: #333; line-height: 1.4; } .notif-content span { font-size: 0.75em; color: #999; display: block; margin-top: 5px; }
.notif-info .notif-icon { background: #e1f5fe; color: #0288d1; } .notif-success .notif-icon { background: #e8f5e9; color: #2e7d32; } .notif-warning .notif-icon { background: #fff3e0; color: #ef6c00; } .notif-error .notif-icon { background: #ffebee; color: #c62828; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* --- 7. OPTIMIZACIÓN MÓVIL (MOBILE FIRST FIXES) --- */
@media (max-width: 768px) {
    /* Header Móvil */
    header.navbar-floating:not(.navbar-internal) { padding: 8px 15px !important; width: 95% !important; top: 10px !important; }
    header.navbar-internal { padding: 10px 15px !important; }
    .nav-logo img { height: 35px !important; }
    .user-btn { padding: 4px 10px !important; font-size: 0.8em !important; min-width: auto !important; }
    .user-btn span { display: none !important; } /* Ocultar nombre en móvil */
    .user-avatar { width: 30px !important; height: 30px !important; }
    .nav-search-container { display: none !important; }
    .date-widget { display: none !important; }
    .patient-header-pill { display: none !important; }

    /* Instagram Móvil */
    .insta-header { grid-template-columns: 1fr !important; display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; gap: 15px !important; }
    .insta-avatar-container { padding-right: 0 !important; margin-bottom: 10px !important; }
    .insta-avatar { width: 100px !important; height: 100px !important; margin: 0 auto !important; }
    .insta-top-row { justify-content: center !important; flex-direction: column !important; gap: 10px !important; }
    .insta-stats { justify-content: center !important; gap: 15px !important; font-size: 0.85em !important; margin: 15px 0 !important; display: flex !important; width: 100%; }
    .insta-bio-container { text-align: center !important; }

    /* Footer / Location / Dashboard Móvil */
    .location-card-wrapper { flex-direction: column-reverse !important; padding: 25px !important; text-align: center; gap: 20px !important; }
    .loc-text-col { text-align: center !important; } .loc-text-col h3 { text-align: center !important; } .btn-map { width: 100%; justify-content: center; }
    .boxdental-footer-wrapper { margin-top: 100px !important; padding-top: 160px !important; padding-bottom: 40px !important; }
    .contact-floating-card { top: -90px !important; width: 90% !important; flex-direction: column !important; text-align: center !important; padding: 25px 15px !important; left: 50% !important; transform: translateX(-50%) !important; }
    .card-content { flex-direction: column !important; padding: 0 !important; gap: 15px !important; align-items: center !important; }
    .card-avatar { width: 120px !important; height: 120px !important; margin-top: -70px !important; margin-left: 0 !important; margin-right: 0 !important; margin-bottom: 10px !important; border-width: 4px !important; }
    .card-text h3 { font-size: 1.3em !important; text-align: center !important; line-height: 1.2 !important; }
    .card-text p { text-align: center !important; font-size: 0.95em !important; }
    .btn-whatsapp-brand { width: 100% !important; justify-content: center !important; }
    .footer-links-grid { flex-direction: column !important; gap: 15px !important; }
    .footer-links-grid a { font-size: 1em !important; padding: 5px !important; }
    .dashboard-grid { grid-template-columns: 1fr !important; }
    .welcome-card { padding: 30px 20px !important; flex-direction: column !important; text-align: center !important; align-items: flex-start !important; }
    .welcome-text h1 { font-size: 2em !important; text-align: left !important; }
    .welcome-img { height: 150px !important; right: 0 !important; opacity: 0.1 !important; }
}