/**
 * ServPro - Dashboard Main Styles
 * 
 * Styles specific to the dashboard page matching client database design exactly
 * Dependencies: sb-admin-2.css (same as client database)
 * Used by: index.php
 * 
 * @version 1.0.0
 * @author ServPro Team
 */

/* Dashboard Cards Enhancement - matching client database */
.dashboard-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.25);
}

/* Table responsive improvements - matching client database exactly */
.table-responsive {
    border-radius: 0.35rem;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    background-color: #f8f9fc;
    white-space: nowrap;
    vertical-align: middle;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
}

.table tbody td {
    vertical-align: middle;
    padding: 0.75rem 0.5rem;
    border-top: 1px solid #e3e6f0;
}

/* DataTable specific fixes - matching client database exactly */
#dailyEventsTable {
    width: 100% !important;
    margin-bottom: 0 !important;
    border-radius: 0.35rem;
    overflow: hidden;
}

.dataTables_wrapper {
    width: 100%;
}

.dataTables_scroll {
    width: 100%;
}

.dataTables_scrollBody {
    overflow-x: auto;
}

/* Status badge improvements - matching client database */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: linear-gradient(135deg, #1cc88a 0%, #13855c 100%);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #e74a3b 0%, #be2617 100%);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%);
    color: white;
}

/* Table info styling - matching client database */
.table-info-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #5a5c69;
}

.table-info-text i {
    width: 16px;
    text-align: center;
}

/* Clickable row styling - matching client database exactly */
#dailyEventsTable tbody tr {
    transition: all 0.2s ease;
}

#dailyEventsTable tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
    transform: scale(1.01);
}

.table-hover-highlight {
    background-color: #e3f2fd !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Loading overlay - matching client database */
.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: 1000;
    border-radius: 0.35rem;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid #e3e6f0;
    border-top: 0.25rem solid #4e73df;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filter buttons - using standard Bootstrap styling like client database */
.filter-btn.active {
    opacity: 0.8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive improvements - matching client database */
@media (max-width: 768px) {
    .card-header .d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .card-header .d-flex > div:last-child {
        margin-top: 1rem;
        justify-content: center;
    }
    
    .filter-btn, .export-btn {
        margin: 0.25rem;
        font-size: 0.8rem;
    }
    
    .export-btn {
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
}

/* Dashboard Export Button Styling */
.export-btn {
    transition: all 0.3s ease;
    border: 2px solid #4e73df;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    box-shadow: 0 2px 4px rgba(78, 115, 223, 0.3);
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(78, 115, 223, 0.4);
    background: linear-gradient(135deg, #224abe 0%, #1a3a8f 100%);
    color: white;
    text-decoration: none;
}

.export-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(78, 115, 223, 0.3);
}

.export-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(78, 115, 223, 0.2);
}

.export-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

/* Enhanced filter button styling to match export button */
.filter-btn {
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid transparent;
}

.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.filter-btn.active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-weight: 700;
}

/* Action button enhancements */
.btn-sm {
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

#dailyEventsTable thead th {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
} 