/* WAO Appointment Manager — shared styles (booking page + admin) */
:root {
  color-scheme: dark;
  --brand: #0AFF16;
  --brand-dark: #000000;
  --bg: #000000;
  --surface: #000000;
  --text: #ffffff;
  --muted: #aaaaaa;
  --border: #333333;
  --danger: #ff6b5e;
  --ok: #0AFF16;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--brand); }
button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #000000;
  color: var(--text);
  border-radius: 8px;
  padding: 9px 14px;
}
button.primary {
  background: var(--brand);
  color: #111;
  border-color: var(--brand);
  font-weight: 700;
}
button.brand {
  background: var(--brand);
  color: #111;
  border-color: var(--brand);
  font-weight: 700;
}
button.danger { color: var(--danger); border-color: var(--danger); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #000000;
  color: var(--text);
}
label { display: block; font-weight: 600; margin: 12px 0 4px; }
.container { max-width: 960px; margin: 0 auto; padding: 16px; }
.card {
  background: #000000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
}
.muted { color: var(--muted); }
.error { color: var(--danger); font-weight: 600; }
.success { color: var(--ok); font-weight: 600; }
.hidden { display: none !important; }
.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}
.service-card { cursor: pointer; border: 2px solid var(--border); }
.service-card.selected { border-color: var(--brand); background: #0f2a12; }
.service-card h3 { margin: 0 0 4px; }
.price { font-weight: 700; font-size: 1.1em; }
.calendar { width: 100%; border-collapse: collapse; }
.calendar th, .calendar td { text-align: center; padding: 8px 4px; }
.calendar td button { width: 100%; padding: 10px 4px; }
.calendar td button.closed { opacity: 0.35; }
.calendar td button.full { opacity: 0.6; }
.calendar td button.selected { background: var(--brand); border-color: var(--brand); color: #111; font-weight: 700; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slots button.selected { background: var(--brand); border-color: var(--brand); color: #111; font-weight: 700; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { border-bottom: 1px solid var(--border); padding: 8px 6px; text-align: left; vertical-align: top; }
table.data th { background: var(--surface); }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--surface);
}
.badge.confirmed { background: #0AFF16; color: #000000; }
.badge.pending { background: #f5a623; color: #000000; }
.badge.cancelled { background: #e5484d; color: #ffffff; }
.badge.completed { background: #238636; color: #ffffff; }
.badge.no_show { background: #6e6e6e; color: #ffffff; }
.badge.moved { background: #2f6feb; color: #ffffff; }
.badge.rescheduled { background: #2f6feb; color: #ffffff; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tabs button.active { background: var(--brand); color: #111; border-color: var(--brand); }
.header { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.header img { max-height: 48px; }
#biz-logo { max-height: 72px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.steps span { padding: 4px 10px; border-radius: 999px; background: var(--surface); font-size: 13px; }
.steps span.active { background: var(--brand); font-weight: 700; }

/* Mobile: the 4 step pills must fit on one line, so these rules live
   AFTER the base .steps rules above (later rules win at equal specificity). */
@media (max-width: 640px) {
  .container { padding: 12px; }
  .steps { gap: 3px; justify-content: center; }
  .steps span { padding: 3px 6px; font-size: 11px; white-space: nowrap; }
}

/* In-page dialog (replaces the browser's prompt/alert/confirm popups). */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; overflow-y: auto; }
.modal-card { background: #000000; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; width: 100%; max-width: 420px; margin: auto; }
.modal-card p { margin: 0 0 12px; }
.modal-card input { width: 100%; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.rs-card { max-width: 560px; }
.rs-cal-head { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
