:root {
    --primary-color: #ff0056;   /* Pink as the main theme color */
    --secondary-color: #2ea3f2; /* Bright blue for contrast */
    --accent-color: #009cd1;    /* Medium blue accent */
    --danger-color: #d30046;    /* Deep reddish-pink for danger alerts */
    --success-color: #2ea3f2;   /* Reuse blue for success indicators */
    --warning-color: #ff0056;   /* Pink tone for warnings if needed */
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --white: #ffffff;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 80px;
    --header-height: 60px;
    --transition-speed: 0.3s;
      --overlay-black: rgba(0, 0, 0, 0.5);
  --hover-bg-light: rgba(0, 0, 0, 0.05);
  --primary-color-light: rgba(255, 0, 86, 0.1); /* example light variant */
}

/* Dark mode variables */
.dark-mode {
    --light-color: #121212;
    --dark-color: #f5f5f5;
    --gray-color: #999999;
    --white: #1e1e1e;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 40px; /* Adjust as needed */
    width: auto;
    margin-right: 10px;
}

.brand-name {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color); /* Adjust color if needed */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    transition: background-color var(--transition-speed) ease;
    min-height: 100vh;
}

/* Layout Structure */
.app-container {
    overflow: hidden;
    display: flex;
    min-height: 100vh;
    position: relative;
}
/* Ensure proper stacking order */
.sidebar {
    z-index: 1000;
}

.desktop-menu-btn {
    z-index: 1001; /* Above sidebar */
}

.mobile-menu-btn {
    z-index: 1100; /* Above everything */
}

.sidebar-overlay {
    z-index: 999; /* Below sidebar */
}
/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-black);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Toggle Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    color: white;
    cursor: pointer;
    z-index: 1100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Desktop Toggle Button */
/* Desktop Toggle Button - Final Fixed Version */
.desktop-menu-btn {
    position: absolute;
    top: 15px;
    right: -12px;
    background: var(--primary-color);
    border: 2px solid var(--white); /* Add border for better visibility */
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1100; /* Increased z-index */
    transition: all var(--transition-speed) ease;
    /* Ensure button is never clipped */
    transform: translateZ(0);
    will-change: transform;
    /* Force visibility */
    visibility: visible !important;
    opacity: 1 !important;
}

/* Parent container adjustments */
.sidebar {
    position: fixed;
    overflow: visible !important; /* Override any hidden overflow */
    z-index: 1000;
    /* Create stacking context */
    isolation: isolate;
}

/* Show only on desktop */
@media (min-width: 993px) {
    .desktop-menu-btn {
        display: flex;
    }
}

/* Prevent any parent from clipping */
.app-container {
    overflow: visible !important;
}

/* Global adjustments */
html, body {
    overflow-x: hidden;
    /* Ensure proper stacking conte xt */
    position: relative;
    z-index: 0;
}

.desktop-menu-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.sidebar-collapsed .desktop-menu-btn {
    right: -12px;
    transform: rotate(180deg);
}

/* Logo Styles */
.logo-wrapper {
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: var(--dark-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.brand-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-left: 10px;
    transition: opacity var(--transition-speed) ease;
}

.sidebar-collapsed .brand-name {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.separator {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 10px 0;
}

/* Menu Items */
.menu-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-items li {
    position: relative;
}

.menu-items li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all var(--transition-speed) ease;
    border-left: 3px solid transparent;
}

.menu-items li a:hover {
    background-color: var(--hover-bg-light);
}

.menu-items li a.active {
    background-color: var(--primary-color-light);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.icon-container {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.icon {
    font-size: 1rem;
}

.item-name {
    transition: all var(--transition-speed) ease;
}

.sidebar-collapsed .item-name {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.tooltip {
    position: absolute;
    left: calc(var(--sidebar-collapsed-width) + 10px);
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: all var(--transition-speed) ease;
    z-index: 1001;
    pointer-events: none;
}

.sidebar-collapsed li:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.badge {
    background-color: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease;
    background-color: rgba(0, 0, 0, 0.03);
    padding-left: 0;
    /* Prevent scrollbar */
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.submenu::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.submenu.active {
   
    max-height: 500px;
    /* Smooth scrolling */
    scroll-behavior: smooth;
}

/* Expanded Sidebar */
.submenu li a {
    padding-left: 50px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* Collapsed Sidebar */
.sidebar-collapsed .submenu li a {
    padding-left: 20px;
}

.sidebar-collapsed .submenu {
    position: absolute;
    left: 100%;
    top: 0;
    width: 200px;
    background-color: var(--white);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    border-radius: 0 4px 4px 0;
}

.has-submenu > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    transition: transform var(--transition-speed) ease;
}

.has-submenu.active > a::after {
    transform: rotate(180deg);
}

/* Main Content */
main {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 20px;
    transition: margin-left var(--transition-speed) ease;
    min-height: 100vh;
    background-color: var(--light-color);
}

.sidebar-collapsed main {
    margin-left: var(--sidebar-collapsed-width);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed) ease;
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.theme-icon {
    margin-right: 10px;
    font-size: 1rem;
}

.theme-toggle .item-name {
    transition: all var(--transition-speed) ease;
}

.sidebar-collapsed .theme-toggle .item-name {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed) ease;
}

.profile-section:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.profile-info {
    transition: all var(--transition-speed) ease;
}

.sidebar-collapsed .profile-info {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.profile-name {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.profile-role {
    font-size: 0.8rem;
    color: var(--gray-color);
}
@media (min-width: 600px) {
   .mobile-menu-btn{
        display: none !important;
    }
}
/* @media(max-width: 600px) {
    .desktop-menu-btn{
        display: none !important;
    }
} */
@media (max-width: 992px) {
    .mobile-menu-btn {
        display: flex !important;
    }
    /* .desktop-menu-btn {
        display: none !important;
    } */
}

@media (min-width: 993px) {
    .mobile-menu-btn {
        display: none !important;
    }
    .desktop-menu-btn {
        display: flex !important;
    }
}
/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        left: -100%;
        width: 280px;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    main {
        margin-left: 0 !important;
        padding: 15px;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* .desktop-menu-btn {
        display: none;
    } */
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .has-submenu > a::after {
        display: none;
    }
    
    .submenu {
        position: static;
        width: auto;
        box-shadow: none;
    }
    
    .sidebar-collapsed .submenu {
        position: static;
        width: auto;
        left: auto;
    }
    
    .has-submenu > a::after {
        display: none;
    }
    
    .submenu li a {
        padding-left: 60px;
    }
}
.menu-items-container {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.menu-items-container::-webkit-scrollbar {
    width: 6px;
}

.menu-items-container::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}
/* Dark Mode Styles */
.dark-mode .sidebar,
.dark-mode .theme-toggle,
.dark-mode .profile-section {
    background-color: var(--white);
    color: var(--dark-color);
}

.dark-mode .menu-items li a {
    color: var(--dark-color);
}

.dark-mode .menu-items li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .submenu {
    background-color: rgba(255, 255, 255, 0.03);
}

.dark-mode .tooltip {
    background-color: var(--light-color);
    color: var(--dark-color);
}

/* Main Content Styles */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.content-header h1 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin-top: 0;
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.card p {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0;
    color: var(--dark-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: var(--white);
    color: var(--dark-color);
}

/* Button Styles */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

/* Alert Styles */
.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background-color: rgba(76, 201, 240, 0.2);
    color: var(--success-color);
    border-left: 3px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(248, 37, 133, 0.2);
    color: var(--danger-color);
    border-left: 3px solid var(--danger-color);
}