.bms-wrapper {
  --bms-brand: #111111;
  border: 1px solid #dddddf;
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f7 100%);
}

.bms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.bms-wrapper label,
.bms-portal label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.bms-wrapper input,
.bms-wrapper select,
.bms-wrapper textarea,
.bms-portal input,
.bms-admin-filters input,
.bms-admin-filters select {
  width: 100%;
  border: 1px solid #d9d9dd;
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff;
}

.bms-full {
  margin-top: 12px;
}

.bms-btn {
  border: 0;
  border-radius: 999px;
  background: var(--bms-brand);
  color: #fff;
  font-weight: 700;
  padding: 12px 18px;
  cursor: pointer;
  margin-top: 12px;
}

.bms-response {
  margin-top: 10px;
  min-height: 18px;
  font-weight: 700;
}

.bms-response.is-success {
  color: #126e2b;
}

.bms-response.is-error {
  color: #b42318;
}

.bms-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.bms-card {
  border: 1px solid #e2e4e9;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.bms-card h3 {
  margin-top: 0;
}

.bms-meta {
  color: #555a67;
}

.bms-portal {
  border: 1px solid #e2e4e9;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.bms-portal-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.bms-loyalty {
  font-weight: 700;
}

.bms-table {
  width: 100%;
  border-collapse: collapse;
}

.bms-table th,
.bms-table td {
  border: 1px solid #e4e6eb;
  padding: 8px;
  text-align: left;
}

.bms-shell {
  --bms-brand: #1c1917;
  --bms-accent: #c4a035;
  --bms-surface: #fafaf9;
  --bms-elevated: #ffffff;
  --bms-border: #e7e5e4;
  --bms-text: #1c1917;
  --bms-muted: #78716c;
  --bms-radius: 14px;
  --bms-shadow: 0 1px 2px rgba(28, 25, 23, 0.06), 0 8px 24px rgba(28, 25, 23, 0.06);
  max-width: 1400px;
  margin: 8px 12px 32px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bms-text);
}

.bms-shell .bms-admin-wrap {
  margin: 0;
}

.bms-admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bms-border);
}

.bms-admin-head h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bms-text);
}

.bms-admin-sub {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--bms-muted);
  max-width: 42rem;
}

.bms-range-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bms-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  color: var(--bms-text);
  background: var(--bms-elevated);
  border: 1px solid var(--bms-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bms-chip:hover,
.bms-chip:focus {
  border-color: color-mix(in srgb, var(--bms-brand) 35%, var(--bms-border));
  color: var(--bms-brand);
  outline: none;
}

.bms-chip.is-active {
  background: var(--bms-brand);
  color: #fff;
  border-color: var(--bms-brand);
}

.bms-chip.is-active:hover {
  color: #fff;
  filter: brightness(1.05);
}

.bms-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 0 0 28px;
}

.bms-quick-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--bms-radius);
  background: var(--bms-elevated);
  border: 1px solid var(--bms-border);
  box-shadow: var(--bms-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.bms-quick-card:hover,
.bms-quick-card:focus {
  border-color: color-mix(in srgb, var(--bms-brand) 40%, var(--bms-border));
  transform: translateY(-2px);
  outline: none;
  color: inherit;
}

.bms-quick-card strong {
  font-size: 15px;
  color: var(--bms-text);
}

.bms-quick-card span {
  font-size: 12px;
  color: var(--bms-muted);
}

.bms-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 14px;
  color: var(--bms-text);
}

.bms-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}

.bms-stat-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--bms-radius);
  padding: 16px 18px;
  background: var(--bms-elevated);
  border: 1px solid var(--bms-border);
  box-shadow: var(--bms-shadow);
}

.bms-stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--bms-accent), var(--bms-brand));
  opacity: 0.9;
}

.bms-stat-card h3 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bms-muted);
}

.bms-stat-card strong {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--bms-text);
}

.bms-table-wrap {
  border-radius: var(--bms-radius);
  border: 1px solid var(--bms-border);
  background: var(--bms-elevated);
  box-shadow: var(--bms-shadow);
  overflow: auto;
  margin-bottom: 16px;
}

.bms-table-wrap table.widefat {
  border: 0;
  box-shadow: none;
}

.bms-table-wrap table.widefat thead th,
.bms-table-wrap table.widefat tfoot th {
  background: var(--bms-surface);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bms-muted);
}

.bms-table-wrap table.widefat td,
.bms-table-wrap table.widefat th {
  padding: 12px 14px;
  vertical-align: middle;
}

.bms-table-wrap table.widefat tbody tr:hover {
  background: color-mix(in srgb, var(--bms-surface) 80%, #fff);
}

.bms-table-wrap .bms-booking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bms-table-wrap .bms-booking-actions select {
  min-width: 120px;
}

.bms-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bms-surface);
  color: var(--bms-muted);
  border: 1px solid var(--bms-border);
}

.bms-badge--pending {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.bms-badge--confirmed {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.bms-badge--completed {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.bms-badge--cancelled {
  background: #f5f5f4;
  color: #57534e;
  border-color: var(--bms-border);
}

.bms-badge--no_show {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.bms-badge--waiting {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.bms-badge--paid {
  background: #ecfdf5;
  color: #047857;
}

.bms-badge--active {
  background: #eff6ff;
  color: #1d4ed8;
}

.bms-admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: flex-end;
  padding: 16px 18px;
  border-radius: var(--bms-radius);
  background: var(--bms-elevated);
  border: 1px solid var(--bms-border);
  box-shadow: var(--bms-shadow);
}

.bms-admin-filters .button-primary {
  box-shadow: none;
}

.bms-pagination {
  margin: 8px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.bms-pagination .page-numbers {
  display: inline-flex;
  min-width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--bms-elevated);
  border: 1px solid var(--bms-border);
  text-decoration: none;
  font-weight: 600;
  color: var(--bms-text);
}

.bms-pagination .page-numbers.current {
  background: var(--bms-brand);
  color: #fff;
  border-color: var(--bms-brand);
}

.bms-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 4px;
}

.bms-bar-row {
  display: grid;
  grid-template-columns: 88px 1fr minmax(72px, auto);
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.bms-bar-label {
  color: var(--bms-muted);
  font-weight: 600;
}

.bms-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bms-surface);
  overflow: hidden;
  border: 1px solid var(--bms-border);
}

.bms-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bms-brand), color-mix(in srgb, var(--bms-accent) 70%, var(--bms-brand)));
  min-width: 2px;
  transition: width 0.35s ease;
}

.bms-bar-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.bms-card-block {
  border-radius: var(--bms-radius);
  background: var(--bms-elevated);
  border: 1px solid var(--bms-border);
  box-shadow: var(--bms-shadow);
  padding: 20px 22px;
  margin-bottom: 24px;
}

.bms-card-block h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.bms-ics-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  margin-top: 12px;
}

.bms-ics-box input[type="text"] {
  flex: 1 1 240px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.bms-settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 6px;
  border-radius: var(--bms-radius);
  background: var(--bms-surface);
  border: 1px solid var(--bms-border);
}

.bms-settings-tab {
  margin: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  color: var(--bms-muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.bms-settings-tab:hover,
.bms-settings-tab:focus {
  color: var(--bms-text);
  background: color-mix(in srgb, var(--bms-elevated) 70%, transparent);
  outline: none;
}

.bms-settings-tab[aria-selected="true"] {
  background: var(--bms-brand);
  color: #fff;
}

.bms-settings-panel .form-table th {
  width: 220px;
  padding-left: 0;
}

.bms-settings-panel .form-table {
  margin-top: 0;
}

.bms-empty-hint {
  padding: 28px 20px;
  text-align: center;
  color: var(--bms-muted);
  font-weight: 500;
}

@media (max-width: 640px) {
  .bms-shell {
    margin-right: 0;
  }

  .bms-bar-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .bms-bar-val {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .bms-wrapper,
  .bms-portal {
    padding: 12px;
  }
  .bms-btn {
    width: 100%;
  }
}

