/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: #343a40;
    /* Dark Sidebar */
    height: 100vh;
    position: sticky;
    top: 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar h4 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 12px 20px;
    margin-bottom: 5px;
    display: block;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar a.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    /* Slightly lighter background for active */
    border-left-color: #0dcaf0;
    /* Cyan accent */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .d-flex {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    .sidebar.show {
        left: 0;
    }

    /* Overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .flex-grow-1 {
        width: 100%;
        margin-left: 0 !important;
    }
}

/* Print Styles */
@media print {
    @page {
        margin: 1cm;
        size: auto;
    }

    /* Hide non-printable elements */
    .sidebar,
    .btn,
    .no-print,
    #filterForm,
    .mobile-toggle,
    iframe {
        display: none !important;
    }

    /* Reset Layout for Print */
    .d-flex {
        display: block !important;
    }

    .flex-grow-1 {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    .container-fluid {
        padding: 0 !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    /* Hide Summary Cards as requested ("dont show this type 11000") */
    /* Assuming the summary cards are in the first .row of the content */
    .row.mb-4:has(.card.bg-success),
    .row.mb-4:has(.card.text-success) {
        display: none !important;
    }

    /* Fallback if :has not supported fully in print engine (Chromium is consistent) */
    /* Alternatively, we can add a 'no-print' class to the row in HTML */

    /* Ensure table is visible */
    .table-responsive {
        overflow: visible !important;
    }
}

/* Stat Card Updates */
.stat-card-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem !important;
}

.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.3);
    /* 30% Opacity Background */
    border-radius: 50%;
    /* Encircle */
    margin-bottom: 1rem;
    font-size: 2.5rem;
    /* Big Icon */
    color: #fff;
}

/* Main Content Area */
.flex-grow-1 {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 8px;
    /* Slightly smaller radius */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    background-color: #fff;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Stat Cards - Solid Colors from Image */
.card.bg-success {
    background-color: #198754 !important;
    /* Green */
}

.card.bg-danger {
    background-color: #dc3545 !important;
    /* Red */
}

.card.bg-info {
    background-color: #0dcaf0 !important;
    /* Cyan */
}

.card.text-white h3 {
    font-weight: 700;
}

/* Quick Actions Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 10px 20px;
}

.btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Specific Quick Action Outline Overrides if needed */
.btn-outline-success {
    border-color: #198754;
    color: #198754;
}

.btn-outline-success:hover {
    background-color: #198754;
    color: #fff;
}

.btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    color: #fff;
}

.btn-outline-info {
    border-color: #0dcaf0;
    color: #0dcaf0;
}

.btn-outline-info:hover {
    background-color: #0dcaf0;
    color: #fff;
}

.btn-outline-warning {
    border-color: #ffc107;
    color: #ffc107;
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    color: #000;
}


/* Table Styling */
.table thead {
    background-color: #f8f9fa;
    color: #212529;
    font-weight: 600;
}

.table th {
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100% !important;
        height: auto;
        position: relative;
    }
}