/* Elegant Light Blue Admin Dashboard Custom Styles */

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-attachment: fixed;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
    width: 100%;
}

.main-content {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px 20px 0 0;
    margin-top: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ensure it doesn't overflow */
    overflow-x: hidden; /* Prevent content from stretching parent */
}

.navbar {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sidebar styling removed - navigation now uses top navbar only */

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

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

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border: none;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e55a5a 0%, #d44a42 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.chart-container {
    position: relative;
    height: 350px;
    border-radius: 10px;
    overflow: hidden;
}

.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.table-responsive {
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-bottom: 1rem;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    border: none;
    padding: 15px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.badge {
    border-radius: 20px;
    padding: 5px 12px;
    font-weight: bold;
}

.nav-link {
    border-radius: 10px;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    transform: translateX(5px);
}

.h2 {
    color: #333;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Animation for loading */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Sidebar animation removed - no sidebar */

.main-content {
    animation: slideInRight 0.6s ease-out;
}

.btn:hover {
    animation: pulse 0.6s ease-in-out;
}

/* Loading spinner */
.spinner-border {
    color: #667eea !important;
}

/* Chart animations */
.chart-container {
    transition: all 0.3s ease;
}

.chart-container:hover {
    transform: scale(1.02);
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-online {
    background-color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
    animation: pulse 2s infinite;
}

.status-warning {
    background-color: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    animation: pulse 1s infinite;
}

.status-danger {
    background-color: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
    animation: pulse 0.5s infinite;
}

/* Toast Notifications Styling */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.toast {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.toast.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.95), rgba(34, 197, 94, 0.95));
    color: white;
}

.toast.danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(255, 107, 107, 0.95));
    color: white;
}

.toast.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(255, 235, 59, 0.95));
    color: #333;
}

.toast.info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.95), rgba(0, 188, 212, 0.95));
    color: white;
}

.toast .toast-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 0 0;
}

.toast.success .toast-header {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.toast.danger .toast-header {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.toast.warning .toast-header {
    border-bottom-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.toast.info .toast-header {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.toast .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.toast.warning .btn-close {
    filter: none;
    opacity: 0.8;
}

.toast .toast-body {
    font-weight: 500;
    line-height: 1.4;
}

/* Toast animations */
.toast.fade.show {
    animation: toastSlideIn 0.3s ease-out;
}

.toast.fade:not(.show) {
    animation: toastSlideOut 0.3s ease-in;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Hover effects */
.toast:hover {
    transform: translateX(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Delete Modal Styling */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    border-radius: 15px 15px 0 0;
}

.modal-body {
    padding: 2rem;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6);
}

.btn-secondary {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.alert-warning {
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 235, 59, 0.1));
    border-left: 4px solid #ffc107;
}

/* Filter Controls Styling */
.input-group .btn-outline-secondary {
    border-left: none;
    transition: all 0.3s ease;
}

.input-group .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.input-group .form-control:focus + .btn-outline-secondary {
    border-color: #667eea;
}

.input-group .form-control {
    border-right: none;
}

.input-group .form-control:focus {
    border-right: 1px solid #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Clear button animation */
#clearFilterBtn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

#clearFilterBtn:not(.d-none) {
    opacity: 1;
    transform: scale(1);
}

#clearFilterBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(108, 117, 125, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

#clearFilterBtn:hover::before {
    width: 100%;
    height: 100%;
}

#clearFilterBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Datalist styling for better visibility */
#giFilter {
    position: relative;
}

#giFilter::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

/* Custom datalist styling (limited browser support but good for UX) */
#giFilter:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Improve datalist dropdown appearance */
datalist {
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

datalist option {
    padding: 0.375rem 0.75rem;
    background: white;
}

datalist option:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Equipment page layout improvements */
.equipment-page .col-12 {
    width: 100%;
}

/* Enhanced table styling for equipment list */
.equipment-table {
    font-size: 0.875rem;
}

.equipment-table th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 8px;
}

.equipment-table td {
    padding: 10px 8px;
    vertical-align: middle;
}

.equipment-table .badge {
    font-size: 0.75rem;
}

/* Equipment Status Monitor styling - different from filtered data */
.equipment-status-monitor {
    border-left: 4px solid #28a745 !important;
}

.equipment-status-monitor .card-header {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    border-bottom: 1px solid rgba(40, 167, 69, 0.2);
}

.equipment-status-monitor .card-header small {
    font-weight: 500;
    color: #28a745;
}

/* Equipment Status Monitor Filter Styling */
.equipment-status-monitor .equipment-filters {
    background: rgba(40, 167, 69, 0.05);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.equipment-status-monitor .equipment-filters .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.equipment-status-monitor .equipment-filters .btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.equipment-status-monitor .equipment-filters .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Equipment filter styling */
.equipment-filters {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.equipment-filters .form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
}

.equipment-filters .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background-color: #fff;
}

.equipment-filters .btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
    transition: all 0.2s ease;
}

.equipment-filters .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: scale(1.05);
}

.equipment-filters .form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Add Equipment collapse styling */
#addEquipmentCollapse {
    transition: all 0.3s ease;
}

#addEquipmentCollapse .card {
    border: 2px solid #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

#addEquipmentCollapse.show .card {
    animation: slideDown 0.3s ease-out;
}

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

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Modern Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    min-width: 350px;
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.danger {
    border-left: 4px solid #dc3545;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

.toast-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px 15px 0 0;
    padding: 12px 15px;
}

.toast-body {
    padding: 15px;
    font-weight: 500;
}

/* Modern Modal Styling */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.98);
    pointer-events: auto;
    z-index: 1056;
    position: relative;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    pointer-events: auto;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
    pointer-events: auto;
}

.modal-body {
    padding: 25px;
    pointer-events: auto;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 20px 25px;
    border-radius: 0 0 20px 20px;
    pointer-events: auto;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    opacity: 1;
    pointer-events: auto;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    pointer-events: auto;
}

/* Modern Confirm Dialog */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1070;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirm-dialog.show {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog .dialog-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    padding: 0;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-dialog.show .dialog-content {
    transform: scale(1);
}

.confirm-dialog .dialog-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 20px 20px 0 0;
    text-align: center;
}

.confirm-dialog .dialog-body {
    padding: 25px;
    text-align: center;
}

.confirm-dialog .dialog-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Form styling in modals */
.modal .form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.modal .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
    pointer-events: auto;
}

.modal .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.modal .btn {
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.modal input, .modal textarea, .modal select {
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

/* Animation for modal appearance */
.modal.fade .modal-dialog {
    transform: scale(0.9);
    transition: transform 0.3s ease-out;
    pointer-events: auto;
}

.modal.show .modal-dialog {
    transform: scale(1);
    pointer-events: auto;
}

.modal-dialog {
    pointer-events: auto;
    z-index: 1055;
}

.modal {
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1050;
}

/* Ensure all interactive elements in modal work */
.modal * {
    pointer-events: auto;
}

/* Specific fix for form elements */
.modal input:focus,
.modal textarea:focus,
.modal select:focus {
    outline: none;
    pointer-events: auto;
}

/* Force pointer events on modal elements */
.modal-open .modal {
    pointer-events: auto;
}

.modal-open .modal-dialog {
    pointer-events: auto;
}

.modal-open .modal-content {
    pointer-events: auto;
}

/* Ensure Bootstrap modal backdrop doesn't interfere */
.modal-backdrop.show {
    pointer-events: none;
}

.modal-backdrop.show::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* Critical fix for modal interaction */
.modal.show {
    pointer-events: auto !important;
}

.modal.show .modal-dialog {
    pointer-events: auto !important;
}

.modal.show .modal-content {
    pointer-events: auto !important;
}

.modal.show .modal-header {
    pointer-events: auto !important;
}

.modal.show .modal-body {
    pointer-events: auto !important;
}

.modal.show .modal-footer {
    pointer-events: auto !important;
}

.modal.show input,
.modal.show textarea,
.modal.show select,
.modal.show button {
    pointer-events: auto !important;
}

/* Override any conflicting styles */
.modal * {
    pointer-events: auto !important;
}

/* Ultimate fix for modal interaction issues */
.modal.show {
    z-index: 1060 !important;
}

.modal.show .modal-dialog {
    z-index: 1061 !important;
}

.modal.show .modal-content {
    z-index: 1062 !important;
}

/* Ensure form elements are clickable */
.modal input,
.modal textarea,
.modal select,
.modal button,
.modal label,
.modal .form-control,
.modal .btn {
    cursor: auto !important;
    pointer-events: auto !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Fix for backdrop-filter interference */
.modal-content {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.98) !important;
}

/* Clean modal backdrop - solid color, no blur effects */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1040 !important;
}

/* Ensure modal content is above backdrop and completely clear */
.modal.show {
    z-index: 1055 !important;
}

.modal.show .modal-dialog {
    z-index: 1056 !important;
    position: relative !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -o-filter: none !important;
    -ms-filter: none !important;
}

.modal.show .modal-content {
    z-index: 1057 !important;
    position: relative !important;
    background: rgb(255, 255, 255) !important;
    background-color: rgb(255, 255, 255) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -o-filter: none !important;
    -ms-filter: none !important;
    opacity: 1 !important;
    isolation: isolate !important;
}

/* Ensure modal content is crystal clear */
.modal-content,
.modal-content *,
.modal-content::before,
.modal-content::after,
.modal-header,
.modal-body,
.modal-footer {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    transform: none !important;
    -webkit-transform: none !important;
}

/* Specific override for any inherited blur effects */
.modal .modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal.show .modal-content {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* Nuclear option - override ALL possible blur/filter effects on ENTIRE MODAL */
.modal,
.modal *,
.modal::before,
.modal::after,
.modal-dialog,
.modal-dialog *,
.modal-content,
.modal-content *,
.modal-content::before,
.modal-content::after,
.modal-header,
.modal-header *,
.modal-body,
.modal-body *,
.modal-footer,
.modal-footer *,
.modal-title,
.modal .form-control,
.modal .btn,
.modal input,
.modal textarea,
.modal select,
.modal label,
.modal.show,
.modal.show *,
.modal.show .modal-dialog,
.modal.show .modal-content,
.modal.show .modal-header,
.modal.show .modal-body,
.modal.show .modal-footer {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -o-filter: none !important;
    -ms-filter: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
}

/* FORCE SOLID WHITE BACKGROUND - NO TRANSPARENCY */
.modal-content {
    background: rgb(255, 255, 255) !important;
    background-color: rgb(255, 255, 255) !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: transparent !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal-body {
    background: transparent !important;
    background-color: transparent !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal-footer {
    background: transparent !important;
    background-color: transparent !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal-dialog {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* Statistics styling */
.stat-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-left: 3px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
    .main-content {
        padding: 10px; /* Reduce padding on mobile */
        margin-top: 10px;
    }
    
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .table th, .table td {
        padding: 8px 5px; /* Reduce table cell padding */
        font-size: 0.85rem; /* Smaller font size for table */
        white-space: nowrap; /* Prevent wrapping to keep rows aligned */
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    /* Adjust filter toolbar on mobile */
    .input-group {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    #dashboardDataLimit, #dashboardTimeRange {
        width: 48% !important; /* Split width for selects */
    }
    
    #searchBtn, #exportReportBtn {
        width: 100%; /* Full width buttons */
        margin-bottom: 5px;
    }
    
    /* Fix chart height on mobile */
    .chart-container {
        height: 250px;
    }
}

.stat-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px 10px;
    margin-bottom: 10px;
    border-left: 3px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-item i {
    width: 20px;
    text-align: center;
    margin-bottom: 8px;
}

.stat-item h4, .stat-item h5 {
    font-weight: bold;
    margin: 0;
}

.stat-item small {
    color: #6c757d;
    font-size: 0.8rem;
}