/* ── OS Work Order Detail ───────────────────────────────────────────────── */

#os-work-order-detail-page {
  padding: 0 0 48px;
}

/* ── Back link posicionado à esquerda do header ── */
#os-work-order-detail-page .page-header-wrapper .os-back-link {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}


/* ── Espaçamento entre cards ── */
#os-work-order-detail-page .os-detail-grid + .os-card,
#os-work-order-detail-page .os-card + .os-card {
  margin-top: 16px;
}

/* ── Parágrafo de observações ── */
#os-wod-notes {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text-secondary);
}

/* ── Mensagem vazia no histórico ── */
.os-wod-empty-msg {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.875rem;
}

/* ── Formulário de comentário ── */
.os-wod-comment-form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.os-wod-comment-wrap {
  width: 100%;
}

/* ── Inputs do modal ── */
#os-work-order-detail-page .os-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

#os-work-order-detail-page .os-input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-light-mode);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--background-color-main-light);
  color: var(--text-primary);
  box-sizing: border-box;
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#os-work-order-detail-page select.os-input {
  padding-right: 28px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

#os-work-order-detail-page .os-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

html.dark-theme #os-work-order-detail-page .os-input {
  background-color: var(--background-main-dark-mode, #1e293b);
  border-color: var(--border-dark-mode, #334155);
  color: var(--text-primary);
}

#os-work-order-detail-page .os-textarea {
  height: auto;
  padding: 9px 12px;
  resize: vertical;
  min-height: 72px;
}

/* ── Modal overlay ── */
#os-wod-edit-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  width: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  overflow-y: visible;
}

#os-wod-edit-modal.os-hidden {
  display: none;
}

/* ── Modal box ── */
#os-wod-edit-modal .os-modal-box {
  background: var(--background-color-main-light);
  border-radius: 14px;
  width: 90vw;
  max-width: min(720px, 90vw);
  max-height: 98vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

#os-wod-edit-modal .os-modal-header {
  justify-content: center;
}

#os-wod-edit-modal .os-modal-title {
  text-align: center;
}

/* ── Spinner oculto inicialmente ── */
#os-wod-modal-spinner {
  display: none;
}
