/* ========================================
   FILTROS POR FECHA - ADMIN PANEL
   ======================================== */

.date-filters-container {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    margin: 20px auto;
    overflow: hidden;
    max-width: 750px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-filters-container:hover {
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
}

.filters-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #fdbe02 0%, #f59e0b 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filters-header:hover::before {
    opacity: 0.5;
}

.filters-header.active::before {
    opacity: 1;
}

.filters-header:hover {
    background: linear-gradient(135deg, #fef5e7 0%, #fffbf0 100%);
}

.filters-header.active {
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border-bottom-color: rgba(253, 190, 2, 0.2);
}

/* Left side with icon and title */
.filters-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filters-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fdbe02 0%, #f59e0b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.filters-header:hover .filters-icon-container {
    transform: scale(1.05) rotate(-5deg);
}

.filters-header.active .filters-icon-container {
    transform: scale(1.05);
}

.filters-icon-container svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

.filters-title {
    font-family: 'Aristotelica Display Trial', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: color 0.3s ease;
}

.filters-title-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-title-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    font-family: 'Open Sans', sans-serif;
}

/* Badge de filtro activo */
.filter-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
    animation: badgePulse 2s infinite;
    border: 2px solid rgba(16, 185, 129, 0.2);
}

@keyframes badgePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}

/* Right side with toggle button */
.btn-toggle-filters {
    background: #f1f5f9;
    border: 2px solid transparent;
    padding: 12px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-filters:hover {
    background: linear-gradient(135deg, #fdbe02 0%, #f59e0b 100%);
    border-color: transparent;
}

.btn-toggle-filters svg {
    width: 22px;
    height: 22px;
    color: #475569;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-toggle-filters:hover svg {
    color: #ffffff;
}

.filters-header.active .btn-toggle-filters {
    background: linear-gradient(135deg, #fdbe02 0%, #f59e0b 100%);
    border-color: transparent;
}

.filters-header.active .btn-toggle-filters svg {
    transform: rotate(180deg);
    color: #ffffff;
}

.filters-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 20px;
}

.filters-content.active {
    max-height: 2000px;
    opacity: 1;
    padding: 6px 10px;
    max-width: 100%;
    margin: 0 auto;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.filter-input,
.filter-select {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.filter-input:focus,
.filter-input:focus {
    outline: none;
    border-color: #fdbe02;
    background: #ffffff;
}

.filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filters-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
    padding: 8px 0 0 0;
    border-top: 1px solid #e0e0e0;
}

.filters-actions .btn-small {
    padding: 0;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    flex-shrink: 0;
    white-space: nowrap;
    width: 44px;
    height: 44px;
    position: relative;
    margin: 0;
}

.filters-actions .btn-small svg {
    width: 20px;
    height: 20px;
    color: #6b7280;
    transition: color 0.3s ease;
}

.filters-actions .btn-primary.btn-small:hover,
.filters-actions .btn-secondary.btn-small:hover,
.filters-actions .btn-success.btn-small:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none;
}

.filters-actions .btn-primary.btn-small:hover svg {
    color: #fdbe02;
}

.filters-actions .btn-secondary.btn-small:hover svg {
    color: #ef4444;
}

.filters-actions .btn-success.btn-small:hover svg {
    color: #28a745;
}

.filter-active-indicator {
    margin-top: 16px;
    padding: 12px 16px;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #0066cc;
    font-weight: 500;
}

.filter-active-indicator svg {
    color: #0066cc;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 968px) {
    .filters-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .filters-header {
        padding: 20px;
    }

    .filters-icon-container {
        width: 44px;
        height: 44px;
    }

    .filters-icon-container svg {
        width: 22px;
        height: 22px;
    }

    .filters-title {
        font-size: 17px;
    }

    .filters-title-subtitle {
        font-size: 12px;
    }

    .btn-toggle-filters {
        padding: 10px;
    }

    .filter-active-badge {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .filters-actions {
        flex-direction: column;
        flex-wrap: nowrap;
    }
    
    .btn-small {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .filters-header {
        padding: 16px 18px;
    }

    .filters-title-wrapper {
        gap: 12px;
    }

    .filters-icon-container {
        width: 40px;
        height: 40px;
    }

    .filters-icon-container svg {
        width: 20px;
        height: 20px;
    }
    
    .filters-title {
        font-size: 16px;
    }

    .filters-title-subtitle {
        display: none;
    }

    .btn-toggle-filters {
        padding: 8px;
    }

    .btn-toggle-filters svg {
        width: 20px;
        height: 20px;
    }

    .filter-active-badge {
        display: none;
    }
    
    .filters-content {
        padding: 16px;
    }
}
