/* Color Scheme */
:root {
  --primary-color: #b23333; /* Primary color */
  --secondary-color: #f4f4f4; /* Secondary color */
  --tertiary-color: #000000; /* Tertiary color (black) */
  --fourth-color: #ffffff; /* Fourth color (white) */
  --fifth-color: #777777; /* Fifth color (light gray) */
}

/* Splash screen styling */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color); /* Primary color */
  color: var(--fourth-color); /* White text */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  z-index: 2000; /* Ensure it is above all other elements */
  transition: opacity 0.5s ease, visibility 0.5s ease; /* Smooth transition */
}

#splash.hidden {
  opacity: 0; /* Fade out */
  visibility: hidden; /* Hide after fading out */
}

#splash .branding .logo {
  height: 90px; /* Scaled-up logo */
 /* margin-bottom: 2rem; */
}

#splash h1 {
  font-size: 2.5rem;
  margin: 0.5rem 0;
}

#splash p {
  font-size: 1.2rem;
  text-align: center;
  max-width: 600px;
}

#splash .loading-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

#splash .loading-animation div {
  width: 15px;
  height: 15px;
  background-color: var(--fourth-color); /* White color */
  border-radius: 50%;
  animation: bounce 1.5s infinite ease-in-out;
}

#splash .loading-animation div:nth-child(1) {
  animation-delay: 0s;
}

#splash .loading-animation div:nth-child(2) {
  animation-delay: 0.3s;
}

#splash .loading-animation div:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* General layout */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--fourth-color); /* White background */
  color: var(--tertiary-color); /* Black text */
  display: flex;
  flex-direction: column;
  height: 100vh; /* Full viewport height */
  overflow: hidden; /* Prevent body scrolling */
}

/* Header Styling */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--primary-color);
  color: var(--fourth-color);
  padding: 0.6rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .branding {
  display: flex;
  align-items: center;
}

header .branding .logo {
  height: 30px;
  margin-right: 1rem;
  margin-left: 30px;
}

header .header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

header .search-bar {
  padding: 0.4rem;
  padding-left: 0.8rem;
  border: none;
  border-radius: 15px;
  width: 200px;
}

header .user-profile {
  display: flex;
  align-items: center;
  position: relative;
}

header .user-profile .user-icon {
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}

/* Profile dropdown */
.user-profile {
  position: relative;
  cursor: pointer;
}

.dropdown-profile {
  position: absolute;
  right: 0;
  top: 45px;
  background: #fff;
  min-width: 150px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: none;
  z-index: 1000;
}

.dropdown-profile a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
}

.dropdown-profile a:hover {
  background: #f5f5f5;
}

/* Show dropdown */
.dropdown-profile.show {
  display: block;
}


#menuToggle {
  display: none;
  top: 15px;
  left: 15px;
  background: var(--primary-color); /* Primary color */
  color: var(--fourth-color); /* White text */
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
}

.innerBody {
  display: flex;
  flex: 1;
 /* margin-top: 70px;  Adjust for fixed header */
  height: calc(100vh - 60px); /* Full height minus header */
  overflow: hidden; /* Prevent innerBody from scrolling */
}

/* Sidebar Styling */
#sidebar {
  background-color: var(--secondary-color);
  color: var(--fifth-color);
  padding: 0.4rem;
  height: 100%;
  width: 210px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: scroll; /* Allow scrolling */
}

#sidebar {
  width: clamp(200px, 18vw, 212px);
  min-width: 200px;
  max-width: 212px;
}

#sidebar a {
  display: block;
  margin-bottom: 0.1rem;
  text-decoration: none;
  color: var(--fifth-color);
  font-weight: bold;
  font-size: 14px;
  padding: 0.5rem;
  border-radius: 5px;
  background-color: var(--fourth-color);
  transition: background-color 0.3s, color 0.3s;
}

#sidebar a:hover {
  background-color: var(--primary-color);
  color: var(--fourth-color);
}

#sidebar a.active {
  background-color: var(--primary-color);
  color: var(--fourth-color);
  font-weight: bold;
}

#sidebar .dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Dropdown Menu Styling */
.dropdown {
  position: relative;
  display: block;
  margin-bottom: 0.1rem;
}

.dropdown-btn {
  background-color: var(--secondary-color);
  color: var(--fifth-color);
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
}

.dropdown-btn:hover {
  background-color: var(--primary-color);
  color: var(--fourth-color);
}

.dropdown-content {
  display: none;
  position: relative;
  background-color: var(--fourth-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  padding: 10px;
  z-index: 1;
}

.dropdown.active .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  color: var(--fifth-color);
  text-decoration: none;
  padding: 8px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

.dropdown-content a:hover {
  background-color: var(--primary-color);
  color: var(--fourth-color);
}

#sidebar.collapsed {
  width: 60px;
  padding: 0.5rem;
}

#sidebar.collapsed .dropdown-content,
#sidebar.collapsed .dropdown-btn {
  display: none;
}


main {
  flex: 1;
  min-width: 0; 
  overflow-y: auto; /* Main content scrolls independently */
  background: var(--fourth-color); /* White background */
}

#selection-toolbar {
	background-color: #fff;
	color: var(--fifth-color);
	padding: 10px;
	border-radius: 5px;
	position: fixed;
	width: 100%;
	z-index: 1000;
}

#selection-toolbar button {
	background-color: var(--fifth-color);
	color: #fff;
	border: none;
	padding: 8px 14px;
	font-size: 13px;
	cursor: pointer;
	border-radius: 20px;
}

#selection-toolbar button:hover {
  background-color: #555;
  color: #fff;
}

#selection-toolbar.hidden {
  display: none;
}

.bulk-action-dropdown {
  position: absolute;
  background-color: #fff;
  padding: 10px;
  display: none;
}

.bulk-action-dropdown:not(.hidden) {
  display: block;
}

#bulk-action {
  position: relative;
  background-color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
}

#bulk-action.active {
  background-color: #f0f0f0;
  color: var(--fifth-color);
}

#content {
  padding: 1rem;
  border: 1px solid var(--secondary-color); /* Secondary color border */
  border-radius: 5px;
  padding: 1rem;
  background: var(--fourth-color); /* White background */
  min-height: 100%; /* Ensure it fills the available space */
  box-sizing: border-box;
}

/* Main Content Area */
.content-area {
  padding: 2rem;
  background-color: var(--fourth-color);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.welcome-card {
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Footer */
footer {
  background-color: var(--secondary-color); /* Secondary color */
  color: var(--fifth-color); /* Fifth color for text */
  text-align: center;
  padding: 1rem;
  font-size: 13px;
}

footer a {
  color: var(--fifth-color); /* Fifth color for text */
  text-decoration: none;
  margin: 0 0.5rem;
  font-weight: bold;
  transition: color 0.3s;
}

footer a:hover {
  color: var(--primary-color); /* Primary color on hover */
  text-decoration: underline;
}

/* Draw Panel Styling */
.draw-panel-full {
  position: absolute;
  top: 80px; /* below the header */
  left: 0;
  right: 0;
  height: calc(100% - 60px); /* avoid overlapping header */
  background: white;
  z-index: 1001;
  overflow-y: auto;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}


.draw-panel-side {
  position: relative;
  top: 0; right: 0; bottom: 0;
  width: 400px;
  max-width: 90vw;
  min-width: 250px;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0,0,0,0.2);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: width 0.2s;
}
.draw-panel-content {
  flex: 1;
  overflow: auto;
  padding: 24px;
}
.draw-panel-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #333;
  cursor: pointer;
  z-index: 1;
}
.draw-panel-full.hidden,
.draw-panel-side.hidden {
  display: none;
}
.draw-panel-resizer {
  width: 6px;
  cursor: ew-resize;
  background: #eee;
  position: absolute;
  left: 0; top: 0; bottom: 0;
  z-index: 2;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  /* Header Styling */
  header .branding .logo {
    margin-left: 0px;
  }

  header .search-bar {
    display: none;
  }

  #menuToggle {
    display: block;
    font-size: 22px;
  }

  #sidebar {
    position: fixed;
    left: 0;
    height: calc(100% - 60px);
    transform: translateX(-100%);
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  }

  #sidebar.show {
    transform: translateX(0);
  }

  .innerBody {
    flex-direction: column;
  }

  #content {
    min-height: 84%;
  }

  footer {
    font-size: 12px;
  }
}

