html,
body {
  margin: 0;
  padding: 0;
}

:root {
  --bos-primary: #2563eb;
  --bos-primary-text: #fff;
  --bos-bg: #f8fafc;
  --bos-surface: #fff;
  --bos-text: #0f172a;
  --bos-muted: #64748b;
  --bos-border: #e2e8f0;
  --bos-danger: #dc2626;
  --bos-ok: #16a34a;
  --bos-radius: 12px;
  --bos-space: 16px;
  --bos-font: "Segoe UI", system-ui, sans-serif;
}

.bos-app,
.bookingos-widget,
.bookingos-portal,
.bookingos-staff {
  font-family: var(--bos-font);
  color: var(--bos-text);
  box-sizing: border-box;
}

.bos-app *,
.bookingos-widget *,
.bookingos-portal *,
.bookingos-staff * {
  box-sizing: border-box;
}

.bos-wrap { max-width: 1200px; }

.bos-card {
  background: var(--bos-surface);
  border: 1px solid var(--bos-border);
  border-radius: var(--bos-radius);
  padding: var(--bos-space);
  margin: 12px 0;
}

.bos-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.bos-btn {
  background: var(--bos-primary);
  color: var(--bos-primary-text);
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}

.bos-btn:focus-visible,
.bos-input:focus-visible,
.bos-select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--bos-primary) 50%, white);
  outline-offset: 2px;
}

.bos-btn.secondary { background: #e2e8f0; color: #0f172a; }
.bos-btn.danger { background: var(--bos-danger); }
.bos-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.bos-input,
.bos-select,
.bos-textarea {
  width: 100%;
  border: 1px solid var(--bos-border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  margin: 6px 0 12px;
}

.bos-password {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 6px 0 12px;
}

.bos-password .bos-input {
  margin: 0;
  flex: 1;
}

.bos-password-toggle {
  flex: 0 0 auto;
  min-width: 72px;
}

.bos-empty { text-align: center; padding: 48px 16px; color: var(--bos-muted); }
.bos-error { color: var(--bos-danger); }
.bos-ok { color: var(--bos-ok); }
.bos-toast {
  position: fixed;
  inset-inline-end: 16px;
  bottom: 16px;
  background: #0f172a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  z-index: 100000;
}

table.bos-table { width: 100%; border-collapse: collapse; }
table.bos-table th,
table.bos-table td { padding: 10px; border-bottom: 1px solid var(--bos-border); text-align: start; }

.bos-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
  margin: 0 0 16px;
}

.bos-steps li { padding: 6px 10px; border-radius: 999px; background: #e2e8f0; }
.bos-steps li.is-current { background: var(--bos-primary); color: #fff; font-weight: 700; }

.bos-choice {
  display: block;
  width: 100%;
  text-align: start;
  background: var(--bos-surface);
  border: 1px solid var(--bos-border);
  border-radius: var(--bos-radius);
  padding: 16px;
  cursor: pointer;
}

.bos-choice small {
  display: block;
  margin-top: 6px;
  color: var(--bos-muted);
  font-size: 13px;
  font-weight: 400;
}

.bos-extra {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--bos-border);
  border-radius: var(--bos-radius);
  padding: 12px 16px;
  margin: 8px 0;
}

.bos-choice:hover,
.bos-choice[aria-pressed="true"] { border-color: var(--bos-primary); }

.bookingos-widget--modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100000;
}

.bookingos-widget--modal[hidden] { display: none; }
.bookingos-widget--modal .bookingos-widget { max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; }

@media (max-width: 700px) {
  table.bos-table, table.bos-table tbody, table.bos-table tr, table.bos-table td, table.bos-table th {
    display: block;
    width: 100%;
  }
  table.bos-table tr {
    border: 1px solid var(--bos-border);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

[dir="rtl"] .bos-toast { inset-inline-end: auto; inset-inline-start: 16px; }
