/* Purchase Reports Dashboard Styles */

/* Quick Filters Card */
.border-left-primary {
    border-left: 0.25rem solid #e74a3b !important;
}

#quickFiltersForm .form-label {
    color: #5a5c69;
    margin-bottom: 0.25rem;
}

#quickFiltersForm .form-control-sm {
    border-radius: 0.35rem;
    font-size: 0.875rem;
}

/* Summary Statistics Cards */
.border-left-danger {
    border-left: 0.25rem solid #e74a3b !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

/* Report Cards Styling */
.report-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 0.5rem;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

.report-card .card-body {
    padding: 2rem 1.5rem;
}

.report-card .report-icon {
    opacity: 0.8;
    transition: all 0.3s ease;
}

.report-card:hover .report-icon {
    opacity: 1;
    transform: scale(1.1);
}

.report-card .card-title {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.report-card .card-text {
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    min-height: 40px;
}

.report-card .btn {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.report-card .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.2);
}

/* Custom Button Colors */
.btn-danger {
    background: linear-gradient(135deg, #e74a3b 0%, #d63031 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f6c23e 0%, #f39c12 100%);
    border: none;
    color: white !important;
}

.btn-info {
    background: linear-gradient(135deg, #36b9cc 0%, #2980b9 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #1cc88a 0%, #27ae60 100%);
    border: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #858796 0%, #5a5c69 100%);
    border: none;
}

.btn-dark {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    border: none;
}

/* Page Header */
.page-heading h1 i {
    margin-right: 0.5rem;
}

/* Summary Stats Cards Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#summaryStats .card {
    animation: fadeInUp 0.5s ease;
}

#summaryStats .card:nth-child(1) {
    animation-delay: 0.1s;
}

#summaryStats .card:nth-child(2) {
    animation-delay: 0.2s;
}

#summaryStats .card:nth-child(3) {
    animation-delay: 0.3s;
}

#summaryStats .card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Charts Container */
.card canvas {
    max-height: 300px;
}

/* Custom Select Styling */
select.form-control-sm {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* Loading Spinner */
.fa-spinner {
    color: #e74a3b;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .report-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .report-card .report-icon i {
        font-size: 2rem !important;
    }
    
    .report-card .card-title {
        font-size: 1rem;
    }
    
    #quickFiltersForm .col-md-3 {
        margin-bottom: 1rem;
    }
}

/* Filter Reset Button */
#resetFilters {
    transition: all 0.3s ease;
}

#resetFilters:hover {
    transform: rotate(180deg);
}

/* Card Headers */
.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    text-align: center;
    color: #fff;
    background: rgba(90, 92, 105, 0.5);
    line-height: 46px;
    border-radius: 50%;
    z-index: 1000;
}

.scroll-to-top:hover {
    background: #5a5c69;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Stats Card Icons */
.text-gray-300 {
    color: #dddfeb !important;
}

/* Report Grid Spacing */
.row > [class*='col-'] {
    margin-bottom: 1.5rem;
}

/* Print Styles */
@media print {
    .sidebar,
    .topbar,
    .footer,
    .scroll-to-top,
    .btn,
    #quickFiltersForm {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Accessibility */
.btn:focus,
.form-control:focus {
    outline: 2px solid #e74a3b;
    outline-offset: 2px;
}

/* Custom Date Range Inputs */
input[type="date"].form-control-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Enhanced Shadow Effects */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

/* Custom Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 74, 59, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 74, 59, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 74, 59, 0);
    }
}

.btn-danger:active {
    animation: pulse 0.5s;
}
