.pusm-wrapper {
  max-width: 960px;
  margin: 0 auto 40px;
  padding: 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

/* Wide layout for dashboards like professional web app */
.pusm-wrapper.pusm-wrapper-dash {
  max-width: 1200px;
}

@media (min-width: 1280px) {
  .pusm-wrapper.pusm-wrapper-dash {
    max-width: 1400px;
  }
}

.pusm-wrapper h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.pusm-form .pusm-row {
  margin-bottom: 16px;
}

.pusm-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
}

.pusm-form input[type="text"],
.pusm-form input[type="email"],
.pusm-form input[type="number"],
.pusm-form input[type="password"],
.pusm-form input[type="date"],
.pusm-form input[type="time"],
.pusm-form select,
.pusm-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 14px;
}

.pusm-form textarea {
  min-height: 90px;
}

.pusm-btn,
.pusm-btn-secondary,
.pusm-btn-outline,
.pusm-btn-small {
  display: inline-block;
  border-radius: 999px;
  padding: 8px 18px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
}

.pusm-btn {
  background: #2563eb;
  color: #ffffff;
}

.pusm-btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
}

.pusm-btn-outline {
  background: transparent;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.pusm-btn-small {
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  padding: 4px 12px;
}

.pusm-message {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

.pusm-success {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.pusm-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* Success card after booking */
.pusm-success-card {
  border-radius: 16px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  padding: 16px 18px;
  margin: 12px 0 24px;
}

.pusm-success-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.pusm-booking-id {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pusm-success-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Table styling */
.pusm-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.pusm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* Desktop/tablet: fixed layout, no horizontal scroll if possible */
@media (min-width: 1024px) {
  .pusm-table.pusm-table-dash {
    table-layout: fixed;
  }

  .pusm-table.pusm-table-dash th,
  .pusm-table.pusm-table-dash td {
    white-space: normal;
    word-break: break-word;
  }

  .pusm-table.pusm-table-dash th:nth-child(1),
  .pusm-table.pusm-table-dash td:nth-child(1) {
    width: 70px;
  }
  .pusm-table.pusm-table-dash th:nth-child(2),
  .pusm-table.pusm-table-dash td:nth-child(2) {
    width: 180px;
  }
  .pusm-table.pusm-table-dash th:nth-child(3),
  .pusm-table.pusm-table-dash td:nth-child(3) {
    width: 140px;
  }
  .pusm-table.pusm-table-dash th:nth-child(6),
  .pusm-table.pusm-table-dash td:nth-child(6) {
    width: 200px;
  }
}

.pusm-table thead tr {
  background: #f8fafc;
}

.pusm-table th,
.pusm-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

/* Zebra rows like helpdesk */
.pusm-table tbody tr:nth-child(odd) {
  background: #ffffff;
}
.pusm-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

/* Status badges */
.pusm-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pusm-status-pending,
.pusm-status-booking_confirmed,
.pusm-status-technician_assigned {
  background: #dbeafe;
  color: #1d4ed8;
}

.pusm-status-on_the_way,
.pusm-status-reached_location,
.pusm-status-pickup_done,
.pusm-status-at_service_centre,
.pusm-status-diagnosis,
.pusm-status-in_progress,
.pusm-status-ready_for_delivery,
.pusm-status-out_for_delivery {
  background: #fef9c3;
  color: #92400e;
}

.pusm-status-completed,
.pusm-status-closed_paid {
  background: #bbf7d0;
  color: #166534;
}

.pusm-status-closed_due {
  background: #fee2e2;
  color: #b91c1c;
}

.pusm-status-hold_part_pending {
  background: #ede9fe;
  color: #5b21b6;
}

.pusm-status-cancelled {
  background: #e5e7eb;
  color: #4b5563;
  text-decoration: line-through;
}

/* Mobile cards for table */
@media (max-width: 768px) {
  .pusm-wrapper {
    margin: 16px auto 24px;
    padding: 16px;
    border-radius: 0;
    box-shadow: none;
  }

  .pusm-table thead {
    display: none;
  }

  .pusm-table,
  .pusm-table tbody,
  .pusm-table tr,
  .pusm-table td {
    display: block;
    width: 100%;
  }

  .pusm-table tr {
    margin-bottom: 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    padding: 8px 10px;
  }

  .pusm-table td {
    border: none;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    padding-left: 48px;
  }

  .pusm-table td:last-child {
    border-bottom: none;
  }

  .pusm-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    top: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
  }
}

/* small texts */
.pusm-help-text,
.pusm-small-text {
  font-size: 12px;
  color: #6b7280;
}

.pusm-location-status {
  font-size: 13px;
  margin-top: 6px;
}

.pusm-track-result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.pusm-status-note {
  margin-top: 10px;
  font-size: 13px;
  color: #4b5563;
}

.pusm-filter-form {
  margin: 12px 0 16px;
}

.pusm-filter-form select {
  min-width: 220px;
}
