/* Variables & Root Settings */
:root {
  --blue: #287bff;
  --white: #fff;
  --grey: #f5f5f5;
  --black1: #222;
  --black2: #999;
  --aDark: #171f21;
  --aBlue: #537d96;
  --aGray: #374767;
  --aWhite: #f7f5f5;
}

/* Core Typography & Base Styles */
body {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
}

/* Layout Components */
.container-fluid {
  padding: 1rem;
}

/* Navigation Components */
.sidebar {
  position: fixed;
  width: 240px;
  height: 100%;
  transition: width 0.3s ease;
  z-index: 1030;
}

.sidebar ul li a {
  text-decoration: none;
  color: black;
}

.sidebar-collapsed {
  width: 4.5rem;
}

.sidebar.collapse.show {
  width: 240px;
}

.sidebar.collapse:not(.show) {
  display: block !important;
  width: 60px;
}

.sidebar-collapsed .nav-text {
  display: none;
}

/* Sidebar Collapse Functionality */
.sidebar {
  transition: width 0.3s ease;
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .bi-chevron-down {
  display: none;
}

.sidebar.collapse:not(.show) .nav-text,
.sidebar.collapse:not(.show) .brand-text,
.sidebar.collapse:not(.show) .bi-chevron-down {
    display: none;
}

.sidebar.collapsed .dropdown-toggle::after {
  display: none;
}

.sidebar.collapse:not(.show) .nav-link[data-bs-toggle="collapse"] span {
  display: none;
}

.sidebar.collapse:not(.show) .nav-link span {
  display: none;
}

.sidebar.collapsed .sidebar-toggle {
  transform: rotate(180deg);
}

/* Sidebar Collapse States */
.sidebar.collapse:not(.show) .nav-link {
  justify-content: center;
  padding: 0.75rem 0;
}

.sidebar.collapse:not(.show) .nav-link i {
  margin: 0;
  font-size: 1.25rem;
}

.sidebar.collapse:not(.show) .dropdown {
  display: flex;
  justify-content: center;
}

.sidebar.collapse:not(.show) .sidebar-brand {
  padding: 1rem 0;
}

/* Adjust parent menu items when collapsed */
.sidebar.collapse:not(.show) .nav-link[data-bs-toggle="collapse"] {
  justify-content: center;
}

/* Hide dropdown indicators when collapsed */
.sidebar.collapse:not(.show) .nav-link[data-bs-toggle="collapse"] .bi-chevron-down {
  display: none;
}

/* Center user profile icon when collapsed */
.sidebar.collapse:not(.show) .dropdown .dropdown-toggle {
  justify-content: center;
  padding: 0;
}

.page-container.sidebar-collapsed {
  /* margin-left: 60px;
  width: calc(100% - 60px); */
}

/* User Profile Section */
.dropdown-menu {
  min-width: 200px;
}

.dropdown-item {
  padding: 8px 16px;
  display: flex;
  align-items: center;
}

.dropdown-item:hover {
  background-color: var(--grey);
}


.topbar {
  position: relative;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

/* Card Components */
.tile {
  width: 100%;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0px 2px 3px -1px rgba(151, 171, 187, 0.7);
  float: left;
  transform-style: preserve-3d;
  margin: 10px 5px;
}

/* Form Elements */
.form-control {
  height: 44px;
  padding: 0 20px;
  vertical-align: middle;
  background: #fff;
  border: 1px solid #ddd;
  font-size: 16px;
  font-weight: 300;
  line-height: 44px;
  color: #888;
  border-radius: 4px;
}

/* Progress Stepper */
.stepper-wrapper {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.stepper-item {
  flex: 1;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Login Form */
.form-signin {
  width: 100%;
  max-width: 330px;
  padding: 15px;
  margin: auto;
}

.form-signin .checkbox {
  font-weight: 400;
}

.form-signin .form-floating:focus-within {
  z-index: 2;
}

.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.form-signin .form-floating:focus-within {
  z-index: 2;
}

.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Utility Classes */
.fontMono {
  font-family: monospace;
}

/* Navigation Components */
.sidebar-brand {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,.1);
}

.sidebar-brand i {
    color: var(--blue);
    font-size: 1.5rem;
}

/* Parent Menu Items */
.nav-link[data-bs-toggle="collapse"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-weight: 500;
}

.nav-link {
    padding: 0.75rem 1rem;
    color: var(--black1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    background-color: rgba(0,0,0,.05);
    color: var(--blue);
}

.nav-link.active {
    background-color: var(--blue);
    color: var(--white);
}
.nav-link:hover:not(.active) {
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateX(4px);
}

.nav-link i {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

/* Collapse Arrow Animation */
.nav-link[data-bs-toggle="collapse"] .bi-chevron-down {
  transition: transform 0.2s ease;
}

.nav-link[data-bs-toggle="collapse"][aria-expanded="true"] .bi-chevron-down {
  transform: rotate(-180deg);
}

.nav-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.page-container {
  margin-left: 60px; /* Matches sidebar width */
  width: calc(100% - 60px);
  padding: .1rem;
  transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Child Menu Items */
.collapse .nav-link {
  padding-left: 2.5rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

/* Active States */
/* Parent active when child is selected */
.collapse .nav-link.active + .nav-link[data-bs-toggle="collapse"] {
  color: var(--blue) !important;
  background-color: rgba(40, 123, 255, 0.1);
}

/* Main Content Spacing */
.main-content {
  position: relative;
    min-height: 100vh;
}

.trip-container {
  transition: all 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
}

.trip-container .fw-bold {
  font-weight: 500 !important;
}

.trip-container .text-muted {
  font-weight: 400;
}

.trip-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-menu {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.dropdown-item {
  padding: 8px 16px;
  color: #495057;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
}

.dropdown-item i {
  margin-right: 8px;
  width: 16px;
}

.leg-row {
  border-left: 4px solid transparent;
}

.leg-row:hover {
  border-left-color: #0d6efd;
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.table-dark {
  --bs-table-bg: #212529;
  --bs-table-striped-bg: #2c3034;
}

.leg-row td {
  vertical-align: middle;
  padding: 0.75rem;
  font-size: .6rem;
}

.table-header th {
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.card {
  transition: all 0.2s ease;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.card-header {
  background-color: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Mobile Navigation */
@media (max-width: 992px) {
  .sidebar {
      width: 100%;
      position: fixed;
      bottom: 0;
      height: auto;
      border-top: 1px solid rgba(0,0,0,.1);
      z-index: 1030;
  }
  
  .main-content {
      margin-left: 0;
  }
  
  .nav-text {
      display: none;
  }
  
  .nav-link i {
      margin: 0;
      font-size: 1.5rem;
  }

  .page-container {
      margin-left: 0;
      width: 100%;
      padding-bottom: 60px;
  }

  .navbar-brand {
      font-size: 1rem;
  }

  .nav-link {
      font-size: 0.9rem;
  }

  .dropdown-item {
      font-size: 0.9rem;
  }
}