:root {
  --brand: #0ea5e9;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #059669;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
}

.cb-loading { padding: 80px 24px; text-align: center; color: var(--muted); }

.cb-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Brand header (hidden in embed mode) */
.cb-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.cb-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  object-fit: contain;
  padding: 4px;
  flex: 0 0 auto;
}
.cb-brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.cb-brand-bio {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
}

body.cb-embed .cb-brand { display: none; }
body.cb-embed { background: transparent; }
body.cb-embed .cb-shell { padding: 8px 12px 16px; }

/* Cards */
.cb-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.cb-card h2 { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.cb-card .cb-desc { color: var(--muted); font-size: 14px; margin-bottom: 12px; }

.cb-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

/* Service list */
.cb-service-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.cb-service-card:hover { border-color: var(--brand); }
.cb-service-card .name { font-weight: 700; font-size: 16px; }
.cb-service-card .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.cb-service-card .price { margin-left: auto; font-weight: 700; font-size: 16px; color: var(--brand); flex: 0 0 auto; }

/* Buttons */
.cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.cb-btn:hover { background: var(--bg); }
.cb-btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.cb-btn.primary:hover { filter: brightness(1.08); }
.cb-btn.danger {
  color: var(--danger);
  border-color: var(--line);
}
.cb-btn.danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.cb-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.cb-form-row { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.cb-form-row label { font-size: 13px; font-weight: 600; color: var(--muted); }
.cb-form-row input, .cb-form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  color: var(--fg);
}
.cb-form-row input:focus, .cb-form-row textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
.cb-form-row textarea { resize: vertical; min-height: 80px; }

/* Date / slot grid */
.cb-date-picker { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cb-date-picker .label { flex: 1 1 auto; text-align: center; font-weight: 600; }

.cb-day {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg-card);
}
.cb-day .heading { font-weight: 600; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.cb-day .heading .day-of-week { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cb-day.is-closed { background: #f8fafc; }
.cb-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; }
.cb-slot {
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-card);
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  cursor: pointer;
}
.cb-slot:hover { background: color-mix(in srgb, var(--brand) 10%, white); border-color: var(--brand); }

.cb-no-slots { color: var(--muted); font-size: 13px; font-style: italic; }

.cb-summary {
  background: color-mix(in srgb, var(--brand) 10%, white);
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 14px 0;
}

.cb-alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}
.cb-alert.err  { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }
.cb-alert.ok   { background: #ecfdf5; color: var(--success);        border: 1px solid #a7f3d0; }
.cb-alert.warn { background: #fffbeb; color: #92400e;               border: 1px solid #fde68a; }

.cb-stepper {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}
.cb-stepper .step { padding: 4px 8px; border-radius: 4px; }
.cb-stepper .step.active { background: var(--brand); color: white; font-weight: 600; }
.cb-stepper .step.done { color: var(--success); }
