:root {
    --primary-green: #1E3A8A;
    --primary-green-dark: #172B69;
    --light-green: #E0F2FE;
    --soft-peach: #EDE9FE;
    --peach-accent: #F59E0B;
    --slate-blue: #1E3A8A;
    --slate-dark: #0F172A;
    --white: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #475569;
    --border-soft: rgba(6, 182, 212, 0.22);
    --danger: #C93B3B;
    --danger-soft: #FDECEC;
    --danger-border: rgba(201, 59, 59, 0.3);
    --shadow-card: 0 14px 36px rgba(30, 58, 138, 0.08);
    --radius-lg: 22px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(155deg, #F8FAFC 0%, #E0F2FE 52%, #EDE9FE 100%);
    color: var(--text-main);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    color: var(--slate-blue);
    letter-spacing: -0.02em;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navigation */
.glass-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 4px 20px rgba(37, 61, 74, 0.04);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
}

.logo-badge {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--primary-green), var(--slate-blue));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 6px 16px rgba(52, 125, 113, 0.25);
}

.logo-text-wrap {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 21px;
    color: var(--slate-blue);
    line-height: 1.1;
}

.logo-tagline {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-green);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 44px;
}

.nav-btn:hover {
    background: var(--light-green);
    color: var(--primary-green-dark);
}

.nav-btn.active {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(52, 125, 113, 0.24);
}

.nav-btn.nav-danger {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: var(--danger-border);
}

.nav-btn.nav-danger.active,
.nav-btn.nav-danger:hover {
    background: var(--danger);
    color: var(--white);
}

/* Main Content */
.main-content {
    flex: 1;
    padding-top: 36px;
    padding-bottom: 64px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.28s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-showcase {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 42px;
    box-shadow: var(--shadow-card);
    margin-bottom: 32px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--light-green);
    color: var(--primary-green-dark);
    font-weight: 700;
    font-size: 12.5px;
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
    border: 1px solid rgba(52, 125, 113, 0.22);
}

.landing-title {
    font-size: clamp(28px, 3.6vw, 42px);
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--slate-blue);
}

.gradient-text {
    color: var(--primary-green);
}

.landing-subtitle {
    font-size: 16.5px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-cta-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary-glow {
    background: var(--primary-green);
    color: var(--white);
    padding: 13px 22px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 8px 20px rgba(52, 125, 113, 0.25);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-height: 48px;
}

.btn-primary-glow:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
}

.btn-secondary-glass {
    background: var(--light-green);
    color: var(--slate-blue);
    padding: 13px 20px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border-soft);
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 48px;
}

.btn-secondary-glass:hover {
    background: var(--soft-peach);
}

/* Mockup Preview Card */
.hero-mockup-card {
    background: linear-gradient(160deg, var(--slate-blue) 0%, var(--slate-dark) 100%);
    color: var(--white);
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(37, 61, 74, 0.22);
}

.hero-mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.hero-mockup-header h3 {
    color: var(--white);
    font-size: 19px;
}

.hero-mockup-tag {
    background: var(--soft-peach);
    color: var(--slate-blue);
    font-weight: 700;
    font-size: 12px;
    padding: 5px 11px;
    border-radius: 99px;
}

.hero-mini-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.hero-mini-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 13.5px;
}

.hero-mini-pill {
    background: rgba(233, 243, 236, 0.2);
    color: #A9E5C3;
    padding: 3px 10px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 12px;
}

/* Cards & Grids */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.feature-card, .glass-card {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
}

.feature-icon, .icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--light-green);
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(52, 125, 113, 0.2);
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 19px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14.5px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-soft);
}

.card-header .icon-badge {
    margin-bottom: 0;
    flex-shrink: 0;
}

.subtitle {
    color: var(--text-muted);
    font-size: 14.5px;
}

.content-body h2 {
    margin-top: 24px;
    margin-bottom: 10px;
    font-size: 20px;
    color: var(--slate-blue);
}

.content-body p, .content-body li {
    color: var(--text-main);
    font-size: 15px;
    margin-bottom: 10px;
}

.content-body ul, .content-body ol {
    padding-left: 22px;
    margin-bottom: 16px;
}

.alert-box {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 22px;
    align-items: flex-start;
}

.alert-box.warning {
    background: #FFF9F0;
    border: 1px solid #E9B97A;
    color: var(--slate-blue);
}

.alert-box.danger {
    background: var(--danger-soft);
    border: 1px solid var(--danger-border);
    color: #7A1C1C;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 13.5px;
    color: #0F1E46;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.form-group input, .form-group select, .form-group textarea,
input[type="text"], input[type="email"], input[type="password"], textarea, select {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 10px 14px;
    border: 1.5px solid #CBD5E1;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13.5px;
    background: #FFFFFF;
    color: #0F1E46;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

textarea {
    resize: vertical !important;
    min-height: 68px;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
input:focus, textarea:focus, select:focus {
    border-color: #0066DD !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 221, 0.15) !important;
}

.wp-section-pane, .glass-card, .form-group, form {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

.wp-main-content {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 13px 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
}

/* Footer */
.glass-footer {
    background: var(--slate-blue);
    color: var(--white);
    padding: 32px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13.5px;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--soft-peach);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 900px) {
    .hero-showcase {
        grid-template-columns: 1fr;
        padding: 28px;
    }
}

/* Web Panel Layout & Vertical Sidebar */
.wp-app-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: start;
}

.wp-sidebar {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(15, 30, 70, 0.05);
    border: 1px solid #E2E8F0;
    position: sticky;
    top: 20px;
}

.wp-menu-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #475569;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.wp-menu-btn i {
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.wp-menu-btn:hover {
    background: #F1F5F9;
    color: #0F1E46;
}

.wp-menu-btn.active {
    background: #E0F2FE;
    color: #0066DD;
    box-shadow: 0 2px 8px rgba(0, 102, 221, 0.12);
}

.wp-section-pane {
    animation: fadeInPane 0.25s ease;
}

@keyframes fadeInPane {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
    .wp-app-layout {
        grid-template-columns: 1fr;
    }
    .wp-sidebar {
        position: static;
    }
    .wp-sidebar nav {
        flex-direction: row !important;
        flex-wrap: wrap;
    }
    .wp-menu-btn {
        flex: 1;
        min-width: 140px;
    }
}

/* Quick option chips for fast documentation by therapists */
.quick-chip {
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #CBD5E1;
    background: #F8FAFC;
    color: #1E293B;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}
.quick-chip:hover {
    background: #EFF6FF;
    border-color: #93C5FD;
    color: #0066DD;
    transform: translateY(-1px);
}
.quick-chip.active {
    background: #0066DD;
    border-color: #0066DD;
    color: #FFFFFF;
}
.quick-chip.chip-green:hover {
    background: #F0FDF4;
    border-color: #86EFAC;
    color: #166534;
}
.quick-chip.chip-purple:hover {
    background: #FAF5FF;
    border-color: #D8B4FE;
    color: #7E22CE;
}

/* Sub-tabs y Selector Clínico de Pacientes */
.pat-subtab-btn {
    background: transparent;
    color: #475569;
    border: 1.5px solid transparent;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.pat-subtab-btn.active {
    background: #0066DD;
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(0, 102, 221, 0.25);
    border-color: #0066DD;
}
.pat-subtab-btn:hover:not(.active) {
    background: #E2E8F0;
    color: #0F1E46;
}

.pat-selector-card {
    flex: 0 0 250px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pat-selector-card:hover {
    border-color: #0066DD;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 30, 70, 0.06);
}
.pat-selector-card.active {
    background: #EFF6FF;
    border-color: #0066DD;
    box-shadow: 0 4px 14px rgba(0, 102, 221, 0.18);
}

/* Gráficos Vectoriales SVG Clínicos */
.clinical-chart-box {
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 16px;
    padding: 18px;
    transition: all 0.2s ease;
}
.clinical-chart-box:hover {
    border-color: #CBD5E1;
    box-shadow: 0 8px 24px rgba(15, 30, 70, 0.05);
}

/* ============================================================== */
/* INFORME CLÍNICO OFICIAL PROFESIONAL E IMPRESIÓN OFICIAL        */
/* ============================================================== */
.clinical-sheet-body {
    background: #FFFFFF;
    color: #0F1E46;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.45;
}

.clinical-header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 2.5px solid #347D71;
    margin-bottom: 20px;
}

.clinical-title-banner {
    background: linear-gradient(135deg, #0F1E46, #253D4A, #347D71);
    color: #FFFFFF;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clinical-title-banner h1 {
    color: #FFFFFF !important;
    margin: 0 0 2px 0;
    font-weight: 900;
}

.clinical-section-header {
    font-size: 13.5px;
    font-weight: 900;
    color: #0F1E46;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1.5px solid #E2E8F0;
    padding-bottom: 6px;
}

.clinical-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 16px;
    margin-bottom: 16px;
}

.clinical-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.clinical-metric-card {
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    padding: 10px 12px;
}

.clinical-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 11.5px;
}

.clinical-table th {
    background: #F1F5F9;
    color: #0F1E46;
    text-align: left;
    padding: 8px 10px;
    font-weight: 800;
    border-bottom: 2px solid #CBD5E1;
}

.clinical-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #E2E8F0;
    color: #334155;
}

.clinical-disclaimer-box {
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-left: 4px solid #347D71;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 10px;
    color: #475569;
    line-height: 1.45;
    margin-top: 22px;
    margin-bottom: 24px;
}

.clinical-signatures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 20px;
    margin-top: 32px;
    align-items: end;
    page-break-inside: avoid;
    break-inside: avoid;
}

.clinical-signature-slot {
    text-align: center;
    padding-top: 10px;
}

.clinical-stamp-seal-img {
    max-height: 86px;
    max-width: 170px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 4px auto;
    opacity: 0.94;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.clinical-sig-line {
    border-top: 1.5px solid #0F1E46;
    margin-bottom: 8px;
}

/* Reglas Estrictas de Impresión Oficial (@media print) */
@media print {
    html, body {
        background: #FFFFFF !important;
        color: #0F1E46 !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body > *:not(#nidavanza-report-preview-overlay) {
        display: none !important;
    }

    #nidavanza-report-preview-overlay {
        display: block !important;
        position: static !important;
        inset: auto !important;
        background: none !important;
        backdrop-filter: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        z-index: 1 !important;
    }

    #nidavanza-report-preview-overlay > div {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    #nidavanza-clinical-print-sheet {
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        font-size: 10pt !important;
    }

    .no-print {
        display: none !important;
    }

    .page-break-avoid {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    @page {
        size: letter portrait;
        margin: 12mm 15mm;
    }
}

/* Campos de Configuración del Centro Editables */
#wp-center-settings-form input {
    background: #FFFFFF !important;
    color: #0F1E46 !important;
    cursor: text !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    pointer-events: auto !important;
}
#wp-center-settings-form input:hover {
    border-color: #347D71 !important;
}
#wp-center-settings-form input:focus {
    border-color: #347D71 !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(52, 125, 113, 0.2) !important;
    outline: none !important;
}

/* ==============================================================
   NIDAVANZA IN-APP MODAL POPUP (Reemplazo nativo de alert/confirm/prompt)
   ============================================================== */
.nida-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.nida-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.nida-modal-card {
    background: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28), 0 8px 24px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.95);
    width: 100%;
    max-width: 480px;
    padding: 24px 26px;
    box-sizing: border-box;
    transform: scale(0.92) translateY(8px);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nida-modal-overlay.active .nida-modal-card {
    transform: scale(1) translateY(0);
}

.nida-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.nida-modal-badge {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nida-modal-badge.success {
    background: #E9F3EC;
    color: #347D71;
    border: 1.5px solid #347D71;
}

.nida-modal-badge.warning {
    background: #FEF3C7;
    color: #D97706;
    border: 1.5px solid #F59E0B;
}

.nida-modal-badge.info {
    background: #EFF6FF;
    color: #0066DD;
    border: 1.5px solid #93C5FD;
}

.nida-modal-badge.error {
    background: #FEE2E2;
    color: #DC2626;
    border: 1.5px solid #FCA5A5;
}

.nida-modal-header-text {
    flex: 1;
    min-width: 0;
}

.nida-modal-brand {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #347D71;
    display: block;
    margin-bottom: 2px;
}

.nida-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #0F1E46;
    margin: 0;
    line-height: 1.25;
}

.nida-modal-close-btn {
    background: transparent;
    border: none;
    color: #94A3B8;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.15s ease;
}

.nida-modal-close-btn:hover {
    background: #F1F5F9;
    color: #0F172A;
}

.nida-modal-body {
    color: #334155;
    font-size: 14.5px;
    line-height: 1.6;
    word-break: break-word;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
}

.nida-modal-body p {
    margin: 0 0 10px 0;
}

.nida-modal-body p:last-child {
    margin-bottom: 0;
}

.nida-modal-input-wrap {
    margin-top: 14px;
}

.nida-modal-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #CBD5E1;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    color: #0F172A;
    background: #F8FAFC;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.nida-modal-input:focus {
    border-color: #347D71;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(52, 125, 113, 0.18);
}

.nida-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 6px;
}

.nida-modal-btn {
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    user-select: none;
}

.nida-modal-btn.primary {
    background: linear-gradient(135deg, #347D71 0%, #253D4A 100%);
    color: #FFFFFF;
    box-shadow: 0 6px 18px rgba(52, 125, 113, 0.28);
}

.nida-modal-btn.primary:hover {
    background: linear-gradient(135deg, #2A685E 0%, #1A2D37 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(52, 125, 113, 0.35);
}

.nida-modal-btn.secondary {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
}

.nida-modal-btn.secondary:hover {
    background: #E2E8F0;
    color: #1E293B;
}

.nida-modal-btn.danger {
    background: #DC2626;
    color: #FFFFFF;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.28);
}

.nida-modal-btn.danger:hover {
    background: #B91C1C;
}

@media (max-width: 640px) {
    .nida-modal-card {
        padding: 20px 18px;
        border-radius: 20px;
    }
    .nida-modal-actions {
        flex-direction: column-reverse;
        width: 100%;
    }
    .nida-modal-btn {
        width: 100%;
    }
}

/* ============================================================== */
/* CITAS RECURRENTES & CALENDARIO CLÍNICO DEL AÑO ENTERO (12 MESES) */
/* Paleta Oficial NIDAVANZA (#347D71, #E9F3EC, #F3D8BA, #253D4A)   */
/* ============================================================== */

.cal-view-switcher {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #E9F3EC;
    padding: 5px;
    border-radius: 14px;
    border: 1px solid #BBF7D0;
}

.cal-view-tab-btn {
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #253D4A;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
}

.cal-view-tab-btn.active {
    background: #347D71;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(52, 125, 113, 0.28);
}

.cal-view-tab-btn:hover:not(.active) {
    background: rgba(52, 125, 113, 0.12);
}

.cal-week-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
}

.cal-nav-btn {
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid #CBD5E1;
    background: #FFFFFF;
    color: #253D4A;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}

.cal-nav-btn:hover {
    border-color: #347D71;
    background: #E9F3EC;
    color: #347D71;
}

.cal-nav-btn.primary-soft {
    background: #E9F3EC;
    border-color: #347D71;
    color: #253D4A;
}

.recurrence-days-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.recurrence-day-chip {
    min-height: 44px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1.5px solid #CBD5E1;
    background: #FFFFFF;
    color: #253D4A;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.16s ease;
}

.recurrence-day-chip.active {
    background: #347D71;
    border-color: #347D71;
    color: #FFFFFF;
    box-shadow: 0 3px 10px rgba(52, 125, 113, 0.25);
}

.recurrence-day-chip:hover:not(.active) {
    border-color: #347D71;
    background: #E9F3EC;
}

.recurrence-preview-box {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #E9F3EC;
    border: 1px solid #347D71;
    color: #253D4A;
    font-size: 12px;
    line-height: 1.45;
}

.cal-annual-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.cal-annual-kpi-card {
    padding: 12px 14px;
    border-radius: 14px;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
}

.cal-year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 14px;
}

.cal-month-card {
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(37, 61, 74, 0.04);
    transition: border-color 0.2s ease;
}

.cal-month-card.has-month-appts {
    border-color: #86EFAC;
}

.cal-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #F1F5F9;
}

.cal-month-title {
    font-size: 14px;
    font-weight: 900;
    color: #253D4A;
}

.cal-month-badge {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: #F1F5F9;
    color: #64748B;
}

.cal-month-badge.active {
    background: #E9F3EC;
    color: #347D71;
    border: 1px solid #347D71;
}

.cal-month-days-header,
.cal-month-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}

.cal-month-days-header span {
    font-size: 10px;
    font-weight: 800;
    color: #64748B;
    padding: 2px 0;
}

.cal-day-cell {
    position: relative;
    min-height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #253D4A;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 2px 0;
}

.cal-day-cell:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.cal-day-cell.empty {
    pointer-events: none;
}

.cal-day-cell.is-today {
    border: 2px solid #0066DD;
    color: #0066DD;
    font-weight: 900;
}

.cal-day-cell.has-appts {
    background: #E9F3EC;
    border-color: #347D71;
    color: #15803D;
    font-weight: 900;
}

.cal-day-cell.all-signed {
    background: #FEF3C7;
    border-color: #F59E0B;
    color: #92400E;
}

.cal-day-cell.selected-day {
    box-shadow: 0 0 0 2px #253D4A;
}

.cal-day-count-dot {
    font-size: 8.5px;
    line-height: 1;
    font-weight: 900;
    color: #FFFFFF;
    background: #347D71;
    border-radius: 6px;
    padding: 1px 4px;
    margin-top: 1px;
}

.cal-day-cell.all-signed .cal-day-count-dot {
    background: #D97706;
}

.cal-scope-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.cal-scope-pill {
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1.5px solid #CBD5E1;
    background: #F8FAFC;
    color: #475569;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.16s ease;
}

.cal-scope-pill.active {
    background: #347D71;
    border-color: #347D71;
    color: #FFFFFF;
}

.team-service-chip {
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 12px;
    border: 1.5px solid #CBD5E1;
    background: #F8FAFC;
    color: #253D4A;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.16s ease;
}

.team-service-chip:hover {
    border-color: #347D71;
    background: #E9F3EC;
}

.team-service-chip.active {
    background: #347D71;
    border-color: #347D71;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(52, 125, 113, 0.22);
}

/* MÓDULO: EJERCICIOS EN CASA ASISTIDOS CON ILUSTRACIONES */
.home-ex-card {
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(37, 61, 74, 0.04);
}

.home-ex-steps-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: #FFFFFF;
}

.home-ex-step-panel {
    background: #E9F3EC;
    border: 1.5px solid #347D71;
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

@media print {
    .home-ex-card,
    .home-ex-steps-strip,
    .home-ex-step-panel {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
