        /* ========== ESTILOS PROPIOS Y VARIABLES ========== */
        :root {
            --azul-profundo: #0E2586;
            --color-bandada: #4169E1;   
            --color-manada: #FFD100;     
            --color-tropa: #00853F;      
            --color-compania: #40E0D0;   
            --color-avanzada: #8B5CF6;   
            --color-clan: #E31837; 
            --gris-fondo: #f4f7f9;
            --border-color: #cbd5e0;
            --texto-claro: #718096;
            --texto-oscuro: #2d3748;
            --success: #2ecc71;
            --warning: #f39c12;
            --danger: #e74c3c;
            --info: #3498db;
        }
        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }
        body { background: #f4f7f9; padding: 15px; overflow-x: hidden; color: var(--texto-oscuro); }
        
        /* Layout Principal */
        .programa-layout { display: flex; gap: 20px; height: calc(100vh - 90px); transition: all 0.3s; }
        .youth-list-panel { width: 350px; background: white; border-radius: 12px; border: 1px solid var(--border-color); display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
        .youth-list-header { padding: 20px; background: white; border-bottom: 1px solid var(--border-color); z-index: 10; }
        .youth-list-header h3 { font-size: 1.1rem; margin-bottom: 15px; font-weight: 700; color: var(--azul-profundo); }
        .search-wrapper { position: relative; margin-bottom: 15px; }
        .search-wrapper i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--texto-claro); }
        .search-wrapper input { padding-left: 35px; width: 100%; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 8px; padding-top: 10px; padding-bottom: 10px; outline: none; transition: border 0.3s; }
        .search-wrapper input:focus { border-color: var(--azul-profundo); }
        .youth-filter-tags { display: flex; gap: 6px; flex-wrap: wrap; }
        .youth-tag { font-size: 0.7rem; padding: 5px 10px; border-radius: 15px; cursor: pointer; font-weight: bold; color: white; opacity: 0.4; transition: all 0.2s; border: 2px solid transparent; text-transform: uppercase; letter-spacing: 0.05em; }
        .youth-tag:hover { opacity: 0.8; transform: translateY(-1px); }
        .youth-tag.active { opacity: 1; border-color: rgba(0,0,0,0.3); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
        
        .youth-list { flex: 1; overflow-y: auto; list-style: none; padding: 0; margin: 0; background: #fafafa; }
        .youth-list-item { padding: 12px 20px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: all 0.2s; background: white; }
        .youth-list-item:hover { background: #f8fafc; padding-left: 25px; }
        .youth-list-item.active { background: #eef2ff; border-left: 5px solid var(--azul-profundo); padding-left: 15px; }
        .youth-list-pic { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 2px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
        .youth-list-info h4 { margin: 0 0 2px 0; font-size: 0.9rem; font-weight: 700; color: #1e293b; }
        .youth-list-info p { margin: 0; font-size: 0.75rem; color: #64748b; font-weight: 500; }
        .youth-list-badge { width: 12px; height: 12px; border-radius: 50%; border: 2px solid white; margin-left: auto; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
        
        /* Panel Derecho / Perfil */
        .youth-profile-panel { flex: 1; background: white; border-radius: 12px; border: 1px solid var(--border-color); overflow-y: auto; display: flex; flex-direction: column; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
        .dashboard-panel { display: none; flex: 1; background: white; border-radius: 12px; border: 1px solid var(--border-color); overflow-y: auto; flex-direction: column; padding: 30px; animation: fadeIn 0.4s; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
        .dashboard-panel.active { display: flex; }

        .profile-header-card { display: flex; gap: 25px; align-items: center; padding: 30px 40px; position: relative; overflow: hidden; flex-shrink: 0; }
        .profile-pic-large { width: 120px; height: 120px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.9); object-fit: cover; background: white; z-index: 1; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3); }
        .profile-info { z-index: 1; flex: 1; }
        .profile-info h2 { margin: 0 0 5px; font-size: 2.2rem; font-weight: 800; color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.3); letter-spacing: -0.02em; }
        .badge-rama { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.9); padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; margin-bottom: 15px; font-weight: 700; color: #1e293b; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
        .badge-rama img { width: 20px; height: 20px; object-fit: contain; }
        .profile-info-grid { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 10px; }
        .profile-info-grid p { margin: 0; font-size: 0.85rem; text-shadow: 0 1px 2px rgba(0,0,0,0.4); display: flex; align-items: center; gap: 6px; font-weight: 500; color: rgba(255,255,255,0.95); background: rgba(0,0,0,0.2); padding: 4px 10px; border-radius: 6px; }
        .profile-actions { z-index: 1; display: flex; flex-direction: column; gap: 8px; }
        
        .btn { padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s; border: none; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 8px; justify-content: center; outline: none; }
        .btn-warning { background: #f59e0b; color: white; box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2); }
        .btn-info { background: #3b82f6; color: white; box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2); }
        .btn-success { background: #10b981; color: white; box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2); }
        .btn-danger { background: #ef4444; color: white; box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2); }
        .btn-primary { background: var(--azul-profundo); color: white; box-shadow: 0 4px 6px rgba(14, 37, 134, 0.2); }
        .btn-sm { padding: 5px 12px; font-size: 0.75rem; }
        .btn-outline { background: white; border: 1px solid #cbd5e0; color: #475569; }
        .btn:hover { filter: brightness(0.9); transform: translateY(-1px); }
        .btn:active { transform: translateY(0); }
        
        .profile-tabs { display: flex; background: white; border-bottom: 1px solid var(--border-color); padding: 0 20px; flex-shrink: 0; overflow-x: auto; }
        .profile-tab { padding: 18px 20px; cursor: pointer; font-weight: 700; color: #64748b; border-bottom: 3px solid transparent; transition: all 0.2s; font-size: 0.85rem; display: flex; align-items: center; gap: 8px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.05em; }
        .profile-tab:hover { color: var(--azul-profundo); background: #f8fafc; }
        .profile-tab.active { color: var(--azul-profundo); border-bottom-color: var(--azul-profundo); }
        .profile-content-area { padding: 30px 40px; flex: 1; background: #f8fafc; }
        .p-tab-pane { display: none; animation: fadeIn 0.3s ease; }
        .p-tab-pane.active { display: block; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
        .section-title { font-size: 1.3rem; font-weight: 800; color: var(--texto-oscuro); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; }
        
        /* Herramientas Visuales */
        .estado-propuesto { color: #64748b; background: #f1f5f9; border: 1px solid #cbd5e0; }
        .estado-patrulla { color: #b45309; background: #fffbeb; border: 1px solid #fcd34d; }
        .estado-aprobado { color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; }
        .badge-estado { padding: 4px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 800; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 5px; text-transform: uppercase; letter-spacing: 0.05em; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
        .badge-estado:hover { filter: brightness(0.95); transform: translateY(-1px); }

        .specialty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 15px; }
        .specialty-card { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; transition: all 0.3s; position: relative; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
        .specialty-card:hover { transform: translateY(-4px); box-shadow: 0 12px 20px rgba(0,0,0,0.08); border-color: #cbd5e0; }
        .specialty-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; border-bottom: 1px solid #f1f5f9; padding-bottom: 15px; }
        .specialty-icon { width: 55px; height: 55px; border-radius: 50%; background: var(--azul-profundo); color: white; display: flex; justify-content: center; align-items: center; font-size: 1.6rem; flex-shrink: 0; box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2); }
        .specialty-title { font-weight: 800; font-size: 1.05rem; line-height: 1.2; color: #1e293b; }
        .specialty-category { font-size: 0.65rem; background: #e2e8f0; color: #475569; padding: 3px 8px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; margin-top: 5px; display: inline-block;}
        .pilares-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 15px; }
        .pilar-item { font-size: 0.75rem; display: flex; align-items: center; gap: 6px; color: #64748b; background: #f8fafc; padding: 8px; border-radius: 8px; font-weight: 600; border: 1px solid transparent; transition: 0.3s; }
        .pilar-item.logrado { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
        .monitor-tag { font-size: 0.75rem; background: #f8fafc; padding: 8px 12px; border-radius: 8px; display: flex; align-items: center; gap: 8px; color: #475569; border: 1px dashed #cbd5e0; font-weight: 600; }

        .firma-slot { border: 2px dashed #cbd5e0; border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; transition: 0.3s; background: #f8fafc; }
        .firma-slot:hover { border-color: var(--azul-profundo); background: #eef2ff; }
        .firma-slot.firmado { border-style: solid; border-color: #10b981; background: #f0fdf4; color: #10b981; cursor: default; }

        /* Ruta de Progresion (Stepper) */
        .progression-stepper { display: flex; justify-content: space-between; margin: 15px auto 20px; position: relative; padding: 25px 40px; background: #f8fafc; border-radius: 16px; width: 100%; max-width: 900px; }
        .progression-stepper::before { content: ''; position: absolute; top: 50px; left: 70px; right: 70px; height: 6px; background: #cbd5e0; z-index: 0; border-radius: 3px; }
        .p-step { flex: 1; text-align: center; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
        .p-step-icon { width: 50px; height: 50px; border-radius: 50%; background: white; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #94a3b8; border: 4px solid #cbd5e0; transition: all 0.4s; box-shadow: 0 4px 6px rgba(0,0,0,0.05); overflow: hidden; }
        .p-step-icon img { width: 100%; height: 100%; object-fit: cover; }
        .p-step.completed .p-step-icon { background: var(--success); border-color: #10b981; }
        .p-step.completed .p-step-label { color: #10b981; }
        .p-step.active .p-step-icon { background: var(--warning); transform: scale(1.2); border-color: #f59e0b; box-shadow: 0 6px 12px rgba(245, 158, 11, 0.4); }
        .p-step-label { font-size: 0.8rem; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; transition: 0.3s; }
        .p-step.active .p-step-label { color: var(--texto-oscuro); transform: scale(1.05); }

        /* Modales */
        .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.7); z-index: 2000; justify-content: center; align-items: center; backdrop-filter: blur(4px); padding: 20px; }
        .modal-overlay.active { display: flex; }
        .modal-box { background: white; padding: 35px; border-radius: 16px; width: 100%; max-width: 750px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); max-height: 90vh; overflow-y: auto; }
        @keyframes slideUp { from { transform: translateY(30px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
        .modal-box h3 { color: var(--azul-profundo); margin-bottom: 20px; border-bottom: 2px solid #e2e8f0; padding-bottom: 12px; font-size: 1.4rem; font-weight: 800; }
        
        .toast-container { position: fixed; bottom: 25px; right: 25px; z-index: 3000; display: flex; flex-direction: column; gap: 12px; }
        .toast { background: white; border-left: 5px solid var(--success); padding: 16px 24px; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 15px; animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; font-size: 0.95rem; font-weight: 600; color: #1e293b; }
        @keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

        /* Edición Modal Completo Formulario */
        .modal-edit-section { margin-bottom: 25px; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: white; }
        .modal-edit-section legend { font-weight: 800; background: #f8fafc; padding: 12px 20px; width: 100%; margin: 0; border-bottom: 1px solid #e2e8f0; font-size: 1.05rem; color: #1e293b; display: flex; align-items: center; gap: 8px; }
        .modal-edit-section .section-content { padding: 25px; }
        .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; margin-bottom: 10px; }
        .form-item { display: flex; flex-direction: column; }
        .form-item label { font-weight: 700; margin-bottom: 6px; font-size: 0.8rem; color: #475569; text-transform: uppercase; letter-spacing: 0.05em; }
        .form-item input, .form-item select, .form-item textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e0; border-radius: 8px; outline: none; transition: all 0.2s; font-size: 0.9rem; font-family: inherit; background: #fff; }
        .form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--azul-profundo); box-shadow: 0 0 0 3px rgba(14,37,134,0.1); }
        .full-width { grid-column: 1 / -1; }
        .checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px; margin-top: 5px; }
        .checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 500; color: #334155; cursor: pointer; }
        .checkbox-item input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

        /* KPIs */
        .kpi-card { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); position: relative; overflow: hidden; }
        .kpi-value { font-size: 2.8rem; font-weight: 900; color: var(--azul-profundo); line-height: 1; margin: 12px 0; letter-spacing: -0.02em; }
        .kpi-label { font-size: 0.8rem; color: #64748b; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }

        /* Scrollbar */
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
        ::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
        
        /* Estilos para enlaces clickeables */
        .clickable-phone, .clickable-address {
            cursor: pointer;
            transition: opacity 0.2s;
        }
        .clickable-phone:hover, .clickable-address:hover {
            opacity: 0.8;
            text-decoration: underline;
        }
        /* Resultados búsqueda desplegable */
        .search-results {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            max-height: 200px;
            overflow-y: auto;
            box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
            z-index: 50;
        }
        .search-results > div {
            padding: 8px 12px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .search-results > div:hover {
            background: #f1f5f9;
        }
