/* ---------- odontogram slide ---------- */
.sd-odo {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
}

.sd-odo-chart {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.sd-arch {
  display: flex;
  justify-content: center;
  gap: 3px;
  flex-wrap: nowrap;
}

.sd-arch {
  gap: 4px;
}

.sd-tooth {
  width: 24px;
  flex: none;
  text-align: center;
}

.sd-tooth .crown {
  display: block;
  width: 100%;
  height: 30px;
  border: 1px solid #c2c2c2;
  border-radius: 5px 5px 8px 8px;
  background: #fbfbfb;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.03);
  margin-bottom: 3px;
}

.sd-tooth .num {
  display: block;
}

.sd-tooth .num {
  font-size: 0.56rem;
  color: var(--mfg);
}

.sd-tooth.caries .crown {
  background: rgba(220, 38, 38, 0.2);
  border-color: #dc2626;
}
.sd-tooth.restored .crown {
  background: rgba(59, 130, 246, 0.22);
  border-color: #3b82f6;
}
.sd-tooth.planned .crown {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
}
.sd-tooth.missing .crown {
  background: repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 3px, #e2e2e2 3px, #e2e2e2 6px);
  border-style: dashed;
  border-color: #c4c4c4;
}

.sd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--mfg);
  margin-top: 4px;
}

.sd-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sd-legend i {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  border: 1px solid;
}
.sd-legend i.caries {
  background: rgba(220, 38, 38, 0.2);
  border-color: #dc2626;
}
.sd-legend i.restored {
  background: rgba(59, 130, 246, 0.22);
  border-color: #3b82f6;
}
.sd-legend i.planned {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
}
.sd-legend i.missing {
  background: #ececec;
  border-color: #c4c4c4;
  border-style: dashed;
}

.sd-odo-side {
  width: 210px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sd-field label {
  display: block;
  font-size: 0.72rem;
  color: var(--mfg);
  margin-bottom: 4px;
}

.sd-input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.8rem;
  background: #fff;
  color: var(--fg);
}

.sd-input.sel {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sd-textarea {
  min-height: 70px;
  white-space: pre-wrap;
  color: var(--mfg);
}

.sd-side-btns {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.sd-btn {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
}

.sd-btn.pri {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.sd-tabsline {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.sd-tabsline span {
  padding-bottom: 7px;
  font-size: 0.78rem;
  color: var(--mfg);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.sd-tabsline span.on {
  color: var(--fg);
  border-bottom-color: var(--primary);
  font-weight: 500;
}

.sd-filterchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--mfg);
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 3px 10px;
}

.sd-check {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  border: 1px solid var(--primary);
  background: var(--primary);
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 0.6rem;
}

.sd-finrow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 16px 10px;
}
