.doc-tasy-agendar-page {
  background: #f5f6fb;
  box-sizing: border-box;
  min-height: calc(100vh - 8rem);
  padding: 2rem 2.5rem 3rem;
}

.doc-tasy-agendar-header,
.doc-tasy-agendar-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.doc-tasy-agendar-header {
  margin-bottom: 1rem;
}

.doc-tasy-agendar-header h1 {
  color: #1f1f1f;
  font-size: 1.8rem;
  line-height: 1.2;
  margin: 0;
}

.doc-tasy-agendar-header p {
  color: #555;
  margin: 0.35rem 0 0;
}

.doc-tasy-agendar-toolbar {
  background: #fff;
  border: 1px solid #d3d7df;
  border-radius: 4px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.75rem;
}

.doc-tasy-agendar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.doc-tasy-agendar-button,
.doc-tasy-agendar-select,
.doc-tasy-agendar-input {
  border: 1px solid #b9c0cc;
  border-radius: 4px;
  box-sizing: border-box;
  font: inherit;
  min-height: 2.25rem;
  padding: 0.4rem 0.6rem;
}

.doc-tasy-agendar-button {
  background: #fff;
  color: #1473e6;
  cursor: pointer;
  font-weight: 700;
}

.doc-tasy-agendar-button.is-primary,
.doc-tasy-agendar-button.is-active {
  background: #1473e6;
  border-color: #1473e6;
  color: #fff;
}

.doc-tasy-agendar-button.is-danger {
  border-color: #d04f3a;
  color: #9b2c1f;
}

.doc-tasy-agendar-button[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

.doc-tasy-agendar-workspace {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 22rem;
}

.doc-tasy-agendar-board,
.doc-tasy-agendar-editor,
.doc-tasy-agendar-stack,
.doc-tasy-agendar-error {
  background: #fff;
  border: 1px solid #d3d7df;
  border-radius: 4px;
}

.doc-tasy-agendar-board {
  max-height: calc(100vh - 16rem);
  overflow: auto;
  scroll-behavior: smooth;
}

.doc-tasy-agendar-error {
  background: #fff4f2;
  border-color: #f2b8ad;
  color: #7a1f12;
  margin-bottom: 1rem;
  padding: 1rem;
}

.doc-tasy-agendar-info {
  background: #eef3fb;
  border: 1px solid #c8d7ee;
  border-radius: 4px;
  color: #123f7d;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
}

.doc-tasy-agendar-loading {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  min-height: 8rem;
}

.doc-tasy-agendar-time-grid {
  display: grid;
  min-width: 48rem;
  position: relative;
}

.doc-tasy-agendar-day-header {
  align-items: center;
  background: #f8f9fc;
  border-bottom: 1px solid #d3d7df;
  border-left: 1px solid #e3e6ee;
  display: flex;
  gap: 0.5rem;
  height: 2.75rem;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 4;
}

.doc-tasy-agendar-day-header span {
  color: #555;
  font-size: 0.82rem;
}

.doc-tasy-agendar-time-label {
  background: #fff;
  border-top: 1px solid #e3e6ee;
  color: #555;
  font-size: 0.75rem;
  left: 0;
  min-height: 2.5rem;
  padding: 0.35rem 0.5rem;
  position: sticky;
  z-index: 3;
}

.doc-tasy-agendar-slot {
  background: #fff;
  border-left: 1px solid #e3e6ee;
  border-top: 1px solid #e3e6ee;
  cursor: crosshair;
  min-height: 2.5rem;
  touch-action: none;
  user-select: none;
}

.doc-tasy-agendar-slot:hover,
.doc-tasy-agendar-slot.is-selected {
  background: #eaf3ff;
}

.doc-tasy-agendar-event {
  border: 1px solid #1473e6;
  border-radius: 4px;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: grab;
  display: flex;
  flex-direction: column;
  font: inherit;
  gap: 0.1rem;
  margin: 0 0.25rem;
  overflow: hidden;
  padding: 0.35rem;
  position: relative;
  text-align: left;
  touch-action: none;
  user-select: none;
  width: auto;
  z-index: 3;
}

.doc-tasy-agendar-event strong,
.doc-tasy-agendar-event span,
.doc-tasy-agendar-event small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-tasy-agendar-event.is-agendamento {
  background: #eaf3ff;
}

.doc-tasy-agendar-event.is-fechamento {
  background: repeating-linear-gradient(135deg, #fff4f2 0, #fff4f2 8px, #ffe4df 8px, #ffe4df 16px);
  border-color: #d04f3a;
}

.doc-tasy-agendar-event.is-disponibilidade {
  background: #edf8f2;
  border-color: #168821;
}

.doc-tasy-agendar-event.is-moving {
  opacity: 0.45;
}

.doc-tasy-agendar-time-grid.is-moving-event .doc-tasy-agendar-event {
  pointer-events: none;
}

.doc-tasy-agendar-selection-range {
  background: rgba(19, 81, 180, 0.14);
  border: 1px solid rgba(19, 81, 180, 0.45);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  margin: 0.1rem 0.2rem;
  pointer-events: none;
  z-index: 2;
}

.doc-tasy-agendar-move-preview {
  border: 2px dashed #1473e6;
  border-radius: 4px;
  box-shadow: 0 0.45rem 1rem rgba(19, 81, 180, 0.22);
  box-sizing: border-box;
  color: #0f3d88;
  display: flex;
  flex-direction: column;
  font: inherit;
  gap: 0.15rem;
  justify-content: center;
  margin: 0.08rem 0.2rem;
  overflow: hidden;
  padding: 0.35rem;
  pointer-events: none;
  text-align: left;
  z-index: 6;
}

.doc-tasy-agendar-move-preview.is-agendamento {
  background: rgba(231, 240, 255, 0.88);
}

.doc-tasy-agendar-move-preview.is-fechamento {
  background: repeating-linear-gradient(135deg, rgba(255, 244, 242, 0.9) 0, rgba(255, 244, 242, 0.9) 8px, rgba(255, 228, 223, 0.9) 8px, rgba(255, 228, 223, 0.9) 16px);
  border-color: #d04f3a;
  color: #7a1f12;
}

.doc-tasy-agendar-move-preview.is-disponibilidade {
  background: rgba(237, 248, 242, 0.9);
  border-color: #168821;
  color: #0f5f1c;
}

.doc-tasy-agendar-move-preview strong,
.doc-tasy-agendar-move-preview small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-tasy-agendar-now-ruler {
  align-self: start;
  border-top: 2px solid #d04f3a;
  height: 0;
  pointer-events: none;
  position: relative;
  z-index: 5;
}

.doc-tasy-agendar-now-ruler::before {
  background: #d04f3a;
  border-radius: 999px;
  content: '';
  height: 0.55rem;
  left: -0.25rem;
  position: absolute;
  top: -0.34rem;
  width: 0.55rem;
}

.doc-tasy-agendar-now-ruler span {
  background: #d04f3a;
  border-radius: 3px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  left: 0.45rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  position: absolute;
  top: -0.75rem;
  white-space: nowrap;
}

.doc-tasy-agendar-month-grid {
  background: #fff;
  border: 1px solid #d3d7df;
  border-radius: 4px;
  display: grid;
  grid-template-columns: repeat(7, minmax(7rem, 1fr));
  overflow: auto;
}

.doc-tasy-agendar-month-header {
  background: #f8f9fc;
  border-bottom: 1px solid #d3d7df;
  font-weight: 700;
  padding: 0.65rem;
  text-align: center;
}

.doc-tasy-agendar-month-cell {
  background: #fff;
  border: 0;
  border-right: 1px solid #e3e6ee;
  border-top: 1px solid #e3e6ee;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 7rem;
  padding: 0.5rem;
  text-align: left;
}

.doc-tasy-agendar-month-cell:hover {
  background: #f8f9fc;
}

.doc-tasy-agendar-chip {
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  overflow: hidden;
  padding: 0.15rem 0.3rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-tasy-agendar-chip.is-agendamento {
  background: #eaf3ff;
  color: #1473e6;
}

.doc-tasy-agendar-chip.is-fechamento {
  background: #fff4f2;
  color: #9b2c1f;
}

.doc-tasy-agendar-chip.is-disponibilidade {
  background: #edf8f2;
  color: #0f5f1c;
}

.doc-tasy-agendar-control {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.doc-tasy-agendar-editor {
  padding: 1rem;
}

.doc-tasy-agendar-editor h2,
.doc-tasy-agendar-stack h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.doc-tasy-agendar-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.doc-tasy-agendar-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.doc-tasy-agendar-notice {
  background: #fff4cc;
  border: 1px solid #dfb000;
  border-radius: 4px;
  color: #574000;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.65rem;
}

.doc-tasy-agendar-stack {
  padding: 1rem;
}

.doc-tasy-agendar-stack-header {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.doc-tasy-agendar-stack-header h2,
.doc-tasy-agendar-stack-header p {
  margin-bottom: 0;
}

.doc-tasy-agendar-stack-header span {
  background: #eaf3ff;
  border-radius: 999px;
  color: #1473e6;
  font-weight: 700;
  min-width: 2rem;
  padding: 0.2rem 0.5rem;
  text-align: center;
}

.doc-tasy-agendar-stack-empty {
  background: #f8f9fc;
  border: 1px dashed #b9c0cc;
  border-radius: 4px;
  color: #555;
  padding: 0.75rem;
}

.doc-tasy-agendar-stack-item {
  background: #f8f9fc;
  border: 1px solid #d3d7df;
  border-left: 4px solid #f2994a;
  border-radius: 4px;
  cursor: grab;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding: 0.65rem;
}

.doc-tasy-agendar-stack-item.is-request {
  cursor: pointer;
  border-left-color: #1473e6;
}

.doc-tasy-agendar-stack-item strong,
.doc-tasy-agendar-stack-item span,
.doc-tasy-agendar-stack-item small {
  display: block;
}

.doc-tasy-agendar-stack-item span,
.doc-tasy-agendar-stack-item small {
  color: #555;
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

.doc-tasy-agendar-stack-reason {
  color: #7a4a00;
}

.doc-tasy-agendar-muted {
  color: #555;
}

@media (max-width: 980px) {
  .doc-tasy-agendar-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .doc-tasy-agendar-page {
    padding: 1.25rem;
  }

  .doc-tasy-agendar-header,
  .doc-tasy-agendar-toolbar {
    align-items: stretch;
    display: block;
  }

  .doc-tasy-agendar-actions {
    margin-top: 0.75rem;
  }

  .doc-tasy-agendar-button,
  .doc-tasy-agendar-select {
    flex: 1 1 8rem;
  }
}
