html,
body {
  overflow-x: hidden;
}

.custom-admin-container {
  padding: 36px 0 48px;
  min-height: 100vh;
  overflow: hidden;
  width: 100%;
  /* max-width: 100%; */
  box-sizing: border-box;
}

.admin-page-header {
  margin-bottom: 12px;
}

.admin-page-title {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 700;
  color: #212121;
  /* letter-spacing: -0.04em; */
}

.admin-page-subtitle {
  margin: 0 0 18px;
  font-size: 14px;
  color: #6f6675;
  line-height: 1.5;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #eadfec;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fcf9fd 100%);
  box-shadow: 0 10px 26px rgba(96, 60, 95, 0.06);
}

.admin-toolbar__left {
  flex: 1;
  min-width: 0;
}

.admin-toolbar__right {
  flex: 0 0 auto;
}

.status-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-filter-pills .filter-pill {
  appearance: none;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5d9e7;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: #514559;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.status-filter-pills .filter-pill:hover {
  transform: translateY(-1px);
  border-color: #cdb8cf;
  box-shadow: 0 8px 18px rgba(96, 60, 95, 0.08);
}

.status-filter-pills .filter-pill.active {
  background: linear-gradient(135deg, #603C5F 0%, #74566f 100%);
  border-color: #603C5F;
  color: #fff;
  box-shadow: 0 10px 20px rgba(96, 60, 95, 0.18);
}

.status-filter-pills .filter-pill .count {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.92);
  color: #603C5F;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(96, 60, 95, 0.12);
}

.status-filter-pills .filter-pill.active .count {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.admin-search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #dccce0;
  border-radius: 999px;
  padding: 0 14px;
  width: 100%;
  min-width: 280px;
  min-height: 44px;
  box-shadow: 0 6px 18px rgba(96, 60, 95, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-search-bar:focus-within {
  border-color: #603C5F;
  box-shadow: 0 0 0 4px rgba(96, 60, 95, 0.12);
  transform: translateY(-1px);
}

.admin-search-bar .search-icon {
  color: #8f8295;
  margin-right: 10px;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.admin-search-bar input {
  border: 0;
  font-size: 13px;
  width: 100%;
  outline: none;
  color: #392c40;
  background: transparent;
  padding: 10px 0;
}

.admin-search-bar input::placeholder {
  color: #a89bab;
}

.booking-count {
  color: #685c70;
  font-size: 14px;
  margin: 0 0 14px;
}

.booking-count strong {
  color: #2b2030;
}

.admin-table-wrapper {
  border: 1px solid #eadfec;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 40px rgba(96, 60, 95, 0.08);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.booking-table,
.atr-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.booking-table th,
.atr-table th {
  background: linear-gradient(135deg, #603C5F 0%, #6c4767 100%);
  color: #fff;
  padding: 0 14px;
  height: 48px;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.booking-table td,
.atr-table td {
  padding: 14px;
  border-bottom: 1px solid #f1eaf2;
  vertical-align: middle;
  font-size: 14px;
  font-weight: 500;
  color: #2c2330;
}

.booking-table tr:last-child td,
.atr-table tr:last-child td {
  border: none;
}

.booking-table tbody tr,
.atr-table tbody tr {
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.booking-table tbody tr:hover,
.atr-table tbody tr:hover {
  background: #fcf7fd;
}

.location-col {
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-from,
.location-to {
  max-width: 110px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.table-customer-name {
  display: block;
  max-width: 160px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.icon-text {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 4px;
}

.sr-only {
  clip-path: inset(50%);
  white-space: nowrap;
  border-width: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
}

.view-more-button {
  height: 34px;
  width: 34px;
  line-height: 1;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #faf7fb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.view-more-button:hover {
  background: #f3ecf4;
  border-color: #e0d2e2;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(96, 60, 95, 0.08);
}

.booking-row.is-hidden,
.admin-card.is-hidden,
.driver-row.is-hidden {
  display: none !important;
}

.status-badge {
  text-transform: capitalize;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  line-height: 1.3;
  font-size: 12px;
  background: #eaeaea;
  color: #4d5660;
  font-weight: 500;
}

.status-badge.pending,
.status-badge.pending_payment {
  background: #FEF3C7;
  color: #92400E;
}

.status-badge.confirmed {
  background: #DBEAFE;
  color: #1E40AF;
}

.status-badge.completed {
  background: #D1FAE5;
  color: #065F46;
}

.status-badge.cancelled {
  background: #FEE2E2;
  color: #991B1B;
}

.status-badge.refunded {
  background: #FFF7ED;
  color: #C2410C;
}

.status-badge.assigned {
  background: #DCFCE7;
  color: #15803D;
}

.status-badge.driver {
  background: transparent;
  color: #212121;
  padding: 0;
}

.driver-assignment-badge {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.drawer-open {
  overflow: hidden !important;
  overscroll-behavior: contain;
  position: relative !important;
  margin: 0;
  padding-right: 0;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: -496px;
  width: 496px;
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #fcf9fd 100%);
  box-shadow: -18px 0 44px rgba(47, 28, 48, 0.16);
  z-index: 9999;
  transition: right 0.3s ease-in-out;
  overflow-y: auto;
  font-size: 14px;
  color: inherit;
}

.side-drawer.open {
  right: 0;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 9998;
}

.drawer-overlay.open {
  display: block;
}

.drawer-content {
  padding: 22px;
}

.drawer-header {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #ece3ee;
}

.drawer-header .atr-col-2 {
  margin-bottom: 12px;
}

.drawer-service-details {
  font-size: 14px;
  text-transform: capitalize;
  color: #6f6675;
}

.drawer-h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #212121;
}

.drawer-h3-icon {
  display: flex;
  font-size: 14px;
  font-weight: 700;
  align-items: center;
  line-height: 1.2;
  gap: 8px;
  margin-bottom: 12px;
  color: #2b2030;
}

.drawer-text-value {
  font-weight: 500;
}

.drawer-text-sm {
  font-size: 12px;
}

.drawer-location-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-location-address {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.drawer-location-line {
  margin-left: 4px;
  border-left: 2px dashed #d9dfe5;
  height: 16px;
}

.drawer-card {
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eadfec;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(96, 60, 95, 0.05);
}

.drawer-divider {
  border: 0;
  border-top: 1px solid #ece3ee;
  margin: 22px 0;
}

.drawer-card .drawer-divider {
  margin: 8px 0;
}

.drawer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  background: linear-gradient(135deg, #603C5F, #7c5a77);
  color: #fff;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(96, 60, 95, 0.18);
}

.drawer-icon-bg {
  border-radius: 10px;
  background: #f4ecf5;
  height: 34px;
  width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #603C5F;
}

.drawer-trip-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #dccce0;
  margin-top: 6px;
  background: #fff;
  color: #392c40;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-select:focus {
  outline: none;
  border-color: #603C5F;
  box-shadow: 0 0 0 4px rgba(96, 60, 95, 0.12);
}

.drawer-action-panel {
  padding: 18px 22px 0;
}

.drawer-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.drawer-action-button {
  border: 0;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.drawer-action-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.drawer-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.drawer-action-button.is-complete {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.drawer-action-button.is-cancel {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.03), 0 8px 16px rgba(185, 28, 28, 0.08);
}

.drawer-action-button.is-cancel:hover {
  background: #fff5f5;
}

.drawer-action-button.is-muted {
  background: linear-gradient(135deg, #a5a0aa, #847a88);
}

.drawer-footer {
  border-top: 1px solid #ece3ee;
  padding: 18px 22px 24px;
  margin-top: 22px;
}

.close-btn {
  background: #fff;
  border: 1px solid #dccce0;
  border-radius: 14px;
  font-size: 14px;
  cursor: pointer;
  padding: 11px 16px;
  font-weight: 700;
  width: 100%;
  min-height: 42px;
  color: #392c40;
  box-shadow: 0 6px 16px rgba(96, 60, 95, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.close-btn:hover {
  background: #fbf7fc;
  border-color: #cdb8cf;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(96, 60, 95, 0.08);
}

.drawer-message {
  margin-top: 8px;
}

.drawer-message.is-error {
  color: #991B1B;
}

.drawer-message.is-success {
  color: #065F46;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal.open {
  display: flex;
}

.admin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
}

.admin-modal__dialog {
  position: relative;
  width: min(100%, 420px);
  background: linear-gradient(180deg, #ffffff 0%, #fcf9fd 100%);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 28px 64px rgba(47, 28, 48, 0.2);
  border: 1px solid #eadfec;
}

.admin-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #603C5F;
  margin-bottom: 8px;
}

.admin-modal__title {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: #212121;
  letter-spacing: -0.03em;
}

.admin-modal__body {
  color: #6f6675;
  line-height: 1.5;
}

.admin-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.admin-modal__button {
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-modal__button:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.admin-modal__button.is-secondary {
  background: #f4ecf5;
  color: #603C5F;
}

.admin-modal__button.is-primary {
  background: linear-gradient(135deg, #603C5F 0%, #74566f 100%);
  color: #fff;
}

.admin-card {
  display: none;
  border: 1px solid #eadfec;
  padding: 18px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fcf9fd 100%);
  box-shadow: 0 14px 30px rgba(96, 60, 95, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-card-header {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #212121;
}

.admin-card-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  color: #2c2330;
}

.admin-card-footer {
  border-top: 1px solid #efe5f0;
  padding-top: 12px;
}

.btn-assign {
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(135deg, #603C5F 0%, #74566f 100%);
  color: white;
  border: none;
  padding: 11px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(96, 60, 95, 0.14);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.btn-assign:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

#assign-driver-message {
  margin-top: 8px;
}

@media (max-width: 1160px) {
  .custom-admin-container {
    padding: 36px 32px 40px;
  }
}

@media (max-width: 1080px) {
  .custom-admin-container {
    padding: 36px 24px 40px;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar__right {
    width: 100%;
    padding-top: 0;
  }

  .admin-search-bar {
    width: 100%;
  }

  .admin-table-wrapper {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .booking-table {
    min-width: 1100px;
  }

  .booking-table th,
  .booking-table td {
    padding-left: 12px;
    padding-right: 12px;
  }

  .booking-table th {
    font-size: 12px;
  }

  .booking-table td {
    font-size: 13px;
  }

  .table-customer-name {
    max-width: 120px;
  }

  .location-from,
  .location-to {
    max-width: 90px;
  }

  .drawer-action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-table-wrapper {
    display: none;
  }

  .admin-card {
    display: block;
  }

  .card-container {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(96, 60, 95, 0.08);
    border-color: #dccce0;
  }
}

@media (max-width: 639px) {
  .custom-admin-container {
    padding: 36px 16px 40px;
  }

  .admin-page-title {
    font-size: 24px;
  }

  .atr-grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .side-drawer {
    width: 100%;
    right: -100%;
  }

  .drawer-content {
    padding: 20px 16px;
  }

  .admin-card {
    padding: 16px;
    border-radius: 16px;
  }

  .drawer-action-panel,
  .drawer-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}
