
/* -------------------- Global Style Reset -------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Lexend', sans-serif;
  background: linear-gradient(to right, #f0f4f8, #e9eff5);
  color: #333;
  min-height: 100vh;
}

/* -------------------- Glass Card Style -------------------- */
.glass {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
/* ---------- Dashboard Layout ---------- */
.dashboard-container {
    display: flex;
  min-height: 100vh; /* use min-height, not fixed height */
  flex-direction: row;  /* Prevent overall page scrolling */
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: white;
  border-right: 1px solid #e0e0e0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}
.sidebar-header {
  padding: 20px;
  font-size: 24px;
  font-weight: 700;
  background: white;
  color: white;
  text-align: center;
}
.sidebar-menu {
  padding: 10px 0;
}
.sidebar-menu li {
  position: relative;
}
.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 14px 14px;
  color: #284d71;
  font-weight: 500;
  transition: background 0.3s;
  border-left: 4px solid transparent;
  font-size: 13px;
    text-align: center;
    font-weight: 400;
}
i.fa-solid.fa-chevron-down.submenu-arrow {
    margin-left: 15px;
    font-size: 11px;
}
.sidebar-menu a.active,
.sidebar-menu a:hover {
  background: #f0f4f8;
  border-left: 4px solid #d4252b;
}
.sidebar-menu i {
  margin-right: 10px;
  font-size: 16px;
}

/* Submenus */
.submenu-items {
  display: none;
  padding-left: 30px;
}
.submenu.open .submenu-items {
  display: block;
}
.submenu-toggle {
  cursor: pointer;
  justify-content: start;
}

/* -------------------- Main Content -------------------- */
.main-content {
  margin-left: 260px;
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
  min-height: 100vh;
}

/* Topbar: Sticky in the content area */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.45);
  padding: 12px 20px;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 999;
  border-radius: 0 0 16px 16px;
}

/* User Dropdown in Topbar */
.user-menu {
  display: flex;
  align-items: center;
  position: relative;
}

.user-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #284d71;
  cursor: pointer;
}

.user-dropdown {
  position: absolute;
  top: 55px;
  right: 0;
  background: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  display: none;
  z-index: 100;
}

.user-dropdown ul {
  padding: 10px 0;
}

.user-dropdown ul li {
  padding: 10px 20px;
  border-bottom: 1px solid #f1f1f1;
}

.user-dropdown ul li:last-child {
  border-bottom: none;
}

.user-dropdown li a {
  display: block;
  padding: 10px 20px;
  color: #333;
  transition: background 0.2s;
}
.user-dropdown li a:hover {
  background: #f1f5f9;
}
.user-menu:hover .user-dropdown {
  display: block;
}
/* ------------ Account Page Container ------------ */
.container {
  max-width: 600px;
  margin: 10px auto;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}


/* Content Area */
.content {
  padding: 20px;
  flex-grow: 1;
}

/* Full-Width Container for Pages like Users */
.full-width {
  width: 100%;
  padding: 20px;
}

/* Sub-Menu for Users Page */
.sub-menu {
  margin-bottom: 20px;
}
.sub-menu a {
  margin-right: 20px;
  text-decoration: none;
  color: #284d71;
}
.sub-menu a.active {
  font-weight: bold;
}

/* ---------- Form & Container Styles ---------- */

.container{
  background-color: #fff;
  max-width: 100%;
  margin: 10px auto;
  padding: 20px 30px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


label {
  display: block;
  margin: 5px 0 5px;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}


button {
  width: 100%;
  padding: 12px;
  background-color: #284d71;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 20px;
  font-size: 1em;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #233d5a;
}


/* ---------- Password Field Toggle ---------- */
.password-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-container input {
  width: 100%;
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  cursor: pointer;
  font-size: 1.1em;
  color: #284d71;
}


/* ---------- Filter Form Styles ---------- */
.filter-form {
    gap: 15px;
    flex-wrap: nowrap;
    margin-bottom: 20px;
    align-items: anchor-center;
    padding: 20px;
    background: #f3f3f3;
    border-radius: 10px;
}

.filter-item {
  display: flex;
  flex-direction: column;
    width: -webkit-fill-available;
}

.filter-item label {
  margin-bottom: 5px;
  font-weight: bold;
  white-space: nowrap;
}

.filter-item input[type="text"],
.filter-item input[type="date"],
.filter-item select {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.filter-form button {
  padding: 6px 12px !important;
  border: none;
  background-color: #284d71;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0px;
}

.filter-form button:hover {
  background-color: #233d5a;
}


/* Vehicle List Container */
.vehicle-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}


/* ---------- Media Queries for Tablet Devices ---------- */
@media (max-width: 1024px) and (min-width: 769px) {
  /* For tablet, we reduce the sidebar width */
  .sidebar {
    width: 200px;
  }
  .main-content {
    margin-left: 200px;
  }
  
  /* Optionally, adjust font sizes for readability */
  .sidebar-menu li a {
    font-size: 0.95em;
  }
  .topbar {
    font-size: 0.95em;
  }
}

/* ---------- Media Queries for Mobile Devices ---------- */
@media (max-width: 768px) {
  /* Change dashboard layout to vertical */
  .dashboard-container {
    flex-direction: column;
    height: auto;
  }
  
  /* Sidebar moves to top */
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }
  
  /* Main content adjusts */
  .main-content {
    margin-left: 0;
    width: 100%;
    height: auto;
  }
  
  /* Topbar stays at top */
  .topbar {
    position: relative;
    width: 100%;
  }
  
  /* Adjust tables for smaller screens */
  .user-list-table {
    font-size: 14px;
    overflow-x: auto;
    display: block;
    width: 100%;
  }
  
  /* Filter form wraps on smaller screens */
  .filter-form {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .filter-item {
    width: 100%;
  }
}


/* Form Row for grouping fields side-by-side */
.form-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.form-group.half {
  flex: 1;
  min-width: 200px;
}

/* Form Group common styles */
.form-group {

  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1em;
}

/* Custom date input styling */
.custom-date {
  background-color: #fdfdfd;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1em;
}

button[type="submit"] {
  padding: 12px;
  background-color: #284d71;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s;
  width: auto;
}

button[type="submit"]:hover {
  background-color: #233d5a;
}

/* Manage button style next to Vehicle Type label */

 /*vehicle type popup*/
 /* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}
.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 5px;
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}
.vehicle-types-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}
.vehicle-types-table th,
.vehicle-types-table td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: left;
}
.vehicle-types-table th {
  background-color: #284d71;
  color: #fff;
}

/* Container to hold the label and manage button inline */
.label-with-button {
  display: -webkit-inline-box;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.label-with-button label {
  margin: 0;
  font-weight: 500;
}

/* Manage button styling */
.manage-btn {
  background: none;
  border: none;
  color: #284d71;
  font-size: 0.9em;
  cursor: pointer;
  padding: 0;
    text-align: left;
    margin-top: 0px;
}
.manage-btn:hover {
  text-decoration: underline;
  background: none;
}

/* Form Group for improved spacing */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1em;
}

/* Form Row for grouping fields side-by-side */
.form-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.form-group.half {
  flex: 1;
  min-width: 200px;
}

/* Custom date input styling */
.custom-date {
  background-color: #fdfdfd;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1em;
}

/* Button styling */
button[type="submit"] {
  padding: 12px;
  background-color: #284d71;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s;
}

button[type="submit"]:hover {
  background-color: #233d5a;
}

/* Style for the 'Create New Trip' button in header */
.create-trip-btn {
  background: rgba(40, 77, 113, 0.85);
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  border: none;
  font-weight: 500;
  transition: 0.3s ease;
}
.create-trip-btn:hover {
  background: rgba(40, 77, 113, 1);
}

/* Trip Info styling in top bar */
.trip-info {
  display: inline-block;
  margin-right: auto;
  font-size: 0.9em;
}

.trip-info span {
  margin-left: 15px;
  font-weight: 500;
}



/*driver master css*/
/* Full-width container override */
.container.full-width {
  width: 100%;
  max-width: 100%;
  padding: 20px;
  margin: 0;
}

/* Table styles for driver list */
/* Group container for grouping related fields */
/* Full-width container override */
.container.full-width {
  width: 100%;
  max-width: 100%;
  padding: 20px;
  margin: 0;
}

/* Table styles for driver list */
.user-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.user-list-table th,
.user-list-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}
.user-list-table th {
    background-color: #284d71;
    color: #fff;
}
.user-list-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.user-list-table tr:hover {
    background-color: #f1f1f1;
}
.action-icons a {
    margin-right: 10px;
    color: #284d71;
    text-decoration: none;
}
.action-icons a:hover {
    color: #233d5a;
}

/* Group container for driver fields */
.group-container {
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.group-container h3 {
  margin-top: 0;
  font-size: 1.1em;
  color: #284d71;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

/* Form Row for grouping fields side-by-side */
.form-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

/* Adjust width for half and quarter columns */
.form-group.half {
  flex: 1;
  min-width: 200px;
}

.form-group.quarter {
  flex: 1;
  min-width: 150px;
}

/* Common Form Group Styling */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1em;
}

/* Custom date input styling */
.custom-date {
  background-color: #fdfdfd;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1em;
}

button[type="submit"] {
  padding: 12px;
  background-color: #284d71;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s;
}

button[type="submit"]:hover {
  background-color: #233d5a;
}




/* Toggle Button Group */
.status-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.status-toggle button {
  padding: 8px 16px;
  border: none;
  background-color: #ddd;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}
.status-toggle button.active {
  background-color: #284d71;
  color: #fff;
}
.status-toggle button:hover {
  background-color: #ccc;
}

/* Live Status Container */
.live-status-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

/* Each Trip Card */
.live-status-card {
  flex: 1 1 100%;
  border: 1px solid #ddd;
  border-left: 5px solid #f0ad4e; /* Orange border for live trips */
  border-radius: 5px;
  padding: 15px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

/* Live Status Content arranged horizontally */
.live-status-content {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}
.trip-group {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: #f8f8f8;
  border-radius: 4px;
  flex: 1 1 200px;
}
.group-label {
  font-weight: 600;
  color: #284d71;
}
.group-value {
  font-weight: 400;
}

/* Footer with buttons */
.live-status-footer {
  margin-top: 10px;
  text-align: right;
}
.edit-trip-btn, .end-trip-btn {
  padding: 6px 10px;
  background-color: #284d71;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9em;
  transition: background-color 0.3s;
  margin-left: 10px;
}
.end-trip-btn {
  background-color: #d9534f;
}
.edit-trip-btn:hover {
  background-color: #233d5a;
}
.end-trip-btn:hover {
  background-color: #c9302c;
}

/* Beautiful Table Styling */
.user-list-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Lexend Deca', sans-serif;
  margin: 20px 0;
  font-size: 0.95em;
  min-width: 400px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.user-list-table thead tr {
  background-color: #284d71;
  color: #ffffff;
  text-align: left;
  font-weight: bold;
}

.user-list-table th,
.user-list-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
}

.user-list-table tbody tr {
  border-bottom: 1px solid #ddd;
}

.user-list-table tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

.user-list-table tbody tr:hover {
  background-color: #e9e9e9;
}

.user-list-table tbody tr:last-of-type {
  border-bottom: 2px solid #284d71;
}

/* Optional: Style action icons inside table cells */
.action-icons a {
  margin-right: 10px;
  color: #284d71;
  font-size: 1.1em;
  transition: color 0.3s;
}

.action-icons a:hover {
  color: #233d5a;
}

input[type="date"]{
    font-family: 'Lexend';
}


/* Notification Bell */
.notification-container {
  position: relative;
  margin-left: 20px;
  cursor: pointer;
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #d4252b;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: bold;
}
#notifBell {
  font-size: 20px;
  color: #284d71;
  cursor: pointer;
}
.notification-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 35px;
  width: 430px;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 10px;
  padding: 15px;
  z-index: 999;
}
.notification-dropdown h4 {
  margin-bottom: 10px;
  font-size: 16px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}
#notifContent {
  max-height: 300px;
  overflow-y: auto;
}


/* Scrollbar (Optional) */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 6px;
}



/* -------------------- Mobile Responsive -------------------- */
.sidebar-toggle {
  display: none;
  font-size: 24px;
  background: rgba(255,255,255,0.6);
  color: #284d71;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1100;
  border-radius: 10px;
  backdrop-filter: blur(8px);
}
@media (max-width: 992px) {
  .sidebar {
    left: -260px;
  }
  .sidebar.active {
    left: 0;
  }
  .main-content {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: block;
  }
}

/* Optional: Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 6px;
}
