/* Shared Client blue palette; rows prioritize the next appointment action. */
.spa-root,
.spa-root > *,
.spa-root .v1-form-grid > * {
  min-width: 0;
}
.spa-root fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}
.spa-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.spa-toolbar .v1-field {
  flex: 0 1 230px;
}
.spa-booking {
  border-top: 1px solid var(--line, #dce7f4);
  padding: 22px 0;
}
.spa-booking:first-child {
  border-top: 0;
  padding-top: 0;
}
.spa-booking:last-child {
  padding-bottom: 0;
}
.spa-row-heading {
  align-items: start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}
.spa-row-heading > div,
.spa-row-heading > h4 {
  flex: 1 1 200px;
  min-width: 0;
}
.spa-row-heading h3,
.spa-row-heading h4 {
  margin: 0 0 8px;
}
.spa-time {
  color: #225c98;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.spa-row-actions {
  gap: 8px;
  margin-top: 16px;
}
.spa-row-actions .v1-button {
  font-size: 13px;
  padding: 8px 12px;
}
.spa-editor {
  border-color: #96c5ff;
  box-shadow: 0 4px 18px rgb(22 119 255 / 8%);
}
.spa-check {
  align-items: start;
  display: flex;
  font-size: 13px;
  gap: 10px;
  line-height: 1.6;
  margin: 16px 0;
}
.spa-check input {
  flex: 0 0 auto;
  margin: 4px 0 0;
  min-height: 16px;
  width: 16px;
}
.spa-sale {
  align-items: start;
  border-top: 1px solid var(--line, #dce7f4);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 0;
}
.spa-sale h4,
.spa-sale p {
  margin: 0 0 8px;
}
.spa-event {
  border-top: 1px solid var(--line, #dce7f4);
  padding: 20px 0;
}
.spa-reference {
  color: var(--muted, #64748b);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.spa-root .v1-badge {
  max-width: 100%;
  white-space: normal;
}
.spa-service-image {
  border: 1px solid var(--line, #dce7f4);
  border-radius: 8px;
  display: block;
  flex: 0 0 64px;
  height: 64px;
  object-fit: cover;
  width: 64px;
}
.spa-service-placeholder {
  align-items: center;
  background: var(--soft, #f0f6ff);
  border: 1px dashed var(--line, #dce7f4);
  border-radius: 8px;
  color: var(--muted, #64748b);
  display: inline-flex;
  flex: 0 0 64px;
  font-size: 11px;
  font-weight: 600;
  height: 64px;
  justify-content: center;
  width: 64px;
}
.spa-service-cell {
  align-items: center;
  display: flex;
  gap: 12px;
}
.spa-service-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.spa-catalog-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}
.spa-catalog-bar-info {
  display: grid;
  flex: 1 1 280px;
  gap: 4px;
}
.spa-catalog-actions {
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.spa-button-danger {
  border-color: #f3c4c4 !important;
  color: #b42318 !important;
}
.spa-button-danger:hover {
  background: #fef3f2 !important;
}
.spa-image-preview {
  align-items: center;
  background: var(--soft, #f8fafc);
  border: 1px solid var(--line, #dce7f4);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
}
.spa-stock-gallery {
  margin-top: 12px;
}
.spa-stock-label {
  color: var(--muted, #475569);
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.spa-stock-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
}
.spa-stock-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line, #dce7f4);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 12px;
  gap: 8px;
  padding: 6px;
  text-align: left;
}
.spa-stock-item:hover {
  border-color: var(--primary, #1677ff);
  background: var(--soft, #f0f6ff);
}
.spa-stock-item img {
  border-radius: 6px;
  flex: 0 0 36px;
  height: 36px;
  object-fit: cover;
  width: 36px;
}
@media (max-width: 640px) {
  .spa-root .v1-panel {
    padding: 16px;
  }
  .spa-root .v1-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .spa-toolbar .v1-field {
    flex: 1 1 100%;
  }
  .spa-root .v1-field input,
  .spa-root .v1-field select,
  .spa-root .v1-field textarea {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }
  .spa-row-actions .v1-button {
    flex: 1 1 130px;
  }
  .spa-root .spa-row-heading > div {
    flex-basis: 100%;
  }
}
