:root {
    /* Font Sizes */
    --font-size-xs: 0.75rem;   /* 12px */
    --font-size-sm: 0.875rem;  /* 14px */
    --font-size-md: 1rem;      /* 16px */
    --font-size-lg: 1.125rem;  /* 18px */
    --font-size-xl: 1.25rem;   /* 20px */
    
    /* Color Scheme */
    --primary: #00a6fb;
    --secondary: #0582ca;
    --dark: #003554;
    --darker: #051923;
    --light: #f8f9fa;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #fd7e14;
    --info: #17a2b8;
    
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --navbar-height: 70px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    overflow-x: hidden;
    font-size: var(--font-size-sm);
}

/* Navbar Styles */
.navbar {
    height: var(--navbar-height);
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: var(--font-size-lg);
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    color: var(--primary);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #aaa;
    font-size: var(--font-size-sm);
}

.search-box input {
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 30px;
    width: 250px;
    transition: var(--transition);
    font-size: var(--font-size-sm);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 166, 251, 0.1);
}

.notification-bell {
    position: relative;
    font-size: var(--font-size-md);
    color: var(--dark);
    cursor: pointer;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: var(--font-size-xs);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile span {
    font-weight: 500;
    font-size: var(--font-size-sm);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--darker);
    color: white;
    transition: var(--transition);
    z-index: 1001;
    overflow-y: auto;
}

.sidebar-header {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hospital-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.hospital-logo i {
    font-size: var(--font-size-xl);
    color: var(--primary);
}

.sidebar-menu {
    padding: 20px 0;
}

.main-menu {
    list-style: none;
}

.menu-item {
    position: relative;
    margin: 5px 0;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    font-size: var(--font-size-sm);
}

.menu-item a i:first-child {
    margin-right: 15px;
    font-size: var(--font-size-md);
    width: 20px;
    text-align: center;
}

.menu-item a .arrow {
    margin-left: auto;
    font-size: var(--font-size-xs);
    transition: var(--transition);
}

.menu-item.active a {
    color: white;
    background: rgba(0, 166, 251, 0.2);
    border-left: 3px solid var(--primary);
}

.menu-item:hover a {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.has-submenu .submenu {
    list-style: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.has-submenu.active .submenu {
    max-height: 500px;
}

.has-submenu.active .arrow {
    transform: rotate(90deg);
}

.submenu li a {
    padding: 10px 20px 10px 45px;
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.6);
}

.submenu li a:hover {
    color: white;
}

.submenu li.active a {
    color: var(--primary);
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.help-center {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--font-size-sm);
}

.help-center:hover {
    color: white;
}

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    min-height: calc(100vh - var(--navbar-height));
    transition: var(--transition);
}

/* Collapsed Sidebar */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .hospital-logo span,
.sidebar.collapsed .menu-item span,
.sidebar.collapsed .arrow,
.sidebar.collapsed .help-center span {
    display: none;
}

.sidebar.collapsed .hospital-logo {
    justify-content: center;
}

.sidebar.collapsed .menu-item a {
    justify-content: center;
}

.sidebar.collapsed .menu-item a i:first-child {
    margin-right: 0;
}

.sidebar.collapsed .submenu {
    display: none;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        left: -100%;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .hospital-logo {
        font-size: var(--font-size-md);
    }
    
    .hospital-logo i {
        font-size: var(--font-size-lg);
    }
    
    .navbar {
        padding: 0 15px;
    }
    
    .search-box input {
        width: 200px;
    }
}

/* Futuristic Elements */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.02);
}

/* Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 166, 251, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 166, 251, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 166, 251, 0); }
}

.pulse {
    animation: pulse 2s infinite;
}
/* SUBMENU SPECIFIC STYLES */
.has-submenu {
    position: relative;
}

.has-submenu > .menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.has-submenu .arrow {
    transition: transform 0.3s ease;
    margin-left: auto;
}

.has-submenu.active .arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
    padding-left: 20px;
}

.has-submenu.active .submenu {
    max-height: 500px; /* Adjust based on content */
}

.submenu li a {
    padding: 10px 15px;
    display: block;
    font-size: 0.9rem;
}

.submenu li a:hover {
    background: rgba(255, 255, 255, 0.1);
}