/**
 * frontend-style.css - Estilos completos para el Frontend
 * Plugin: Consulta Procesos
 * Version: 5.2
 */

/* ==========================================================================
   CONTAINER PRINCIPAL
   ========================================================================== */

.jpt-frontend-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 1200px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

/* ==========================================================================
   HEADER CON BRANDING - VERSIÓN MEJORADA
   ========================================================================== */

.jpt-f-header {
    background: linear-gradient(135deg, #3C91A5 0%, #2C7A8F 100%);
    padding: 25px 30px;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.jpt-f-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.05) 35px, rgba(255,255,255,.05) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255,255,255,.03) 35px, rgba(255,255,255,.03) 70px);
    pointer-events: none;
}

.jpt-f-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 25px;
}

/* Logo principal del plugin */
.jpt-f-logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
    border: none !important;
    outline: none !important;
    flex-shrink: 0;
}

.jpt-f-header-text {
    flex-grow: 1;
}

.jpt-f-title {
    color: #ffffff !important;
    font-size: 32px !important;
    font-weight: 600 !important;
    margin: 0 0 5px 0 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.2 !important;
    letter-spacing: -0.5px;
}

.jpt-f-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

/* Logo del branding (opcional, en esquina derecha) */
.jpt-f-brand-logo-container {
    margin-left: auto;
    flex-shrink: 0;
}

.jpt-f-brand-logo {
    height: 50px;
    width: auto;
    opacity: 0.9;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s ease;
}

.jpt-f-brand-logo:hover {
    opacity: 1;
}

/* ==========================================================================
   RESPONSIVE PARA EL HEADER
   ========================================================================== */

@media (max-width: 992px) {
    .jpt-f-header {
        padding: 20px;
    }
    
    .jpt-f-logo {
        height: 60px;
    }
    
    .jpt-f-title {
        font-size: 28px !important;
    }
    
    .jpt-f-brand-logo {
        height: 40px;
    }
}

@media (max-width: 768px) {
    .jpt-f-header-content {
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
    }
    
    .jpt-f-logo {
        height: 50px;
        margin: 0 auto;
    }
    
    .jpt-f-header-text {
        width: 100%;
        text-align: center;
    }
    
    .jpt-f-title {
        font-size: 24px !important;
    }
    
    .jpt-f-subtitle {
        font-size: 14px;
    }
    
    .jpt-f-brand-logo-container {
        display: none; /* Ocultar en móviles para no saturar */
    }
}

@media (max-width: 480px) {
    .jpt-f-title {
        font-size: 20px !important;
    }
    
    .jpt-f-logo {
        height: 40px;
    }
}

/* ==========================================================================
   TEMA CLÁSICO - AJUSTES PARA EL HEADER
   ========================================================================== */

.jpt-frontend-container[data-tema="clasico"] .jpt-f-header {
    background: linear-gradient(135deg, #23282d 0%, #32373c 100%);
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-title {
    color: #ffffff !important;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   NAVEGACIÓN DE TABS
   ========================================================================== */

.jpt-f-tabs {
    background: #f8f9fa;
    padding: 0;
    display: flex;
    border-bottom: 2px solid #e5e7eb;
}

.jpt-f-tab {
    flex: 1;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.jpt-f-tab:hover {
    background: rgba(60, 145, 165, 0.05);
    color: #3C91A5;
}

.jpt-f-tab.active {
    background: #ffffff;
    color: #3C91A5;
}

.jpt-f-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3C91A5;
}

.jpt-f-tab-icon {
    font-size: 18px;
}

/* ==========================================================================
   CONTENIDO PRINCIPAL
   ========================================================================== */

.jpt-f-content {
    padding: 30px;
    min-height: 400px;
    background: #ffffff;
}

.jpt-f-tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

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

/* Secciones */
.jpt-f-search-section,
.jpt-f-list-section,
.jpt-f-add-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.jpt-f-search-section:last-child,
.jpt-f-list-section:last-child,
.jpt-f-add-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Títulos de sección */
.jpt-f-content h3,
.jpt-f-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 10px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3C91A5;
    display: inline-block;
}

.jpt-f-info {
    color: #6b7280;
    font-size: 14px;
    margin: 10px 0 20px 0;
}

/* ==========================================================================
   FORMULARIOS
   ========================================================================== */

.jpt-f-form {
    margin-top: 20px;
}

.jpt-f-form-group {
    margin-bottom: 20px;
}

.jpt-f-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.jpt-f-form-row .jpt-f-form-group {
    flex: 1;
    margin-bottom: 0;
}

.jpt-f-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.jpt-f-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    background: #ffffff;
    box-sizing: border-box;
}

.jpt-f-input:focus {
    outline: none;
    border-color: #3C91A5;
    box-shadow: 0 0 0 3px rgba(60, 145, 165, 0.1);
}

.jpt-f-input::placeholder {
    color: #9ca3af;
}

.jpt-f-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.jpt-f-help-text {
    display: block;
    color: #9ca3af;
    font-size: 13px;
    margin-top: 5px;
}

/* ==========================================================================
   TARJETA DE BÚSQUEDA MEJORADA
   ========================================================================== */

.jpt-f-search-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.jpt-f-search-card:hover {
    border-color: #3C91A5;
    box-shadow: 0 4px 16px rgba(60, 145, 165, 0.15);
}

.jpt-f-search-card-header {
    background: linear-gradient(135deg, #f8fafb 0%, #f3f4f6 100%);
    padding: 20px 25px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.jpt-f-search-card-header .dashicons {
    font-size: 24px;
    color: #3C91A5;
}

.jpt-f-search-card-header h4 {
    margin: 0;
    font-size: 18px;
    color: #1f2937;
    font-weight: 600;
}

.jpt-f-search-card-body {
    padding: 30px 25px;
    background: #ffffff;
}

/* Input mejorado con wrapper */
.jpt-f-input-wrapper {
    position: relative;
    width: 100%;
}

.jpt-f-input-large {
    font-size: 16px !important;
    padding: 14px 45px 14px 18px !important;
    height: 52px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.jpt-f-input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.jpt-f-input-icon .dashicons {
    font-size: 18px;
    cursor: help;
}

/* Label con icono */
.jpt-f-form-group label .dashicons {
    font-size: 16px;
    color: #3C91A5;
    vertical-align: middle;
    margin-right: 6px;
}

/* Help text mejorado */
.jpt-f-help-text {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 13px;
    margin-top: 8px;
    padding-left: 4px;
}

.jpt-f-help-text .dashicons {
    font-size: 14px;
    color: #9ca3af;
}

/* ==========================================================================
   HEADER DE SECCIÓN MEJORADO
   ========================================================================== */

.jpt-f-section-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

.jpt-f-section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #3C91A5;
}

.jpt-f-section-header h3 {
    border: none;
    padding: 0;
    margin: 0 0 10px 0;
    display: block;
}

.jpt-f-section-header .jpt-f-info {
    margin: 0;
    color: #6b7280;
}

/* ==========================================================================
   CONTROLES DE LISTA MEJORADOS
   ========================================================================== */

.jpt-f-list-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
}

.jpt-f-control-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.jpt-f-control-item {
    flex: 1;
    min-width: 200px;
}

.jpt-f-input-small,
.jpt-f-select-small {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: all 0.2s;
}

.jpt-f-input-small:focus,
.jpt-f-select-small:focus {
    outline: none;
    border-color: #3C91A5;
    box-shadow: 0 0 0 3px rgba(60, 145, 165, 0.1);
}

.jpt-f-input-small::placeholder {
    color: #9ca3af;
}

/* ==========================================================================
   GRID DE TARJETAS MEJORADO
   ========================================================================== */

.jpt-f-procesos-grid {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

/* Configuración responsive del grid */
.jpt-f-col-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .jpt-f-col-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .jpt-f-col-3 {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* ==========================================================================
   ESTADO VACÍO
   ========================================================================== */

.jpt-f-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
    margin: 30px 0;
}

.jpt-f-empty-state .dashicons {
    font-size: 48px;
    color: #cbd5e1;
    display: block;
    margin-bottom: 15px;
}

.jpt-f-empty-state h4 {
    color: #64748b;
    font-size: 18px;
    margin: 0 0 10px 0;
}

.jpt-f-empty-state p {
    color: #94a3b8;
    margin: 0;
}

/* ==========================================================================
   FOOTER DE LISTA MEJORADO
   ========================================================================== */

.jpt-f-list-footer {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 30px;
    border: 1px solid #e5e7eb;
}

.jpt-f-list-footer p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.jpt-f-list-footer #jpt-showing-count {
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.jpt-ver-todas {
    color: #3C91A5;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.jpt-ver-todas:hover {
    color: #2C7A8F;
    text-decoration: underline;
}

/* ==========================================================================
   BOTÓN PEQUEÑO PARA TARJETAS
   ========================================================================== */

.jpt-f-button-small {
    padding: 8px 16px;
    font-size: 13px;
    width: 100%;
    justify-content: center;
    background: #3C91A5;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jpt-f-button-small:hover {
    background: #2C7A8F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 145, 165, 0.25);
}

/* ==========================================================================
   ANIMACIÓN DE ENTRADA PARA TARJETAS
   ========================================================================== */

.jpt-f-proceso-card {
    animation: cardFadeIn 0.5s ease backwards;
}

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

/* ==========================================================================
   MEJORAS RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .jpt-f-search-card-body {
        padding: 20px 15px;
    }
    
    .jpt-f-search-card-header {
        padding: 15px 20px;
    }
    
    .jpt-f-input-large {
        font-size: 14px !important;
        padding: 12px 40px 12px 15px !important;
        height: 46px;
    }
    
    .jpt-f-control-row {
        flex-direction: column;
    }
    
    .jpt-f-control-item {
        width: 100%;
    }
    
    .jpt-f-form-actions {
        flex-direction: column;
    }
    
    .jpt-f-form-actions button {
        width: 100%;
    }
}

/* ==========================================================================
   CONTADOR DE DÍGITOS MEJORADO
   ========================================================================== */

.jpt-f-counter {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
    background: white;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.jpt-f-counter.valid {
    color: #10b981;
    border-color: #10b981;
    background: #f0fdf4;
}

/* ==========================================================================
   RESULTADO DE BÚSQUEDA MEJORADO
   ========================================================================== */

.jpt-f-result {
    margin-top: 30px;
    animation: resultSlideIn 0.3s ease;
}

@keyframes resultSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   BOTONES - VERSIÓN MEJORADA
   ========================================================================== */

.jpt-f-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Botón Primario - Estilo Azul Consistente */
.jpt-f-button-primary {
    background: #3C91A5;
    color: white;
}

.jpt-f-button-primary:hover {
    background: #2C7A8F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 145, 165, 0.35);
}

.jpt-f-button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(60, 145, 165, 0.2);
}

/* Botón Secundario - Para acciones secundarias */
.jpt-f-button-secondary {
    background: #6b7280;
    color: white;
}

.jpt-f-button-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.35);
}

.jpt-f-button-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

.jpt-f-button-outline:hover {
    background: #3C91A5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 145, 165, 0.25);
}

/* Botón Danger - Para acciones destructivas */
.jpt-f-button-danger {
    background: #ef4444;
    color: white;
}

.jpt-f-button-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* Efecto Ripple en todos los botones */
.jpt-f-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.jpt-f-button:active::before {
    width: 300px;
    height: 300px;
}

/* Estados de los botones */
.jpt-f-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.jpt-f-button.loading {
    color: transparent;
}

.jpt-f-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

/* Iconos en botones */
.jpt-f-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* Grupo de botones */
.jpt-f-button-group {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

/* Tamaños de botones */
.jpt-f-button-small {
    padding: 6px 12px;
    font-size: 13px;
}

.jpt-f-button-large {
    padding: 14px 28px;
    font-size: 16px;
}

/* ==========================================================================
   BOTONES ESPECÍFICOS DE DETALLES
   ========================================================================== */

/* Botón Ver Detalles en resultados de búsqueda */
.jpt-ver-detalles-btn {
    background: #3C91A5 !important;
    color: white !important;
    padding: 8px 16px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 12px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.jpt-ver-detalles-btn:hover {
    background: #2C7A8F !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(60, 145, 165, 0.35) !important;
}

.jpt-ver-detalles-btn .dashicons {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
}

/* ==========================================================================
   GRID DE PROCESOS - SISTEMA DE COLUMNAS
   ========================================================================== */

.jpt-f-procesos-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

/* Configuración de columnas */
.jpt-f-col-1 { grid-template-columns: repeat(1, 1fr); }
.jpt-f-col-2 { grid-template-columns: repeat(2, 1fr); }
.jpt-f-col-3 { grid-template-columns: repeat(3, 1fr); }
.jpt-f-col-4 { grid-template-columns: repeat(4, 1fr); }
.jpt-f-col-5 { grid-template-columns: repeat(5, 1fr); }

/* ==========================================================================
   TARJETAS DE PROCESO
   ========================================================================== */

.jpt-f-proceso-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.jpt-f-proceso-card:hover {
    border-color: #3C91A5;
    box-shadow: 0 4px 12px rgba(60, 145, 165, 0.15);
    transform: translateY(-2px);
}

/* Header de la tarjeta */
.jpt-f-card-header {
    background: linear-gradient(135deg, #3C91A5 0%, #2C7A8F 100%);
    padding: 12px;
}

.jpt-f-proceso-numero {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 600;
    color: white;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
}

/* Body de la tarjeta */
.jpt-f-card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jpt-f-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jpt-f-card-info strong {
    color: #6b7280;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jpt-f-card-info span {
    color: #1f2937;
    font-size: 14px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Estadísticas */
.jpt-f-card-stats {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.jpt-f-stat {
    font-size: 11px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.jpt-f-stat .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #3C91A5;
}

/* Footer de la tarjeta */
.jpt-f-card-footer {
    padding: 12px;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
}

/* ==========================================================================
   RESULTADOS Y MENSAJES
   ========================================================================== */

.jpt-f-result {
    margin-top: 20px;
}

.jpt-f-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jpt-f-message.jpt-f-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.jpt-f-message.jpt-f-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.jpt-f-message.jpt-f-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.jpt-f-message .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Detalles del proceso */
.jpt-f-proceso-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3C91A5;
}

.jpt-f-proceso-details h4 {
    color: #2C7A8F;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.jpt-f-detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.jpt-f-detail-row:last-child {
    border-bottom: none;
}

.jpt-f-detail-label {
    font-weight: 600;
    width: 140px;
    color: #6b7280;
    font-size: 13px;
}

.jpt-f-detail-value {
    flex: 1;
    color: #1f2937;
    font-size: 14px;
}

/* ==========================================================================
   ACTUACIONES
   ========================================================================== */

.jpt-f-actuaciones {
    margin-top: 30px;
}

.jpt-f-actuaciones h5 {
    color: #2C7A8F;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}

.jpt-f-actuacion-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.jpt-f-actuacion-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #3C91A5;
}

.jpt-f-actuacion-fecha {
    color: #3C91A5;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 8px;
}

.jpt-f-actuacion-texto {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.6;
}

.jpt-f-actuacion-anotacion {
    color: #6b7280;
    font-size: 12px;
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.jpt-f-actuacion-terminos {
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
}

.jpt-f-actuacion-terminos span {
    margin-right: 15px;
}

/* ==========================================================================
   MODAL
   ========================================================================== */

.jpt-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.jpt-modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.jpt-modal-content h3 {
    background: linear-gradient(135deg, #3C91A5 0%, #2C7A8F 100%);
    color: white;
    margin: 0;
    padding: 20px 25px;
    font-size: 20px;
    font-weight: 600;
}

.jpt-modal-close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    margin-top: -2px;
}

.jpt-modal-close:hover {
    opacity: 0.8;
}

#jpt-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}

#jpt-modal-body h4 {
    color: #2C7A8F;
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.jpt-f-footer {
    background: #f8f9fa;
    padding: 20px 30px;
    text-align: center;
    border-top: 2px solid #e5e7eb;
    color: #6b7280;
    font-size: 13px;
}

.jpt-f-footer-link {
    margin-top: 8px;
}

.jpt-f-footer-link a {
    color: #3C91A5;
    text-decoration: none;
    font-weight: 600;
}

.jpt-f-footer-link a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   LOADER
   ========================================================================== */

.jpt-loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3C91A5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   TEMA CLÁSICO
   ========================================================================== */

.jpt-frontend-container[data-tema="clasico"] .jpt-f-header {
    background: #f0f0f0;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-header::before {
    display: none;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-title {
    color: #333 !important;
    text-shadow: none;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-subtitle {
    color: #666;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-card-header {
    background: #f5f5f5;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-proceso-numero {
    color: #333;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-button-primary {
    background: #0073aa;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-button-primary:hover {
    background: #005177;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-modal-content h3 {
    background: #23282d;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1200px) {
    .jpt-f-col-5 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    .jpt-f-col-5,
    .jpt-f-col-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .jpt-frontend-container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .jpt-f-header {
        padding: 20px;
    }
    
    .jpt-f-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .jpt-f-title {
        font-size: 22px !important;
    }
    
    .jpt-f-tabs {
        flex-direction: column;
    }
    
    .jpt-f-tab {
        width: auto;
        justify-content: center;
    }
    
    .jpt-f-content {
        padding: 20px;
    }
    
    .jpt-f-form-row {
        flex-direction: column;
    }
    
    .jpt-f-form-actions {
        flex-direction: column;
    }
    
    .jpt-f-button {
        width: 100%;
        justify-content: center;
    }
    
    .jpt-f-col-5,
    .jpt-f-col-4,
    .jpt-f-col-3 { grid-template-columns: repeat(2, 1fr); }
    
    .jpt-f-detail-row {
        flex-direction: column;
    }
    
    .jpt-f-detail-label {
        width: 100%;
        margin-bottom: 4px;
    }
}

@media (max-width: 480px) {
    .jpt-f-col-5,
    .jpt-f-col-4,
    .jpt-f-col-3,
    .jpt-f-col-2 { grid-template-columns: repeat(1, 1fr); }
    
    .jpt-f-card-stats {
        flex-direction: column;
        gap: 5px;
    }
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */

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

.jpt-f-proceso-card {
    animation: fadeIn 0.5s ease;
}

/* ==========================================================================
   UTILIDADES
   ========================================================================== */

.jpt-f-text-center { text-align: center; }
.jpt-f-text-right { text-align: right; }
.jpt-f-mt-20 { margin-top: 20px; }
.jpt-f-mb-20 { margin-bottom: 20px; }
.jpt-f-hidden { display: none !important; }

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .jpt-f-button,
    .jpt-f-form,
    .jpt-f-tabs,
    .jpt-f-footer {
        display: none !important;
    }
    
    .jpt-f-proceso-card {
        break-inside: avoid;
    }
    
    .jpt-f-header {
        background: none;
        color: black;
        print-color-adjust: exact;
    }
}

/**
 * frontend-animations.css - Animaciones y Efectos adicionales
 * Agregar este código AL FINAL del archivo frontend-style.css existente
 */

/* ==========================================================================
   CONTADOR DE DÍGITOS
   ========================================================================== */

.jpt-f-counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    transition: color 0.3s ease;
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
}

.jpt-f-form-group {
    position: relative;
}

/* ==========================================================================
   BADGES Y ESTADOS
   ========================================================================== */

.jpt-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jpt-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.jpt-badge-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.jpt-toast {
    position: fixed;
    bottom: 20px;
    right: -100%;
    max-width: 350px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 999999;
    opacity: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jpt-toast-success {
    border-left: 4px solid #10b981;
    color: #065f46;
}

.jpt-toast-error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.jpt-toast-info {
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* ==========================================================================
   ERROR SHAKE ANIMATION
   ========================================================================== */

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.jpt-error-shake {
    animation: errorShake 0.5s ease;
    border-color: #ef4444 !important;
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.jpt-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

/* ==========================================================================
   HOVER EFFECTS MEJORADOS
   ========================================================================== */

.jpt-f-proceso-card {
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jpt-f-proceso-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(60, 145, 165, 0.15);
}

.jpt-f-button-primary {
    position: relative;
    overflow: hidden;
}

.jpt-f-button-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.jpt-f-button-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* ==========================================================================
   FOCUS STATES
   ========================================================================== */

.jpt-f-input:focus,
.jpt-f-button:focus,
.jpt-f-tab:focus {
    outline: 2px solid #3C91A5;
    outline-offset: 2px;
}

/* ==========================================================================
   ANIMACIÓN DE ENTRADA ESCALONADA
   ========================================================================== */

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

.jpt-f-proceso-card,
.jpt-f-actuacion-item {
    animation: slideInUp 0.5s ease backwards;
}

/* ==========================================================================
   MEJORAS PARA EL MODAL
   ========================================================================== */

.jpt-modal {
    display: none;
    align-items: center;
    justify-content: center;
}

.jpt-modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scrollbar personalizada para el modal */
#jpt-modal-body::-webkit-scrollbar {
    width: 8px;
}

#jpt-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#jpt-modal-body::-webkit-scrollbar-thumb {
    background: #3C91A5;
    border-radius: 4px;
}

#jpt-modal-body::-webkit-scrollbar-thumb:hover {
    background: #2C7A8F;
}

/* ==========================================================================
   SKELETON LOADING
   ========================================================================== */

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.jpt-skeleton {
    display: inline-block;
    height: 1em;
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
    background-image: linear-gradient(
        90deg,
        #f0f0f0,
        #f8f8f8,
        #f0f0f0
    );
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 4px;
    animation: skeleton-loading 1.4s ease infinite;
}

/* ==========================================================================
   MEJORAS DE ACCESIBILIDAD
   ========================================================================== */

.jpt-f-button:focus-visible,
.jpt-f-input:focus-visible,
.jpt-f-tab:focus-visible {
    outline: 3px solid #3C91A5;
    outline-offset: 2px;
}

/* Skip link para accesibilidad */
.jpt-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3C91A5;
    color: white;
    padding: 8px;
    z-index: 100;
    text-decoration: none;
}

.jpt-skip-link:focus {
    top: 0;
}

/* ==========================================================================
   INDICADORES DE ESTADO
   ========================================================================== */

.jpt-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

.jpt-status-active {
    background-color: #10b981;
}

.jpt-status-inactive {
    background-color: #6b7280;
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ==========================================================================
   MEJORAS PARA FORMULARIOS
   ========================================================================== */

.jpt-f-input:valid {
    border-color: #10b981;
}

.jpt-f-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* Checkbox y Radio buttons personalizados */
.jpt-f-checkbox,
.jpt-f-radio {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    display: inline-block;
}

.jpt-f-checkbox input,
.jpt-f-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.jpt-f-checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    transition: all 0.2s;
}

.jpt-f-radio .jpt-f-checkmark {
    border-radius: 50%;
}

.jpt-f-checkbox:hover input ~ .jpt-f-checkmark,
.jpt-f-radio:hover input ~ .jpt-f-checkmark {
    border-color: #3C91A5;
}

.jpt-f-checkbox input:checked ~ .jpt-f-checkmark,
.jpt-f-radio input:checked ~ .jpt-f-checkmark {
    background-color: #3C91A5;
    border-color: #3C91A5;
}

.jpt-f-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.jpt-f-checkbox input:checked ~ .jpt-f-checkmark:after,
.jpt-f-radio input:checked ~ .jpt-f-checkmark:after {
    display: block;
}

.jpt-f-checkbox .jpt-f-checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.jpt-f-radio .jpt-f-checkmark:after {
    left: 6px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* ==========================================================================
   TOOLTIPS
   ========================================================================== */

[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    display: block;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #1f2937;
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    display: none;
    margin-bottom: 5px;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    display: none;
}

/* ==========================================================================
   TRANSICIONES SUAVES
   ========================================================================== */

* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   DARK MODE (Opcional para el futuro)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /* Aquí se pueden agregar estilos para modo oscuro en el futuro */
}

/**
 * Estilos para la Lista de Procesos en la pestaña de Búsqueda
 * AGREGAR AL FINAL del archivo frontend-style.css
 */

/* ==========================================================================
   DIVIDER DECORATIVO
   ========================================================================== */

.jpt-f-divider {
    text-align: center;
    margin: 40px 0 30px;
    position: relative;
}

.jpt-f-divider::before,
.jpt-f-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 100px);
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.jpt-f-divider::before {
    left: 0;
}

.jpt-f-divider::after {
    right: 0;
}

.jpt-f-divider span {
    background: white;
    padding: 0 20px;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   SECCIÓN DE LISTA EN BÚSQUEDA
   ========================================================================== */

.jpt-f-search-list-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.jpt-f-search-list-section h4 {
    color: #2C7A8F;
    font-size: 18px;
    margin: 0 0 20px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jpt-f-search-list-section h4::before {
    content: '📂';
    font-size: 20px;
}

/* ==========================================================================
   BÚSQUEDA RÁPIDA / FILTRO
   ========================================================================== */

.jpt-f-quick-search {
    margin-bottom: 20px;
}

.jpt-f-input-small {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px 8px 35px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%239ca3af" viewBox="0 0 24 24"><path d="M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"/></svg>') no-repeat 10px center;
    background-size: 16px;
}

.jpt-f-input-small:focus {
    outline: none;
    border-color: #3C91A5;
    box-shadow: 0 0 0 3px rgba(60, 145, 165, 0.1);
}

.jpt-f-input-small::placeholder {
    color: #9ca3af;
}

/* ==========================================================================
   LISTA DE PROCESOS CLICKEABLE
   ========================================================================== */

.jpt-f-proceso-list {
    display: grid;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 5px;
    margin-bottom: 15px;
}

/* Scrollbar personalizada */
.jpt-f-proceso-list::-webkit-scrollbar {
    width: 8px;
}

.jpt-f-proceso-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.jpt-f-proceso-list::-webkit-scrollbar-thumb {
    background: #3C91A5;
    border-radius: 4px;
}

.jpt-f-proceso-list::-webkit-scrollbar-thumb:hover {
    background: #2C7A8F;
}

/* Item de proceso en la lista */
.jpt-f-proceso-list-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jpt-f-proceso-list-item:hover {
    border-color: #3C91A5;
    box-shadow: 0 4px 12px rgba(60, 145, 165, 0.15);
    transform: translateX(5px);
    background: linear-gradient(to right, #ffffff 0%, #f0fafb 100%);
}

.jpt-f-proceso-list-item.hidden {
    display: none !important;
}

/* Header del item */
.jpt-f-proceso-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

.jpt-f-proceso-list-numero {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #3C91A5;
    letter-spacing: 0.5px;
}

.jpt-f-proceso-list-stats {
    display: flex;
    gap: 10px;
}

.jpt-f-stat-mini {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 12px;
}

.jpt-f-stat-mini .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
    color: #3C91A5;
}

/* Body del item */
.jpt-f-proceso-list-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jpt-f-proceso-list-info {
    font-size: 13px;
    color: #4b5563;
    display: flex;
    gap: 5px;
}

.jpt-f-proceso-list-info strong {
    color: #6b7280;
    font-weight: 600;
    min-width: 85px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jpt-f-proceso-list-date {
    font-size: 11px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #f9fafb;
}

.jpt-f-proceso-list-date .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

/* Footer de la lista */
.jpt-f-list-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 13px;
}

/* ==========================================================================
   ESTADOS Y MENSAJES
   ========================================================================== */

.jpt-f-no-results {
    text-align: center;
    padding: 30px;
    color: #9ca3af;
    font-size: 14px;
}

.jpt-f-no-results::before {
    content: '🔍';
    display: block;
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* ==========================================================================
   ANIMACIONES PARA LA LISTA
   ========================================================================== */

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.jpt-f-proceso-list-item {
    animation: slideInFromLeft 0.3s ease backwards;
}

.jpt-f-proceso-list-item:nth-child(1) { animation-delay: 0.05s; }
.jpt-f-proceso-list-item:nth-child(2) { animation-delay: 0.1s; }
.jpt-f-proceso-list-item:nth-child(3) { animation-delay: 0.15s; }
.jpt-f-proceso-list-item:nth-child(4) { animation-delay: 0.2s; }
.jpt-f-proceso-list-item:nth-child(5) { animation-delay: 0.25s; }

/* ==========================================================================
   LOADING STATE PARA LA LISTA
   ========================================================================== */

.jpt-f-list-loading {
    text-align: center;
    padding: 40px;
}

.jpt-f-list-loading::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3C91A5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .jpt-f-search-list-section {
        padding: 15px;
    }
    
    .jpt-f-proceso-list {
        max-height: 400px;
    }
    
    .jpt-f-proceso-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .jpt-f-proceso-list-btn {
        position: static;
        transform: none;
        opacity: 1;
        width: 100%;
        margin-top: 10px;
        justify-content: center;
    }
    
    .jpt-f-proceso-list-item:hover .jpt-f-proceso-list-btn {
        transform: none;
    }
    
    .jpt-f-divider::before,
    .jpt-f-divider::after {
        width: calc(50% - 80px);
    }
}

@media (max-width: 480px) {
    .jpt-f-proceso-list-info {
        flex-direction: column;
    }
    
    .jpt-f-proceso-list-info strong {
        min-width: auto;
    }
}

/* ==========================================================================
   TEMA CLÁSICO - AJUSTES PARA LA LISTA
   ========================================================================== */

.jpt-frontend-container[data-tema="clasico"] .jpt-f-search-list-section {
    background: #f5f5f5;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-proceso-list-item {
    border-color: #d0d0d0;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-proceso-list-item:hover {
    border-color: #0073aa;
    background: linear-gradient(to right, #ffffff 0%, #f0f5f8 100%);
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-proceso-list-numero {
    color: #0073aa;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-proceso-list-btn {
    background: #0073aa;
}

.jpt-frontend-container[data-tema="clasico"] .jpt-f-proceso-list-btn:hover {
    background: #005177;
}

/* Ajuste del contenedor del item para el nuevo botón */
.jpt-f-proceso-list-item {
    padding-bottom: 10px;
    position: relative;
}

/* Contenedor del botón */
.jpt-f-proceso-list-item .jpt-f-proceso-list-btn {
    margin-left: auto;
    margin-right: auto;
    display: flex;
}

/* Link "Ver todas" */
.jpt-ver-todas {
    color: #3C91A5;
    text-decoration: none;
    font-weight: 600;
}

.jpt-ver-todas:hover {
    color: #2C7A8F;
    text-decoration: underline;
}

/* Mejorar espaciado del contenido del item */
.jpt-f-proceso-list-body {
    padding-bottom: 5px;
}

/* Estado seleccionado más visible */
.jpt-f-proceso-list-item.selected {
    background: linear-gradient(to right, #f0fafb 0%, #e6f7f9 100%);
    border-color: #3C91A5;
    box-shadow: 0 0 0 3px rgba(60, 145, 165, 0.1);
    position: relative;
}

.jpt-f-proceso-list-item.selected::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #3C91A5;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ==========================================================================
   RESPONSIVE: Ajustes para móviles
   ========================================================================== */

@media (max-width: 768px) {
    .jpt-f-proceso-list-btn {
        width: 100%;
        justify-content: center;
    }
    
    .jpt-f-proceso-list-item.selected::before {
        top: 5px;
        right: 5px;
    }
}

* ==========================================================================
   BOTÓN VER DETALLES EN LA LISTA - ESTILO AZUL COMO LAS TARJETAS
   ========================================================================== */

.jpt-f-proceso-list-btn,
.jpt-quick-view {
    background: #3C91A5 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: auto !important;
    min-width: 100px !important;
    max-width: 150px !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    margin: 10px auto 5px auto !important;
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: normal !important;
    box-shadow: none !important;
}

.jpt-f-proceso-list-btn:hover,
.jpt-quick-view:hover {
    background: #2C7A8F !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(60, 145, 165, 0.3) !important;
    color: white !important;
}

.jpt-f-proceso-list-btn .dashicons,
.jpt-quick-view .dashicons {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    color: white !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Asegurar que el botón sea visible y clickeable */
.jpt-f-proceso-list-item {
    position: relative !important;
    padding-bottom: 60px !important; /* Espacio para el botón */
}

.jpt-f-proceso-list-item .jpt-f-proceso-list-btn {
    position: absolute !important;
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 10 !important;
}

/* Remover estilos conflictivos del hover */
.jpt-f-proceso-list-item:hover .jpt-f-proceso-list-btn {
    opacity: 1 !important;
    transform: translateX(-50%) !important;
}

/* Asegurar que el botón no se oculte */
.jpt-quick-view {
    display: inline-flex !important;
    visibility: visible !important;
}

/* Para móviles */
@media (max-width: 768px) {
    .jpt-f-proceso-list-btn,
    .jpt-quick-view {
        width: calc(100% - 20px) !important;
        max-width: none !important;
        position: relative !important;
        left: auto !important;
        transform: none !important;
        margin: 10px auto !important;
    }
    
    .jpt-f-proceso-list-item {
        padding-bottom: 15px !important;
    }
}

/* ==========================================================================
   CONTROLES DE LISTA (FILTRO Y ORDENAMIENTO)
   ========================================================================== */

.jpt-f-list-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.jpt-f-control-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

.jpt-f-control-item {
    flex: 1;
    min-width: 200px;
}

/* Campo de búsqueda mejorado */
.jpt-f-input-small {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%239ca3af" viewBox="0 0 24 24"><path d="M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"/></svg>') no-repeat 10px center;
    background-size: 16px;
}

/* Selector de ordenamiento */
.jpt-f-select-small {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%236b7280" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
    background-size: 20px;
    appearance: none;
    cursor: pointer;
}

.jpt-f-select-small:focus,
.jpt-f-input-small:focus {
    outline: none;
    border-color: #3C91A5;
    box-shadow: 0 0 0 3px rgba(60, 145, 165, 0.1);
}

/* Botón limpiar */
.jpt-f-button-secondary-small {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.jpt-f-button-secondary-small:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

.jpt-f-button-secondary-small .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Contador de resultados */
.jpt-f-results-counter {
    font-size: 13px;
    color: #6b7280;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    display: inline-block;
}

.jpt-f-results-counter span {
    font-weight: 600;
    color: #3C91A5;
}

/* Indicador de ordenamiento activo */
.jpt-f-select-small.active {
    border-color: #3C91A5;
    background-color: #f0fafb;
}

/* Animación para reordenamiento */
.jpt-f-proceso-list.sorting .jpt-f-proceso-list-item {
    transition: all 0.3s ease;
}

/* Estado cuando no hay resultados en el filtro */
.jpt-f-no-results {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 8px;
    margin: 20px 0;
}

.jpt-f-no-results::before {
    content: '🔍';
    display: block;
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* ==========================================================================
   RESPONSIVE PARA CONTROLES
   ========================================================================== */

@media (max-width: 768px) {
    .jpt-f-control-row {
        flex-direction: column;
    }
    
    .jpt-f-control-item {
        width: 100%;
        min-width: unset;
    }
    
    .jpt-f-button-secondary-small {
        width: 100%;
        justify-content: center;
    }
    
    .jpt-f-list-controls {
        padding: 15px;
    }
}

/* ==========================================================================
   INDICADORES VISUALES DE ORDENAMIENTO
   ========================================================================== */

/* Agregar icono de orden al select cuando está activo */
.jpt-f-select-small.sorted-asc {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%233C91A5" viewBox="0 0 24 24"><path d="M7 14l5-5 5 5z"/></svg>');
}

.jpt-f-select-small.sorted-desc {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%233C91A5" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
}

/* Highlight del item cuando se está filtrando */
.jpt-f-proceso-list-item.highlighted {
    background: linear-gradient(to right, #fef3c7 0%, #fef9e7 100%);
    border-color: #f59e0b;
}

/* ==========================================================================
   MEJORAS DE BOTONES EN LA PESTAÑA CONSULTAR PROCESO
   ========================================================================== */

/* Botones en el formulario de búsqueda */
#jpt-search-btn,
#jpt-clear-btn {
    background: #3C91A5 !important;
    color: white !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-transform: none !important;
    min-width: 120px !important;
    justify-content: center !important;
}

/* Botón Buscar */
#jpt-search-btn:hover {
    background: #2C7A8F !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(60, 145, 165, 0.35) !important;
}

/* Botón Limpiar con estilo secundario */
#jpt-clear-btn {
    background: #6b7280 !important;
}

#jpt-clear-btn:hover {
    background: #4b5563 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.35) !important;
}

/* Estados activos */
#jpt-search-btn:active,
#jpt-clear-btn:active {
    transform: translateY(0) !important;
}

/* Estados deshabilitados */
#jpt-search-btn:disabled,
#jpt-clear-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Loader en botones */
.jpt-loader-inline {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

/* Botón Ver Detalles en resultados */
.jpt-ver-actuaciones-btn {
    background: #3C91A5 !important;
    color: white !important;
    padding: 8px 16px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 15px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.jpt-ver-actuaciones-btn:hover {
    background: #2C7A8F !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(60, 145, 165, 0.35) !important;
}

/* Mejorar los iconos en botones */
#jpt-search-btn .dashicons,
#jpt-clear-btn .dashicons,
.jpt-ver-actuaciones-btn .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

/* Animación fadeInUp */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .jpt-f-form-actions {
        flex-direction: column !important;
    }
    
    #jpt-search-btn,
    #jpt-clear-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ==========================================================================
   ESTILOS ADICIONALES PARA RESULTADOS Y DETALLES
   ========================================================================== */

/* Card de detalles mejorada */
.jpt-f-detail-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.jpt-f-detail-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Header de la tarjeta */
.jpt-f-detail-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 12px 20px;
    border-bottom: 2px solid #3C91A5;
}

/* Body de la tarjeta */
.jpt-f-detail-body {
    padding: 20px;
}

/* Filas de detalles */
.jpt-f-detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.jpt-f-detail-row:hover {
    background: #f9fafb;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
}

.jpt-f-detail-row:last-child {
    border-bottom: none;
}

/* Fila destacada */
.jpt-f-detail-highlight {
    background: #f0f9ff;
    padding: 15px !important;
    margin: -10px -10px 10px -10px;
    border-bottom: 2px solid #3C91A5 !important;
}

/* Labels y valores */
.jpt-f-detail-label {
    flex: 0 0 140px;
    font-weight: 600;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 6px;
}

.jpt-f-detail-label .dashicons {
    color: #3C91A5;
    font-size: 16px;
}

.jpt-f-detail-value {
    flex: 1;
    color: #1f2937;
}

/* Badge de conteo */
.jpt-f-count-badge {
    display: inline-block;
    background: #3C91A5;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

/* Badge de estado */
.jpt-f-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jpt-f-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.jpt-f-badge .dashicons {
    font-size: 16px;
}

/* Sección de actuaciones */
.jpt-f-detail-section {
    background: #f9fafb;
    padding: 20px;
    margin: 20px -20px -20px -20px;
    border-top: 1px solid #e5e7eb;
}

.jpt-f-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jpt-f-section-title .dashicons {
    color: #3C91A5;
}

/* Preview de actuaciones */
.jpt-f-actuaciones-preview {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.jpt-f-actuacion-item {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.jpt-f-actuacion-item:last-child {
    border-bottom: none;
}

.jpt-f-actuacion-fecha {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.jpt-f-actuacion-fecha .dashicons {
    font-size: 14px;
}

.jpt-f-actuacion-texto {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
}

.jpt-f-actuacion-anotacion {
    margin-top: 5px;
    padding-left: 20px;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

/* Indicador de más elementos */
.jpt-f-more-indicator {
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}

/* Link externo */
.jpt-f-external-link {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    margin: 20px -20px -20px -20px;
}

/* Botón outline mejorado */
.jpt-f-button-outline {
    background: transparent !important;
    color: #3C91A5 !important;
    border: 2px solid #3C91A5 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.3s ease !important;
}

.jpt-f-button-outline:hover {
    background: #3C91A5 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 145, 165, 0.25);
}

/* Animaciones */
.animated-entry {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.animated-entry.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Flash de éxito para el botón limpiar */
.success-flash {
    animation: successFlash 0.3s ease;
}

@keyframes successFlash {
    0% { background: #6b7280 !important; }
    50% { background: #10b981 !important; }
    100% { background: #6b7280 !important; }
}

/* Mensaje de información mejorado */
.jpt-f-message.jpt-f-info {
    background: #f0f9ff;
    border: 1px solid #3C91A5;
    color: #1e40af;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
}

.jpt-f-message.jpt-f-info .dashicons {
    color: #3C91A5;
    font-size: 18px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .jpt-f-detail-row {
        flex-direction: column;
    }
    
    .jpt-f-detail-label {
        flex: none;
        margin-bottom: 5px;
        font-size: 13px;
    }
    
    .jpt-f-detail-section {
        padding: 15px;
        margin: 15px -15px -15px -15px;
    }
    
    .jpt-ver-actuaciones-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loader mejorado */
.jpt-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.jpt-loader::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #3C91A5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Asegurar que los botones sean consistentes */
.jpt-f-button,
.jpt-f-button-primary,
.jpt-f-button-secondary,
.jpt-f-button-outline,
#jpt-search-btn,
#jpt-clear-btn,
.jpt-ver-actuaciones-btn,
.jpt-f-proceso-list-btn,
.jpt-quick-view {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    line-height: normal !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
}

/* ============================================
   NUEVOS ESTILOS: Modal de Detalles y Controles
   ============================================ */

/* Modal más grande para detalles completos */
.jpt-modal-large .jpt-modal-content {
    max-width: 900px;
    width: 90%;
}

/* Contenedor de detalles del proceso */
.jpt-detalles-proceso {
    padding: 10px 0;
}

.jpt-detalles-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.jpt-detalles-section:last-child {
    border-bottom: none;
}

.jpt-detalles-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jpt-detalles-section h4 .dashicons {
    color: #3C91A5;
}

.jpt-detalles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.jpt-detalle-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #3C91A5;
}

.jpt-detalle-item strong {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jpt-detalle-item span {
    font-size: 14px;
    color: #1f2937;
}

.jpt-monospace {
    font-family: 'Courier New', Courier, monospace;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    font-weight: 600;
}

/* Tabla de actuaciones en el modal */
.jpt-actuaciones-table-wrapper {
    overflow-x: auto;
    margin-top: 15px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.jpt-actuaciones-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.jpt-actuaciones-table thead {
    background: linear-gradient(135deg, #3C91A5 0%, #2C7A8F 100%);
    color: white;
}

.jpt-actuaciones-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jpt-actuaciones-table td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
}

.jpt-actuaciones-table tbody tr:hover {
    background: #f9fafb;
}

.jpt-actuaciones-table tbody tr:last-child td {
    border-bottom: none;
}

.jpt-fecha-cell {
    font-weight: 600;
    color: #3C91A5;
    white-space: nowrap;
}

.jpt-termino-cell {
    font-size: 13px;
    color: #6b7280;
}

.jpt-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-style: italic;
}

.jpt-detalles-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
    text-align: center;
}

/* Controles de filtro y ordenamiento */
.jpt-f-controls-wrapper {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.jpt-f-filter-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.jpt-f-filter-input:focus {
    outline: none;
    border-color: #3C91A5;
    box-shadow: 0 0 0 3px rgba(60, 145, 165, 0.1);
}

/* Select de ordenamiento con máxima especificidad */
.jpt-f-controls-wrapper select#jpt-sort-procesos.jpt-f-sort-select,
select#jpt-sort-procesos.jpt-f-sort-select,
.jpt-f-sort-select {
    width: auto !important;
    min-width: 120px !important;
    padding: 12px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: white !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

/* Focus del select */
.jpt-f-controls-wrapper select#jpt-sort-procesos.jpt-f-sort-select:focus,
select#jpt-sort-procesos.jpt-f-sort-select:focus,
.jpt-f-sort-select:focus {
    outline: none !important;
    border-color: #3C91A5 !important;
    box-shadow: 0 0 0 3px rgba(60, 145, 165, 0.1) !important;
}

/* Hover del select */
.jpt-f-controls-wrapper select#jpt-sort-procesos.jpt-f-sort-select:hover,
select#jpt-sort-procesos.jpt-f-sort-select:hover,
.jpt-f-sort-select:hover {
    border-color: #3C91A5 !important;
}

.jpt-f-sort-select:focus {
    outline: none;
    border-color: #3C91A5;
    box-shadow: 0 0 0 3px rgba(60, 145, 165, 0.1);
}

.jpt-f-sort-select:hover {
    border-color: #3C91A5;
}

/* Mejorar el botón "Ver Detalles" */
.jpt-f-button-small.jpt-f-button-primary {
    background: linear-gradient(135deg, #3C91A5 0%, #2C7A8F 100%);
    color: white;
}

.jpt-f-button-small.jpt-f-button-primary:hover {
    background: linear-gradient(135deg, #2C7A8F 0%, #1f5f73 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 145, 165, 0.3);
}

/* Espaciado en el footer de las tarjetas */
.jpt-f-card-footer {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.jpt-f-card-footer .jpt-f-button-small {
    flex: 1;
}

/* Loading mejorado */
.jpt-f-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.jpt-f-loading:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top-color: #3C91A5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error mejorado */
.jpt-f-error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c33;
    margin: 10px 0;
}

/* Responsive para controles */
@media (max-width: 768px) {
    .jpt-f-controls-wrapper {
        flex-direction: column;
    }
    
    .jpt-f-filter-input,
    .jpt-f-sort-select {
        width: 100%;
        min-width: 100%;
    }
    
    .jpt-modal-large .jpt-modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .jpt-detalles-grid {
        grid-template-columns: 1fr;
    }
    
    .jpt-actuaciones-table {
        font-size: 12px;
    }
    
    .jpt-actuaciones-table th,
    .jpt-actuaciones-table td {
        padding: 8px;
    }
}

/* ==========================================================================
   SISTEMA DE PAGINACIÓN
   ========================================================================== */

.jpt-pagination-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.jpt-pagination-info {
    text-align: center;
    margin-bottom: 15px;
}

.jpt-pagination-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.jpt-pagination-info span {
    color: #3C91A5;
    font-weight: 600;
}

.jpt-pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.jpt-pagination-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jpt-pagination-btn:hover:not(:disabled) {
    background: #3C91A5;
    color: white;
    border-color: #3C91A5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(60, 145, 165, 0.2);
}

.jpt-pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.jpt-pagination-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.jpt-pagination-numbers {
    display: flex;
    gap: 4px;
    align-items: center;
}

.jpt-page-number {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.jpt-page-number:hover {
    background: #f3f4f6;
    border-color: #3C91A5;
    color: #3C91A5;
}

.jpt-page-number.active {
    background: #3C91A5;
    border-color: #3C91A5;
    color: white;
    cursor: default;
}

.jpt-page-ellipsis {
    padding: 0 8px;
    color: #9ca3af;
    font-weight: 600;
}

.jpt-pagination-jump {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.jpt-pagination-jump label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.jpt-pagination-jump input {
    width: 60px;
    padding: 6px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.jpt-pagination-jump input:focus {
    outline: none;
    border-color: #3C91A5;
    box-shadow: 0 0 0 3px rgba(60, 145, 165, 0.1);
}

.jpt-pagination-btn-small {
    padding: 6px 12px;
    background: #3C91A5;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jpt-pagination-btn-small:hover {
    background: #2C7A8F;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(60, 145, 165, 0.3);
}

/* Ocultar tarjetas que no están en la página actual */
.jpt-f-proceso-card.jpt-hidden-page {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .jpt-pagination-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .jpt-pagination-btn {
        width: 100%;
        justify-content: center;
    }
    
    .jpt-pagination-numbers {
        width: 100%;
        justify-content: center;
    }
    
    .jpt-pagination-jump {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================================
   SCROLL PARA LA TABLA DE ACTUACIONES EN EL MODAL DE DETALLES
   ============================================================ */

/* Asegurar que el modal body tenga scroll */
#jpt-modal-detalles-body {
    padding: 25px;
    overflow-y: auto !important;
    flex-grow: 1;
    max-height: calc(80vh - 80px); /* Altura del modal menos el header */
}

/* Contenedor específico para la tabla de actuaciones con scroll */
.jpt-actuaciones-table-wrapper {
    max-height: 400px; /* Altura máxima para la sección de actuaciones */
    overflow-y: auto; /* Scroll vertical */
    overflow-x: auto; /* Scroll horizontal */
    margin-top: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
}

/* Scrollbar personalizada para el contenedor de actuaciones */
.jpt-actuaciones-table-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.jpt-actuaciones-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.jpt-actuaciones-table-wrapper::-webkit-scrollbar-thumb {
    background: #3C91A5;
    border-radius: 4px;
}

.jpt-actuaciones-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #2C7A8F;
}

/* Scrollbar personalizada para el modal body principal */
#jpt-modal-body::-webkit-scrollbar,
#jpt-modal-detalles-body::-webkit-scrollbar {
    width: 10px;
}

#jpt-modal-body::-webkit-scrollbar-track,
#jpt-modal-detalles-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#jpt-modal-body::-webkit-scrollbar-thumb,
#jpt-modal-detalles-body::-webkit-scrollbar-thumb {
    background: #3C91A5;
    border-radius: 4px;
}

#jpt-modal-body::-webkit-scrollbar-thumb:hover,
#jpt-modal-detalles-body::-webkit-scrollbar-thumb:hover {
    background: #2C7A8F;
}

/* Responsive: Ajustar alturas en móviles */
@media (max-width: 768px) {
    #jpt-modal-body,
    #jpt-modal-detalles-body {
        max-height: calc(90vh - 80px);
        padding: 15px;
    }
    
    .jpt-actuaciones-table-wrapper {
        max-height: 300px; /* Menos altura en móviles */
    }
}

/* Indicador visual de que hay scroll disponible */
.jpt-actuaciones-table-wrapper::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
    display: block;
}

/* ============================================================
   SISTEMA DE COLORES PARA FECHA DE ÚLTIMA ACTUACIÓN
   ============================================================ */

/* Estilos base para el stat de fecha con color */
.jpt-f-stat.jpt-fecha-muy-reciente,
.jpt-f-stat.jpt-fecha-reciente,
.jpt-f-stat.jpt-fecha-antigua,
.jpt-f-stat.jpt-fecha-muy-antigua {
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* 🟢 Verde - Muy reciente (≤ 7 días) */
.jpt-f-stat.jpt-fecha-muy-reciente {
    color: #10b981;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.jpt-f-stat.jpt-fecha-muy-reciente:hover {
    background: #dcfce7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

/* 🔵 Azul - Reciente (8-30 días) */
.jpt-f-stat.jpt-fecha-reciente {
    color: #3b82f6;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.jpt-f-stat.jpt-fecha-reciente:hover {
    background: #dbeafe;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* 🟠 Naranja - Antigua (31-90 días) */
.jpt-f-stat.jpt-fecha-antigua {
    color: #f59e0b;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.jpt-f-stat.jpt-fecha-antigua:hover {
    background: #fef3c7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* ⚪ Gris - Muy antigua (> 90 días) */
.jpt-f-stat.jpt-fecha-muy-antigua {
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.jpt-f-stat.jpt-fecha-muy-antigua:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}

/* Icono de círculo de color */
.jpt-fecha-icono {
    font-size: 10px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Responsive: Ajustar en móviles */
@media (max-width: 768px) {
    .jpt-f-stat.jpt-fecha-muy-reciente,
    .jpt-f-stat.jpt-fecha-reciente,
    .jpt-f-stat.jpt-fecha-antigua,
    .jpt-f-stat.jpt-fecha-muy-antigua {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .jpt-fecha-icono {
        font-size: 8px;
    }
}

/* ============================================
   ARCHIVOS ADJUNTOS
   ============================================ */

.jpt-f-actuacion-archivo {
    margin-top: 12px;
    padding: 12px;
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
}

.jpt-f-archivo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.jpt-f-archivo-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.jpt-f-archivo-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.jpt-f-archivo-size {
    color: #6b7280;
    font-size: 12px;
    font-weight: normal;
}

/* Icono de archivo en la vista previa de actuaciones */
.jpt-f-actuacion-preview-archivo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 6px;
    background: #dbeafe;
    border-radius: 4px;
    font-size: 11px;
    color: #1e40af;
}

.jpt-f-actuacion-preview-archivo .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Badge de archivo en tarjetas de proceso */
.jpt-f-card-archivo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

.jpt-f-card-archivo-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Animación al pasar el mouse sobre archivos */
.jpt-f-archivo-link:hover .dashicons {
    animation: paperclip-bounce 0.5s ease;
}

@keyframes paperclip-bounce {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .jpt-f-actuacion-archivo {
        padding: 10px;
    }
    
    .jpt-f-archivo-link {
        font-size: 13px;
    }
    
    .jpt-f-archivo-size {
        font-size: 11px;
    }
}

/* AGREGAR ESTE CSS AL FINAL de frontend-style.css */

/* ============================================
   ARCHIVOS ADJUNTOS
   ============================================ */

.jpt-f-actuacion-archivo {
    margin-top: 12px;
    padding: 12px;
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
}

.jpt-f-archivo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.jpt-f-archivo-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.jpt-f-archivo-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.jpt-f-archivo-size {
    color: #6b7280;
    font-size: 12px;
    font-weight: normal;
}

/* Icono de archivo en la vista previa de actuaciones */
.jpt-f-actuacion-preview-archivo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 6px;
    background: #dbeafe;
    border-radius: 4px;
    font-size: 11px;
    color: #1e40af;
}

.jpt-f-actuacion-preview-archivo .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Badge de archivo en tarjetas de proceso */
.jpt-f-card-archivo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

.jpt-f-card-archivo-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Animación al pasar el mouse sobre archivos */
.jpt-f-archivo-link:hover .dashicons {
    animation: paperclip-bounce 0.5s ease;
}

@keyframes paperclip-bounce {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Estilos para tabla de detalles con archivos */
.jpt-actuaciones-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.jpt-actuaciones-table thead th {
    background: #f3f4f6;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.jpt-actuaciones-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #4b5563;
}

.jpt-actuaciones-table tbody tr:hover {
    background: #f9fafb;
}

.jpt-archivo-cell {
    text-align: center;
}

.jpt-archivo-link-table {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.jpt-archivo-link-table:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.jpt-archivo-link-table .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .jpt-f-actuacion-archivo {
        padding: 10px;
    }
    
    .jpt-f-archivo-link {
        font-size: 13px;
    }
    
    .jpt-f-archivo-size {
        font-size: 11px;
    }
    
    .jpt-actuaciones-table {
        font-size: 12px;
    }
    
    .jpt-actuaciones-table thead th,
    .jpt-actuaciones-table tbody td {
        padding: 8px;
    }
}

/* ============================================
   ARCHIVOS ADJUNTOS - VERSIÓN CON ÍCONOS
   ============================================ */

.jpt-f-actuacion-archivo {
    margin-top: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.jpt-f-archivo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.jpt-f-archivo-link:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(4px);
}

.jpt-f-archivo-link .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.jpt-f-archivo-link:hover .dashicons {
    transform: scale(1.1);
}

.jpt-archivo-texto {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jpt-archivo-texto strong {
    font-size: 14px;
    color: #1e3a8a;
}

.jpt-f-archivo-size {
    color: #64748b;
    font-size: 12px;
    font-weight: normal;
}

/* Icono de archivo en la vista previa de actuaciones */
.jpt-f-actuacion-preview-archivo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 4px 10px;
    background: white;
    border: 2px solid;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.jpt-f-actuacion-preview-archivo:hover {
    transform: scale(1.05);
}

.jpt-f-actuacion-preview-archivo .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Badge de archivo en tarjetas de proceso */
.jpt-f-card-archivo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.jpt-f-card-archivo-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Animación al pasar el mouse sobre archivos */
.jpt-f-archivo-link:hover .dashicons {
    animation: paperclip-bounce 0.5s ease;
}

@keyframes paperclip-bounce {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Estilos para tabla de detalles con archivos */
.jpt-actuaciones-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.jpt-actuaciones-table thead th {
    background: #f3f4f6;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.jpt-actuaciones-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #4b5563;
}

.jpt-actuaciones-table tbody tr:hover {
    background: #f9fafb;
}

.jpt-archivo-cell {
    text-align: center;
}

.jpt-archivo-link-table {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.jpt-archivo-link-table:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.jpt-archivo-link-table .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .jpt-f-actuacion-archivo {
        padding: 10px;
    }
    
    .jpt-f-archivo-link {
        font-size: 13px;
    }
    
    .jpt-f-archivo-size {
        font-size: 11px;
    }
    
    .jpt-actuaciones-table {
        font-size: 12px;
    }
    
    .jpt-actuaciones-table thead th,
    .jpt-actuaciones-table tbody td {
        padding: 8px;
    }
}

/* ========================================
   PWA - Botón de Instalación
======================================== */
.jpt-install-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #3C91A5 0%, #2d7a8a 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(60, 145, 165, 0.4);
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInUp 0.3s ease;
    cursor: pointer;
    transition: transform 0.2s;
}

.jpt-install-prompt:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(60, 145, 165, 0.5);
}

.jpt-install-content {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.jpt-install-content .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.jpt-install-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 10px;
    transition: background 0.2s;
}

.jpt-install-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

/* Responsive */
@media (max-width: 768px) {
    .jpt-install-prompt {
        bottom: 10px;
        right: 10px;
        left: 10px;
        justify-content: space-between;
    }
}

/* ========================================
   PWA - Ocultar menú, footer y WIDGETS cuando está instalada
======================================== */

/* Detectar si está en modo standalone (PWA instalada) */
@media all and (display-mode: standalone) {
    /* ===== OCULTAR HEADER/MENÚ ===== */
    header,
    .site-header,
    #masthead,
    .header,
    #header,
    nav,
    .navigation,
    .main-navigation,
    #site-navigation,
    .navbar,
    .menu-principal,
    #menu-principal {
        display: none !important;
    }
    
    /* ===== OCULTAR FOOTER ===== */
    footer,
    .site-footer,
    #colophon,
    .footer {
        display: none !important;
    }
    
    /* ===== ⭐ NUEVO: OCULTAR WIDGETS FLOTANTES ===== */
    
    /* Widgets de chat */
    .chat-widget,
    #chat-widget,
    .floating-chat,
    .tawk-widget,
    .livechat-widget,
    .messenger-widget,
    .whatsapp-widget,
    .wa-widget,
    .facebook-chat,
    #fb-customer-chat,
    .crisp-client,
    .intercom-messenger,
    .drift-widget,
    
    /* Botones flotantes */
    .floating-button,
    .float-button,
    .sticky-button,
    .fixed-button,
    
    /* Pop-ups y modales */
    .popup-widget,
    .modal-widget,
    .overlay-widget,
    
    /* Widgets de redes sociales flotantes */
    .social-widget,
    .social-float,
    .share-buttons-float,
    
    /* Widgets de newsletter */
    .newsletter-popup,
    .subscribe-popup,
    
    /* Banners de cookies */
    .cookie-notice,
    .cookie-banner,
    #cookie-notice,
    
    /* Widgets generales flotantes */
    .widget-area.floating,
    
    /* ⭐ AGREGAR AQUÍ selectores específicos de tu widget */
    /* Por ejemplo: */
    /* .tu-widget-especifico,
    #id-del-widget,
    .clase-del-plugin-widget */
    
    /* Selector genérico para capturar elementos fixed/sticky con z-index alto */
    *[style*="position: fixed"][style*="z-index"] {
        display: none !important;
    }
    
    /* Hacer que el contenido ocupe toda la pantalla */
    body {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    /* Ajustar contenedor principal */
    .site-content,
    #content,
    main,
    .main-content {
        margin-top: 0 !important;
        padding-top: 20px !important;
    }
    
    /* Asegurar que el contenido del shortcode se vea bien */
    .jpt-f-wrap,
    .jpt-frontend-container {
        margin-top: 0 !important;
    }
    
    /* IMPORTANTE: No ocultar elementos del plugin de procesos */
    /* PERO RESPETAR su estado normal (hidden cuando debe estar hidden) */
    .jpt-install-prompt {
        /* Solo el botón de instalar debe ser visible siempre */
    }
    
    /* Los modales deben respetar su estado inicial (display: none) */
    .jpt-modal {
        /* NO forzar display aquí, dejar que JS controle su visibilidad */
    }
    
    /* Elementos del plugin que deben mantenerse si están visibles */
    .jpt-f-wrap,
    .jpt-frontend-container,
    .jpt-f-header,
    .jpt-f-content {
        /* Estos sí deben mantenerse visibles */
    }
}

/* Para iOS en modo standalone */
@media all and (display-mode: standalone) and (-webkit-touch-callout: none) {
    header,
    .site-header,
    nav,
    footer,
    
    /* Widgets flotantes en iOS */
    .chat-widget,
    .floating-button,
    .popup-widget,
    .cookie-notice,
    
    /* ⭐ Agregar selectores específicos aquí también */
    .tu-widget-especifico {
        display: none !important;
    }
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA DEBUGGING
   (Remover en producción)
======================================== */

/* Cuando está en modo PWA, agregar borde rojo a elementos que deberían estar ocultos */
body.pwa-mode .chat-widget,
body.pwa-mode .floating-button,
body.pwa-mode .popup-widget {
    /* border: 3px solid red !important; */ /* Descomentar para debug */
}

/* ==========================================================================
   RESPONSIVE - MIS PROCESOS (correcciones móvil)
   ========================================================================== */

/* Box-sizing global para evitar overflow horizontal */
.jpt-frontend-container *,
.jpt-frontend-container *::before,
.jpt-frontend-container *::after {
    box-sizing: border-box;
}

.jpt-frontend-container {
    overflow-x: hidden;
}

/* ── TABS: ocultar en móvil, reemplazados por dropdown JS ── */
@media (max-width: 768px) {
    .jpt-f-tabs {
        display: none !important;
    }

    .jpt-f-content {
        padding: 14px;
    }

    /* ── DROPDOWN MÓVIL ── */
    .jpt-mobile-nav {
        position: relative;
        z-index: 100;
        background: #f8f9fa;
        border-bottom: 2px solid #e5e7eb;
    }

    .jpt-mobile-nav-btn {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
        background: #ffffff;
        border: none;
        font-size: 15px;
        font-weight: 600;
        color: #3C91A5;
        cursor: pointer;
        text-align: left;
    }

    .jpt-mobile-nav-icon {
        font-size: 20px;
        line-height: 1;
    }

    .jpt-mobile-nav-label {
        flex: 1;
    }

    .jpt-mobile-nav-arrow {
        font-size: 18px;
        color: #9ca3af;
        transition: transform 0.2s;
        line-height: 1;
    }

    .jpt-mobile-nav.open .jpt-mobile-nav-arrow {
        transform: rotate(180deg);
    }

    .jpt-mobile-nav-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #e5e7eb;
        border-top: none;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        overflow: hidden;
        z-index: 999;
    }

    .jpt-mobile-nav-option {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 18px;
        background: white;
        border: none;
        border-bottom: 1px solid #f3f4f6;
        font-size: 14px;
        font-weight: 500;
        color: #374151;
        cursor: pointer;
        text-align: left;
        transition: background 0.15s;
    }

    .jpt-mobile-nav-option:last-child {
        border-bottom: none;
    }

    .jpt-mobile-nav-option:hover {
        background: #f0f9fb;
        color: #3C91A5;
    }

    .jpt-mobile-nav-option.active {
        background: #e8f5f8;
        color: #3C91A5;
        font-weight: 600;
    }

    .jpt-mobile-nav-option span:first-child {
        font-size: 18px;
    }
}

/* ── TARJETA DE PROCESO: layout en móvil ── */
@media (max-width: 600px) {
    .jpt-proceso-card-inner {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .jpt-proceso-card-actions {
        min-width: unset !important;
        width: 100% !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .jpt-proceso-card-actions .jpt-toggle-switch {
        width: 100%;
    }

    .jpt-proceso-card-actions > div {
        width: 100%;
    }

    .jpt-proceso-card-actions button {
        flex: 1;
        min-width: 120px;
        font-size: 12px !important;
        padding: 9px 8px !important;
    }
}

/* ── FILTROS: 1 columna en móvil ── */
@media (max-width: 600px) {
    .jpt-filtros-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── BARRA MOSTRAR / MOSTRANDO: apilada en móvil ── */
@media (max-width: 600px) {
    .jpt-paginacion-top-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
}

/* ── PAGINACIÓN INFERIOR: scroll horizontal ── */
@media (max-width: 600px) {
    .jpt-pagination-container .jpt-pagination-controls,
    div[style*="justify-content: center"][style*="gap: 10px"][style*="margin-top: 25px"] {
        flex-wrap: wrap !important;
        gap: 6px !important;
        justify-content: center !important;
    }
}

/* ── MODAL: mejor en pantallas pequeñas ── */
@media (max-width: 768px) {
    .jpt-modal-content {
        margin: 10px auto !important;
        width: 95% !important;
        max-height: 92vh !important;
        border-radius: 8px;
    }

    .jpt-modal-content h3 {
        padding: 15px 18px;
        font-size: 16px;
    }

    #jpt-modal-body,
    #jpt-modal-detalles-body {
        padding: 15px;
    }
}

/* ── TARJETAS STATS (Total / Con revisión / Sin revisión) ── */
@media (max-width: 480px) {
    .jpt-stats-cards {
        grid-template-columns: 1fr !important;
    }

    .jpt-stat-card {
        padding: 15px !important;
    }
}

/* ── LOGIN WRAPPER en móvil ── */
@media (max-width: 480px) {
    .jpt-login-wrapper {
        margin: 15px 10px !important;
        padding: 20px !important;
        border-radius: 8px !important;
    }
}
}

/* ==========================================================================
   RESPONSIVE GLOBAL - CORRECCIONES Y MEJORAS
   ========================================================================== */

/* Box-sizing global para evitar overflow horizontal */
.jpt-frontend-container *,
.jpt-frontend-container *::before,
.jpt-frontend-container *::after {
    box-sizing: border-box;
}

/* Evitar overflow horizontal en el container */
.jpt-frontend-container {
    overflow-x: hidden;
}

/* ── TABS: scroll horizontal en móvil (mejor que apilar verticalmente) ── */
@media (max-width: 768px) {
    .jpt-f-tabs {
        flex-direction: row !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 2px solid #e5e7eb;
        flex-wrap: nowrap;
    }

    .jpt-f-tabs::-webkit-scrollbar {
        display: none;
    }

    .jpt-f-tab {
        flex: 0 0 auto;
        min-width: 110px;
        padding: 12px 14px;
        font-size: 13px;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        white-space: nowrap;
    }

    .jpt-f-tab-icon {
        font-size: 20px;
        display: block;
    }

    .jpt-f-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .jpt-f-tab {
        min-width: 90px;
        padding: 10px 10px;
        font-size: 12px;
    }

    .jpt-f-content {
        padding: 12px;
    }
}

/* ── MODAL: mejor en pantallas pequeñas ── */
@media (max-width: 768px) {
    .jpt-modal-content {
        margin: 10px auto !important;
        width: 95% !important;
        max-height: 92vh !important;
        border-radius: 8px;
    }

    .jpt-modal-content h3 {
        padding: 15px 18px;
        font-size: 16px;
    }

    #jpt-modal-body,
    #jpt-modal-detalles-body {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .jpt-modal-content {
        margin: 5px auto !important;
        max-height: 96vh !important;
        border-radius: 6px;
    }
}

/* ── LOGIN WRAPPER: ajuste en móvil ── */
@media (max-width: 480px) {
    .jpt-login-wrapper {
        margin: 15px 10px !important;
        padding: 20px !important;
        border-radius: 8px !important;
    }
}

/* ── PERFIL: avatar + nombre en móvil ── */
@media (max-width: 480px) {
    .jpt-perfil-avatar-row {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .jpt-perfil-card {
        padding: 16px !important;
    }
}

/* ── SEARCH CARD: quitar padding excesivo en móvil ── */
@media (max-width: 480px) {
    .jpt-f-search-card-body {
        padding: 14px 12px !important;
    }

    .jpt-f-section-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
}

/* ── TARJETAS: stats en una fila en móvil ── */
@media (max-width: 480px) {
    .jpt-f-card-stats {
        flex-wrap: wrap;
        gap: 6px;
    }

    .jpt-f-stat {
        font-size: 10px;
    }
}

/* ── LISTA: botones del footer de tarjeta apilados en pantallas muy pequeñas ── */
@media (max-width: 380px) {
    .jpt-f-card-footer {
        flex-direction: column;
    }

    .jpt-f-card-footer .jpt-f-button-small {
        width: 100%;
        justify-content: center;
    }
}

/* ── CONSULTA: select de ordenamiento en móvil ── */
@media (max-width: 600px) {
    .jpt-f-controls-wrapper > div[style*="min-width: 200px"] {
        flex: 1 1 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
    }

    .jpt-f-sort-select {
        width: 100% !important;
        min-width: unset !important;
    }
}

/* ── LOGIN: inputs del formulario de WordPress ── */
.jpt-login-wrapper #loginform input[type="text"],
.jpt-login-wrapper #loginform input[type="password"],
.jpt-login-wrapper #jpt-loginform input[type="text"],
.jpt-login-wrapper #jpt-loginform input[type="password"] {
    width: 100% !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
}