:root {
  --app-bg: #f3f6fb;
  --surface-border: #e3e9f2;
  --muted: #6d7788;
  --shadow: 0 18px 45px rgba(25, 42, 70, 0.08);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, 0.08), transparent 32rem),
    var(--app-bg);
  color: #202938;
}

.app-shell {
  max-width: 1680px;
}

.app-header {
  padding-inline: .25rem;
}

.app-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  font-weight: 750;
  letter-spacing: -.035em;
}

.app-subtitle {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: .25rem;
  color: var(--bs-primary);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.surface {
  border: 1px solid var(--surface-border);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.controls-panel,
.workspace-panel {
  padding: clamp(1.25rem, 2vw, 2rem);
}

.controls-panel {
  position: sticky;
  top: 1.5rem;
}

.workspace-panel {
  min-height: 35rem;
}

.section-heading,
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.section-heading {
  margin-bottom: 1.5rem;
}

.search-tabs {
  padding: .25rem;
  border-radius: .8rem;
  background: #eef2f7;
}

.search-tabs .nav-link {
  padding: .5rem .6rem;
  border-radius: .6rem;
  color: #5f6b7c;
  font-size: .875rem;
  font-weight: 650;
}

.search-tabs .nav-link.active {
  background: #fff;
  color: var(--bs-primary);
  box-shadow: 0 3px 10px rgba(28, 45, 75, .09);
}

.workspace-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.empty-state {
  display: grid;
  min-height: 28rem;
  place-content: center;
  justify-items: center;
  padding: 2rem;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: 1.25rem;
  background: #eaf2ff;
  color: var(--bs-primary);
  font-size: 2rem;
}

.form-control,
.form-select,
.btn {
  border-radius: .7rem;
}

.search-select {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
}

.search-suggestions {
  position: absolute;
  z-index: 50;
  top: calc(100% + .35rem);
  right: 0;
  left: 0;
  max-height: 17.5rem;
  overflow-y: auto;
  border: 1px solid var(--surface-border);
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 16px 38px rgba(20, 34, 58, .16);
}

.search-suggestion {
  display: block;
  width: 100%;
  padding: .65rem .8rem;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  background: transparent;
  color: #202938;
  text-align: left;
}

.search-suggestion:last-child {
  border-bottom: 0;
}

.search-suggestion:hover,
.search-suggestion:focus,
.search-suggestion.is-active {
  outline: 0;
  background: #edf4ff;
}

.search-suggestion.is-selected {
  color: #1558b0;
  background: #f4f8ff;
  font-weight: 600;
}

.search-suggestion.is-empty {
  color: var(--muted);
}

.selected-dates .list-group-item,
.selection-list .list-group-item {
  border-color: var(--surface-border);
}

.selected-dates .list-group-item {
  padding: .65rem .75rem;
  font-size: .875rem;
}

.selection-card {
  padding: .75rem .85rem;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.selection-card:hover {
  z-index: 1;
  border-color: #a9c7f7;
  background: #f8fbff;
  transform: translateY(-1px);
}

.selection-card.is-selected-for-creation {
  border-color: #9fcdb3;
  background: #f0faf4;
}

.selection-card.is-selected-for-creation:hover {
  border-color: #75b992;
  background: #e9f8ef;
}

.creation-checkbox:checked {
  background-color: var(--bs-success);
  border-color: var(--bs-success);
}

.creation-options {
  display: grid;
  grid-template-columns: max-content minmax(11rem, 1fr) max-content minmax(7rem, .45fr);
  align-items: center;
  gap: .45rem .65rem;
  padding: .6rem .7rem;
  border-radius: .85rem;
  background: #f5f8fc;
}

.creation-options label {
  font-size: .8rem;
}

.creation-options .form-control,
.creation-options .form-select {
  min-height: 2rem;
  padding-block: .3rem;
  font-size: .85rem;
}

.creation-panel,
.slots-response {
  padding-top: 1.25rem;
  border-top: 1px solid var(--surface-border);
}

.slots-summary {
  display: inline-flex;
  gap: .35rem;
  padding: .55rem .85rem;
  border-radius: 999px;
  background: #eaf2ff;
  color: #174e9e;
}

.slot-group {
  padding: .9rem;
  border: 1px solid var(--surface-border);
  border-radius: 1rem;
  background: #f8fafc;
}

.slot-group-title {
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 750;
}

.slot-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr));
  gap: .75rem;
}

.slot-card {
  overflow: visible;
  border: 1px solid #dfe6ef;
  border-radius: .9rem;
  box-shadow: 0 8px 24px rgba(29, 46, 75, .055);
  transition: transform .15s ease, box-shadow .15s ease;
}

.slot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(29, 46, 75, .1);
}

.slot-card-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.35;
}

.slot-field {
  margin-bottom: .5rem;
  padding: .55rem .65rem;
  border-radius: .7rem;
  background: #f6f8fb;
}

.slots-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface-border);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.pagination-controls .btn {
  min-width: 2.25rem;
}

.pagination-gap,
.pagination-summary {
  color: var(--muted);
  font-size: .875rem;
}

@media (max-width: 575.98px) {
  .slots-pagination {
    align-items: stretch;
    flex-direction: column;
  }
}

.progress {
  height: .65rem;
  border-radius: 999px;
}

@media (max-width: 991.98px) {
  .controls-panel {
    position: static;
  }

  .workspace-panel {
    min-height: auto;
  }
}

@media (max-width: 767.98px) {
  .workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-header .btn {
    flex: 1;
  }

  .creation-options {
    grid-template-columns: 1fr;
  }

  .selection-card > div:first-child {
    align-items: flex-start !important;
    flex-direction: column;
  }
}
