/* Google Fonts Import Link */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Hind:wght@300;400;500;600;700&display=swap');

:root {
  --menus-background: #f7f7f7;
  --menus-text-color: #505050;
  --menus-border-color: #d3d3d3;
  --menus-hover-color: #ffffff;
  --alpa-blue: #216CB7;
  --body-background: #ffffff;
  --body-foreground: #1f1f1f;
  --link-color: #1a0dab;
}
.dark-mode {
  --menus-background: #1f1f1f;
  --menus-text-color: #ffffff;
  --menus-border-color: #444;
  --body-background: #1f1f1f;
  --body-foreground: #ffffff;
  --link-color: #99c3ff;
}

body ::-webkit-scrollbar,
body.dark-mode ::-webkit-scrollbar {
  width: 14px;
}

body ::-webkit-scrollbar-track ,
body.dark-mode ::-webkit-scrollbar-track {
  background: var(--menus-background);
}
body ::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
  border: 3px solid #f7f7f7;
}
body ::-webkit-scrollbar-thumb:hover {
  background-color: #bbb;
}
body.dark-mode ::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 10px;
  border: 3px solid #1f1f1f;
}
body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* Restore defaults caused by the above * */
.home-section ul, 
.home-section ol {
  margin-left: 20px; /* Restore default indentation */
  padding-left: 20px; /* Restore padding for bullets */
}
.home-section p {
  margin-bottom: 16px; /* Restore spacing between paragraphs */
}

body {
  background: var(--body-background);
}

.sidebar{
  position: fixed;
  top: 50px; /* Start below the header */
  left: 0;
  height: calc(100% - 50px); /* Adjust height to account for header */
  width: 240px; 
  background: var(--menus-background); 
  z-index: 100;
  transition: all 0.2s ease;
  border-right: 0.5px solid var(--menus-border-color); 
}
.sidebar.close{
  width: 60px; /* Collapsed width */
}
.sidebar .sidebar-header{
  position: relative;
}
.sidebar .sidebar-header .toggle{
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%) rotate(180deg);
  height: 18px;
  width: 18px;
  background-color: var(--menus-background);
  color: var(--menus-text-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sidebar.close .toggle{
  right: -10px;
  transform: translateY(-50%) rotate(0deg);
}
.sidebar .app-details{
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
  border-bottom: 0.5px solid var(--menus-border-color);
}
.sidebar .app-details i{
  font-size: 22px;
  color: var(--menus-text-color);
  height: 50px;
  min-width: 54px;
  text-align: center;
  line-height: 50px;
  margin-left: 3px;
}
.sidebar .app-details .app_name{
  font-size: 18px;
  color: var(--menus-text-color); /* Updated color */
  font-weight: 600;
  transition: 0.2s ease;
  opacity: 1; /* Ensure text is visible */
  pointer-events: auto;
  white-space: nowrap; /* Add nowrap property */
}
.sidebar.close .app-details .app_name{
  opacity: 0;
  pointer-events: none;
}
.sidebar .nav-links{
  height: calc(100% - 120px); /* Adjust height to account for the footer */
  padding: 20px 0 0 0;
  overflow-x: hidden; /* Hide horizontal scrollbar */
  overflow-y: auto; /* Show vertical scrollbar */
}
.sidebar.close .nav-links{
  overflow: visible;
}
.sidebar .nav-links li{
  position: relative;
  list-style: none;
  transition: all 0.2s ease;
  margin: 4px;
}
.sidebar .nav-links li:hover{
  background: var(--alpa-blue);
  border-radius: 5px;
  margin: 4px;
}
.sidebar.close .nav-links li:hover{
  border-radius: 5px 0 0 5px;
}
.sidebar .nav-links li:hover i,
.sidebar .nav-links li:hover a .link_name {
  color: var(--menus-hover-color);
}
.sidebar .nav-links li.showMenu {
  background: var(--alpa-blue); /* Keep background color when sub-menu is open */
  border-radius: 5px;
}
.sidebar .nav-links li.showMenu i,
.sidebar .nav-links li.showMenu a .link_name {
  color: #fff;
}
.sidebar .nav-links li .icon-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar.close .nav-links li .icon-link{
  display: block
}
.sidebar .nav-links li i{
  height: 46px; 
  min-width: 50px; 
  text-align: center;
  line-height: 46px;
  color: var(--menus-text-color); 
  font-size: 20px; 
  cursor: pointer;
  transition: all 0.2s ease;
}
.sidebar .nav-links li.showMenu i.arrow{
  transform: rotate(-180deg);
}
.sidebar.close .nav-links i.arrow{
  display: none;
}
.sidebar .nav-links li a{
  display: flex;
  align-items: center;
  text-decoration: none;
  width: 100%;
}
.sidebar .nav-links li a .link_name{
  font-size: 16px;
  font-weight: 400;
  color: var(--menus-text-color);
  transition: all 0.2s ease;
  opacity: 1; 
  pointer-events: auto;
  white-space: nowrap;
}
.sidebar.close .nav-links li a .link_name{
  opacity: 0;
  pointer-events: none;
}
.sidebar .nav-links li .sub-menu{
  background: var(--alpa-blue); 
  padding: 6px 6px 14px 55px; 
  margin-top: -10px;
  display: none;
}
.sidebar .nav-links li.showMenu .sub-menu{
  display: block;
}
.sidebar .nav-links li .sub-menu a{
  color: #f8f8f8;
  font-size: 16px; 
  padding: 5px 0;
  white-space: nowrap;
  opacity: 0.6;
  transition: all 0.2s ease;
}
.sidebar .nav-links li .sub-menu a:hover{
  opacity: 1;
}
.sidebar.close .nav-links li .sub-menu{
  position: absolute;
  left: 100%;
  top: -10px;
  margin-top: 0;
  padding: 10px 20px;
  border-radius: 0 5px 5px 0;
  opacity: 0;
  display: block;
  pointer-events: none;
}
.sidebar.close .nav-links li:hover .sub-menu{
  top: 0;
  opacity: 1;
  pointer-events: auto;
  transition: all 0.2s ease;
}
.sidebar .nav-links li .sub-menu .link_name{
  display: none;
}
.sidebar.close .nav-links li .sub-menu .link_name{
  font-size: 16px;
  opacity: 1;
  display: block;
}
.sidebar .nav-links li .sub-menu.blank{
  opacity: 1;
  pointer-events: auto;
  padding: 2px 20px 2px 16px;
  opacity: 0;
  pointer-events: none;
}
.sidebar .nav-links li:hover .sub-menu.blank{
  top: 50%;
  transform: translateY(-50%);
}

.sub-menu.no-transition {
  transition: none !important;
}

.sidebar.no-transition {
  transition: none !important;
}

.link_name.no-transition {
  transition: none !important;
}

.nav-links .link_name.no-transition {
  transition: none !important;
}

.app_name.no-transition {
  transition: none !important;
}

.toggle.no-transition {
  transition: none !important;
}

.sidebar .sidebar-footer {
  position: fixed;
  bottom: 0;
  width: 240px;
  display: flex;
  flex-direction: column; /* Stack children vertically */
  align-items: center;
  justify-content: center; 
  padding: 12px 0;
  border-top: 0.5px solid var(--menus-border-color);
  border-right: 0.5px solid var(--menus-border-color);
  color: inherit;
  z-index: 101; 
  background-color: var(--menus-background);
  transition: all 0.2s ease;
}

.sidebar.close .sidebar-footer {
  display: none;
}

.sidebar .sidebar-footer .copyright {
  display: block; /* Ensure each span is on a new line */
  width: 100%; /* Ensure the text spans the full width */
  text-align: center; /* Center align the text */
  font-size: 10px;
  color: var(--menus-text-color);
}

.home-section{
  position: relative;
  background: var(--body-background);
  color: var(--body-foreground);
  height: calc(100vh - 50px); /* Adjust height to account for header */
  top: 50px; /* Start below the header */
  left: 240px; 
  width: calc(100% - 240px); /* Updated width calculation */
  transition: all 0.2s ease;
  overflow: auto; /* Enable scrollbars when content overflows */
}

.home-section.no-transition {
  transition: none !important;
}

.sidebar.close ~ .home-section{
  left: 60px; /* Updated left position */
  width: calc(100% - 60px); /* Updated width calculation */
}
.home-content{
  display: flex;
  align-items: left;
  justify-content: left; /* Center align the content */
  flex-wrap: wrap;
  padding: 12px 12px 24px 24px;
  overflow: auto; /* Enable scrollbars when content overflows */
  font-family: 'Hind', sans-serif; /* Apply Hind font */
}
.home-content * {
  font-family: 'Hind', sans-serif; /* Apply Hind font to all descendants */
}
.home-section .home-content .text{
  color: var(--menus-text-color);
  font-size: 35px;
}
.home-section .home-content .text{
  font-size: 26px;
  font-weight: 600;
}
.header {
  position: fixed;
  top: 0;
  left: 0; /* Start from the left edge */
  width: 100%; /* Span the full width */
  height: 50px; /* Adjust height */
  background: var(--menus-background); 
  border-bottom: 0.5px solid var(--menus-border-color);
  display: flex;
  align-items: center;
  padding: 0 15px 0 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 101; 
  color: var(--menus-text-color); 
}
.sidebar.close ~ .header {
  left: 78px;
  width: calc(100% - 78px);
}
.header .logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-left: 16px; 
}

.header .logo img {
  height:42px;
}

.header .right-section {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.header .profile {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: inherit;
  border: 0.5px solid var(--menus-border-color);
  border-radius: 4px;
  transition: all 0.2s ease;
  padding: 6px;
}

.header .profile i {
  font-size: 14px;
}

.header .profile .welcome-text {
  margin-right: 10px;
  margin-left: 10px;
  font-size: 14px; /* Make font size smaller */
  font-weight: 400;
}

.header .profile .profiledropdown {
  position: absolute;
  top: 50px;
  right: 5px;
  background: var(--menus-background);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  margin-right: 10px;
  color: var(--menus-text-color); 
  border: 0.5px solid var(--menus-border-color);
  border-radius: 0 0 5px 5px;
}

.header .profile .profiledropdown a {
  display: flex;
  align-items: center; /* Align items horizontally */
  padding: 10px 20px 10px 0px;
  text-decoration: none;
  color: var(--menus-text-color);
  white-space: nowrap;
  margin: 4px;
}

.header .profile.show .profiledropdown a:hover {
  color: var(--menus-hover-color);
  background: var(--alpa-blue);
  border-radius: 5px;
  margin: 4px;
}

.header .profile.show .profiledropdown a:hover .profilemenuicon {
  color: var(--menus-hover-color);
}

.header .profile.show .profiledropdown {
  display: flex;
}

.header .hamburger-menu {
  display: none;
  font-size: 22px;
  cursor: pointer;
  color: inherit;
  margin-left: 15px;
}

.header .help {
  color: inherit;
  margin-right: 15px;
  font-size: 20px;
  padding: 1px 7px;
  transition: all 0.2s ease;
  cursor: pointer; 
}

.header .help a {
  color: inherit; 
  text-decoration: none; 
  display: block;
  pointer-events: none; 
}

.header .help:hover {
  background-color: var(--alpa-blue);
  color: #fff; 
  border-radius: 4px;  
}

.header .profile:hover {
  background-color: var(--alpa-blue); /* Change background color to blue */
  color: var(--menus-hover-color);
}

.header .profile:hover i,
.header .profile:hover .welcome-text {
  color: var(--menus-hover-color);
}

.header .profile .profiledropdown a .fa-user.profilemenuicon,
.header .profile .profiledropdown .dark-mode-toggle .fa-moon.profilemenuicon,
.header .profile .profiledropdown a .fa-arrow-right-to-bracket.profilemenuicon {
  color: var(--menus-text-color);
  margin-right: 16px;
  margin-left: 16px;
  font-size: 18px;
}

.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.35); /* Semi-transparent black */
  z-index: 9995;
}

.loader-wrapper {
  position: fixed;
  top: calc(50% - 5%);
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader-svg {
  width: 120px;
  height: 120px;
}

.loader-logo {
  x: 30px;
  y: 30px;
  width: 60px;
  height: 60px;
}

.loader-arc-ring {
  cx: 60;
  cy: 60;
  r: 35;
  stroke: #216CB7;
  stroke-width: 5;
  fill: none;
  stroke-dasharray: 110 110;
  stroke-dashoffset: 0;
}

.loader-arc-spin {
  transform-origin: 60px 60px;
  animation: loader-spin 2s linear infinite;
}

/* Orbiting airplane wrapper rotates with arc */
.loader-plane-wrapper {
  position: absolute;
  width: 120px;
  height: 120px;
  animation: loader-spin 2s linear infinite;
}

/* Plane is positioned just ahead of the arc */
.loader-plane {
  position: absolute;
  top: 38px;           /* radius from center (60px center - 35px arc radius - offset) */
  left: 28px;
  transform: translateX(-50%) rotate(290deg);
  transform-origin: center;
  font-size: 17px;
  color: #216CB7;
  rotate: (45deg);
}

@keyframes loader-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes loader-spin-arc {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Styles for dark mode toggle */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 20px 10px 0px;
  margin: 4px;
}
.dark-mode-toggle input {
  display: none;
}
.dark-mode-lbl {
  margin-right: 16px;
  margin-left: 2px;
}
.dark-mode-toggle .slider {
  position: relative;
  width: 40px;
  height: 20px;
  background-color: #ccc;
  border-radius: 34px;
  transition: 0.4s;
}
.dark-mode-toggle .slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}
.dark-mode-toggle input:checked + .slider {
  background-color: var(--alpa-blue);
}
.dark-mode-toggle input:checked + .slider:before {
  transform: translateX(20px);
}

/* Default link styles */
a {
  color: var(--link-color);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
/* Remove underline from links that contain only a FontAwesome icon */
a:has(i[class^="fa-"]) {
  text-decoration: none !important;
}

/* Ensure no underline appears on hover */
a:has(i[class^="fa-"]):hover {
  text-decoration: none !important;
}

@media screen and (max-width: 580px) {
  body {
    overflow: hidden;
  }
  body img {
    touch-action: manipulation; /* Prevent double-tap zoom for all images within the body */
  }
  .home-content{
    padding: 12px 12px 120px 12px;
  }
  .header .hamburger-menu {
    display: flex;
  }
  .sidebar {
    display: none; /* Hide sidebar by default */
  }
  .sidebar.visible {
    display: block; /* Show sidebar when visible */
  }
  .sidebar .sidebar-header .toggle {
    display: none;
  }
  .home-section {
    left: 0; /* Adjust home section position */
    width: 100%; /* Adjust home section width */
  }
  .sidebar.close ~ .home-section {
    left: 0; /* Adjust home section position */
    width: 100%; /* Adjust home section width */
  }
}
