/* ========================================================
   FLECHAS - MÓDULO CHECKLIST DE PAÑALERA & MALETA DE PARTO
   Estilos Principales & Modo de Impresión Oficial Aislado
   ======================================================== */

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #e0f2fe;
    --secondary: #8b5cf6;
    --secondary-light: #f3e8ff;
    --rose: #ec4899;
    --rose-light: #fce7f3;
    --emerald: #10b981;
    --emerald-light: #d1fae5;
    --amber: #f59e0b;
    --amber-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ========================================================
   CABECERA PRINCIPAL & HUB DE NAVEGACIÓN FLECHAS
   ======================================================== */
.main-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #0284c7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.logo-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* HUB DE ENLACES ENTRE MÓDULOS */
.nav-links-hub {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.nav-hub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 600;
    color: #475569;
    transition: var(--transition);
}

.nav-hub-link:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.nav-hub-link.active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* MENÚ Y PERFIL DE USUARIO EN CABECERA */
.user-menu-area {
    position: relative;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #f1f5f9;
    padding: 0.35rem 0.85rem 0.35rem 0.45rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.user-badge:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.25);
}

.user-text-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.user-greeting {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.user-name {
    font-size: 0.825rem;
    color: #0f172a;
    font-weight: 700;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* MENÚ DESPLEGABLE DE PERFIL */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    z-index: 100;
    animation: fadeIn 0.2s ease;
}

.user-dropdown-menu.active {
    display: flex;
}

.dropdown-header {
    padding: 0.5rem 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.d-user-email {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.d-user-id {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--primary-dark);
    background: var(--primary-light);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

.dropdown-switch-user {
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.dropdown-switch-user label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.35rem;
}

.dropdown-switch-user select {
    width: 100%;
    padding: 0.45rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    background: #ffffff;
    font-family: inherit;
    color: #0f172a;
    cursor: pointer;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.dropdown-item.text-danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* NOTIFICACIONES TOAST */
.toast-box {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast-box.show {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================================
   CONTENEDOR PRINCIPAL & HERO BANNER
   ======================================================== */
.main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

.hero-checklist-banner {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 40%, #8b5cf6 100%);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.3);
    position: relative;
    overflow: hidden;
}

.hero-checklist-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hero-desc {
    font-size: 0.975rem;
    color: #e0f2fe;
    max-width: 820px;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* BARRA DE PROGRESO DE EMPAQUE */
.progress-card-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    max-width: 720px;
}

.progress-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.progress-label {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-percent-pill {
    background: #ffffff;
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.15rem 0.65rem;
    border-radius: var(--radius-full);
}

.progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* ========================================================
   SELECTOR DESLIZANTE DE ETAPAS (TABS)
   ======================================================== */
.stages-slider-container {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stages-track {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
}

.stages-track::-webkit-scrollbar {
    height: 6px;
}

.stages-track::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.stage-tab-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius-full);
    background: #f1f5f9;
    border: 1px solid transparent;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.stage-tab-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.stage-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

/* ========================================================
   BARRA DE ACCIONES, BÚSQUEDA Y FILTROS
   ======================================================== */
.actions-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filters-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.toolbar-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-action-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.825rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-add-item {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-add-item:hover {
    background: #bae6fd;
}

.btn-reset-list {
    background: #f1f5f9;
    color: #475569;
}

.btn-reset-list:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.btn-print-checklist {
    background: linear-gradient(135deg, #0284c7 0%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

.btn-print-checklist:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(2, 132, 199, 0.35);
}

/* ========================================================
   ENCABEZADO DE ETAPA & TIP PRÁCTICO
   ======================================================== */
.stage-summary-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stage-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stage-title-group h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.stage-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.stage-advice-box {
    background: #fffbeb;
    border-left: 4px solid var(--amber);
    padding: 0.85rem 1.15rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #92400e;
}

/* ========================================================
   TARJETAS DE DIAGRAMAS ILUSTRADOS
   ======================================================== */
.illustration-diagram-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.illustration-diagram-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.illustration-diagram-img {
    width: 100%;
    max-width: 850px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-md);
}

/* ========================================================
   CATEGORÍAS Y LISTA DE ARTÍCULOS CHECKLIST
   ======================================================== */
.checklist-category-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.15rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.category-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-count-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

/* ELEMENTOS DE LA LISTA */
.checklist-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 0.85rem;
}

.checklist-item-row {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    user-select: none;
}

.checklist-item-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.checklist-item-row.completed {
    background: #f0fdf4;
    border-color: #86efac;
}

/* CASILLA DE VERIFICACIÓN PERSONALIZADA */
.custom-checkbox-btn {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.85rem;
    transition: var(--transition);
    margin-top: 2px;
}

.checklist-item-row.completed .custom-checkbox-btn {
    background: var(--emerald);
    border-color: var(--emerald);
    color: #ffffff;
    transform: scale(1.05);
}

.item-content-box {
    flex: 1;
}

.item-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.item-name-text {
    font-size: 0.925rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    transition: var(--transition);
}

.checklist-item-row.completed .item-name-text {
    color: #64748b;
    text-decoration: line-through;
}

.priority-pill {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.priority-imprescindible {
    background: #fee2e2;
    color: #b91c1c;
}

.priority-recomendado {
    background: #eff6ff;
    color: #1d4ed8;
}

.priority-opcional {
    background: #f1f5f9;
    color: #475569;
}

.item-desc-text {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.btn-delete-custom-item {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-delete-custom-item:hover {
    color: var(--danger);
    background: var(--danger-light);
}

/* ========================================================
   MODAL PARA AGREGAR ARTÍCULO PERSONALIZADO
   ======================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 1rem;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(10px);
    transition: transform 0.25s ease;
}

.modal-backdrop.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.35rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    color: #0f172a;
    outline: none;
    transition: var(--transition);
}

.form-input:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* ========================================================
   PIE DE PÁGINA
   ======================================================== */
.app-footer {
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 2rem;
}

/* ========================================================
   CONTENEDOR EXCLUSIVO PARA IMPRESIÓN Y PDF CON MEMBRETE
   ======================================================== */
.print-only-container {
    display: none;
}

@media print {
    @page {
        size: letter portrait;
        margin: 12mm 15mm 15mm 15mm;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Outfit', sans-serif !important;
    }

    .no-print,
    .main-header,
    .hero-checklist-banner,
    .stages-slider-container,
    .actions-toolbar,
    .stage-summary-card,
    .illustration-diagram-card,
    .checklist-category-card,
    .app-footer,
    .modal-backdrop {
        display: none !important;
    }

    .print-only-container {
        display: block !important;
        width: 100% !important;
    }

    .pdf-letterhead {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 2px solid #0284c7 !important;
        padding-bottom: 12px !important;
        margin-bottom: 16px !important;
    }

    .pdf-brand-left {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .pdf-logo-svg,
    .pdf-logo-img {
        width: 54px !important;
        height: 54px !important;
        object-fit: contain !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        display: inline-block !important;
    }

    .pdf-brand-title {
        font-family: 'Playfair Display', Georgia, serif !important;
        font-size: 22pt !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        margin: 0 !important;
    }

    .pdf-brand-sub {
        font-size: 9pt !important;
        font-weight: 700 !important;
        color: #0284c7 !important;
        text-transform: uppercase !important;
        margin: 2px 0 0 0 !important;
    }

    .pdf-brand-motto {
        font-size: 8pt !important;
        font-style: italic !important;
        color: #64748b !important;
        display: block !important;
    }

    .pdf-letterhead-right {
        text-align: right !important;
        font-size: 8.5pt !important;
        color: #475569 !important;
        line-height: 1.4 !important;
    }

    .pdf-stage-title-banner {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        padding: 10px 14px !important;
        margin-bottom: 14px !important;
    }

    .pdf-category-block {
        page-break-inside: avoid !important;
        margin-bottom: 14px !important;
    }

    .pdf-category-heading {
        font-size: 11pt !important;
        font-weight: 800 !important;
        color: #0284c7 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-bottom: 4px !important;
        margin-bottom: 8px !important;
    }

    .pdf-item-row {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 4px 0 !important;
        font-size: 9pt !important;
    }

    .pdf-checkbox-square {
        width: 13px !important;
        height: 13px !important;
        border: 1.5px solid #475569 !important;
        border-radius: 3px !important;
        margin-top: 2px !important;
        flex-shrink: 0 !important;
    }

    .pdf-doc-footer {
        text-align: center !important;
        border-top: 1px solid #e2e8f0 !important;
        padding-top: 8px !important;
        margin-top: 20px !important;
        font-size: 8pt !important;
        color: #94a3b8 !important;
    }
}

/* ========================================================
   RESPONSIVO
   ======================================================== */
@media (max-width: 900px) {
    .checklist-items-grid {
        grid-template-columns: 1fr;
    }
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .actions-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar-buttons {
        justify-content: flex-start;
    }
    .hero-title {
        font-size: 1.75rem;
    }
}


/* ==========================================================
   CABECERA UNIFICADA & NAVEGACIÓN RESPONSIVA SIN SCROLLBARS
   ========================================================== */
.main-header {
    background: #ffffff !important;
    border-bottom: 1px solid #f1e4e6 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.header-container {
    max-width: 1320px !important;
    margin: 0 auto !important;
    padding: 10px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    position: relative !important;
}

.brand-area {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    color: inherit !important;
    flex-shrink: 0 !important;
}

.brand-logo-img {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    object-fit: contain !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.brand-text {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.15 !important;
}

.brand-name {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    color: #be123c !important;
}

.brand-tagline {
    font-size: 0.68rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
}

/* Botón Hamburguesa para Móviles (< 992px) */
.mobile-nav-toggle {
    display: none !important;
    background: transparent !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    width: 40px !important;
    height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.mobile-nav-toggle:hover {
    background: #f8fafc !important;
    color: #be123c !important;
}

/* Hub de Navegación de 5 Módulos */
.nav-hub,
.nav-links-hub {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex: 1 !important;
    margin: 0 10px !important;
    overflow: visible !important; /* Cero barras de desplazamiento */
    padding: 0 !important;
}

.nav-hub-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 12px !important;
    border-radius: 9999px !important;
    text-decoration: none !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.nav-hub-link:hover {
    background: #ffe4e6 !important;
    color: #be123c !important;
}

.nav-hub-link.active {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 50%, #fb7185 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25) !important;
}

.mobile-nav-divider,
.mobile-logout-btn {
    display: none !important;
}

/* Menú de Usuario */
.user-menu-area {
    position: relative !important;
    flex-shrink: 0 !important;
}

.user-badge {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 5px 12px !important;
    background: #fdf2f4 !important;
    border: 1px solid #fecdd3 !important;
    border-radius: 9999px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.user-badge:hover {
    background: #ffe4e6 !important;
    border-color: #fda4af !important;
}

.avatar-circle {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.88rem !important;
}

.user-text-info {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.15 !important;
}

.user-greeting {
    font-size: 0.65rem !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
}

.user-name {
    font-size: 0.82rem !important;
    color: #0f172a !important;
    max-width: 130px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.dropdown-arrow {
    font-size: 0.72rem !important;
    color: #64748b !important;
    margin-left: 2px !important;
}

/* Dropdown */
.user-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    width: 270px !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #f1e4e6 !important;
    padding: 12px !important;
    display: none !important;
    flex-direction: column !important;
    z-index: 1100 !important;
}

.user-dropdown-menu.show {
    display: flex !important;
    animation: fadeInDown 0.2s ease !important;
}

.dropdown-header {
    padding-bottom: 8px !important;
    border-bottom: 1px solid #f1e4e6 !important;
    margin-bottom: 8px !important;
}

.d-user-email {
    font-size: 0.8rem !important;
    color: #64748b !important;
    display: block !important;
    word-break: break-all !important;
}

.d-user-id {
    font-size: 0.72rem !important;
    color: #e11d48 !important;
    font-weight: 700 !important;
}

.dropdown-switch-user {
    padding: 6px 0 !important;
}

.dropdown-switch-user label {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.dropdown-switch-user select {
    width: 100% !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 0.82rem !important;
    background-color: #fff !important;
    font-family: inherit !important;
}

.dropdown-divider {
    height: 1px !important;
    background: #f1e4e6 !important;
    margin: 8px 0 !important;
}

.dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 12px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: background 0.15s ease !important;
    width: 100% !important;
    font-family: inherit !important;
}

.dropdown-item:hover {
    background: #fdf2f4 !important;
    color: #be123c !important;
}

.dropdown-item.text-danger {
    color: #ef4444 !important;
}

.dropdown-item.text-danger:hover {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

/* ==========================================================
   REGLAS RESPONSIVAS GLOBALES PARA MÓVILES (< 992px)
   ========================================================== */
@media (max-width: 992px) {
    .header-container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 14px !important;
        position: relative !important;
    }

    .brand-area {
        order: 1 !important;
    }

    .user-menu-area {
        order: 2 !important;
        margin-left: auto !important;
        margin-right: 10px !important;
        position: relative !important;
    }

    .mobile-nav-toggle {
        order: 3 !important;
        display: flex !important;
    }

    .user-dropdown-menu {
        right: 0 !important;
        left: auto !important;
        max-width: calc(100vw - 28px) !important;
        width: 260px !important;
        z-index: 1200 !important;
    }

    .nav-hub,
    .nav-links-hub {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 12px !important;
        right: 12px !important;
        background: #ffffff !important;
        border-radius: 16px !important;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18) !important;
        border: 1px solid #f1e4e6 !important;
        padding: 12px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        margin: 6px 0 0 0 !important;
        z-index: 1150 !important;
    }

    .nav-hub.mobile-open,
    .nav-links-hub.mobile-open {
        display: flex !important;
        animation: fadeInDown 0.25s ease !important;
    }

    .nav-hub-link {
        padding: 12px 16px !important;
        border-radius: 10px !important;
        font-size: 0.92rem !important;
        justify-content: flex-start !important;
    }

    .mobile-nav-divider {
        display: block !important;
        height: 1px !important;
        background: #f1e4e6 !important;
        margin: 8px 4px !important;
    }

    .mobile-logout-btn {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        background: #fff1f2 !important;
        color: #e11d48 !important;
        border: 1px solid #fecdd3 !important;
        font-weight: 700 !important;
        border-radius: 12px !important;
        padding: 12px 16px !important;
        margin-top: 4px !important;
        cursor: pointer !important;
        width: 100% !important;
        text-align: left !important;
    }

    .mobile-logout-btn:hover {
        background: #fee2e2 !important;
        color: #be123c !important;
    }

    .user-text-info {
        display: flex !important;
    }

    .user-badge {
        padding: 4px 8px !important;
    }

    .brand-tagline {
        display: block !important;
    }

    /* Adaptabilidad de contenedores y cards */
    .main-container {
        padding: 16px 12px 40px 12px !important;
    }

    .hero-banner,
    .hero-checklist-banner {
        padding: 20px 16px !important;
    }

    .hero-title {
        font-size: 1.55rem !important;
    }

    /* Tracker contracciones móvil */
    .tracker-workspace-grid {
        grid-template-columns: 1fr !important;
    }

    .big-timer-btn {
        width: 180px !important;
        height: 180px !important;
    }

    .timer-digits {
        font-size: 2.7rem !important;
    }

    .guide-cards-grid {
        grid-template-columns: 1fr !important;
    }

    /* Adaptación de tablas */
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}
