/* ============================================
   FICHA CLÍNICA DE ENDODONCIA
   Depende de las variables de styles.css
   ============================================ */

.fe-section {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}
.fe-section:first-child { border-top: none; margin-top: 0; padding-top: 0; }

.fe-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.fe-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.6rem;
  width: 100%;
}

.fe-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.fe-field {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.fe-field.fe-full { flex-basis: 100%; }

.fe-field > label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.fe-field input[type="text"],
.fe-field input[type="date"],
.fe-field textarea {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
}
.fe-field input:focus,
.fe-field textarea:focus { outline: none; border-color: var(--accent); background: #fff; }

.fe-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  align-items: center;
}

.fe-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.83rem;
  color: var(--text);
  cursor: pointer;
}
.fe-check input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }

.fe-otro {
  flex: 1 1 160px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.83rem;
  background: var(--bg);
}
.fe-otro:focus { outline: none; border-color: var(--accent); background: #fff; }

.fe-table-wrap { overflow-x: auto; width: 100%; }
.fe-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; min-width: 520px; }
.fe-table th, .fe-table td { border: 1px solid var(--border); padding: 0.3rem; text-align: left; }
.fe-table thead th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
}
.fe-table tbody th { font-weight: 500; color: var(--text); font-size: 0.78rem; white-space: nowrap; }
.fe-table td input { width: 100%; border: none; background: transparent; font-size: 0.8rem; padding: 0.25rem; color: var(--text); }
.fe-table td input:focus { outline: none; background: var(--accent-light); }

/* Toggle para habilitar la ficha en el alta */
.fe-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.fe-toggle input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
