@import url("https://fonts.googleapis.com/css2?family=Mulish:wght@400;600;700;800&display=swap");

:root {
  --background: #f7f7f5;
  --foreground: #18181b;
  --card: #ffffff;
  --card-foreground: #18181b;
  --popover: #ffffff;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #f0f1ef;
  --secondary-foreground: #27272a;
  --muted: #f4f4f2;
  --muted-foreground: #71717a;
  --accent: #ecf7f0;
  --accent-foreground: #14532d;
  --warning: #fff7ed;
  --warning-foreground: #9a3412;
  --destructive: #b91c1c;
  --destructive-soft: #fef2f2;
  --border: #e4e4e7;
  --input: #dedee3;
  --ring: #27272a;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.05);
  --shadow-md: 0 14px 34px rgba(24, 24, 27, 0.08);
  --booking-font-family: Inter, "Avenir Next", "Segoe UI", Arial, sans-serif;
  --booking-page-background: #f7f7f5;
  --booking-card-background: #ffffff;
  --booking-text-color: #18181b;
  --booking-muted-text-color: #71717a;
  --booking-hero-background: #ffffff;
  --booking-hero-title-color: #18181b;
  --booking-hero-lead-color: #71717a;
  --booking-title-size: 38;
  --booking-body-size: 13;
  --booking-panel-radius: 14;
  --booking-date-text-color: #18181b;
  --booking-weekday-text-color: #9ca3af;
  --booking-date-muted-color: #71717a;
  --booking-date-hover-background: #f4f4f2;
  --booking-date-active-background: #efe9ff;
  --booking-date-active-text-color: #5b3fd8;
  --booking-date-button-height: 54;
  --booking-time-background: #ffffff;
  --booking-time-text-color: #18181b;
  --booking-time-border-color: #e4e4e7;
  --booking-time-active-background: #ecf7f0;
  --booking-time-active-text-color: #14532d;
  --booking-time-active-border-color: #14532d;
  --booking-time-button-height: 56;
  --booking-form-gradient-start: #0b314d;
  --booking-form-gradient-mid: #123f5f;
  --booking-form-gradient-end: #0a2840;
  --booking-form-title-color: #f7fbff;
  --booking-form-label-color: #f2f8ff;
  --booking-form-muted-color: #dfeaf7;
  --booking-form-input-background: #2d5c86;
  --booking-form-input-text-color: #f7fbff;
  --booking-form-placeholder-color: #bfd0e1;
  --booking-form-input-border-color: #a0c0db;
  --booking-form-input-height: 34;
  --booking-primary-button-background: #ffffff;
  --booking-primary-button-text-color: #0c1c2c;
  --booking-primary-button-border-color: #081d30;
  --booking-primary-button-height: 38;
  --booking-icon-button-background: #6591b3;
  --booking-icon-button-text-color: #f2f8ff;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body.booking-page {
  --background: var(--booking-page-background);
  --card: var(--booking-card-background);
  --card-foreground: var(--booking-text-color);
  --foreground: var(--booking-text-color);
  --muted-foreground: var(--booking-muted-text-color);
  font-size: calc(var(--booking-body-size) * 1px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--booking-font-family);
  color: var(--booking-text-color);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--booking-page-background) 78%, white), rgba(247, 247, 245, 0) 360px),
    var(--background);
}

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
  padding: 24px;
}

.card {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.auth-card,
.booking-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.auth-card {
  display: grid;
  gap: 12px;
  max-width: 460px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  font-size: 30px;
}

.booking-shell {
  display: grid;
  gap: 20px;
  padding: 24px 0 36px;
}

body.booking-page.embedded-booking {
  min-height: 0;
  background: transparent;
}

body.booking-page.embedded-booking .booking-shell {
  min-height: 0;
  padding: 0;
}

.booking-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.booking-copy,
.booking-panel {
  border: 1px solid color-mix(in srgb, var(--booking-card-background) 78%, #d4d4d8);
  border-radius: calc(var(--booking-panel-radius) * 1px);
  background: var(--card);
  box-shadow: 0 18px 48px rgba(24, 24, 27, 0.08);
}

.booking-copy {
  display: grid;
  gap: 10px;
  padding: 24px 28px;
  background: linear-gradient(180deg, var(--booking-hero-background), color-mix(in srgb, var(--booking-hero-background) 86%, #f3f4f6));
}

.booking-copy h1 {
  max-width: none;
  font-size: clamp(24px, calc(var(--booking-title-size) * 1px), 72px);
  line-height: 1.08;
  color: var(--booking-hero-title-color);
  white-space: nowrap;
}

.booking-lead {
  margin: 0;
  color: var(--booking-hero-lead-color);
  font-size: calc(var(--booking-body-size) * 1px);
  line-height: 1.45;
}

.booking-panel {
  padding: 18px;
}

.smartm-widget {
  display: grid;
  gap: 4px;
}

.booking-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--muted);
  list-style: none;
}

.booking-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 9px;
  color: var(--booking-hero-lead-color);
  font-size: calc(var(--booking-body-size) * 1px);
  font-weight: 500;
}

.booking-step span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--booking-date-muted-color);
  font-size: 10px;
  font-weight: 500;
}

.booking-step.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

.booking-step.complete {
  color: var(--accent-foreground);
}

.booking-step.complete span,
.booking-step.active span {
  background: var(--foreground);
  color: var(--primary-foreground);
}

.compact-head {
  margin-bottom: 12px;
}

.compact-head h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
}

.date-grid,
.time-grid,
.calendar-shell {
  display: grid;
  gap: 4px;
}

.calendar-shell {
  gap: 10px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.calendar-month-label {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 500;
}

.calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.calendar-nav-button {
  width: auto;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 42px;
  line-height: 1;
  font-weight: 300;
  box-shadow: none;
}

.calendar-nav-button:hover:not(:disabled) {
  background: transparent;
  color: var(--booking-date-text-color);
  opacity: 1;
}

.calendar-nav-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-weekdays span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  color: var(--booking-weekday-text-color);
  font-size: calc(var(--booking-body-size) * 1px);
  font-weight: 400;
}

.calendar-grid.empty,
.time-grid.empty {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--muted-foreground);
}

.calendar-grid.empty p,
.time-grid.empty p {
  margin: 0;
}

.date-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(var(--booking-date-button-height) * 1px);
  padding: 0;
  border: 1px solid transparent;
  border-radius: calc(var(--booking-panel-radius) * 1px);
  background: transparent;
  color: var(--booking-date-text-color);
  text-align: center;
  box-shadow: none;
}

.date-option strong,
.time-option strong {
  font-size: 14px;
  font-weight: 500;
}

.date-option strong {
  font-size: 17px;
  font-weight: 400;
}

.date-option:hover:not(:disabled) {
  background: var(--booking-date-hover-background);
  color: var(--booking-date-text-color);
  box-shadow: none;
}

.date-option.active {
  background: var(--booking-date-active-background);
  color: var(--booking-date-active-text-color);
  box-shadow: none;
}

.date-option.active strong {
  font-weight: 500;
}

.date-option.is-disabled,
.date-option:disabled {
  color: color-mix(in srgb, var(--booking-date-muted-color) 68%, white);
  cursor: default;
  opacity: 1;
  background: transparent;
  box-shadow: none;
}

.date-option.is-outside {
  color: color-mix(in srgb, var(--booking-date-muted-color) 48%, white);
}

.date-option-spacer {
  display: block;
  min-height: calc(var(--booking-date-button-height) * 1px);
}

.date-option span,
.time-option span {
  color: var(--booking-date-muted-color);
  font-size: 10px;
  font-weight: 400;
}

.time-option.active,
.time-option:hover {
  border-color: var(--booking-time-active-border-color);
  background: var(--booking-time-active-background);
  color: var(--booking-time-active-text-color);
  box-shadow: 0 10px 26px rgba(20, 83, 45, 0.1);
}

.slots-panel {
  display: grid;
  gap: 12px;
}

.time-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.field small {
  color: var(--muted-foreground);
  font-size: 9px;
  line-height: 1.3;
}

.embed-code-area {
  min-height: 360px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  line-height: 1.45;
  white-space: pre;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.brand-lockup {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.app-header .brand-lockup {
  align-items: center;
  gap: 0;
}

.app-header .brand-lockup > div {
  display: grid;
  gap: 4px;
}

.app-header h1 {
  line-height: 1;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--foreground);
  color: var(--primary-foreground);
  font-size: 13px;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 500;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.status-pill,
.employee-badge,
.event-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(20, 83, 45, 0.16);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-foreground);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.muted-pill {
  border-color: var(--border);
  background: var(--muted);
  color: var(--muted-foreground);
}

.employee-badge {
  align-self: flex-start;
  min-height: 18px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.tabs {
  display: inline-flex;
  max-width: 100%;
  margin: 18px 0 20px;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--muted);
  overflow-x: auto;
}

.tab-button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  padding: 8px 13px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.tab-button.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(320px, 1.14fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}

.lead,
.hero > .lead {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--booking-icon-button-background);
  color: var(--booking-icon-button-text-color);
  font-size: 15px;
  line-height: 1.65;
  box-shadow: var(--shadow-sm);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.overview-card,
.panel,
.results,
.employee-card,
.day-card,
.event-row,
.inline-rules,
.rules-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.overview-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 142px;
  padding: 18px;
}

.overview-card span {
  color: var(--booking-date-muted-color);
  font-size: 10px;
  font-weight: 800;
}

.overview-card strong {
  font-size: 16px;
}

.overview-card p {
  margin: 0;
  color: var(--booking-hero-lead-color);
  font-size: calc(var(--booking-body-size) * 1px);
  line-height: 1.45;
}

.employees-layout,
.workspace {
  display: grid;
  gap: 20px;
  margin: 0 0 20px;
}

.employees-layout {
  grid-template-columns: minmax(0, 1fr);
}

.workspace {
  grid-template-columns: minmax(280px, 0.92fr) minmax(340px, 1.08fr);
}

.panel,
.results {
  padding: 22px;
}

.hidden-panel {
  display: none !important;
}

.form {
  display: grid;
  gap: 16px;
}

.split,
.toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.toolbar {
  margin-bottom: 16px;
}

.field {
  display: grid;
  gap: 4px;
}

.compact-field {
  margin: 0;
}

.field span {
  color: var(--foreground);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--foreground);
  background: var(--popover);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea {
  resize: vertical;
  min-height: 104px;
}

input::placeholder,
textarea::placeholder {
  color: #a1a1aa;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(39, 39, 42, 0.12);
}

.password-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.booking-consent {
  width: 100%;
  margin: 0;
  color: var(--booking-date-muted-color);
  font-size: 10px;
  line-height: 1.45;
}

button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease;
}

button:hover {
  opacity: 0.92;
}

button:disabled {
  opacity: 0.56;
  cursor: wait;
}

.primary-button {
  background: var(--primary);
  color: var(--primary-foreground);
}

.secondary-button {
  border-color: var(--border);
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.ghost-button {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.danger-button {
  border-color: rgba(185, 28, 28, 0.16);
  background: var(--destructive-soft);
  color: var(--destructive);
}

.status {
  min-height: 42px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 14px;
}

.status:empty {
  display: none;
}

.status.error {
  border-color: rgba(185, 28, 28, 0.2);
  background: var(--destructive-soft);
  color: var(--destructive);
}

.status.success {
  border-color: rgba(20, 83, 45, 0.18);
  background: var(--accent);
  color: var(--accent-foreground);
}

body.modal-open {
  overflow: hidden;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 27, 0.38);
}

.admin-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  box-shadow: 0 28px 64px rgba(24, 24, 27, 0.18);
}

.admin-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-modal-head .summary {
  margin: 8px 0 0;
}

.admin-modal-close {
  min-height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
}

.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.booking-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 30, 0.62);
  font-size: 10px;
  backdrop-filter: blur(6px);
}

.booking-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 30px 60px rgba(7, 18, 30, 0.32);
  text-align: center;
}

.booking-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(241, 245, 249, 0.92);
  color: #334155;
}

.booking-modal-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #dff6e7, #c9efd8);
  color: #166534;
  font-size: 28px;
  font-weight: 700;
}

.booking-modal-dialog h2 {
  margin: 0 0 10px;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.08;
  font-weight: 600;
}

.booking-modal-dialog p {
  margin: 0;
  color: #5b6472;
  font-size: 15px;
  line-height: 1.6;
}

.booking-modal-button {
  width: 100%;
  margin-top: 20px;
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.booking-results-head {
  margin-bottom: 0;
}

.booking-title-row {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  column-gap: 0;
  row-gap: 2px;
  min-height: auto;
  font-size: 14px;
}

.text-action-button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 28px;
  font-weight: 400;
}

.text-action-button:hover {
  color: var(--foreground);
  opacity: 1;
}

.text-action-button:disabled {
  opacity: 0.56;
  cursor: wait;
}

.results h2,
.panel h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 500;
}

#booking-title {
  line-height: 28px;
}

.summary {
  margin: 0;
  max-width: 54ch;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.5;
}

.employees-list,
.rules-list,
.rules-preview,
.slots,
.events {
  display: grid;
  gap: 12px;
}

.employees-list {
  margin-top: 18px;
}

.employees-list.empty,
.rules-list.empty,
.slots.empty,
.events.empty {
  padding: 22px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--muted);
  color: var(--muted-foreground);
}

.employees-list.empty p,
.rules-list.empty p,
.slots.empty p,
.events.empty p {
  margin: 0;
}

.rules-preview {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--warning);
  color: var(--warning-foreground);
}

.rules-preview p {
  margin: 0;
}

.inline-rules {
  margin-top: 20px;
  padding: 20px;
  background: #fbfbfa;
}

.rule-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.employee-card,
.day-card,
.event-row {
  padding: 18px;
}

.employee-card.active {
  border-color: rgba(20, 83, 45, 0.28);
  background: linear-gradient(0deg, rgba(236, 247, 240, 0.64), rgba(255, 255, 255, 0.96));
  box-shadow: 0 0 0 1px rgba(20, 83, 45, 0.08), var(--shadow-sm);
}

.employee-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.employee-card-head p {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  word-break: break-word;
}

.employee-card-head strong {
  font-size: 16px;
  line-height: 1.25;
}

.employee-card-head p,
.employee-card > p {
  font-size: 10px;
  line-height: 1.45;
}

.employee-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.employee-card-actions button {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
}

.day-card h3 {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.3;
}

.slot-list,
.event-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-list.full {
  gap: 12px;
}

.slot-item,
.event-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.slot-item {
  border-color: rgba(20, 83, 45, 0.14);
  background: var(--accent);
  color: var(--accent-foreground);
}

.public-slot-item {
  align-items: center;
}

.public-slot-item button {
  min-height: 34px;
  padding: 7px 12px;
}

.event-item {
  border-color: rgba(154, 52, 18, 0.14);
  background: var(--warning);
}

.event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
}

.event-content {
  display: grid;
  gap: 4px;
}

.event-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.event-meta {
  color: var(--muted-foreground);
  font-size: 14px;
}

.event-description {
  margin: 4px 0 0;
  color: var(--foreground);
  white-space: pre-wrap;
}

.event-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 168px;
}

.day-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.day-grid h4 {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 1020px) {
  .hero,
  .employees-layout,
  .workspace,
  .booking-hero {
    grid-template-columns: 1fr;
  }

  .overview-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    overflow-x: auto;
  }

  .event-row {
    grid-template-columns: 1fr;
  }

  .event-actions {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .phone-field {
    grid-template-columns: 1fr;
  }

  .shell {
    padding: 14px;
  }

  .app-header {
    flex-direction: column;
    padding: 18px;
  }

  .brand-lockup {
    flex-direction: column;
  }

  .header-actions {
    justify-content: flex-start;
  }

  h1 {
    font-size: 28px;
  }

  .booking-copy h1 {
    white-space: normal;
  }

  .tabs {
    display: grid;
    width: 100%;
  }

  .tab-button {
    white-space: normal;
  }

  .overview-grid,
  .password-wrap,
  .split,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .panel,
  .results,
  .booking-copy,
  .booking-panel,
  .lead,
  .hero > .lead {
    padding: 18px;
  }

  .actions,
  .employee-card-actions {
    flex-direction: column;
  }

  .actions button,
  .employee-card-actions button,
  .event-actions button {
    width: 100%;
  }
}


.date-option strong,
.time-option strong,
#booking-title,
#selected-slot-summary,
#selected-date-summary {
  font-weight: 500;
}

#booking-status,
.summary,
.date-grid button,
.time-grid button,
.text-action-button {
  font-weight: 400;
}



.selected-date-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 0;
}

.selected-date-label {
  color: var(--booking-muted-text-color);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.icon-action-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--booking-icon-button-background);
  color: var(--booking-icon-button-text-color);
}

.icon-action-button:hover {
  color: var(--foreground);
  opacity: 1;
}

.time-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(var(--booking-time-button-height) * 1px);
  text-align: center;
  border: 1px solid var(--booking-time-border-color);
  border-radius: calc(var(--booking-panel-radius) * 1px);
  background: var(--booking-time-background);
  color: var(--booking-time-text-color);
}

.time-option span {
  font-size: calc(var(--booking-body-size) * 1px + 3px);
  font-weight: 400;
  white-space: nowrap;
}

.booking-form {
  gap: 4px;
}

#booking-form-panel {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  padding: 10px 12px;
  background:
    radial-gradient(circle at top left, rgba(70, 119, 160, 0.22), transparent 34%),
    linear-gradient(135deg, var(--booking-form-gradient-start) 0%, var(--booking-form-gradient-mid) 52%, var(--booking-form-gradient-end) 100%);
  box-shadow: 0 14px 28px rgba(5, 18, 31, 0.2);
}

#booking-form-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  pointer-events: none;
}

#booking-form-panel > * {
  position: relative;
  z-index: 1;
}

#booking-form-panel #client-form-title {
  color: var(--booking-form-title-color);
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.05;
  font-weight: 500;
}

#booking-form-panel .summary,
#booking-form-panel #selected-slot-summary,
#booking-form-panel .selected-date-label,
#booking-form-panel .field small,
#booking-form-panel .booking-consent {
  color: var(--booking-form-muted-color);
  font-size: 10px;
}

#booking-form-panel .selected-slot-row {
  gap: 6px;
  margin-top: 2px;
}

#booking-form-panel .field {
  gap: 4px;
}

#booking-form-panel .field span,
#booking-form-panel .field-label {
  color: var(--booking-form-label-color);
  font-size: 10px;
  font-weight: 600;
}

#booking-form-panel input,
#booking-form-panel textarea,
#booking-form-panel select {
  min-height: calc(var(--booking-form-input-height) * 1px);
  border: 1px solid var(--booking-form-input-border-color);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1.2;
  background: var(--booking-form-input-background);
  color: var(--booking-form-input-text-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
}

#booking-form-panel select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(242, 248, 255, 0.88) 50%),
    linear-gradient(135deg, rgba(242, 248, 255, 0.88) 50%, transparent 50%),
    linear-gradient(180deg, var(--booking-form-input-background), var(--booking-form-input-background));
  background-position:
    calc(100% - 14px) calc(50% - 2px),
    calc(100% - 9px) calc(50% - 2px),
    0 0;
  background-size: 4px 4px, 4px 4px, 100% 100%;
  background-repeat: no-repeat;
  padding-right: 26px;
}

#booking-form-panel textarea {
  min-height: calc(var(--booking-form-input-height) * 1px + 22px);
  resize: vertical;
}

#booking-form-panel input::placeholder,
#booking-form-panel textarea::placeholder,
#booking-form-panel select,
#booking-form-panel option[disabled] {
  color: var(--booking-form-placeholder-color);
}

#booking-form-panel input:focus,
#booking-form-panel textarea:focus,
#booking-form-panel select:focus {
  border-color: rgba(223, 235, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(187, 214, 237, 0.12);
}

#booking-form-panel .phone-field {
  gap: 4px;
}

#booking-form-panel .icon-action-button {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-color: rgba(195, 217, 235, 0.18);
  background: var(--booking-icon-button-background);
  color: var(--booking-icon-button-text-color);
  font-size: 10px;
}

#booking-form-panel .icon-action-button:hover {
  color: #ffffff;
  background: rgba(126, 167, 198, 0.24);
}

#booking-form-panel .actions {
  gap: 8px;
  margin-top: 2px;
}

#booking-form-panel .primary-button {
  width: 100%;
  min-height: calc(var(--booking-primary-button-height) * 1px);
  border: 1px solid var(--booking-primary-button-border-color);
  border-radius: 12px;
  background: var(--booking-primary-button-background);
  color: var(--booking-primary-button-text-color);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(3, 12, 22, 0.14);
}

#booking-form-panel .primary-button:hover {
  opacity: 1;
  transform: translateY(-1px);
}

#booking-form-panel .booking-consent {
  max-width: 68ch;
  font-size: 9px;
  line-height: 1.3;
}

#booking-form-panel .field-error {
  color: #ffd1d1;
}

#booking-form-panel .field.invalid input,
#booking-form-panel .field.invalid textarea,
#booking-form-panel .field.invalid select,
#booking-form-panel .field.invalid .phone-field {
  border-color: rgba(255, 164, 164, 0.48);
  box-shadow: 0 0 0 4px rgba(255, 154, 154, 0.1);
}

#booking-form-panel .field.invalid .phone-field input,
#booking-form-panel .field.invalid .phone-field select {
  border-color: rgba(255, 164, 164, 0.48);
}

@media (max-width: 720px) {
  #booking-form-panel {
    padding: 10px;
    border-radius: 16px;
  }

  #booking-form-panel input,
  #booking-form-panel textarea,
  #booking-form-panel select {
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  #booking-form-panel .primary-button {
    min-height: 38px;
    font-size: 12px;
  }
}

.booking-form .split {
  grid-template-columns: 1fr;
}

.phone-field {
  display: grid;
  grid-template-columns: minmax(118px, 160px) minmax(0, 1fr);
  gap: 4px;
}

.phone-country {
  min-width: 0;
}

.booking-form #additional-attendees {
  min-height: 34px;
}

.booking-form textarea#additional-attendees {
  min-height: 34px;
  resize: none;
}

.booking-form-head {
  margin-bottom: 6px;
}

.selected-slot-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.field-label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}


.field-error {
  display: block;
  min-height: 14px;
  color: var(--destructive);
  font-size: 10px;
  line-height: 1.25;
}

.field.invalid input,
.field.invalid textarea,
.field.invalid select,
.field.invalid .phone-field {
  border-color: rgba(185, 28, 28, 0.45);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.08);
}

.field.invalid .phone-field input,
.field.invalid .phone-field select {
  border-color: rgba(185, 28, 28, 0.45);
}


.appearance-layout {
  display: grid;
  gap: 18px;
}

.integration-layout {
  display: grid;
  gap: 18px;
}

.appearance-form {
  gap: 18px;
}

.appearance-groups {
  display: grid;
  gap: 16px;
}

.appearance-group {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fcfcfb);
  box-shadow: var(--shadow-sm);
}

.appearance-group-head {
  margin-bottom: 14px;
}

.appearance-group-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.appearance-hint {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.45;
}

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

.appearance-color {
  width: 100%;
  min-height: 44px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.appearance-actions {
  justify-content: flex-start;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.checkbox-field input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

.checkbox-field span {
  font-size: 13px;
  font-weight: 600;
}

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

.integration-reference {
  margin-top: 0;
}

.integration-reference p + p {
  margin-top: 6px;
}

.integration-reference a {
  color: inherit;
}

.integration-reference code {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.06);
  font-size: 12px;
}

.appearance-preview p {
  margin: 0;
}

.appearance-preview {
  padding: 0;
  overflow: hidden;
}

.appearance-preview-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
  font-family: var(--preview-font-family);
  color: var(--preview-text-color);
  background: linear-gradient(180deg, color-mix(in srgb, var(--preview-page-background) 86%, #ffffff), var(--preview-page-background));
}

.appearance-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.appearance-preview-meta strong,
.appearance-preview-form-head strong {
  display: block;
  margin: 0;
  color: var(--preview-text-color);
}

.appearance-preview-widget-head strong {
  display: block;
  margin: 0;
  color: var(--preview-date-text-color);
}

.appearance-preview-meta span {
  color: var(--preview-muted-text-color);
  font-size: 12px;
}

.appearance-preview-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.06);
  font-weight: 600;
  white-space: nowrap;
}

.appearance-preview-canvas {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(320px, 1.35fr);
  gap: 16px;
}

.appearance-preview-hero,
.appearance-preview-widget {
  background: var(--preview-card-background);
  border-radius: var(--preview-panel-radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.appearance-preview-hero {
  padding: 18px;
  background: var(--preview-hero-background, var(--preview-card-background));
}

.appearance-preview-hero h3 {
  margin: 0 0 8px;
  color: var(--preview-hero-title-color);
  font-size: clamp(22px, calc(var(--preview-title-size) * 0.6), 32px);
  line-height: 1.08;
}

.appearance-preview-hero p {
  margin: 0;
  color: var(--preview-hero-lead-color);
  font-size: clamp(12px, calc(var(--preview-body-size) * 0.92), 14px);
  line-height: 1.45;
}

.appearance-preview-widget {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.appearance-preview-widget-head,
.appearance-preview-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.appearance-preview-widget-head strong,
.appearance-preview-form-head strong {
  font-size: 15px;
}

.appearance-preview-widget-head span,
.appearance-preview-form-card p {
  color: var(--preview-muted-text-color);
  font-size: 12px;
}

.appearance-preview-weekdays,
.appearance-preview-dates,
.appearance-preview-times {
  display: grid;
  gap: 10px;
}

.appearance-preview-weekdays {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.appearance-preview-dates {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.appearance-preview-times {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.appearance-preview-date,
.appearance-preview-time,
.appearance-preview-submit,
.appearance-preview-icon {
  border: 1px solid transparent;
  font: inherit;
}

.appearance-preview-weekdays span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--preview-weekday-text-color);
  font-size: 11px;
}

.appearance-preview-date {
  min-height: var(--preview-date-button-height);
  padding: 8px 10px;
  border-radius: calc(var(--preview-panel-radius) - 2px);
  background: var(--preview-card-background);
  color: var(--preview-date-text-color);
  border-color: color-mix(in srgb, var(--preview-date-text-color) 12%, #d4d4d8);
  font-size: 12px;
  font-weight: 600;
}

.appearance-preview-date.muted {
  color: var(--preview-date-muted-color);
  background: var(--preview-date-hover-background);
}

.appearance-preview-date.active {
  background: var(--preview-date-active-background);
  color: var(--preview-date-active-text-color);
  border-color: color-mix(in srgb, var(--preview-date-active-text-color) 18%, var(--preview-date-active-background));
}

.appearance-preview-time {
  min-height: var(--preview-time-button-height);
  padding: 8px 12px;
  border-radius: calc(var(--preview-panel-radius) - 4px);
  background: var(--preview-time-background);
  color: var(--preview-time-text-color);
  border-color: var(--preview-time-border-color);
  font-size: 12px;
  text-align: center;
}

.appearance-preview-time.active {
  background: var(--preview-time-active-background);
  color: var(--preview-time-active-text-color);
  border-color: var(--preview-time-active-border-color);
}

.appearance-preview-form-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: calc(var(--preview-panel-radius) + 2px);
  background: linear-gradient(135deg, var(--preview-form-gradient-start), var(--preview-form-gradient-mid) 55%, var(--preview-form-gradient-end));
}

.appearance-preview-form-head strong,
.appearance-preview-fields label {
  color: var(--preview-form-title-color);
}

.appearance-preview-form-card p {
  margin: 0;
  color: var(--preview-form-muted-color);
}

.appearance-preview-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--preview-icon-button-background);
  color: var(--preview-icon-button-text-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.appearance-preview-fields {
  display: grid;
  gap: 8px;
}

.appearance-preview-fields label {
  font-size: 11px;
  font-weight: 600;
}

.appearance-preview-input {
  min-height: var(--preview-form-input-height);
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-radius: calc(var(--preview-panel-radius) - 2px);
  border: 1px solid var(--preview-form-input-border-color);
  background: var(--preview-form-input-background);
  color: var(--preview-form-input-text-color);
  font-size: 12px;
}

.appearance-preview-input-placeholder {
  color: var(--preview-form-placeholder-color);
}

.appearance-preview-submit {
  min-height: var(--preview-primary-button-height);
  padding: 0 16px;
  border-radius: calc(var(--preview-panel-radius) - 2px);
  background: var(--preview-primary-button-background);
  color: var(--preview-primary-button-text-color);
  border-color: var(--preview-primary-button-border-color);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .appearance-preview-canvas {
    grid-template-columns: 1fr;
  }

  .appearance-preview-dates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
