﻿:root {
    /* =========================
     ðŸŽ¨ PALETA MODERN GLASS
     ========================= */


    /* PRIMARIOS */
    --pink-main: #E84C9A;
    --pink-light: #FCE7F3;
    --pink-hover: #D63384;


    --blue-main: #3BB6C4;
    --blue-light: #E0F7FA;


    --text-main: #1F2937;
    /* Gris muy oscuro, suave */
    --text-muted: #6B7280;


    /* ESTADOS */
    --success-bg: #D1FAE5;
    --success-text: #065F46;
    --warning-bg: #FEF3C7;
    --warning-text: #92400E;
    --error-bg: #FEE2E2;
    --error-text: #B91C1C;


    /* GLASS EFFECTS */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(232, 76, 154, 0.1);
    /* Sombra rosada sutil */
    --glass-blur: blur(12px);


    /* UTILS */
    --radius-xl: 24px;
    /* Tarjetas */
    --radius-lg: 16px;
    /* Elementos internos */
    --radius-full: 9999px;
    /* Botones */


    --vh: 1vh;
    /* Mobile browser safeguard */
}


/* =========================
   RESET & BASE
   ========================= */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}


html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
    /* overflow: hidden; removed to allow scroll */
}


body {
    font-family: 'Nunito Sans', system-ui, -apple-system, sans-serif;
    margin: 0;
    color: var(--text-main);
    background: linear-gradient(135deg, #FFF0F5 0%, #E0F7FA 100%);
    /* Gradiente Marca Suave */
    background-attachment: fixed;
    min-height: 100%;
}


/* App Container Scrollable */
#app {
    min-height: 100vh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: 120px;
    /* Mas espacio para evitar que el nav tape contenido */
}


h1,
h2,
h3,
h4 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    margin: 0 0 12px 0;
    color: var(--pink-main);
}


a {
    text-decoration: none;
    color: inherit;
}


/* =========================
   ðŸ”® GLASS COMPONENTS
   ========================= */


/* Glass Card */
.card,
.auth-card,
.supervision-card,
.perfil-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 20px;
}


#paso-seleccion .card:hover {
    transform: translateY(-5px);
    border-color: var(--pink-main);
    box-shadow: 0 12px 40px rgba(232, 76, 154, 0.2);
}




/* Buttons */
button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: transform 0.1s ease, box-shadow 0.2s;
}


button:active {
    transform: scale(0.97);
}


/* Aliases for compatibility */
.btn-primary,
.btn-pink {
    background: var(--pink-main);
    /* Cambio de gradiente a sÃ³lido */
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 16px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(232, 76, 154, 0.3);
    letter-spacing: 0.5px;
}


.btn-primary:hover,
.btn-pink:hover {
    box-shadow: 0 6px 20px rgba(59, 182, 196, 0.4);
}


.btn-ghost {
    background: transparent;
    color: var(--pink-main);
    font-weight: 600;
}


/* Inputs */
input,
textarea,
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    color: var(--text-main);
    font-family: 'Nunito Sans', sans-serif;
    margin-bottom: 12px;
    transition: all 0.2s;
}


input:focus,
textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--pink-main);
    box-shadow: 0 0 0 3px var(--pink-light);
}


/* =========================
   LOGIN & AUTH
   ========================= */
.auth-wrapper {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}


.auth-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}


.brand-title {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(34px, 10vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--pink-main);
    letter-spacing: -1px;
    /* Estilo mas compacto/gordito */
    line-height: 1;
}


/* Ajustes segun PWA vs Navegador */
@media (display-mode: standalone) {
    #app {
        padding-top: calc(env(safe-area-inset-top) + 10px);
    }
}


@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
}


.login-subtitle {
    color: var(--text-muted);
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
    margin-bottom: 32px;
}


/* Esconder el tÃ­tulo default del body si existe */
body>h2:first-of-type {
    display: none;
}




/* =========================
   NAVIGATION (FLOATING ISLAND) ðŸ  ï¸ 
   ========================= */
.bottom-nav {
    position: fixed;
    bottom: 24px;
    /* Flotante */
    left: 20px;
    right: 20px;
    max-width: 600px;
    /* Un poco mas ancho */
    margin: 0 auto;
    /* Centrado en desktop */


    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);


    border-radius: 24px;
    /* Isla redonda */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);


    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 10px;
}


.bottom-nav button {
    background: transparent;
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #9CA3AF;
    font-size: 22px;
    /* Emoji Size */
    gap: 2px;
}


.bottom-nav button span {
    font-size: 11px;
    /* Text Size */
    font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    color: #9CA3AF;
    /* Default label color */
}


/* Active State */
.bottom-nav button.activo span {
    color: var(--pink-main);
    font-weight: 800;
}




/* =========================
   VISTAS & CONTENIDO
   ========================= */
.container {
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    /* Mucho mas amplio para evitar huecos en PC */
    margin: 0 auto;
}


@media (min-width: 1024px) {
    .container {
        padding: 40px 20px;
        /* Mas aire arriba en PC */
    }
}


.vista {
    display: none;
    animation: fadeInPremium 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}


.vista.activa {
    display: block;
}


@keyframes fadeInPremium {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Para compatibilidad si algo usa fadeIn todavia */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}




/* =========================
   CALENDARIO & LISTAS
   ========================= */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}


.day {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 8px;
    min-height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}


.day.today {
    background: #FFFBEB;
    /* Amarillo muy suave */
    border-color: #FCD34D;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}


/* Pills de Servicio */
.svc-pill {
    display: block;
    margin-top: 4px;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    border-left: 4px solid transparent;
}


.svc-pill:active {
    transform: scale(0.98);
}


/* Variantes de Pills */
.svc-pill.pending {
    background: #FEF9C3;
    /* Yellow 100 */
    color: #854D0E;
    /* Yellow 800 */
    border-left-color: #EAB308;
    /* Yellow 500 */
}


.svc-pill.confirmed {
    background: #DCFCE7;
    /* Green 100 */
    color: #166534;
    /* Green 800 */
    border-left-color: #22C55E;
    /* Green 500 */
}


.svc-pill.inprogress {
    background: #DBEAFE;
    /* Blue 100 */
    color: #1E40AF;
    /* Blue 800 */
    border-left-color: #3B82F6;
    /* Blue 500 */
}


.svc-pill.completed {
    background: #F3F4F6;
    /* Gray 100 */
    color: #374151;
    /* Gray 700 */
    border-left-color: #9CA3AF;
    /* Gray 400 */
}


.svc-pill.conflict {
    background: #FEF2F2 !important;
    color: #B91C1C !important;
    border: 2px solid #EF4444 !important;
    animation: pulse 2s infinite;
}


/* Pills de Servicio para Cliente - MÃ¡s grandes y legibles */
.svc-pill-cliente {
    padding: 10px 12px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.3;
    border-radius: 10px;
}


.svc-pill-cliente:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }


    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }


    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}


/* =========================
   MODALES (Glass Overlay)
   ========================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4) !important;
    /* Force override inline styles */
    backdrop-filter: blur(8px);
    /* Blur fuerte fondo */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.2s;
}


.modal-card {
    background: #ffffff;
    /* Modal solido para legibilidad */
    width: 100%;
    max-width: 500px;
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    max-height: 85vh;
    overflow-y: auto;
}


.modal-title {
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
}


.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}


.modal-actions button {
    flex: 1;
}


#mNotas,
#mDireccion {
    white-space: pre-wrap;
}




/* =========================
   UTILIDADES & EXTRAS
   ========================= */
.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-style: italic;
}


.toast {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(31, 41, 55, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 100001;
    backdrop-filter: blur(4px);
}


.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}


/* SupervisiÃ³n Specifics */
.pl-item {
    background: white;
    border-left: 4px solid var(--success-text);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.pl-ciudad-header {
    font-size: 20px;
    color: var(--pink-main);
    margin-top: 24px;
    margin-bottom: 12px;
}




/* =========================
   MEDIA QUERIES
   ========================= */
@media (max-width: 768px) {
    .calendar {
        grid-template-columns: 1fr;
        /* Lista en mÃ³vil */
    }


    .day {
        min-height: auto;
        margin-bottom: 10px;
    }
}


/* Scrollbar Tweaks Nanny */
body.ninera .modal-planeacion::-webkit-scrollbar {
    width: 6px;
}


body.ninera .modal-planeacion::-webkit-scrollbar-thumb {
    background: #E5E7EB;
    border-radius: 10px;
}


/* MEJORAS FORMULARIO FAMILIA */
.welcome-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 28px;
    color: var(--blue-main);
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
}


.form-group label {
    font-weight: 700;
    color: #374151;
    /* Gris mÃ¡s oscuro para contraste */
    margin-bottom: 5px;
    display: block;
}


.form-group input,
.form-group textarea {
    border: 2px solid #D1D5DB;
    /* Borde mÃ¡s grueso y visible */
    padding: 12px;
    font-size: 16px;
    background: #FFFFFF;
    transition: border-color 0.2s;
    border-radius: 8px;
    width: 100%;
}


.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--blue-main);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}


.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9CA3AF;
}


/* =========================================
   ESTILOS PREMIUM PERFIL Y ONBOARDING
   ========================================= */
.onboarding-section-title {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    color: var(--pink-main);
    border-bottom: 2px solid var(--pink-light);
    padding-bottom: 5px;
    margin: 20px 0 10px 0;
}


.profile-premium-card {
    padding: 0 !important;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}


.profile-header {
    background: linear-gradient(135deg, var(--pink-main), var(--blue-main));
    padding: 30px 20px;
    text-align: center;
    color: white;
}


.profile-avatar {
    font-size: 50px;
    background: white;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


.profile-header h3 {
    margin: 0;
    color: white;
    font-family: 'DM Serif Display', serif;
    font-size: 24px;
}


.profile-header .muted {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}


.profile-section {
    padding: 20px;
}


.section-title {
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 15px;
    display: block;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}


.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}


.profile-info-item {
    display: flex;
    flex-direction: column;
}


.profile-info-item.full {
    grid-column: span 2;
}

/* =========================================
   ESTILOS CREDENCIAL INTELIGENTE (SMART CREDENTIAL)
   ========================================= */

/* Botón en el Grid */
.btn-smart-credential {
    background: linear-gradient(135deg, #FF69B4, #3BB6C4) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 10px 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 15px rgba(232, 76, 154, 0.3) !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    margin-top: 8px !important;
    outline: none !important;
}

.btn-smart-credential:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(232, 76, 154, 0.4);
}

/* Modal y Tarjeta de Credencial */
.credential-modal-card {
    background: #f8fafc;
    padding: 0 !important;
    max-width: 350px !important;
    overflow: hidden !important;
    border: none !important;
    position: relative;
}

.credential-header-strip {
    height: 8px;
    background: linear-gradient(to right, var(--pink-main), var(--blue-main));
    width: 100%;
}

.credential-body {
    padding: 25px 20px;
    text-align: center;
    position: relative;
}

.credential-logo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.03;
    width: 80%;
    z-index: 0;
    pointer-events: none;
}

.credential-avatar-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    z-index: 2;
}

.credential-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.credential-hologram-effect {
    position: absolute;
    inset: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
    background-size: 200% 200%;
    animation: hologramMove 3s infinite linear;
    pointer-events: none;
    z-index: 3;
    opacity: 0.5;
}

@keyframes hologramMove {
    0% {
        background-position: -200% -200%;
    }

    100% {
        background-position: 200% 200%;
    }
}

.credential-name {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: var(--text-main);
    margin-bottom: 5px;
}

.credential-role {
    font-size: 13px;
    font-weight: 700;
    color: var(--pink-main);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.credential-qr-container {
    background: white;
    padding: 0;
    border-radius: 12px;
    width: 100%;
    /* Fix: changed from 140px to 100% */
    height: 180px;
    margin: 15px auto 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.credential-qr-container img {
    width: 100%;
    height: 100%;
}

.credential-verification-seal {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: #22C55E;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.credential-dynamic-info {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
    padding: 8px 15px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.credential-status-dot {
    width: 8px;
    height: 8px;
    background: #22C55E;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.credential-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #f1f5f9;
}

.credential-footer-text {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.4;
}


.profile-info-item .label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 2px;
}


.profile-info-item .value {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
    word-break: break-word;
}


.profile-info-item .value.link {
    color: var(--blue-main);
    text-decoration: none;
    font-weight: 600;
}


/* Peque Profile Card */
.peque-profile-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    border-left: 5px solid var(--pink-main);
}


.peque-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}


.peque-icon {
    font-size: 24px;
    margin-right: 12px;
}


.peque-meta {
    flex-grow: 1;
}


.peque-name {
    font-weight: 800;
    color: var(--text-main);
    font-size: 16px;
}


.peque-date {
    font-size: 12px;
    color: #64748b;
}


.peque-age-badge {
    background: var(--pink-light);
    color: var(--pink-main);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}


.peque-details p {
    font-size: 13px;
    margin: 5px 0;
    color: #334155;
}


.profile-actions {
    padding: 20px;
    background: #f1f5f9;
}


/* =========================
   MODAL PREMIUM DESIGN
   ========================= */
.service-premium-modal.modal-card {
    padding: 0;
    overflow: hidden;
    max-width: 500px;
    border: none;
    border-radius: 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    /* Allow it to be tall but not overflow viewport */
}


.modal-header-gradient {
    background: #fff;
    padding: 20px 24px 10px 24px;
    text-align: left;
    border-bottom: none;
    flex-shrink: 0;
    /* Header stays fixed */
}


.modal-header-gradient h3 {
    color: var(--blue-main);
    margin: 0;
    font-size: 20px;
    font-family: 'DM Serif Display', serif;
    font-weight: 700;
}


.modal-subtitle {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}


.modal-body-scroll {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    /* Take remaining space */
    min-height: 0;
    /* Important for flex scrolling */
}


/* Sections */
.info-section {
    margin-bottom: 20px;
}


.section-label {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}


/* Grid for Contact */
.modal-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}


.info-box {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #f3f4f6;
}


.info-box.full {
    grid-column: span 2;
}


.info-box label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 4px;
}


.info-box .value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
    word-break: break-word;
}


.info-box .value.highlight {
    font-size: 15px;
    font-weight: 700;
    color: var(--pink-main);
}


.info-box .value.emergency {
    color: var(--error-text);
    font-weight: 600;
}


.info-box .value a {
    color: var(--blue-main);
    text-decoration: underline;
}


/* Child Card */




.child-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}


.child-notes {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}


/* Financial */
.financial-box {
    text-align: right;
    font-size: 14px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
    margin-top: 10px;
    color: var(--text-muted);
}


.financial-box b {
    color: #059669;
    font-size: 16px;
}


/* Footer Actions */
.modal-footer {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
    flex-shrink: 0;
    /* Always visible */
}


/* Overrides for specific existing elements being moved */
#mMsg {
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
}


.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}


.weekly-section-title {
    font-size: 16px;
    color: var(--pink-main);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    font-weight: 800;
    border-left: 4px solid var(--pink-main);
    padding-left: 12px;
}


.activity-card {
    background: white;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s;
}


.activity-card:active {
    transform: scale(0.98);
}


.activity-label-pink {
    color: var(--pink-main);
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 5px;
    display: block;
}


.activity-area-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}


.activity-detail-summary {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 12px;
}


.activity-details-link {
    color: var(--blue-main);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}


.activity-expanded-content {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    font-size: 14px;
    color: #374151;
}


.activity-expanded-content b {
    color: var(--text-main);
}


.activity-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-top: 15px;
    display: block;
}


.activity-img:hover {
    transform: scale(1.02);
    cursor: pointer;
}


.activity-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* =========================================
/* =========================================
   CARDS DE BIENVENIDA PREMIUM (COMPACTA)
   ========================================= */
.welcome-family-card {
    background: linear-gradient(135deg, #C6FAFF 0%, #E0F7FA 100%) !important;
    border: none !important;
    padding: 15px 10px !important;
    /* Estilo compacto */
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(59, 182, 196, 0.1) !important;
    margin-bottom: 15px !important;
    border-radius: 20px !important;
}


.welcome-title-bold {
    font-family: 'DM Serif Display', serif !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #1F2937 !important;
    margin: 0 0 4px 0 !important;
}


.welcome-subtitle-light {
    font-size: 14px !important;
    color: #6B7280 !important;
    /* Gris menos negro (text-muted) */
    margin: 0 0 10px 0 !important;
}


.logout-btn-premium {
    background: rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(31, 41, 55, 0.05) !important;
    color: #6B7280 !important;
    padding: 6px 14px !important;
    font-size: 10px !important;
    border-radius: 50px !important;
    width: auto !important;
    margin: 0 auto;
    display: inline-block !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.logout-btn-premium:hover {
    background: rgba(255, 255, 255, 0.6) !important;
    color: #1F2937 !important;
}


/* =========================================
   SELECCIÓN DE ROL (CLIENTE)
   ========================================= */
.role-selection-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}


.role-btn {
    flex: 1;
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 14px 10px;
    /* Mas alto para touch targets */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    /* Un poco mas grande */
    color: #6B7280;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}


.role-btn span {
    font-size: 20px;
    /* Emojis mas grandes */
}


.role-btn:hover {
    border-color: #3BB6C4;
    background: #F0FDFA;
    transform: translateY(-2px);
}


.role-btn.active {
    background: #3BB6C4;
    border-color: #3BB6C4;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 182, 196, 0.3);
}


.role-btn.active:hover {
    transform: translateY(-2px);
    background: #34A8B5;
}


/* =========================
   ANIMACIONES DE ENTRADA CLIENTE
   ========================= */
.slide-up-fade {
    opacity: 0;
    /* Empieza invisible */
    animation: slideUpFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.fade-in-smooth {
    animation: fadeInPremium 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.slide-up-fade.delay-1 {
    animation-delay: 0.2s;
}

.slide-up-fade.delay-2 {
    animation-delay: 0.4s;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   BITÁCORA - BOTONES DE OPCIÓN (UX IMPROVEMENT)
   ========================================= */

.bitacora-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.bitacora-option-btn {
    flex: 1;
    min-width: 80px;
    padding: 12px 10px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: white;
    color: #4B5563;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border-bottom: 4px solid #E5E7EB;
}

.bitacora-option-btn:hover {
    border-color: var(--blue-main);
    background: rgba(59, 182, 196, 0.05);
}

.bitacora-option-btn.active {
    border-color: var(--blue-main);
    background: var(--blue-main);
    color: white;
    border-bottom: 4px solid #339ba7;
    transform: translateY(2px);
}

.bitacora-option-btn:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

/* Variantes de columnas para que se vean organizadas */
.options-2 .bitacora-option-btn {
    flex: 1 1 45%;
}

.options-3 .bitacora-option-btn {
    flex: 1 1 30%;
}

.options-4 .bitacora-option-btn {
    flex: 1 1 22%;
}

/* =========================================
   ESTILOS DE VALIDACIÓN
   ========================================= */
.input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.input-error-shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}