    /* Estilos del Formulario en Pantalla */
    .form-comunidad-wrapper { font-family: inherit; max-width: 1200px; margin: 30px auto; background: #ffffff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); overflow: hidden; border: 1px solid #e1e8ed; }
    .form-header { background: linear-gradient(135deg, #74b9ff 0%, #4a90e2 100%); color: #ffffff; padding: 20px 25px; text-align: center; }
    .form-header h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 0.5px; color: #ffffff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.1); }
    .form-body { padding: 30px; }
    .steps-navigation { display: flex; gap: 10px; margin-bottom: 25px; background: #f4f8fb; padding: 10px; border-radius: 6px; border: 1px solid #e1e8ed; }
    .step-tag { flex: 1; text-align: center; padding: 10px; background: #e1e8ed; color: #5b6b7a; font-size: 14px; font-weight: 700; border-radius: 4px; text-transform: uppercase; transition: all 0.3s ease; }
    .step-tag.active { background: linear-gradient(135deg, #74b9ff 0%, #4a90e2 100%); color: #ffffff; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(74, 144, 226, 0.2); }
    .step-tag.active:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 6px 10px rgba(74, 144, 226, 0.25); cursor: default; }
    .step-tag.completed { background: #e1f0fa; color: #34495e; }
    .step-tag.completed:hover { background: #cce4f7; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.05); cursor: pointer; }
    
    @keyframes fadeInSlide {
        from { opacity: 0; transform: translateY(15px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .form-comunidad-wrapper, .form-comunidad-wrapper *,
    #seccion-constancia-pdf, #seccion-constancia-pdf *,
    .whatsapp-status-container, .whatsapp-status-container * {
        text-transform: uppercase !important;
    }
    ::-webkit-input-placeholder { text-transform: uppercase !important; }
    ::-moz-placeholder { text-transform: uppercase !important; }
    :-ms-input-placeholder { text-transform: uppercase !important; }
    :-moz-placeholder { text-transform: uppercase !important; }
    
    .form-section { display: none; background: #fdfdfd; border: 1px solid #eef0f2; border-radius: 6px; padding: 22px; margin-bottom: 25px; border-left: 4px solid #74b9ff; }
    .form-section.active { display: block; animation: fadeInSlide 0.4s ease forwards; }
    .section-title { font-size: 16px; font-weight: 700; color: #2c3e50; text-transform: uppercase; margin-top: 0; margin-bottom: 18px; border-bottom: 1px solid #e1e8ed; padding-bottom: 6px; }
    .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
    .form-group { display: flex; flex-direction: column; gap: 6px; }
    .form-group.full-width { grid-column: 1 / -1; }
    label { font-size: 15px; font-weight: 600; color: #5b6b7a; }
    input[type="text"], input[type="email"], select, textarea { padding: 10px 12px; border: 1px solid #c8d4df; border-radius: 4px; font-size: 16px; background-color: #fff; box-sizing: border-box; color: #2c3e50; }
    input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus { border-color: #74b9ff; outline: none; box-shadow: 0 0 0 3px rgba(116, 185, 255, 0.2); }
    .checkbox-trigger-group { display: flex; gap: 25px; background: #f4f8fb; padding: 12px 15px; border-radius: 4px; margin-bottom: 25px; }
    .checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #34495e; cursor: pointer; font-size: 15px; }
    .form-navigation-buttons { display: flex; justify-content: space-between; margin-top: 20px; }
    .btn-nav { background-color: #95a5a6; color: #fff; border: none; padding: 10px 25px; border-radius: 4px; cursor: pointer; font-size: 16px; font-weight: 700; transition: background-color 0.2s; }
    .btn-nav.btn-next { background: linear-gradient(135deg, #74b9ff 0%, #4a90e2 100%); color: #ffffff; border: none; transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease; }
    .btn-nav.btn-next:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3); }
    .btn-nav:disabled { opacity: 0.5; cursor: not-allowed; }
    .alert-success { background: #e1f0fa; color: #2c3e50; padding: 15px; border-radius: 4px; margin-bottom: 20px; border: 1px solid #b3d7f0; font-weight: 600; }
    .alert-danger { background: #fae4e4; color: #9c3b3b; padding: 15px; border-radius: 4px; margin-bottom: 20px; border: 1px solid #f2c7c7; font-weight: 600; }

    /* =========================================================================
       PESTAÑAS (TABS)
    ========================================================================= */
    .buzon-tabs-nav { display: flex; background: #f4f8fb; border-bottom: 1px solid #c8d4df; }
    .buzon-tab-btn { flex: 1; padding: 15px; border: none; background: transparent; color: #5b6b7a; font-size: 16px; font-weight: 700; text-transform: uppercase; cursor: pointer; transition: all 0.2s ease; border-bottom: 3px solid transparent; }
    .buzon-tab-btn:hover { background: #eef3f7; }
    .buzon-tab-btn.active { color: #4a90e2; border-bottom: 3px solid #4a90e2; background: #fff; }
    .buzon-tab-content { display: none; }
    .buzon-tab-content.active { display: block; animation: fadeInSlide 0.4s ease forwards; }

    /* =========================================================================
       BUSCADOR RESULTADOS
    ========================================================================= */
    .resultado-card { background: #fff; border: 1px solid #e1e8ed; border-radius: 6px; padding: 15px; border-left: 4px solid #74b9ff; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
    .resultado-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px solid #f4f8fb; padding-bottom: 8px; }
    .resultado-codigo { font-weight: 700; color: #34495e; font-size: 18px; }
    .resultado-fecha { font-size: 14px; color: #7f8c8d; }
    .resultado-estatus { font-size: 13px; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; background: #e1e8ed; color: #5b6b7a; }
    .resultado-estatus.creada { background: #e1f0fa; color: #4a90e2; }
    .resultado-estatus.recibida { background: #eafaf1; color: #2ecc71; }
    .resultado-estatus.atendida { background: #d5f5e3; color: #27ae60; }
    .resultado-estatus.devuelta { background: #fae4e4; color: #e74c3c; }
    .resultado-estatus.terminada { background: #f2f4f4; color: #7f8c8d; }
    .resultado-body { font-size: 13px; color: #5b6b7a; line-height: 1.4; }
    .resultado-meta { display: flex; gap: 15px; margin-bottom: 5px; font-size: 12px; font-weight: 600; color: #4a90e2; }

    /* =========================================================================
       MODAL DE FINALIZACIÓN
    ========================================================================= */
    #modal_finalizacion { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(44, 62, 80, 0.7); z-index: 9999; justify-content: center; align-items: center; }
    #modal_finalizacion.show { display: flex; animation: fadeInModal 0.3s ease; }
    @keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }
    .modal-content-box { background: #fff; padding: 30px; border-radius: 8px; max-width: 450px; width: 90%; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
    .modal-content-box h3 { color: #2c3e50; margin-top: 0; margin-bottom: 10px; font-size: 20px; }
    .modal-content-box p { color: #5b6b7a; font-size: 14px; margin-bottom: 20px; }
    .codigo-generado-box { display: flex; align-items: center; justify-content: space-between; background: #f4f8fb; padding: 10px 15px; border-radius: 6px; margin-bottom: 25px; border: 1px dashed #74b9ff; }
    .codigo-generado-text { font-size: 20px; font-weight: 700; color: #2c3e50; letter-spacing: 1px; margin: 0; }
    .btn-copiar { background: #74b9ff; color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 700; transition: background 0.2s; }
    .btn-copiar:hover { background: #4a90e2; }
    .modal-actions { display: flex; gap: 10px; justify-content: center; }
    .btn-modal-outline { flex: 1; background: transparent; color: #4a90e2; border: 1px solid #4a90e2; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; }
    .btn-modal-outline:hover { background: #f4f8fb; }
    .btn-modal-primary { flex: 1; background: #4a90e2; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; }
    .btn-modal-primary:hover { background: #357ebd; }


    /* =========================================================================
        ADAPTACIÓN RESPONSIVE PARA DISPOSITIVOS MÓVILES (PASOS EN 2 COLUMNAS)
    ========================================================================= */
    @media (max-width: 768px) {
        .steps-navigation {
            display: grid !important;
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 8px !important;
            padding: 8px !important;
        }
        
        /* Hace que el quinto paso (al ser impar) se expanda a lo ancho para un acabado limpio */
        .steps-navigation #tag_paso_5 {
            grid-column: span 2;
        }

        .step-tag {
            font-size: 11px !important;
            padding: 8px 4px !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }

   /* =========================================================================
        ESTILOS CONTROLADOS DE IMPRESIÓN (FORZADO ESTRICTO A 1 SOLA HOJA LETTER)
    ========================================================================= */
    #seccion-constancia-pdf { display: none; }

    @media print {
        /* 1. Elimina radicalmente los encabezados/pies de página del navegador (URL, Fecha, Título) */
        @page { 
            size: letter; 
            margin: 0 !important; /* Margen cero remueve metadatos nativos */
        }
        
        /* 2. Congela el lienzo base para evitar páginas secundarias residuales */
        html, body { 
            height: 100% !important; 
            max-height: 100% !important; 
            overflow: hidden !important; 
            margin: 0 !important; 
            padding: 0 !important;
            background: #fff !important;
        }
        
        /* Oculta los bloques del formulario web por completo para que no dejen espacio fantasma */
        .form-comunidad-wrapper,
        .whatsapp-status-container,
        #wpadminbar,
        header,
        footer {
            display: none !important;
        }
        
        /* 3. Posiciona la constancia al tope real de la hoja y añade margen de cortesía interno */
        #seccion-constancia-pdf, #contenedor-reimpresion-pdf {
            display: block !important;
            position: fixed !important; /* Fixed lo ancla al cuadrante 0,0 de la hoja física */
            left: 0 !important;
            top: 0 !important;
            width: 100% !important;
            height: 100% !important;
            background: #fff !important;
            /* El margen del documento ahora se simula aquí para separar el contenido del borde del papel */
            padding: 45px 50px !important; 
            box-sizing: border-box !important;
            margin: 0px !important;
            page-break-inside: avoid !important;
            page-break-after: avoid !important;
            page-break-before: avoid !important;
        }

        /* 4. Neutraliza la inyección automática de URLs en las etiquetas de enlace */
        a[href]::after { content: "" !important; }
        a { text-decoration: none !important; color: #000 !important; pointer-events: none !important; cursor: default !important; }
        
        /* Oculta lo demás */
        body * { visibility: hidden; }
        #seccion-constancia-pdf, #seccion-constancia-pdf *, #contenedor-reimpresion-pdf, #contenedor-reimpresion-pdf * { visibility: visible; }
        
        /* =========================================================================
            DISEÑO INTERNO DE LA CONSTANCIA (Alineado a la paleta institucional #0f3f67)
           ========================================================================= */
        .print-header { 
            display: flex !important; 
            align-items: center !important; 
            justify-content: space-between !important;
            border-bottom: 2px solid #0f3f67; 
            padding-bottom: 8px; 
            margin-bottom: 12px; 
            margin-top: 0px !important; 
        }
        .print-logo-container {
            width: 25%;
            text-align: left;
        }
        .print-logo-container img {
            max-height: 55px !important;
            width: auto !important;
            display: block;
        }
        .print-header-text {
            width: 75%;
            text-align: right;
        }
        .print-header h1 { font-size: 15.5px; margin: 2px 0; color: #0f3f67; text-transform: uppercase; font-weight: bold; }
        .print-header p { font-size: 11px; margin: 0; color: #444; }
        
        .print-badge-container { display: table; width: 100%; margin-bottom: 15px; background: #f2f2f2; padding: 6px 12px; border-radius: 4px; box-sizing: border-box; }
        .print-badge-box { display: table-cell; font-size: 12.5px; font-weight: bold; width: 50%; vertical-align: middle; }
        .print-badge-box.right { text-align: right; }
        .print-badge-box span { color: #0f3f67; font-size: 13.5px; }

        .print-section-title { background: #0f3f67; color: #fff; font-size: 11px; padding: 4px 8px !important; font-weight: bold; text-transform: uppercase; margin-top: 14px !important; margin-bottom: 5px; letter-spacing: 0.5px; border-radius: 2px; }
        
        .print-table { width: 100%; border-collapse: collapse; margin-bottom: 0px; table-layout: fixed; page-break-inside: avoid !important; }
        .print-table td { 
            font-size: 12px; 
            border: 1px solid #175d9c; 
            vertical-align: middle; 
            word-wrap: break-word; 
            overflow: hidden; 
            padding: 5px 8px !important;
        }
        
        .print-table td.label-cell { 
            font-weight: bold; 
            background: #f8f8f8; 
            width: 24%; 
        }
        
        .print-table td.descripcion-header { 
            font-weight: bold; 
            background: #f2f2f2; 
            text-align: center; 
            font-size: 10px; 
            letter-spacing: 0.5px;
        }
        
        .print-table td.descripcion-body { 
            height: 85px; 
            vertical-align: top; 
            padding: 8px 12px !important; 
            text-align: justify; 
            line-height: 1.3; 
        }

        .text-anonimo { color: #c0392b; font-weight: bold; font-style: italic; }
        .print-footer { margin-top: 20px !important; text-align: center; font-size: 8px; color: #555; border-top: 1px dashed #175d9c; padding-top: 6px; page-break-inside: avoid !important; }
    }
    
    .whatsapp-status-container {
        background-color: #f4fdf7;
        border: 1px solid #c3e6cb;
        border-radius: 8px;
        padding: 15px;
        margin: 0px auto 15px auto;
        max-width: 1200px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    .whatsapp-status-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 12px;
    }
    .whatsapp-status-content p {
        margin: 0;
        color: #333;
        font-size: 15px;
        font-weight: 500;
        line-height: 1.4;
    }
    .whatsapp-link {
        color: #128C7E;
        font-weight: bold;
        text-decoration: underline;
        transition: color 0.2s ease;
    }
    .whatsapp-link:hover {
        color: #075E54;
    }
    .whatsapp-icon {
        display: flex;
        align-items: center;
    }
    .form-header h3 { color: #f7f7f7ff !important; }
