/* ── Typography system ── */
:root {
  --fs-page-title: 1.4rem;
  --fs-card-heading: .95rem;
  --fs-card-sub: .8rem;
  --fs-body: .9rem;
  --fs-input: .9rem;
  --fs-label: .78rem;
  --fs-th: .75rem;
  --fs-td: .875rem;
  --fs-btn: .875rem;
  --fs-badge: .75rem;
  --fs-small: .78rem;
}

html, body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.login-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.sidebar {
  width: 250px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background-color: #1f1f21;
  transition: transform 0.3s ease;
  z-index: 1000;
}
.active > .page-link {
  background-color: #ff7a00 !important;
  border: none !important;
}

/* Navbar sits to the right of the sidebar */
.sn-navbar {
  position: fixed !important;
  top: 0;
  left: 250px;
  right: 0;
  z-index: 1030;
}

.main-content {
  margin-left: 250px;
  margin-top: 52px; /* push below fixed navbar */
  transition: margin 0.3s ease;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sn-navbar {
    left: 0 !important;
  }
  .main-content {
    margin-left: 0;
  }
  .sidebar.active {
    transform: translateX(0);
  }
}
.rotate-icon {
  transition: transform 0.3s ease;
}
.rotate-icon[aria-expanded='true'] {
  transform: rotate(180deg);
}
.navbar {
  background-color: white;
  padding: 10px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.search-container {
  position: relative;
  transition: all 0.3s ease;
}
.search-input {
  width: 0;
  opacity: 0;
  transition: all 0.3s ease;
  border: none;
  background: #f5f7fa;
  border-radius: 20px;
  padding-left: 40px;
}
.search-container.active .search-input {
  width: 250px;
  opacity: 1;
  padding: 8px 15px 8px 40px;
}
.search-icon {
  position: absolute;
  left: 10px;
  z-index: 2;
}
.custom-dropdown {
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 10px 0;
}
.custom-dropdown .dropdown-item {
  padding: 8px 20px;
}
@media (min-width: 768px) {
  .ms-lg-230 {
    margin-left: 260px !important;
  }
}
.form-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.form-check-input + label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  padding-left: 30px;
  font-size: 16px;
  color: #1f1f21;
}
.form-check-input + label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #fff;
  border: 1px solid #969696;
  border-radius: 4px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.form-check-input:checked + label::before {
  background-color: #ff7a00;
  border-color: #ff7a00;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.293 10.293l-2.146-2.147-1.414 1.414L6.293 13.12l8.147-8.147-1.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ── Shared rides table ── */
.pc-table thead th {
  font-size: var(--fs-th);
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid #e5e7eb !important;
  padding-bottom: .65rem;
  white-space: nowrap;
}
.pc-table tbody td {
  font-size: var(--fs-td);
  color: #374151;
  padding: .75rem .5rem;
  border-bottom: 1px solid #f3f4f6 !important;
  vertical-align: middle;
}
.pc-table tbody tr:last-child td { border-bottom: none !important; }
.pc-table tbody tr:hover td     { background: #fafafa; }

/* ── Status badges (circular bg) ── */
.badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-badge);
  font-weight: 600;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  letter-spacing: .02em;
  padding: 0;
}
.badge-completed  { background: #dcfce7; color: #16a34a; }
.badge-inprogress { background: #fef3c7; color: #d97706; }
.badge-pending    { background: #dbeafe; color: #2563eb; }
.badge-scheduled  { background: #f5f3ff; color: #7c3aed; }
.badge-cancelled  { background: #fee2e2; color: #dc2626; }

/* ── DataTables overrides ── */
div.dataTables_wrapper div.dataTables_filter,
div.dataTables_wrapper div.dataTables_length { display: none; }

/* Bottom row: info left, pagination right */
div.dataTables_wrapper div.dataTables_info {
  font-size: var(--fs-small);
  color: #9ca3af;
  padding-top: 1rem;
}

/* Pagination container */
div.dataTables_wrapper .dataTables_paginate {
  padding-top: 1rem;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

/* Reset all Bootstrap pagination noise */
div.dataTables_wrapper .dataTables_paginate .pagination {
  gap: 4px;
  margin: 0;
}
div.dataTables_wrapper .dataTables_paginate .page-item .page-link,
div.dataTables_wrapper .dataTables_paginate .paginate_button {
  all: unset !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 .5rem !important;
  font-size: var(--fs-small) !important;
  font-weight: 500 !important;
  color: #6b7280 !important;
  background: transparent !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: background .12s, color .12s !important;
  box-sizing: border-box !important;
  text-align: center !important;
  line-height: 1 !important;
  font-family: inherit !important;
}

/* Hover */
div.dataTables_wrapper .dataTables_paginate .page-item .page-link:hover,
div.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

/* Active / current */
div.dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
div.dataTables_wrapper .dataTables_paginate .paginate_button.current,
div.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #f37a20 !important;
  color: #fff !important;
  font-weight: 600 !important;
}

/* Disabled (prev/next) */
div.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: #d1d5db !important;
  background: transparent !important;
  cursor: default !important;
  pointer-events: none !important;
}
