/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Stats Cards */
.stats-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    color: white;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0d6efd 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #20c997 0%, #198754 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.stats-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stats-value {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.stats-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f8f9fa;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* Table Styles */
.table {
    font-size: 0.9rem;
}

.table thead {
    background-color: #f8f9fa;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Badge Styles */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Responsive Tables */
.table-responsive {
    border-radius: 5px;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

/* Chart Container */
canvas {
    max-height: 300px;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    border-radius: 5px;
    font-weight: 500;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 5px;
}

/* Code Tags */
code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.875em;
}

/* Filters Panel */
.card-body .row {
    align-items: end;
}

/* Export Button */
#exportCsv {
    font-size: 0.875rem;
}

/* Footer */
footer {
    padding: 1rem 0;
    border-top: 1px solid #dee2e6;
    margin-top: 2rem;
}

/* Auto-refresh Badge */
#autoRefreshBadge {
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-value {
        font-size: 1.5rem;
    }

    .stats-icon {
        font-size: 2rem;
    }

    .table {
        font-size: 0.8rem;
    }

    canvas {
        max-height: 250px;
    }

    .card-header {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .stats-card .card-body {
        padding: 1rem;
    }

    .stats-value {
        font-size: 1.25rem;
    }

    .stats-label {
        font-size: 0.75rem;
    }

    .stats-icon {
        display: none;
    }

    .table {
        font-size: 0.75rem;
    }

    .badge {
        font-size: 0.7rem;
    }

    canvas {
        max-height: 200px;
    }
}

/* Smooth Transitions */
* {
    transition: all 0.2s ease-in-out;
}

button, a, .btn {
    transition: all 0.15s ease-in-out;
}

/* Alert Positioning */
.alert {
    min-width: 300px;
    max-width: 600px;
}

/* Status Indicators */
.badge.bg-success i,
.badge.bg-danger i {
    margin-right: 0.25rem;
}

/* Table Codes */
.table code {
    background-color: #e9ecef;
    color: #495057;
    font-size: 0.8em;
}

/* Filter Section */
.card-body .row.g-3 {
    margin-bottom: 0;
}

/* Pagination Info */
#paginationInfo {
    font-size: 0.875rem;
}

/* Custom Scrollbar */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

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