/* Registro psíquico: resposta neutra, sem cores de julgamento ou classificação de risco. */
#psychic-form {
  max-width: 780px;
}
.psychic-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #6739ed;
}
.psychic-progress {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 16px;
  border-radius: 12px;
  background: #eee9fc;
  color: #4a2a9f;
  font-weight: 700;
  margin: 18px 0;
}
#psychic-form fieldset {
  border: 1px solid #e0daee;
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
}
#psychic-form legend {
  font-weight: 700;
  font-size: 15px;
  padding: 0 8px;
  max-width: 95%;
  line-height: 1.5;
}
.psychic-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.psychic-choices label {
  position: relative;
  margin: 0;
  cursor: pointer;
  flex: 1;
  min-width: 110px;
}
.psychic-choices input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.psychic-choices label > span {
  display: block;
  text-align: center;
  border: 2px solid #e0daee;
  background: #faf9fd;
  border-radius: 12px;
  padding: 12px 14px;
  color: #40364f;
  font-weight: 600;
}
.psychic-choices input:checked + span {
  border-color: #6739ed;
  background: #eee7ff;
  color: #4b229c;
}
.psychic-choices input:focus-visible + span {
  outline: 3px solid #99dccc;
  outline-offset: 3px;
}
.psychic-choices input:disabled + span {
  opacity: 0.6;
}
.psychic-observations {
  display: block;
  margin: 20px 0;
}
.psychic-observations textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc3dd;
  border-radius: 12px;
  font: inherit;
  margin-top: 8px;
  resize: vertical;
}
.psychic-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0;
}
.psychic-summary {
  color: #302941;
  border: 1px solid #e0daee;
  background: #faf9fd;
  padding: 18px;
  border-radius: 16px;
  margin: 16px 0;
}
.psychic-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid #e5dfef;
}
.psychic-summary dt {
  max-width: 75%;
  font-size: 14px;
}
.psychic-summary dd {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}
.psychic-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.psychic-history {
  margin: 20px 0;
}
.psychic-history summary {
  cursor: pointer;
  line-height: 1.6;
}
.psychic-history details {
  padding: 12px 0;
}
.psychic-pending-list .row {
  gap: 12px;
}
@media (max-width: 600px) {
  .psychic-choices {
    gap: 6px;
  }
  .psychic-choices label {
    min-width: 80px;
  }
  .psychic-choices label > span {
    padding: 12px 6px;
    font-size: 13px;
  }
  .psychic-footer button {
    flex: 1;
  }
}

.psychic-choices label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.psychic-choices input {
  position: static;
  opacity: 1;
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: #6739ed;
}
.psychic-choices label > span {
  flex: 1;
}
.clinical-structured {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #a99ac044;
  border-radius: 14px;
}
.clinical-structured label {
  display: block;
  margin: 12px 0;
}
.clinical-structured input[type='radio'] {
  width: 18px;
  height: 18px;
  display: inline-block;
  accent-color: #6739ed;
}

dialog.clinical-psychic-inline { position: static; inset: auto; width: 100%; max-width: none; max-height: none; margin: 12px 0; box-sizing: border-box; box-shadow: none; }
dialog.clinical-psychic-inline:not([open]) { display: none !important; }

.clinical-session-history { border: 1px solid var(--border, #ddd5ed); border-radius: 16px; padding: 16px; margin: 12px 0 20px; }
.clinical-session-history > summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.clinical-history-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-top:1px solid var(--border,#ddd5ed); }
.clinical-history-row button { flex-shrink:0; }
.clinical-history-record { padding:12px; border-radius:12px; background:var(--surface,transparent); }
.clinical-history-record .clinical-text { white-space:pre-wrap; overflow-wrap:anywhere; }

.clinical-focus-choice { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid var(--border,#ddd5ed); border-radius:10px; cursor:pointer; margin:8px 0; }
.clinical-focus-choice input[type=checkbox] { width:18px; height:18px; flex:0 0 18px; accent-color:#6739ed; }
.clinical-focus-choice:has(input:checked) { border-color:#8156ec; background:color-mix(in srgb, #8156ec 12%, transparent); }
.clinical-focus-choice:focus-within { outline:2px solid #8156ec; outline-offset:2px; }

dialog.clinical-objective-editor { width:min(480px, calc(100vw - 32px)); padding:24px; border-radius:18px; }
.clinical-objective-editor textarea { width:100%; box-sizing:border-box; }
.clinical-objective-preview { white-space:pre-wrap; overflow-wrap:anywhere; }

.clinical-legacy-field, .clinical-legacy-field[hidden] { display:none !important; }
