
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  /* overflow: auto; */
}


/* Root Variables */

 /* :root {
  --containerPadding: 16px;
  --boxShadow: 0 2px 8px rgba(0,0,0,0.08);
  --borderColor: #e0e0e0;
  --inputBorderRadius: 6px;
  --navbarText: #222222;
  --spacingXxs: 4px;
  --selectionColor: #bee2e5;
  --primaryColor: #1d72b8;
  --fontWeightBase: 400;
  --infoColor: #1e90ff;
  --secondaryColorDark: #af2856;
  --fontFamilyBase: 'Roboto', sans-serif;
  --sidebarDividerColor: #eaeaea;
  --cardBg: #fff;
  --spacingSm: 12px;
  --cardTextColor: #000;
  --tableBorderColor: #e0e0e0;
  --tableRowHover: #f0f7fa;
  --inputShadow: 0 1px 2px 0 rgba(16, 30, 54, 0.08);
  --iconSizeMd: 24px;
  --navbarBg: #fff;
  --buttonShadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadowColor: rgba(0,0,0,0.08);
  --spacingXxl: 48px;
  --buttonBgHover: #389be6;
  --buttonBorderRadius: 6px;
  --buttonText: #fff;
  --fontSizeXl: 24px;
  --navbarHeight: 64px;
  --inputText: #222222;
  --linkColor: #1565c0;
  --fontFamilyHeading: 'Montserrat', sans-serif;
  --inputBg: #fff;
  --textColor: #222222;
  --fontSizeXs: 12px;
  --fontSizeLg: 18px;
  --sidebarText: #555555;
  --fontSizeBase: 16px;
  --borderRadius: 6px;
  --primaryColorDark: #115180;
  --successColor: #43b581;
  --sidebarBg: #f5f5f5;
  --borderRadiusCircle: 50%;
  --modalZIndex: 1000;
  --tableHeaderBg: #f5f7fa;
  --primaryColorLight: #389be6;
  --linkHoverColor: #1e88e5;
  --cardBorderRadius: 12px;
  --cardPadding: 24px;
  --textSecondaryColor: #555555;
  --modalShadow: 0 8px 32px rgba(0,0,0,0.08);
  --cardShadow: 0 4px 12px rgba(0,0,0,0.08);
  --footerBg: #eeeeee;
  --fontSizeHeading: 32px;
  --fontSizeSm: 14px;
  --fontWeightSemibold: 600;
  --containerWidth: 1200px;
  --surfaceColor: #f5f7fa;
  --spacingMd: 16px;
  --inputBorderActive: #1d72b8;
  --fontWeightBold: 700;
  --modalTextColor: #000;
  --iconSizeSm: 16px;
  --inputPlaceholder: #b0b0b0;
  --warningColor: #ffa600;
  --backgroundColor: #ffffff;
  --borderRadiusLg: 12px;
  --buttonBg: #1d72b8;
  --modalBorderRadius: 12px;
  --secondaryColorLight: #ff709a;
  --dangerColor: #fa4d56;
  --inputBorderColor: #e0e0e0;
  --modalBg: #fff;
  --spacingXs: 8px;
  --spacingLg: 24px;
  --sidebarWidth: 250px;
  --iconSizeLg: 32px;
  --secondaryColor: #e94e77;
  --spacingXl: 32px;
} */



/* Body Layout */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f5f5; 
  color: #333;
}

/* Layout Flex */
.layout {
  display: flex;
  /* min-height: 100vh; */
  height: 100vh;
}
body {
  background-color: var(--backgroundColor);
  color: var(--textColor);
  font-family: var(--fontFamilyBase);
}

.navbar {
  background-color: var(--navbarBg);
  color: var(--navbarText);
  height: var(--navbarHeight);
}

.button-primary {
  background-color: var(--buttonBg);
  color: var(--buttonText);
  border-radius: var(--buttonBorderRadius);
  box-shadow: var(--buttonShadow);
}

/* Sidebar */
/* .sidebar {
  width: 220px;
  background-color: var(--primaryColor);
  color: #fff;
  padding: var(--containerPadding);
  transition: transform 0.3s ease;
} */
.sidebar {
  /* width: 220px; */
  background-color: var(--primaryColor);
  color: #fff;
  padding: var(--containerPadding);
  transition: transform 0.3s ease;
  min-height: 100vh;
  /* overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin; */
  overflow-y: scroll;
}

.sidebar::-webkit-scrollbar {
  /* width: 6px; */
  opacity: 0 !important; 
}

/* .sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  opacity: 0;
} */


.sidebar .logo {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 24px;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav ul li {
  margin-bottom: 12px;
}

.sidebar nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  display: block;
}
/* .sidebar {
  overflow-y: auto;
  max-height: 100vh;
} */
h4 a {
  color: inherit;
  text-decoration: none;
}


/* admin name  */
.notification-icons {
            display: flex;
            gap: 10px;
        }

        .notification-icon {
            width: 40px;
            height: 40px;
            background-color: #d0d0d0;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .notification-icon:hover {
            background-color: #b0b0b0;
        }

        .admin-profile {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .admin-avatar {
            width: 40px;
            height: 40px;
            background-color: #d0d0d0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
        }

        .admin-info {
            display: flex;
            flex-direction: column;
        }

        .admin-name {
            font-weight: 600;
            font-size: 14px;
        }

        .admin-role {
            font-size: 12px;
            /* color: #666; */
        }


/* menu-item */
 .menu-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1px 0;
            color: #333;
            text-decoration: none;
            font-size: 12px;
            margin-bottom: 5px;
            transition: color 0.2s ease;
        }

        .menu-item:hover {
            color:inherit;
        }

        .menu-item::before {
            content: '■';
            margin-right: 10px;
            font-size: 8px;
        }

        /* .menu-item::after {
            content: '›';
            font-size: 14px;
        } */

.date-section {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        .current-date {
            background-color: #d0d0d0;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
        }
        .add-new-btn {
            background-color: #333;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: background-color 0.2s ease;
        }

        .add-new-btn:hover {
            background-color: #555;
        }
/* Welcome Section */
        .welcome-section {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }

        .welcome-text h2 {
            font-size: 18px;
            margin-bottom: 5px;
        }

        .welcome-text p {
            color: #666;
            font-size: 14px;
        }

        .date-section {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .current-date {
            background-color: #d0d0d0;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
        }

        .add-new-btn {
            background-color: #333;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: background-color 0.2s ease;
        }

        .add-new-btn:hover {
            background-color: #555;
        }

/*  */
.dropdown-list {
  display: none;
  list-style: none;
  padding-left: 15px;
  margin-top: 5px;
}


.add-btn{
   background-color: var(--buttonBg);
}

.dropdown-toggle {
  cursor: pointer;
  margin-top: 15px;
  position: relative;
  font-size: 20px;
}

.dropdown-toggle::after {
  content: '▼';
  position: absolute;
  right: 0;
  transition: transform 0.3s ease;
}

.dropdown-toggle.open::after {
  transform: rotate(-180deg);
}

.sidebar-section.open .dropdown-list {
  display: block;
}




/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Topbar */
.topbar {
  background-color: var(--primaryColor);
  color: var(--navbarText);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--containerPadding);
  box-shadow: var(--boxShadow);
}

.topbar input[type="text"] {
  padding: 8px;
  border-radius: var(--inputBorderRadius);
  border: 1px solid var(--borderColor);
  outline: none;
  width: 200px;
}

.topbar .admin-info {
  text-align: right;
  font-size: 0.9rem;
}

/* Content */
#content {
  padding: var(--containerPadding);
}

 /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background-color: #d8d8d8;
            padding: 20px;
            border-radius: 12px;
            position: relative;
        }

        .stat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .stat-title {
            font-size: 12px;
            font-weight: 600;
            color: #666;
            text-transform: uppercase;
        }

        .stat-percentage {
            font-size: 12px;
            font-weight: 500;
            color: #333;
        }

        .stat-value {
            font-size: 24px;
            font-weight: bold;
            color: #333;
        }

        .stat-link {
            position: absolute;
            bottom: 15px;
            right: 15px;
            font-size: 12px;
            color: #666;
            text-decoration: underline;
            cursor: pointer;
        }
 /* Finance Section */
        .finance-section {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            margin-bottom: 30px;
        }

        .finance-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .finance-card {
            background-color: white;
            padding: 25px;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .finance-card h3 {
            font-size: 12px;
            font-weight: 600;
            color: #666;
            margin-bottom: 15px;
            text-transform: uppercase;
        }

        .finance-value {
            font-size: 28px;
            font-weight: bold;
            color: #333;
        }

        .graph-section {
            background-color: white;
            padding: 25px;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            position: relative;
        }

        .graph-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .graph-title {
            font-size: 14px;
            font-weight: 600;
            color: #333;
        }

        .report-dropdown {
            position: relative;
            width:fit-content;
        }

        .report-btn {
            background-color: #f8f9fa;
            border: 1px solid #ddd;
            padding: 8px 15px;
            border-radius: 6px;
            font-size: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            background-color: white;
            border: 1px solid #ddd;
            border-radius: 6px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            min-width: 120px;
            z-index: 100;
            display: none;
        }

        .dropdown-menu.show {
            display: block;
        }

        .dropdown-item {
            padding: 8px 12px;
            font-size: 12px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
        }

        .dropdown-item:hover {
            background-color: #f8f9fa;
        }

        .dropdown-item:last-child {
            border-bottom: none;
        }

        .chart-container {
            height: 200px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
        }

        .donut-chart {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            background: conic-gradient(rgb(208, 67, 67) 0deg 120deg,rgb(103, 103, 211) 120deg 240deg, skyblue 240deg 360deg);
            position: relative;
        }

        .donut-chart::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 80px;
            height: 80px;
            background-color: white;
            border-radius: 50%;
        }

        .chart-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            justify-content: center;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
        }

        .legend-color {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background-color: #ccc;
        }
/* Action Cards */
        .action-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }

        .action-card {
            background-color: #d8d8d8;
            padding: 25px;
            border-radius: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .action-card:hover {
            background-color: #c8c8c8;
        }

        .action-content h3 {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 5px;
        }

        .action-content p {
            font-size: 14px;
            color: #666;
        }

        .action-arrow {
            font-size: 20px;
            color: #333;
        }
.notification-icons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.notification-icon {
  font-size: 22px;   
  color: black;    
  cursor: pointer;
  transition: transform 0.2s ease;
}

.notification-icon:hover {
  transform: scale(1.2); 
}



/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin-top: 16px;
}

.form input {
  padding: 10px;
  border: 1px solid var(--borderColor);
  border-radius: var(--inputBorderRadius);
}

.form button {
  padding: 10px;
  background-color: var(--primaryColor);
  color: #fff;
  border: none;
  border-radius: var(--inputBorderRadius);
  cursor: pointer;
}

/* Toggle Menu Button */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
}

/* Responsive Rules */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
    z-index: 1000;
    width: 220px;
    background-color: var(--primaryColor);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    width: 100%;
  }

  .menu-toggle {
    display: inline-block;
  }
}
/* ---------- RESPONSIVE HEADER FIX ---------- */

/* Tablet */
@media (max-width: 992px) {
  .topbar input[type="text"] {
    width: 150px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar input[type="text"] {
    order: 3; 
    flex: 1;
    width: 100%;
  }

  .admin-name,
  .admin-role {
    display: none; 
  }

  .notification-icons {
    gap: 10px;
  }
}

/* Very Small Screens */
@media (max-width: 480px) {
  .notification-icons {
    gap: 6px;
  }

  .notification-icon {
    font-size: 18px;
  }

  .admin-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}
.admin-profile {
  position: relative;
  cursor: pointer;
}

.admin-avatar {
  background: linear-gradient(135deg, #16a085, #2c3e50);
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
}

.admin-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  /* background: black; */
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
  display: none;
  z-index: 100;
}

.admin-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 5px 0;
}

.admin-dropdown ul li {
  padding: 10px 15px;
}

.admin-dropdown ul li a {
  text-decoration: none;
  color: #333;
  display: block;
}

.admin-dropdown ul li:hover {
  background: #f1f1f1;
}
.logo {
  display: flex;
  justify-content: center;
  text-align: center;
 padding: 5px 10px 10px;
 
}

.logo img {
  max-width: 180px;   
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  padding: 5px;
  position: relative;
  top: -8px;
}
.logo img {
  background: #fff;
  border-radius: 8px;
  padding: 5px;
}
/* Sidebar default */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;   
  width: 260px;
  height: 100%;
  transition: left 0.3s ease;
  z-index: 1000;
}
/* Fix dropdown-toggle <a> link color */
.dropdown-toggle a {
  color: inherit;         
  text-decoration: none;  
}

.dropdown-toggle a:hover,
.dropdown-toggle a:focus,
.dropdown-toggle a:active {
  color: inherit;         
  text-decoration: none;
}

/* When open */
.sidebar.open {
  left: 0;
}


/* Only apply slide menu on small screens */
@media (min-width: 769px) {
  .sidebar {
    position: relative;
    left: 0 !important;  
    transition: none;
  }
}

/* ---------- MOBILE RESPONSIVENESS ---------- */

/* Tablet Adjustments */
@media (max-width: 992px) {
  .topbar input[type="text"] {
    width: 150px; /* search bar shrinks a bit */
  }
}

/* Mobile Screens */
@media (max-width: 768px) {
  /* Sidebar becomes slide-in */
  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;   /* hidden by default */
    width: 260px;
    height: 100%;
    background: var(--primaryColor);
    transition: left 0.3s ease;
    z-index: 1000;
  }
  .sidebar.open {
    left: 0;        /* slide in */
  }

  /* Topbar rearranges */
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar input[type="text"] {
    order: 3;       /* search bar goes below */
    flex: 1;
    width: 100%;
  }

  /* Hide name/role to save space */
  .admin-name,
  .admin-role {
    display: none;
  }

  .notification-icons {
    gap: 10px;
  }

  /* Show menu button */
  .menu-toggle {
    display: inline-block;
  }
}

/* Very Small Screens */
@media (max-width: 480px) {
  .notification-icons {
    gap: 6px;
  }

  .notification-icon {
    font-size: 18px;
  }

  .admin-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* ----------- DASHBOARD MOBILE FIXES ----------- */

/* Tablet & below */
@media (max-width: 992px) {
  .stats-grid,
  .finance-section,
  .finance-grid,
  .action-cards {
    grid-template-columns: 1fr !important; /* single column */
  }

  .graph-section {
    margin-top: 20px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Sidebar slide in */
  .sidebar {
    width: 220px;
    left: -220px;
  }
  .sidebar.open {
    left: 0;
  }

  /* Content padding */
  #content {
    padding: 12px;
  }

  /* Welcome section stacks */
  .welcome-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Finance section stacks */
  .finance-section {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  /* Graph adjusts */
  .graph-section {
    width: 100%;
    padding: 15px;
  }
  .chart-container {
    height: auto;
  }
  .donut-chart {
    width: 120px;
    height: 120px;
  }

  /* Action cards stack */
  .action-cards {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }

  /* Fix Report button overflow */
  .report-btn {
    font-size: 11px;
    padding: 6px 10px;
  }
}
