:root {
  --mb-ink: #14263b;
  --mb-muted: #6b7a8f;
  --mb-line: #dce5ef;
  --mb-soft: #f5f8fc;
  --mb-card: #ffffff;
  --mb-navy: #003b70;
  --mb-navy-dark: #00264d;
  --mb-orange: #ff8400;
  --mb-success: #087a52;
  --mb-danger: #b42318;
  --mb-warning: #9a6700;
  --mb-brand: radial-gradient(circle at top right, rgba(255, 132, 0, 0.14), transparent 32%), linear-gradient(135deg, rgba(0, 38, 77, 0.96), rgba(0, 59, 112, 0.96));
}

.manage-bookings-v2 {
  min-height: 100vh;
  background: #f4f7fb;
  color: var(--mb-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.manage-bookings-v2 form {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.manage-bookings-v2 input,
.manage-bookings-v2 select,
.manage-bookings-v2 button {
  font: inherit;
  margin: 0;
}

.manage-bookings-v2 button { width: auto; }

.manage-bookings-v2 table,
.manage-bookings-v2 .page-content table {
  margin: 0;
  border: 0;
  box-shadow: none;
}

.manage-bookings-v2 table th,
.manage-bookings-v2 table td,
.manage-bookings-v2 .page-content table th,
.manage-bookings-v2 .page-content table td {
  border: 0;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mb-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.mb-page-header h1 {
  margin: 2px 0 5px;
  color: var(--mb-ink);
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.mb-page-header p {
  margin: 0;
  color: var(--mb-muted);
  line-height: 1.5;
  max-width: 760px;
}

.mb-eyebrow {
  color: var(--mb-navy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.mb-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mb-btn,
.mb-icon-btn,
.mb-page-btn,
.mb-tab {
  text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}

.mb-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  font-weight: 750;
  white-space: nowrap;
}

.mb-btn-primary {
  color: #fff !important;
  background: var(--mb-brand);
  box-shadow: 0 7px 20px rgba(0, 59, 112, .17);
}

.mb-btn-primary:hover { transform: translateY(-1px); filter: brightness(1.04); }

.mb-btn-secondary {
  color: var(--mb-navy) !important;
  background: #fff;
  border-color: var(--mb-line);
}

.mb-btn-secondary:hover,
.mb-btn-quiet:hover {
  color: var(--mb-navy-dark) !important;
  background: #f8fbff;
  border-color: #9bb8d4;
}

.mb-btn-quiet {
  color: var(--mb-muted) !important;
  background: transparent;
  border-color: transparent;
}

.mb-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mb-stat {
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--mb-line);
  border-radius: 13px;
  box-shadow: 0 3px 13px rgba(21, 36, 58, .035);
}

.mb-stat-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--mb-navy);
  background: #edf5fd;
  font-size: 17px;
}

.mb-stat span,
.mb-stat small {
  display: block;
}

.mb-stat span {
  color: var(--mb-muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.mb-stat strong {
  display: block;
  margin: 1px 0;
  color: var(--mb-ink);
  font-size: clamp(20px, 2.3vw, 27px);
  line-height: 1.1;
}

.mb-stat small { color: #8491a3; font-size: 12px; }

.mb-stat-accent {
  color: #fff;
  border-color: transparent;
  background: var(--mb-brand);
}

.mb-stat-accent .mb-stat-icon {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.mb-stat-accent span,
.mb-stat-accent strong,
.mb-stat-accent small { color: #fff; }
.mb-stat-accent small { opacity: .72; }

.mb-controls {
  margin-bottom: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--mb-line);
  border-radius: 13px;
  box-shadow: 0 4px 15px rgba(21, 36, 58, .04);
}

.mb-tabs {
  display: flex;
  gap: 5px;
  padding-bottom: 11px;
  margin-bottom: 11px;
  border-bottom: 1px solid #e9eef4;
  overflow-x: auto;
  scrollbar-width: thin;
}

.mb-tab {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  color: var(--mb-muted) !important;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.mb-tab span {
  min-width: 22px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 99px;
  background: #edf2f7;
  color: #607087;
  font-size: 11px;
}

.mb-tab:hover { background: #f5f8fc; }

.mb-tab.active {
  color: #fff !important;
  background: var(--mb-brand);
}

.mb-tab.active span { color: var(--mb-navy); background: #fff; }

.mb-filter-form {
  display: grid;
  grid-template-columns: minmax(240px, 1.8fr) repeat(4, minmax(130px, .7fr)) minmax(135px, .7fr) auto auto;
  gap: 8px;
  align-items: end;
}

.mb-search-field,
.mb-field {
  position: relative;
  min-width: 0;
}

.mb-field > span {
  display: block;
  margin: 0 0 4px 2px;
  color: var(--mb-muted);
  font-size: 11px;
  font-weight: 750;
}

.mb-search-field i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a98aa;
  pointer-events: none;
}

.manage-bookings-v2 .mb-search-field input,
.manage-bookings-v2 .mb-field input,
.manage-bookings-v2 .mb-field select {
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 11px;
  color: var(--mb-ink);
  background: #fbfcfe;
  border: 1px solid #d7e0ea;
  border-radius: 9px;
  outline: none;
}

.manage-bookings-v2 .mb-search-field input { padding-left: 36px; }

.manage-bookings-v2 .mb-search-field input:focus,
.manage-bookings-v2 .mb-field input:focus,
.manage-bookings-v2 .mb-field select:focus {
  border-color: #5f93bf;
  box-shadow: 0 0 0 3px rgba(255, 132, 0, .12);
  background: #fff;
}

.mb-filter-chip {
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfe0f0;
  border-radius: 99px;
  color: var(--mb-navy);
  background: #f0f7fe;
  font-size: 12px;
}

.mb-filter-chip a {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--mb-muted);
}

.mb-filter-chip a:hover { background: #dcebf8; color: var(--mb-navy); }

.mb-results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 11px;
  color: var(--mb-muted);
  font-size: 12px;
}

.mb-results-meta strong { color: var(--mb-ink); }
.mb-filter-hint { color: #8995a5; }
.mb-filter-hint kbd {
  padding: 1px 5px;
  color: #4f5f73;
  background: #f3f6fa;
  border: 1px solid #dce4ec;
  border-bottom-width: 2px;
  border-radius: 4px;
  font: inherit;
  font-weight: 800;
}

.mb-bookings-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--mb-line);
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(21, 36, 58, .045);
}

.mb-table-scroll { overflow-x: auto; }

.mb-bookings-table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
  min-width: 1020px;
  background: #fff;
  color: var(--mb-ink);
}

.mb-bookings-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 13px;
  color: #647389;
  background: #f7f9fc;
  border-bottom: 1px solid #e2e8ef !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mb-bookings-table tbody td {
  padding: 13px;
  vertical-align: middle;
  border-bottom: 1px solid #edf1f5 !important;
  font-size: 13px;
}

.mb-bookings-table tbody tr:last-child td { border-bottom: 0 !important; }

.mb-bookings-table tbody tr[data-row-href] { cursor: pointer; }
.mb-bookings-table tbody tr:hover { background: #f9fbfd; }
.mb-bookings-table tbody tr:focus-visible { outline: 2px solid var(--mb-orange); outline-offset: -2px; }

.mb-bookings-table td:nth-child(1) { width: 24%; }
.mb-bookings-table td:nth-child(2) { width: 20%; }
.mb-bookings-table td:nth-child(3) { width: 16%; }
.mb-bookings-table td:nth-child(4) { width: 12%; }
.mb-bookings-table td:nth-child(5) { width: 12%; }
.mb-bookings-table td:nth-child(6) { width: 9%; }
.mb-bookings-table td:nth-child(7) { width: 7%; }

.mb-booking-id-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.mb-id {
  color: var(--mb-navy);
  font-size: 12px;
  font-weight: 850;
}

.mb-source {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.mb-source.online { color: #075985; background: #eaf6ff; }
.mb-source.manual { color: #6b4f00; background: #fff6d8; }

.mb-lock {
  color: #8390a0;
  font-size: 10px;
}

.mb-booking-name,
.mb-customer,
.mb-time,
.mb-amount,
.mb-lane {
  display: block;
}

.mb-booking-name {
  max-width: 310px;
  overflow: hidden;
  color: var(--mb-ink);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mb-customer {
  max-width: 260px;
  overflow: hidden;
  color: var(--mb-navy) !important;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mb-time { margin-top: 2px; color: var(--mb-navy); font-weight: 800; }
.mb-lane { font-weight: 800; }
.mb-lane i { margin-right: 4px; color: var(--mb-navy); }
.mb-amount { font-size: 14px; font-weight: 850; }

.mb-bookings-table small {
  display: block;
  margin-top: 3px;
  color: #7d8a9b;
  font-size: 11px;
  line-height: 1.3;
}

.mb-muted { color: #8995a5 !important; }

.mb-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.mb-status-confirmed,
.mb-status-paid { color: #066344; background: #e8f8f1; }
.mb-status-checkedin { color: #fff; background: #4b5563; }
.mb-status-noshow { color: #fff; background: #111827; }
.mb-status-maintenance { color: #fff; background: #7a2525; }
.mb-status-pending { color: #855a00; background: #fff3cd; }
.mb-status-cancelled,
.mb-status-refunded { color: #9c2b21; background: #ffefed; }
.mb-status-expired { color: #626d7a; background: #edf0f3; }

.mb-actions-cell { text-align: right !important; }

.mb-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.mb-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #65758a !important;
  background: #fff;
  border: 1px solid #dce4ed;
  border-radius: 8px;
}

.mb-icon-btn:hover {
  color: var(--mb-navy) !important;
  background: #f3f8fd;
  border-color: #a8c1d9;
  transform: translateY(-1px);
}

.mb-icon-primary {
  color: #fff !important;
  border-color: transparent;
  background: var(--mb-brand);
}

.mb-icon-primary:hover { color: #fff !important; filter: brightness(1.04); }

.mb-empty {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.mb-empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  color: var(--mb-navy);
  background: #eef6fd;
  border-radius: 16px;
  font-size: 23px;
}

.mb-empty h2 { margin: 0 0 6px; color: var(--mb-ink); font-size: 20px; }
.mb-empty p { margin: 0 0 16px; color: var(--mb-muted); }

.mb-pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mb-page-btn {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mb-navy) !important;
  background: #fff;
  border: 1px solid var(--mb-line);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
}

.mb-page-btn:not(.disabled):hover { border-color: #9bb8d4; background: #f7fbff; }
.mb-page-btn.disabled { opacity: .45; pointer-events: none; }
.mb-page-position { color: var(--mb-muted); font-size: 12px; }
.mb-page-position strong { color: var(--mb-ink); }

@media (max-width: 1280px) {
  .mb-filter-form {
    grid-template-columns: minmax(250px, 1.6fr) repeat(3, minmax(130px, .75fr));
  }
  .mb-search-button,
  .mb-btn-quiet { align-self: end; }
}

@media (max-width: 1050px) {
  .mb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mb-filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mb-search-field { grid-column: span 2; }
}

@media (max-width: 760px) {
  .manage-bookings-v2.main-content { padding: 18px 12px 30px; }

  .mb-page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .mb-header-actions { width: 100%; }
  .mb-header-actions .mb-btn { flex: 1; }

  .mb-stats { grid-template-columns: 1fr 1fr; }
  .mb-stat { min-height: 83px; padding: 12px; }
  .mb-stat-icon { width: 36px; height: 36px; flex-basis: 36px; }

  .mb-filter-form { grid-template-columns: 1fr 1fr; }
  .mb-search-field { grid-column: 1 / -1; }
  .mb-search-button { width: 100%; }
  .mb-filter-form .mb-btn-quiet { width: 100%; }
  .mb-filter-hint { display: none; }

  .mb-bookings-card { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .mb-table-scroll { overflow: visible; }
  .mb-bookings-table { min-width: 0; display: block; background: transparent; }
  .mb-bookings-table thead { display: none; }
  .mb-bookings-table tbody { display: grid; gap: 10px; }
  .mb-bookings-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--mb-line);
    border-radius: 13px;
    box-shadow: 0 3px 12px rgba(21, 36, 58, .035);
  }

  .mb-bookings-table tbody td,
  .mb-bookings-table tbody td:nth-child(n) {
    width: auto;
    min-width: 0;
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f5 !important;
  }

  .mb-bookings-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #8a96a6;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .mb-bookings-table tbody td:first-child,
  .mb-bookings-table tbody td:nth-child(2),
  .mb-bookings-table tbody td:last-child {
    grid-column: 1 / -1;
  }

  .mb-bookings-table tbody td:last-child { border-bottom: 0 !important; }
  .mb-actions-cell { text-align: left !important; }
  .mb-row-actions { justify-content: flex-start; }
  .mb-booking-name,
  .mb-customer { max-width: 100%; }
}

@media (max-width: 480px) {
  .mb-stats { grid-template-columns: 1fr; }
  .mb-filter-form { grid-template-columns: 1fr; }
  .mb-search-field { grid-column: auto; }
  .mb-results-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
  .mb-pagination { justify-content: space-between; gap: 6px; }
  .mb-page-position { text-align: center; }
  .mb-bookings-table tbody tr { grid-template-columns: 1fr; }
  .mb-bookings-table tbody td,
  .mb-bookings-table tbody td:first-child,
  .mb-bookings-table tbody td:nth-child(2),
  .mb-bookings-table tbody td:last-child { grid-column: 1; }
}
