/* =========================================================
   ROOT VARIABLES
========================================================= */
:root {
  --sidebar-width: 280px;
  --sidebar-gap: 20px;

  --primary-color: #4339f2;
  --text-dark: #37375c;
  --text-muted: #555;
  --text-light: #aaa;

  --hover-bg: #f5f6fa;
  --active-bg: #e6e9f2;
  --border-light: #e9e9e9;
}

/* =========================================================
   GLOBAL
========================================================= */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Poppins, sans-serif;
  overflow-x: hidden;
}

/* =========================================================
   PAGE WRAPPER
========================================================= */
.page-wrapper {
  position: relative;
  height: 100vh;
  transition: margin-left 0.3s ease;
}

body.sidebar-open .page-wrapper {
  margin-left: calc(var(--sidebar-width) + var(--sidebar-gap));
}

body.sidebar-minimized .page-wrapper {
  margin-left: 60px;
}

/* =========================================================
   SIDEBAR
========================================================= */
.sidebar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: #fff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
  transform: translateX(-100%);
  transition:
    transform 0.3s ease,
    width 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 30px 20px;
}

.sidebar-wrapper.open {
  transform: translateX(0);
}

/* =========================================================
   SIDEBAR LAYOUT
========================================================= */
.main-navigation-dashboard,
.tabs {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-top {
  flex-shrink: 0;
  margin: 20px 0;
}

/* =========================================================
   SCROLLABLE MENU
========================================================= */
.sidebar-menu-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 30px;
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-menu-container::-webkit-scrollbar {
  display: none;
}

/* Extra bottom spacing for reports parent */
.reports-parent::after {
  content: "";
  display: block;
  height: 40px;
}

.reports-parent {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================================================
   MENU ITEMS
========================================================= */
.reports1 {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.reports1:hover {
  background-color: var(--hover-bg);
}

.reports1.active,
.reports1.open {
  background-color: var(--active-bg);
  font-weight: 600;
}

.reports1.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.reports1.active .sidebar-menu1,
.reports1.open .sidebar-menu1 {
  color: var(--primary-color);
}

.reports1.active .vector-icon,
.reports1.open .vector-icon {
  filter: brightness(0) saturate(100%) invert(26%) sepia(96%) saturate(3000%)
    hue-rotate(242deg) brightness(90%) contrast(90%);
}

.icon-parent {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vector-icon {
  width: 20px;
  height: 20px;
}

.sidebar-menu1 {
  font-size: 16px;
  color: var(--text-dark);
}

/* =========================================================
   SUBMENU (first level and nested)
========================================================= */
.submenu,
.submenu-nested {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 44px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease;
}

.submenu.open,
.submenu-nested.open {
  max-height: 1000px; /* large enough for content */
  opacity: 1;
}

.overridepadding {
  padding: 6px 0 !important;
}

.submenu-item {
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.submenu-item:hover {
  color: var(--primary-color);
}

.submenu-item.active {
  font-weight: 600;
  color: var(--primary-color);
}

.submenu-item.disabled {
  pointer-events: none;
  color: var(--text-light);
}

/* =========================================================
   MINIMIZED SIDEBAR
========================================================= */
.sidebar-wrapper.minimized {
  width: 50px;
  transform: translateX(0);
}

.sidebar-wrapper.minimized .sidebar-menu1,
.sidebar-wrapper.minimized .logo-text,
.sidebar-wrapper.minimized .dashboard-header,
.sidebar-wrapper.minimized .logo,
.sidebar-wrapper.minimized .submenu {
  display: none;
}

.sidebar-wrapper.minimized .icon-parent {
  justify-content: center;
}

.sidebar-wrapper.minimized .sidebar-menu-container {
  padding-top: 70px;
}

/* =========================================================
   TOGGLE BUTTON
========================================================= */
.sidebar-toggle-button1 {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 2002;
  transition: left 0.3s ease;
}

body.sidebar-open .sidebar-toggle-button1 {
  left: calc(var(--sidebar-width) - 20px + var(--sidebar-gap));
}

body.sidebar-minimized .sidebar-toggle-button1 {
  left: calc(5px + var(--sidebar-gap));
}

/* =========================================================
   LOGO
========================================================= */
.logo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.isam-icon {
  width: 122px;
  height: 29px;
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
  color: #4d4d4d;
}

/* =========================================================
   DROPDOWN
========================================================= */
.system-dropdown {
  width: 170px;
  height: 38px;
  border-radius: 10px;
  padding: 8px 45px 8px 15px;
  border: 1px solid #ccc;
  background-color: #fff;
  cursor: pointer;
}

/* =========================================================
   TOPBAR
========================================================= */
.topbar {
  height: 60px;
  background-color: #f3f5f8;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 25px;
  box-sizing: border-box;
}

.user-greeting {
  border-radius: 9px;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1.2px solid var(--border-light);
  padding: 8px 12px;
  display: flex;
  align-items: center;
}

.user-greeting-text {
  font-size: 16px;
}

/* =========================================================
   HIDDEN UTILITIES
========================================================= */
.hidden {
  display: none !important;
}

/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 500px) {
  .sidebar-wrapper.minimized {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }

  body.sidebar-open .page-wrapper,
  body.sidebar-minimized .page-wrapper {
    margin-left: 0;
  }

  .sidebar-toggle-button1 {
    left: 15px !important;
  }
}
