#cmBody details.cm-plega > summary { display: none; }
/* odontOS · Reportes > Comisiones (solo escritorio ≥ 900 px): más compacto y ordenado. El celular no se toca. */
@media (min-width: 900px) {
  html body #cmBody { font-size: 13.5px !important; }
  /* Período: fichas pequeñas y en una sola línea con los doctores */
  html body #cmBody > .ct-row:first-child { gap: 6px !important; margin: 0 0 10px !important; }
  html body #cmBody > .ct-row:first-child > button { min-height: 32px !important; padding: 0 12px !important; font-size: 12.5px !important; border-radius: 999px !important; }

  /* Doctores: un grupo por fila, tarjetas cómodas en rejilla (planta arriba, externos debajo) */
  html body #cmBody .cd .dcs { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; align-items: start !important; gap: 12px 20px !important; margin: 0 0 16px !important; }
  html body #cmBody .cd .dcs > .dg:only-of-type, html body #cmBody .cd .dcs > .dgt { grid-column: 1 / -1 !important; }
  html body #cmBody .cd .dg { flex: none !important; width: 100% !important; min-width: 0 !important; }
  html body #cmBody .cd .dgh { margin: 0 2px 8px !important; }
  html body #cmBody .cd .dgr { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important; gap: 10px !important; }
  html body #cmBody .cd .dc { grid-template-columns: 40px minmax(0, 1fr) auto !important; gap: 2px 12px !important; padding: 12px 14px !important; border-radius: 14px !important; }
  html body #cmBody .cd .dc.on { padding: 11px 13px !important; }
  html body #cmBody .cd .dc .av { width: 40px !important; height: 40px !important; font-size: 13px !important; }
  html body #cmBody .cd .dc .nm b { font-size: 14.5px !important; }
  html body #cmBody .cd .dc .nm small { font-size: 12px !important; }
  html body #cmBody .cd .dc .mo b { font-size: 16px !important; }
  html body #cmBody .cd .dc .mo small { font-size: 11px !important; }
  html body #cmBody .cd .dc .md { margin-top: 6px !important; font-size: 11px !important; padding: 2px 10px !important; }
  html body #cmBody .cd .dgt { margin-top: -2px; }

  /* Dos columnas: atenciones a la izquierda, pago y cálculo fijos a la derecha */
  html body #cmBody .cd .cd-dos { grid-template-columns: minmax(0, 1fr) 372px !important; gap: 0 18px !important; }
  html body #cmBody .cd .cd-der { position: sticky !important; top: 10px !important; }
  html body #cmBody .cd .cap { margin: 10px 4px 5px !important; font-size: 11px !important; }
  html body #cmBody .cd .cd-s.at > .cap { margin-top: 0 !important; }
  html body #cmBody .cd .cd-s.pago > .cap { margin-top: 0 !important; }

  /* Atenciones: tabla fina */
  html body #cmBody .cd table.tat { font-size: 12.5px !important; }
  html body #cmBody .cd table.tat th { font-size: 10.5px !important; padding: 6px 8px !important; }
  html body #cmBody .cd table.tat td { padding: 6px 8px !important; line-height: 1.25 !important; vertical-align: middle !important; font-size: 12.5px !important; }
  html body #cmBody .cd table.tat td:first-child { font-weight: 600 !important; line-height: 1.35 !important; }
  html body #cmBody .cd table.tat th { font-size: 10.5px !important; }
  html body #cmBody .cd table.tat .lab { display: flex !important; gap: 6px !important; align-items: center !important; flex-wrap: wrap !important; }
  html body #cmBody .cd table.tat .lab select, html body #cmBody .cd table.tat .lab input { height: 30px !important; font-size: 12px !important; padding: 0 8px !important; width: auto !important; max-width: 96px !important; border-radius: 8px !important; }
  html body #cmBody .cd table.tat td span:not(.tag), html body #cmBody .cd table.tat td small, html body #cmBody .cd table.tat td div:not(.lab) { font-size: 11.5px !important; }
  html body #cmBody .cd table.tat td:first-child { font-size: 12.5px !important; }
  html body #cmBody .cd table.tat .lab { justify-content: center !important; }
  html body #cmBody .cd table.tat .tag { font-size: 10.5px !important; padding: 0 7px !important; }
  html body #cmBody .cd table.tat .edit { font-size: 13.5px !important; padding: 4px 10px !important; }
  html body #cmBody .cd table.tat select, html body #cmBody .cd table.tat input { height: 32px !important; font-size: 12.5px !important; }
  html body #cmBody .cd .nota { font-size: 11.5px !important; margin: 6px 4px !important; }

  /* Pago y cálculo: filas bajas, total grande */
  html body #cmBody .cd .grp .it { padding: 7px 12px !important; min-height: 0 !important; font-size: 13px !important; }
  html body #cmBody .cd .grp .it .s { font-size: 11px !important; line-height: 1.3 !important; }
  html body #cmBody .cd .seg button { min-height: 34px !important; font-size: 12.5px !important; }
  html body #cmBody .cd .it.tot { padding: 11px 14px !important; }
  html body #cmBody .cd .it.tot .l b { font-size: 14px !important; }
  html body #cmBody .cd .it.tot .r b { font-size: 22px !important; letter-spacing: -.01em !important; }
  html body #cmBody .cd .cd-s.calc .b { min-height: 42px !important; font-size: 13.5px !important; border-radius: 12px !important; padding: 8px 14px !important; line-height: 1.2 !important; white-space: normal !important; }
  html body #cmBody .cd .cd-s.calc [data-cd="imprimir"] { font-size: 13px !important; }

  /* Profesionales y Ajustes: plegados, se abren al tocar */
  html body #cmBody details.cm-plega { margin-top: 10px !important; border: 1px solid var(--cd-line, rgba(15,23,42,.1)) !important; border-radius: 14px !important; background: var(--card, #fff) !important; }
  html body #cmBody details.cm-plega > summary { list-style: none !important; display: flex !important; align-items: center !important; justify-content: space-between !important; min-height: 42px !important; padding: 0 14px !important; font-size: 13.5px !important; font-weight: 700 !important; cursor: pointer !important; }
  html body #cmBody details.cm-plega > summary::-webkit-details-marker { display: none !important; }
  html body #cmBody details.cm-plega > summary::after { content: "" !important; width: 7px !important; height: 7px !important; border-right: 2px solid var(--cd-mut, #5F6168) !important; border-bottom: 2px solid var(--cd-mut, #5F6168) !important; transform: rotate(-45deg) !important; transition: transform .15s !important; margin-right: 4px !important; }
  html body #cmBody details.cm-plega[open] > summary::after { transform: rotate(45deg) !important; }
  html body #cmBody details.cm-plega > .ct-card { margin: 0 !important; border: 0 !important; border-top: 1px solid var(--cd-line, rgba(15,23,42,.1)) !important; border-radius: 0 0 14px 14px !important; box-shadow: none !important; }
  html body #cmBody details.cm-plega > .ct-card > h3, html body #cmBody details.cm-plega > .ct-card > .ct-row > h3 { display: none !important; }
  html body #cmBody details.cm-plega > .ct-card { margin-top: 0 !important; }
}
@media (min-width: 900px) { html body #cmBody .cd table.tat td.r { color: #0F172A !important; } }

/* Celular: la tabla Profesionales no se corta (se oculta la columna Reglas, que se ve al Editar) */
@media (max-width: 620px) {
  html body #cmBody .ct-t th:nth-child(4), html body #cmBody .ct-t td:nth-child(4) { display: none !important; }
  html body #cmBody .ct-t td, html body #cmBody .ct-t th { padding-left: 6px !important; padding-right: 6px !important; }
}

/* Comisiones (escritorio): la tabla de atenciones cabe siempre en su columna; sin esto «Le toca» y «Base» quedaban cortados */
@media (min-width: 900px) {
  /* La regla global `table { min-width: 840px }` (css/02-bloque.css) hacía la tabla más ancha que su columna: se anula aquí */
  html body #cmBody .cd table.tat { table-layout: auto !important; width: 100% !important; min-width: 0 !important; }
  html body #cmBody .cd table.tat th, html body #cmBody .cd table.tat td { padding-left: 5px !important; padding-right: 5px !important; }
  html body #cmBody .cd table.tat td.r, html body #cmBody .cd table.tat th.r { white-space: nowrap !important; }
  html body #cmBody .cd table.tat td select, html body #cmBody .cd table.tat .lab select { min-width: 136px !important; width: auto !important; max-width: 162px !important; padding: 0 8px !important; background-image: none !important; text-overflow: ellipsis !important; }
  html body #cmBody .cd table.tat .lab input { min-width: 0 !important; width: 100px !important; max-width: 100px !important; }
  html body #cmBody .cd table.tat .edit { min-width: 0 !important; padding: 4px 8px !important; }
}
