:root {
    font-size: 68%;
    /* 10px on default */

    /* start of light mode */
    --text-color: #0F172A;
    --text-hover: #0f172acb;
    --text-hover2: #dfdfdf;
    --text-color2: #606060;


    --background-color: #F8F9FA;
    --background-color2: #DEE2E6;
    --border-color: #CCCCCC;


    --color1: #EB5704;
    /* dominant color */
    --color1b: #b54200;
    --color2: #EBB009;
    --color2b: #c18f05;
    --color3: #0F172A;
    --color3b: #1E293B;
    --color4: #F8FAFC;
    --color5: rgb(0, 0, 170);
    --color6: red;
    --color-redb:#e70000b8;
    --color6b: rgba(255, 0, 0, 0.79);


    /* end of light */

    --button-bg: #0F172A;
    --button-text: #F8FAFC;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: "Roboto Flex", serif;
}



/* Dark mode styles */
.dark-mode {

    --text-color: #f5f5f5;
    --text-hover: #a1a1a1cb;
    --text-hover2: #494949;
    --text-color2: #b6b6b6;

    --background-color: #0F172A;
    --background-color2: #070b14;
    --border-color: #696969;


    --color1: #EB5704;
    /* dominant color */
    --color1b: #b54200;
    --color2: #EBB009;
    --color2b: #c18f05;
    --color3: #495057;
    --color3b: #374a68;
    --color4: #0F172A;
    --color5: rgb(0, 0, 170);
    --color6: red;
    --color6b: rgba(255, 0, 0, 0.741);

  
}

/* --- Student Medicines Section --- */
.medicines-section {
    margin: 2em 0;
    padding: 1em;
    background: #f7fafd;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.medicine-list-student {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.medicine-card-student {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    width: 220px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.medicine-card-student img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}
.medicine-card-student h4 {
    margin: 0.5em 0 0.2em 0;
    color: #1976d2;
    font-size: 1.1em;
}
.medicine-card-student p {
    font-size: 0.97em;
    color: #555;
    margin: 0.2em 0;
}
.medicine-card-student form {
    margin-top: 8px;
    display: flex;
    gap: 7px;
    justify-content: center;
}
.medicine-card-student input[type='number'] {
    width: 55px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}
.medicine-card-student button {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.2s;
}
.medicine-card-student button:hover {
    background: #125ea8;
}
.medicine-requests-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.medicine-requests-table th, .medicine-requests-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}
.medicine-requests-table th {
    background: #1976d2;
    color: #fff;
}
.medicine-requests-table tr:last-child td {
    border-bottom: none;
}
.medicine-requests-student p {
    color: #c62828;
    margin-top: 1em;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-color2);
    display: flex;
    /* background-color: #F8FAFC;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25'%3E%3Cdefs%3E%3ClinearGradient id='a' gradientUnits='userSpaceOnUse' x1='0' x2='0' y1='0' y2='100%25' gradientTransform='rotate(0,768,367)'%3E%3Cstop offset='0' stop-color='%23F8FAFC'/%3E%3Cstop offset='1' stop-color='%23F4F4F9'/%3E%3C/linearGradient%3E%3Cpattern patternUnits='userSpaceOnUse' id='b' width='300' height='250' x='0' y='0' viewBox='0 0 1080 900'%3E%3Cg fill-opacity='0.03'%3E%3Cpolygon fill='%23444' points='90 150 0 300 180 300'/%3E%3Cpolygon points='90 150 180 0 0 0'/%3E%3Cpolygon fill='%23AAA' points='270 150 360 0 180 0'/%3E%3Cpolygon fill='%23DDD' points='450 150 360 300 540 300'/%3E%3Cpolygon fill='%23999' points='450 150 540 0 360 0'/%3E%3Cpolygon points='630 150 540 300 720 300'/%3E%3Cpolygon fill='%23DDD' points='630 150 720 0 540 0'/%3E%3Cpolygon fill='%23444' points='810 150 720 300 900 300'/%3E%3Cpolygon fill='%23FFF' points='810 150 900 0 720 0'/%3E%3Cpolygon fill='%23DDD' points='990 150 900 300 1080 300'/%3E%3Cpolygon fill='%23444' points='990 150 1080 0 900 0'/%3E%3Cpolygon fill='%23DDD' points='90 450 0 600 180 600'/%3E%3Cpolygon points='90 450 180 300 0 300'/%3E%3Cpolygon fill='%23666' points='270 450 180 600 360 600'/%3E%3Cpolygon fill='%23AAA' points='270 450 360 300 180 300'/%3E%3Cpolygon fill='%23DDD' points='450 450 360 600 540 600'/%3E%3Cpolygon fill='%23999' points='450 450 540 300 360 300'/%3E%3Cpolygon fill='%23999' points='630 450 540 600 720 600'/%3E%3Cpolygon fill='%23FFF' points='630 450 720 300 540 300'/%3E%3Cpolygon points='810 450 720 600 900 600'/%3E%3Cpolygon fill='%23DDD' points='810 450 900 300 720 300'/%3E%3Cpolygon fill='%23AAA' points='990 450 900 600 1080 600'/%3E%3Cpolygon fill='%23444' points='990 450 1080 300 900 300'/%3E%3Cpolygon fill='%23222' points='90 750 0 900 180 900'/%3E%3Cpolygon points='270 750 180 900 360 900'/%3E%3Cpolygon fill='%23DDD' points='270 750 360 600 180 600'/%3E%3Cpolygon points='450 750 540 600 360 600'/%3E%3Cpolygon points='630 750 540 900 720 900'/%3E%3Cpolygon fill='%23444' points='630 750 720 600 540 600'/%3E%3Cpolygon fill='%23AAA' points='810 750 720 900 900 900'/%3E%3Cpolygon fill='%23666' points='810 750 900 600 720 600'/%3E%3Cpolygon fill='%23999' points='990 750 900 900 1080 900'/%3E%3Cpolygon fill='%23999' points='180 0 90 150 270 150'/%3E%3Cpolygon fill='%23444' points='360 0 270 150 450 150'/%3E%3Cpolygon fill='%23FFF' points='540 0 450 150 630 150'/%3E%3Cpolygon points='900 0 810 150 990 150'/%3E%3Cpolygon fill='%23222' points='0 300 -90 450 90 450'/%3E%3Cpolygon fill='%23FFF' points='0 300 90 150 -90 150'/%3E%3Cpolygon fill='%23FFF' points='180 300 90 450 270 450'/%3E%3Cpolygon fill='%23666' points='180 300 270 150 90 150'/%3E%3Cpolygon fill='%23222' points='360 300 270 450 450 450'/%3E%3Cpolygon fill='%23FFF' points='360 300 450 150 270 150'/%3E%3Cpolygon fill='%23444' points='540 300 450 450 630 450'/%3E%3Cpolygon fill='%23222' points='540 300 630 150 450 150'/%3E%3Cpolygon fill='%23AAA' points='720 300 630 450 810 450'/%3E%3Cpolygon fill='%23666' points='720 300 810 150 630 150'/%3E%3Cpolygon fill='%23FFF' points='900 300 810 450 990 450'/%3E%3Cpolygon fill='%23999' points='900 300 990 150 810 150'/%3E%3Cpolygon points='0 600 -90 750 90 750'/%3E%3Cpolygon fill='%23666' points='0 600 90 450 -90 450'/%3E%3Cpolygon fill='%23AAA' points='180 600 90 750 270 750'/%3E%3Cpolygon fill='%23444' points='180 600 270 450 90 450'/%3E%3Cpolygon fill='%23444' points='360 600 270 750 450 750'/%3E%3Cpolygon fill='%23999' points='360 600 450 450 270 450'/%3E%3Cpolygon fill='%23666' points='540 600 630 450 450 450'/%3E%3Cpolygon fill='%23222' points='720 600 630 750 810 750'/%3E%3Cpolygon fill='%23FFF' points='900 600 810 750 990 750'/%3E%3Cpolygon fill='%23222' points='900 600 990 450 810 450'/%3E%3Cpolygon fill='%23DDD' points='0 900 90 750 -90 750'/%3E%3Cpolygon fill='%23444' points='180 900 270 750 90 750'/%3E%3Cpolygon fill='%23FFF' points='360 900 450 750 270 750'/%3E%3Cpolygon fill='%23AAA' points='540 900 630 750 450 750'/%3E%3Cpolygon fill='%23FFF' points='720 900 810 750 630 750'/%3E%3Cpolygon fill='%23222' points='900 900 990 750 810 750'/%3E%3Cpolygon fill='%23222' points='1080 300 990 450 1170 450'/%3E%3Cpolygon fill='%23FFF' points='1080 300 1170 150 990 150'/%3E%3Cpolygon points='1080 600 990 750 1170 750'/%3E%3Cpolygon fill='%23666' points='1080 600 1170 450 990 450'/%3E%3Cpolygon fill='%23DDD' points='1080 900 1170 750 990 750'/%3E%3C/g%3E%3C/pattern%3E%3C/defs%3E%3Crect x='0' y='0' fill='url(%23a)' width='100%25' height='100%25'/%3E%3Crect x='0' y='0' fill='url(%23b)' width='100%25' height='100%25'/%3E%3C/svg%3E");
    background-attachment: fixed;
    background-size: cover;
 }


}

button,
a {
    cursor: pointer;
    color: var(--text-color);

}

.gradient-text {
    background-image: linear-gradient(to right, #EB5704, #f7971e, #EB5704);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}



/* Scrollbar width */
::-webkit-scrollbar {
    width: 10px;
}

/* Scrollbar track (background) */
::-webkit-scrollbar-track {
    background: var(--background-color);

}

/* Scrollbar handle */
::-webkit-scrollbar-thumb {
    background: var(--color3b);

}

/* Scrollbar handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--color1), var(--color2));
}








/* input, select and textarea */

textarea {
    padding: 5px;
    color: var(--text-color);
    background-color: var(--background-color2);
    border: 0;
    border-bottom: 1px solid var(--border-color);

}

textarea:focus {
    background-color: var(--background-color2);
    color: var(--color1);
    border: 0;
    border-bottom: 1px solid var(--color1);
    outline: none;
}

input,
select {

    padding: 8px;
    color: var(--text-color);
    background-color: var(--background-color2);
    border: 0;
    border-bottom: 1px solid var(--border-color)
}

input:focus,
select:focus {
    background-color: var(--background-color2);
    color: var(--color1);
    border: 0;
    border-bottom: 1px solid var(--color1);
    outline: none;
}


















/* table */

table tbody tr:nth-child(even) {
    background-color: var(--background-color);
    /* Alternate row color */
}

table tbody tr:nth-child(odd) {
    background-color: var(--background-color2);
}

/* Default row color */
th,
td {
    border: 1px solid var(--border-color);
    padding: 10px;
    /* Add more padding for better spacing */
    text-align: left;
    font-size: 1.08rem;
    /* Adjust font size for readability */
    vertical-align: middle;
    /* Align content vertically */
}

td{
    border-left: 0;
    border-right: 0;
}

table th {
    background-color: var(--color3b);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    /* Uppercase headers */
    letter-spacing: 0.05em;
    /* Add slight spacing for headers */
    position: sticky;
    /* Keep headers visible during scroll */
    top: 0;
    z-index: 1;
}

tbody tr:nth-child(even) {
    background-color: var(--background-color);
    /* Alternate row color */
}

tbody tr:nth-child(odd) {
    /* Default row color */
    background-color: var(--background-color);
}

table td {
    color: var(--text-color);
    word-wrap: break-word;
    /* Wrap long text */
    max-width: 200px;
    /* Limit cell width */
    overflow: hidden;
    text-overflow: ellipsis;
    /* Add ellipsis for overflow text */
}

body, .main-content, .content {
    font-size: 1.07rem;
}

.vital-record table th, .vital-record table td {
    font-size: 1.02rem;
    padding: 10px 12px;
}

/* Responsive Styles for All Admin Pages */

/* Large Tablet/Small Desktop */
@media (max-width: 1200px) {
    :root {
        font-size: 62%;
    }
    table th, table td, .table th, .table td {
        font-size: 0.98rem;
        padding: 9px 10px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    :root {
        font-size: 60%;
    }
    
    main {
        padding: 15px;
    }
    
    table th, table td, .table th, .table td {
        font-size: 0.95rem;
        padding: 8px 8px;
    }
}

/* Mobile Landscape / Small Tablet */
@media (max-width: 800px) {
    :root {
        font-size: 58%;
    }
    
    main {
        padding: 12px;
    }
    
    table th, table td, .table th, .table td {
        font-size: 0.92rem;
        padding: 7px 6px;
    }
    
    /* Make tables scrollable */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Mobile Portrait */
@media (max-width: 768px) {
    :root {
        font-size: 56%;
    }
    
    main {
        padding: 10px;
    }
    
    table th, table td, .table th, .table td {
        font-size: 0.88rem;
        padding: 6px 5px;
    }
    
    /* Stack form elements */
    form {
        display: flex;
        flex-direction: column;
    }
    
    input, select, textarea {
        width: 100% !important;
        margin-bottom: 10px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    :root {
        font-size: 54%;
    }
    
    main {
        padding: 8px;
    }
    
    table th, table td, .table th, .table td {
        font-size: 0.85rem;
        padding: 5px 4px;
    }
    
    button, .btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    :root {
        font-size: 52%;
    }
    
    main {
        padding: 5px;
    }
    
    table th, table td, .table th, .table td {
        font-size: 0.82rem;
        padding: 4px 3px;
    }
}

/* Fix z-index layering and layout for admin panel */
nav, .side-nav, .sidebar {
    z-index: 100 !important;
    position: relative;
}

main, .main-content {
    z-index: 1 !important;
    position: relative;
    max-width: 100%;
    overflow-x: hidden;
}

.table-responsive {
    z-index: 1 !important;
    position: relative;
    max-width: 100%;
    overflow-x: auto;
}

table, .table {
    z-index: 1 !important;
    position: relative;
}

.students-list {
    max-width: 100%;
    overflow-x: auto;
}

/* Additional Admin Panel Responsive Fixes */

/* Dashboard cards and widgets */
.dashboard-cards, .stats-container, .card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

@media (max-width: 768px) {
    .dashboard-cards, .stats-container, .card-container {
        grid-template-columns: 1fr;
    }
}

/* Action buttons */
.action-buttons, .button-group, .action-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 768px) {
    .action-buttons, .button-group, .action-buttons-container {
        flex-direction: column;
    }
    
    .action-buttons button,
    .button-group button,
    .action-buttons-container button {
        width: 100%;
    }
}

/* Search and filter containers */
.search-filter-container, .filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .search-filter-container, .filter-container {
        flex-direction: column;
    }
    
    .search-filter-container input,
    .search-filter-container select,
    .filter-container input,
    .filter-container select {
        width: 100%;
    }
}

/* Modal responsiveness */
.modal-content, .custom-modal-content {
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .modal-content, .custom-modal-content {
        max-width: 95%;
        padding: 15px;
    }
}

/* Form responsiveness */
.form-grid, .input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

@media (max-width: 768px) {
    .form-grid, .input-grid {
        grid-template-columns: 1fr;
    }
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

@media (max-width: 480px) {
    .pagination {
        font-size: 0.85rem;
    }
    
    .pagination a,
    .pagination span {
        padding: 5px 8px;
    }
}

/* Header and navigation fixes */
header, .header {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    header h1, .header h1 {
        font-size: 1.5rem;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Print button and export buttons */
.print-btn, .export-btn, .download-btn {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .print-btn, .export-btn, .download-btn {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

/* Modern Sidebar Design */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
    top: 0;
    left: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    border-right: 2px solid rgba(235, 87, 4, 0.2);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100vh;
    min-height: 100vh;
    overflow: hidden !important;
    position: relative;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px 15px 25px;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.sidebar-header .logo {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.sidebar-header .logo:hover {
    transform: scale(1.05);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
    margin: 0;
}

.gradient-text {
    background: linear-gradient(135deg, #EB5704 0%, #f7971e 50%, #EBB009 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(235, 87, 4, 0.3);
}

/* Modern Scrollbar - Auto-hide */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 15px 10px;
    scrollbar-width: none; /* Firefox - hide by default */
    scrollbar-color: transparent transparent;
}

/* Show scrollbar on hover (Firefox) */
.sidebar-menu:hover {
    scrollbar-width: thin;
    scrollbar-color: rgba(235, 87, 4, 0.3) transparent;
}

/* Webkit browsers (Chrome, Safari, Edge) */
.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: transparent; /* Hidden by default */
    border-radius: 10px;
    transition: background 0.3s ease;
}

/* Show scrollbar on hover */
.sidebar-menu:hover::-webkit-scrollbar-thumb {
    background: rgba(235, 87, 4, 0.3);
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(235, 87, 4, 0.6);
}

/* Menu Sections */
.mini-menu {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
    gap: 5px;
}

.mini-menu label {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 20px 18px 12px;
    margin-bottom: 8px;
}

/* Menu Items - Modern Design */
.mini-menu a {
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    padding: 14px 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mini-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, #EB5704 0%, #f7971e 100%);
    transition: width 0.3s ease;
    border-radius: 10px 0 0 10px;
}

.mini-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mini-menu a:hover::before {
    width: 4px;
}

.mini-menu a.active {
    background: linear-gradient(135deg, rgba(235, 87, 4, 0.2) 0%, rgba(247, 151, 30, 0.2) 100%);
    color: #ffffff;
    border-left: 4px solid #EB5704;
    padding-left: 11px;
    box-shadow: 0 4px 15px rgba(235, 87, 4, 0.2);
}

.mini-menu a i {
    font-size: 1.2rem;
    width: 22px;
    text-align: center;
    transition: transform 0.3s ease;
}

.mini-menu a:hover i {
    transform: scale(1.1);
}

/* Logout Button - Special Style */
.logout-btn {
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    padding: 14px 18px;
    margin: 10px 8px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(220, 53, 69, 0.3);
    background: rgba(220, 53, 69, 0.05);
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.15);
    color: #ff6b6b;
    border-color: rgba(220, 53, 69, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Dropdown Styling */
.dropdown {
    display: flex;
    flex-direction: column;
    position: relative;
}

.dropdown-toggle {
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    padding: 14px 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(5px);
}

.dropdown-icon {
    transition: transform 0.3s ease-in-out;
    margin-left: auto;
}

.dropdown-menu {
    display: none;
    flex-direction: column;
    padding-left: 20px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out;
}

.dropdown-menu a {
    text-decoration: none;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding-left: 22px;
}

.dropdown.active .dropdown-menu {
    display: flex;
    max-height: 200px;
}

.dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

/* Collapsed Sidebar Styles */
.sidebar.collapsed {
    width: 70px !important;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .mini-menu label,
.sidebar.collapsed .logout-btn span,
.sidebar.collapsed .mini-menu a span {
    display: none;
}

.sidebar.collapsed .mini-menu .dropdown-menu {
    margin: 0;
    padding: 0;
}

.sidebar.collapsed .sidebar-header img {
    width: 40px;
    height: 40px;
}

.sidebar.collapsed [title] {
    position: relative;
}

.sidebar.collapsed [title]:hover::after {
    content: attr(title);
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 1000;
    margin-left: 10px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

main {
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .sidebar-header h2 {
        font-size: 1.2rem;
    }
    
    .sidebar-menu a {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 10px;
        left: 10px;
        width: 45px;
        height: 45px;
        z-index: 1100;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        transition: all 0.3s ease;
        padding: 0;
    }

    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }

    .mobile-menu-toggle i {
        font-size: 1.3rem;
    }
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.mobile-close-btn i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-close-btn {
        display: block;
    }
    
    /* Hide sidebar by default on mobile */
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    /* Show sidebar when active */
    .sidebar.mobile-active {
        left: 0;
        z-index: 1001;
    }
    
    /* Adjust main content */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Adjust header for mobile */
    header, .header {
        padding-left: 70px !important;
    }

    /* Mobile content adjustments */
    .content {
        padding: 15px !important;
    }

    /* Dashboard cards mobile */
    .dashboard-cards {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Stat cards mobile */
    .stat-card, .card {
        padding: 20px 15px !important;
        margin-bottom: 15px;
    }

    /* Chart containers */
    .chart-container {
        padding: 15px !important;
        margin-bottom: 15px;
    }

    /* Tables mobile */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 0.85rem !important;
    }

    table th, table td {
        padding: 8px 5px !important;
        white-space: nowrap;
    }

    /* Notification bells mobile */
    .notification-bell {
        width: 45px !important;
        height: 45px !important;
    }

    /* Welcome banner mobile */
    .welcome-banner {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }

    .welcome-banner h1 {
        font-size: 1.5rem !important;
    }

    .welcome-banner p {
        font-size: 0.9rem !important;
    }
}

/* Remove all page transitions - Normal loading */
.page-transition-overlay {
    display: none !important;
}

/* Mobile: Full screen overlay */
@media (max-width: 768px) {
    .page-transition-overlay {
        left: 0;
        width: 100%;
    }
}

/* Cards and stat boxes */
.stat-card, .info-card, .summary-card {
    min-width: 200px;
}

@media (max-width: 480px) {
    .stat-card, .info-card, .summary-card {
        min-width: 100%;
    }
}

/* Tabs responsive */
.tabs, .tab-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .tabs button, .tab-container button {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* Footer responsive */
.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: stretch;
    }
}