:root {
    --sidebar-width: 260px;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --surface: #f8fafc;
    --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--surface);
    color: #1e293b;
    margin: 0;
    overflow-x: hidden;
}

.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: transform 0.25s ease-in-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.sidebar-brand i { color: #60a5fa; font-size: 1.4rem; }

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    padding: 0.65rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 2px;
    font-size: 0.92rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(37, 99, 235, 0.2);
    color: #fff;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-mini .avatar {
    width: 40px; height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.user-mini small { display: block; color: var(--sidebar-text); }

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    transition: margin-left 0.25s ease-in-out;
}

.topbar {
    background: #fff;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}

.page-heading {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.content-area { padding: 1.5rem; }

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
    height: 100%;
}

.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label { color: #64748b; font-size: 0.875rem; }

.card-panel {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.card-panel .card-header {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-panel .card-body { padding: 1.25rem; }

.table-responsive {
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth horizontal scrolling */
    scroll-behavior: smooth;
    /* Prevent text clipping */
    white-space: nowrap;
}

.table-responsive table {
    min-width: 100%;
    /* Ensure table doesn't shrink below content */
    width: max-content;
}

/* Ensure table cells don't wrap text on mobile */
.table-responsive th,
.table-responsive td {
    white-space: nowrap;
    /* Prevent text clipping */
    overflow: visible;
    /* Ensure minimum width for readability */
    min-width: 80px;
}

/* Special handling for longer columns */
.table-responsive th:first-child,
.table-responsive td:first-child {
    min-width: 150px; /* For names/student info */
}

.table-responsive th:nth-child(2),
.table-responsive td:nth-child(2) {
    min-width: 120px; /* For fee types/classes */
}

.badge-status-present { background: #dcfce7; color: #166534; }
.badge-status-absent { background: #fee2e2; color: #991b1b; }
.badge-status-late { background: #fef3c7; color: #92400e; }

.notification-badge {
    position: absolute;
    top: -4px; right: -4px;
    font-size: 0.65rem;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    padding: 1.5rem;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.auth-logo {
    width: 56px; height: 56px;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-logo-img {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.75rem;
}

.school-logo {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-form .form-control {
    width: 100%;
}

.auth-form .btn {
    width: 100%;
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.sidebar-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* Mobile First Responsive Design */

/* Extra Small Devices (phones, 320px and up) */
@media (min-width: 320px) {
    .content-area { padding: 0.75rem; }
    .stat-card { padding: 0.875rem; }
    .card-panel .card-body { padding: 0.875rem; }
    .card-panel .card-header { padding: 0.75rem 0.875rem; }
    
    .stat-card .stat-value { font-size: 1.4rem; }
    .page-heading { font-size: 1rem; }
    .topbar { padding: 0.75rem 1rem; }
    
    /* Responsive Tables for Mobile */
    .table-responsive {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin: 0 -0.75rem;
        width: calc(100% + 1.5rem);
    }
    
    .table-responsive table {
        font-size: 0.8125rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.375rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Card-based table view for very small screens */
    .table-mobile-view {
        display: none;
    }
    
    /* Responsive Auth Card */
    .auth-card {
        padding: 1.5rem;
        max-width: 420px;
        width: calc(100% - 24px);
    }

    .auth-logo {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .school-logo {
        max-width: 75px;
        max-height: 75px;
    }

    .auth-footer {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }

    .auth-page {
        padding: 0.75rem;
    }
    
    /* Responsive Sidebar */
    .sidebar-brand {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .sidebar-nav {
        padding: 0.75rem 0.5rem;
    }
    
    .sidebar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        gap: 0.5rem;
    }
    
    .sidebar-footer {
        padding: 0.75rem 1rem;
    }
    
    .user-mini .avatar {
        width: 36px;
        height: 36px;
    }
    
    /* Touch-friendly targets */
    .btn,
    .nav-link,
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    /* Responsive Stat Cards */
    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Small Devices (landscape phones, 375px and up) */
@media (min-width: 375px) {
    .content-area { padding: 1rem; }
    .stat-card { padding: 1rem; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .page-heading { font-size: 1.1rem; }
    .auth-card { padding: 1.75rem; max-width: 420px; width: calc(100% - 32px); }
    .school-logo { max-width: 85px; max-height: 85px; }

    .table-responsive {
        margin: 0 -1rem;
        width: calc(100% + 2rem);
    }
}

/* Medium Small Devices (large phones, 425px and up) */
@media (min-width: 425px) {
    .content-area { padding: 1.25rem; }
    .stat-card { padding: 1.125rem; }
    .stat-card .stat-value { font-size: 1.6rem; }
    .page-heading { font-size: 1.15rem; }
    .auth-card { padding: 1.75rem; max-width: 420px; width: calc(100% - 32px); }
    .school-logo { max-width: 90px; max-height: 90px; }
    
    .table-responsive {
        margin: 0;
        width: 100%;
    }
    
    .table-responsive table {
        font-size: 0.875rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem 0.625rem;
    }
    
    .stat-card .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
}

/* Tablets (768px and up) */
@media (min-width: 768px) {
    .content-area { padding: 1.5rem; }
    .stat-card { padding: 1.25rem; }
    .card-panel .card-body { padding: 1.25rem; }
    .card-panel .card-header { padding: 1rem 1.25rem; }
    
    .stat-card .stat-value { font-size: 1.75rem; }
    .page-heading { font-size: 1.25rem; }
    .topbar { flex-wrap: nowrap; padding: 0.85rem 1.5rem; }
    
    .sidebar-brand { padding: 1.25rem 1.5rem; font-size: 1.15rem; }
    .sidebar-nav { padding: 1rem 0.75rem; }
    .sidebar-nav .nav-link { padding: 0.65rem 1rem; font-size: 0.92rem; }
    .sidebar-footer { padding: 1rem 1.25rem; }

    .auth-card { padding: 1.75rem; max-width: 420px; }
    .school-logo { max-width: 95px; max-height: 95px; }
    
    .table-responsive table { font-size: 0.9375rem; }
    .table-responsive th,
    .table-responsive td { padding: 0.625rem 0.75rem; }
    
    .stat-card .stat-icon { width: 48px; height: 48px; font-size: 1.4rem; }
    
    .user-mini .avatar { width: 40px; height: 40px; }
}

/* Laptops (1024px and up) */
@media (min-width: 1024px) {
    .content-area { padding: 2rem; }
    .table-responsive table { font-size: 1rem; }
    .table-responsive th,
    .table-responsive td { padding: 0.75rem 1rem; }
    .auth-card { max-width: 420px; }
    .school-logo { max-width: 100px; max-height: 100px; }
}

/* Desktops (1200px and up) */
@media (min-width: 1200px) {
    .content-area { padding: 2rem; }
    .stat-card .stat-value { font-size: 1.875rem; }
    .auth-card { max-width: 420px; }
    .school-logo { max-width: 100px; max-height: 100px; }
}

/* Large Desktops (1440px and up) */
@media (min-width: 1440px) {
    .content-area { padding: 2.5rem; }
}

/* Extra Large Desktops (1920px and up) */
@media (min-width: 1920px) {
    .content-area { padding: 3rem; }
    .stat-card .stat-value { font-size: 2rem; }
    .page-heading { font-size: 1.5rem; }
    
    .sidebar { width: 280px; }
    .main-content { margin-left: 280px; }
    :root { --sidebar-width: 280px; }
}

/* Mobile Sidebar Toggle */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    
    .sidebar-overlay {
        display: block;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: none;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    /* Ensure sidebar links are touch-friendly on mobile */
    .sidebar-nav .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
    }
    
    /* Ensure sidebar toggle button is touch-friendly */
    .sidebar-toggle {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
    }
    
    /* Quick Actions buttons for mobile */
    .card-panel .card-body .row.g-2 .col-4 .btn {
        min-height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
        font-size: 0.75rem;
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
    }
    
    .card-panel .card-body .row.g-2 .col-4 .btn i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    /* Stat card action buttons on mobile */
    .stat-card .btn {
        min-height: 36px;
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
    }
}

/* Responsive Tables */
@media (max-width: 767.98px) {
    .table-responsive {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin: 0 -0.75rem;
        width: calc(100% + 1.5rem);
        /* Ensure horizontal scrolling is enabled */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .table-responsive table {
        font-size: 0.8125rem;
        /* Ensure table doesn't shrink */
        width: max-content;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem 0.75rem;
        /* Prevent text wrapping */
        white-space: nowrap;
        /* Prevent text clipping */
        overflow: visible;
        /* Minimum width for readability */
        min-width: 80px;
    }
    
    /* Ensure first column (names) has enough space */
    .table-responsive th:first-child,
    .table-responsive td:first-child {
        min-width: 140px;
    }
    
    /* Ensure second column (fee types/classes) has enough space */
    .table-responsive th:nth-child(2),
    .table-responsive td:nth-child(2) {
        min-width: 110px;
    }
    
    /* DO NOT hide columns - allow horizontal scrolling instead */
    /* .table-responsive .hide-mobile,
    .table-responsive .d-none-mobile {
        display: none;
    } */
    
    /* Stack action buttons vertically */
    .table-responsive .btn-group {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .table-responsive .btn-group .btn {
        width: 100%;
    }
    
    /* Card-style table for mobile */
    .table-responsive.table-card-view {
        display: block;
    }
    
    .table-responsive.table-card-view thead {
        display: none;
    }
    
    .table-responsive.table-card-view tbody,
    .table-responsive.table-card-view tr,
    .table-responsive.table-card-view td {
        display: block;
        width: 100%;
    }
    
    .table-responsive.table-card-view tr {
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 0.75rem;
        background: #fff;
    }
    
    .table-responsive.table-card-view td {
        text-align: left;
        padding: 0.5rem 0;
        border: none;
        position: relative;
        padding-left: 50%;
    }
    
    .table-responsive.table-card-view td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 1rem;
        white-space: nowrap;
        font-weight: 600;
        color: #64748b;
    }
}

/* Responsive Forms */
@media (max-width: 767.98px) {
    .form-row,
    .row > .col-md-6,
    .row > .col-md-4,
    .row > .col-md-3,
    .row > .col-lg-4,
    .row > .col-lg-3 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .form-control,
    .form-select {
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }
    
    .form-check-input {
        width: 1.25em;
        height: 1.25em;
    }
    
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-body {
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
    
    /* Responsive input groups */
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-control,
    .input-group .input-group-text {
        width: 100%;
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
    
    .input-group .form-control:last-child,
    .input-group .input-group-text:last-child {
        margin-bottom: 0;
    }
}

/* Responsive Modals */
@media (max-width: 575.98px) {
    .modal-xl,
    .modal-lg,
    .modal-md {
        max-width: 100%;
        margin: 0;
    }
    
    .modal-content {
        border-radius: 0;
        height: 100vh;
        max-height: 100vh;
    }
    
    .modal-body {
        flex: 1;
        overflow-y: auto;
    }
}

/* Responsive Dashboard Cards */
@media (max-width: 575.98px) {
    .row.g-3 > .col,
    .row.g-3 > .col-md-3,
    .row.g-3 > .col-md-4,
    .row.g-3 > .col-md-6,
    .row.g-3 > .col-lg-3,
    .row.g-3 > .col-lg-4 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .row.g-3 {
        row-gap: 0.75rem;
    }
}

/* Responsive Buttons */
@media (max-width: 767.98px) {
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        min-height: 36px;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    /* Stack buttons in groups */
    .btn-group-vertical-mobile .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group-vertical-mobile .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .btn-group-vertical-mobile .btn:last-child {
        margin-bottom: 0;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .topbar,
    .btn,
    .sidebar-toggle,
    .sidebar-overlay {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card-panel {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .table-responsive {
        overflow: visible;
    }
}

.progress-thin { height: 6px; }

/* Additional Responsive Utilities */
@media (max-width: 767.98px) {
    /* Responsive alerts */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .alert .btn-close {
        padding: 0.5rem;
    }
    
    /* Responsive badges */
    .badge {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Responsive dropdowns */
    .dropdown-menu {
        min-width: 200px;
        font-size: 0.875rem;
    }
    
    .dropdown-item {
        padding: 0.5rem 0.75rem;
    }
    
    /* Responsive tabs */
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Responsive cards */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Responsive breadcrumbs */
    .breadcrumb {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Responsive tooltips */
    .tooltip-inner {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Responsive accordion */
    .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .accordion-body {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Responsive list groups */
    .list-group-item {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
    
    /* Responsive cards with images */
    .card-img-top {
        height: auto;
        max-height: 200px;
        object-fit: cover;
    }
    
    /* Responsive spacing utilities */
    .mb-3 { margin-bottom: 1rem !important; }
    .mb-4 { margin-bottom: 1.25rem !important; }
    .mb-5 { margin-bottom: 1.5rem !important; }
    .mt-3 { margin-top: 1rem !important; }
    .mt-4 { margin-top: 1.25rem !important; }
    .mt-5 { margin-top: 1.5rem !important; }
    .p-3 { padding: 1rem !important; }
    .p-4 { padding: 1.25rem !important; }
    .p-5 { padding: 1.5rem !important; }
    
    /* Responsive flex utilities */
    .d-md-flex {
        flex-direction: column !important;
    }
    
    .d-md-flex > * {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Responsive grid */
    .container,
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Responsive text alignment */
    .text-md-end {
        text-align: left !important;
    }
    
    .text-md-center {
        text-align: left !important;
    }
    
    /* Responsive visibility */
    .d-md-block {
        display: none !important;
    }
    
    .d-md-none {
        display: block !important;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 767.98px) and (orientation: landscape) {
    .auth-card {
        padding: 1.5rem;
        max-width: 90%;
    }
    
    .sidebar-nav {
        max-height: calc(100vh - 200px);
    }
    
    .modal-body {
        max-height: calc(100vh - 250px);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .auth-logo,
    .stat-icon,
    .user-mini .avatar {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Dark mode support preparation */
@media (prefers-color-scheme: dark) {
    /* This is a placeholder for future dark mode implementation */
    /* Current design remains unchanged as per requirements */
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print optimizations */
@media print {
    .sidebar,
    .topbar,
    .btn,
    .sidebar-toggle,
    .sidebar-overlay,
    .notification-badge,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card-panel {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }
    
    .table-responsive {
        overflow: visible;
    }
    
    .stat-card {
        page-break-inside: avoid;
    }
    
    .content-area {
        padding: 0 !important;
    }
    
    body {
        background: #fff;
        color: #000;
    }
}

/* Responsive Search and Filter Bars */
@media (max-width: 767.98px) {
    .search-bar,
    .filter-bar,
    .d-flex.align-items-center {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch !important;
    }
    
    .search-bar input,
    .filter-bar select,
    .filter-bar input,
    .search-bar .form-control,
    .filter-bar .form-control,
    .filter-bar .form-select {
        width: 100%;
    }
    
    .search-bar .btn,
    .filter-bar .btn {
        width: 100%;
    }
    
    /* Responsive card actions */
    .card-header .d-flex {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch !important;
    }
    
    .card-header .btn {
        width: 100%;
    }
}

/* Responsive Pagination */
@media (max-width: 767.98px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .pagination .page-item {
        margin: 0;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.8125rem;
        min-width: 36px;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Responsive Charts */
@media (max-width: 767.98px) {
    .chart-container {
        height: 250px;
    }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    .chart-container {
        height: 300px;
    }
}

/* Responsive Profile Pages */
@media (max-width: 767.98px) {
    .profile-header,
    .d-flex.align-items-center.profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-avatar {
        margin: 0 auto 1rem;
    }
    
    .profile-stats,
    .d-flex.profile-stats {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .profile-stats .stat-card {
        width: 100%;
    }
}

/* Responsive Report Cards */
@media (max-width: 767.98px) {
    .report-card {
        padding: 1rem;
    }
    
    .report-card .report-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .report-card .report-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .report-card .report-actions .btn {
        width: 100%;
    }
}

/* Responsive Announcements */
@media (max-width: 767.98px) {
    .announcement-card {
        padding: 1rem;
    }
    
    .announcement-card .announcement-meta,
    .d-flex.announcement-meta {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start !important;
    }
    
    .announcement-card .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start !important;
    }
}

/* Responsive Settings */
@media (max-width: 767.98px) {
    .settings-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .settings-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .settings-content {
        width: 100%;
    }
}
