/* ============================================================
   PARTE DIARIO / HOJA DE DÍA — pantalla + impresión A4 vertical
   ============================================================ */

.dr-page { padding: 1rem; }

/* ── Barra de herramientas (solo pantalla) ──────────────── */
.dr-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .75rem; margin: 0 auto 1rem; max-width: 210mm;
}
.dr-toolbar-left, .dr-toolbar-right { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.dr-toolbar input[type="date"] {
  padding: .45rem .6rem; border: 1.5px solid var(--gray-300); border-radius: 8px; font: inherit; font-weight: 600;
}
.dr-status { font-size: .8rem; color: var(--gray-500); min-width: 9rem; text-align: right; }

/* ── Papel ──────────────────────────────────────────────── */
.dr-paper-wrap { overflow-x: auto; padding-bottom: 1.5rem; }
#dr-sheet-host { width: 210mm; margin: 0 auto; }

.dr-sheet {
  box-sizing: border-box;
  width: 210mm; min-height: 297mm;
  padding: 6.5mm 8mm;
  background: #fff; color: #000;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .15);
  display: flex;
  flex-direction: column;
  gap: 3.5mm;
  font-size: 9pt;
}
.dr-sheet *, .dr-sheet *::before, .dr-sheet *::after { box-sizing: border-box; }

/* ── Encabezado Oficial con Logo ────────────────────────── */
.dr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4mm;
  padding-bottom: 2mm;
  border-bottom: 1.5px solid #111;
  margin-bottom: 0.5mm;
  flex: 0 0 auto;
}
.dr-header-logo-wrap {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.dr-header-logo {
  height: 12.5mm;
  width: auto;
  max-width: 42mm;
  object-fit: contain;
  display: block;
}
.dr-header-title-wrap {
  flex: 1;
  text-align: center;
}
.dr-header-title {
  margin: 0;
  font-size: 11pt;
  font-weight: 900;
  letter-spacing: .03em;
  color: #0f172a;
  line-height: 1.15;
}
.dr-header-subtitle {
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: .08em;
  color: #475569;
  margin-top: 0.5mm;
}
.dr-header-badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5mm;
  padding: 1.5mm 3.5mm;
  background: #f1f5f9;
  border: 1.2px solid #cbd5e1;
  border-radius: 2mm;
  font-size: 8pt;
  font-weight: 800;
  color: #0f172a;
}
.dr-header-badge-icon {
  font-size: 9.5pt;
}

/* Cajas con título sobre el borde superior izquierdo */
.dr-box {
  position: relative;
  border: 1.4px solid #222; border-radius: 3mm;
  padding: 3.5mm 2.5mm 2mm;
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
}
.dr-box-title {
  position: absolute; top: -2.6mm; left: 4mm;
  margin: 0; padding: 0 1.5mm;
  background: #fff; color: #000;
  font-size: 9.5pt; font-weight: 800; line-height: 1.1; letter-spacing: .02em;
}

/* 1. Cabecera en 2 niveles: Fila 1 [Cuidadores | Fecha | El tiempo], Fila 2 [Cosas importantes 100%] */
.dr-top {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1.35fr;
  gap: 3.5mm;
  align-items: stretch;
  min-height: 0;
  flex: 0 0 auto;
}
.dr-date-main { font-size: 10.5pt; font-weight: 800; line-height: 1.2; }
.dr-date-dept { margin-top: 1mm; font-size: 8.5pt; color: #444; }
.dr-weather {
  min-width: 175px;
  overflow: visible;
  padding: 3mm 2.2mm 2mm;
  box-sizing: border-box;
}
.dr-weather-in {
  font-size: 8pt;
  line-height: 1.25;
  padding: 1px 2px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: ellipsis;
}
.dr-weather-temp { font-weight: 700; }
.dr-weather-next {
  font-size: 7.2pt;
  color: #1e293b;
  border-top: 1px dotted #cbd5e1;
  padding-top: 0.8mm;
  margin-top: 0.8mm;
  white-space: nowrap;
  overflow: visible;
  text-overflow: ellipsis;
}

/* Bloque "Cosas importantes / Incidencias" a ancho completo (100%) */
.dr-notes,
.important-notes-box {
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
  min-height: 55px;
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
}
.dr-notes-in {
  flex: 1;
  width: 100%;
  min-height: 52px;
  height: auto;
  resize: vertical;
  border: 0;
  outline: none;
  padding: 2px 0;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.3;
  color: #000;
  overflow: visible;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 16px,
    #cbd5e1 16px,
    #cbd5e1 17px
  );
  background-attachment: local;
}
/* Ocultar líneas guía de fondo si ya contiene texto digital para evitar superposición visual */
.dr-notes.has-notes .dr-notes-in,
.important-notes-box.has-notes .dr-notes-in {
  background: transparent !important;
}

/* Listas con línea (personal / tareas) */
.dr-tasks { flex: 0 0 auto; min-height: 0; }
.dr-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.dr-line {
  min-height: 26px;
  height: auto;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  font-size: 0.8rem;
  line-height: 1.25;
}
.dr-line:last-child { border-bottom-color: transparent; }
.dr-line.dr-line-blank { border-bottom: 1px dashed #cbd5e1; }
.dr-task-content { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.dr-task-notes { font-size: 7.2pt; color: #475569; font-style: italic; line-height: 1.2; padding-left: 2px; margin-top: 1px; }
.dr-line.dr-line-has-notes { height: auto !important; min-height: 28px; padding: 3px 6px; }

/* Checkbox compacto y alineado */
.dr-chk {
  width: 14px;
  height: 14px;
  margin-right: 8px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #0284c7;
}
.dr-manual-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

/* Drag and Drop en Tareas */
.dr-handle {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  padding: 0 4px;
  color: #94a3b8;
  font-size: 12pt;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.dr-handle:hover {
  color: #0284c7;
}
.dr-handle:active {
  cursor: grabbing;
}
.dr-line.dr-dragging {
  opacity: 0.4 !important;
  background: #f1f5f9 !important;
}
.dr-line.drag-over-top {
  border-top: 2.5px solid #0284c7 !important;
}
.dr-line.drag-over-bottom {
  border-bottom: 2.5px solid #0284c7 !important;
}

.dr-in {
  flex: 1; min-width: 0; width: 100%;
  border: 0; outline: none; background: transparent;
  font: inherit; font-size: 0.8rem; color: #000; padding: 2px 4px;
}
.dr-in:focus { background: #eaf4ff; }
.dr-in-name { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 0.76rem; }
.dr-in-small {
  flex: 0 0 auto;
  min-width: 82px;
  width: 84px;
  white-space: nowrap;
  font-size: 0.72rem;
  color: #475569;
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding: 2px 2px;
}
.dr-in-time {
  flex: 0 0 13mm;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin-right: 6px;
  padding: 2px 4px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}
.dr-in-manual::placeholder {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.75rem;
}
.dr-center { text-align: center; }

/* Bloque "Cuidadores" (sin horarios y a 2 columnas cuando hay 2 o más) */
.dr-staff-list {
  list-style: none;
  margin: 0;
  padding: 1mm 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 8px;
  align-content: center;
  flex: 1;
  min-height: 0;
}
.dr-staff-list.dr-staff-single {
  grid-template-columns: 1fr;
  align-content: center;
}
.dr-staff-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 4px;
  border-bottom: 1px dotted #e2e8f0;
  font-size: 0.78rem;
  font-weight: 500;
  min-height: 20px;
  position: relative;
}
.dr-staff-list.dr-staff-single .dr-staff-item {
  border-bottom-color: transparent;
}
.dr-staff-item:hover .dr-x { opacity: 1; }
.dr-staff-item .dr-in-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 500;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dr-staff-list.dr-staff-single .dr-staff-item .dr-in-name {
  text-align: center;
}
.dr-staff-name {
  font-weight: 700;
  color: #111;
  font-size: 0.78rem;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
.dr-staff-note { font-size: 0.74rem; color: #475569; white-space: nowrap; margin-left: 2mm; font-variant-numeric: tabular-nums; }
.dr-staff-empty { color: #888; font-style: italic; padding: 3mm 1mm; font-size: 8pt; text-align: center; }

/* 3 y 4. Tablas */
.dr-records { display: none !important; }
.dr-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dr-table th, .dr-table td { border: 1.2px solid #222; padding: 0; height: 6.8mm; vertical-align: middle; }
.dr-table th { background: #e9ecef; font-size: 8.5pt; font-weight: 800; text-align: left; padding: 0 2mm; }
.dr-table th.dr-rec-chk, .dr-table th.dr-c-num, .dr-table th.dr-c-time { text-align: center; padding: 0; }
.dr-records .dr-table { width: 100%; }
.dr-rec-chk { width: 22mm; text-align: center; }
.dr-rec-name, .dr-inst-name { position: relative; }
.dr-c-time { width: 13mm; }
.dr-c-num { width: 12mm; }

/* Instalación: tabla con Cloro dividido en CC, CL, CT (mucho más estrechos) y Sal separada */
.dr-install { padding-bottom: 2mm; flex: 1.1 0 auto; }
.dr-install .dr-install-table { table-layout: fixed; width: 100%; }

/* Anchos exactos de columnas (Cloro compacto para valores como 1.1, 2.2) */
.dr-install-table col.dr-col-inst { width: 33mm; }
.dr-install-table col.dr-col-time { width: 12mm; }
.dr-install-table col.dr-col-ph   { width: 10mm; }
.dr-install-table col.dr-col-cc   { width: 7.5mm; }
.dr-install-table col.dr-col-cl   { width: 7.5mm; }
.dr-install-table col.dr-col-ct   { width: 7.5mm; }
.dr-install-table col.dr-col-sal  { width: 10mm; }
.dr-install-table col.dr-col-temp { width: 11mm; }
.dr-install-table col.dr-col-obs  { width: auto; }

/* Anchos específicos para Pingüinario (sin cloro, con T.ª amb) */
.dr-sheet-pinguinario .dr-install-table col.dr-col-inst { width: 38mm; }
.dr-sheet-pinguinario .dr-install-table col.dr-col-time { width: 13mm; }
.dr-sheet-pinguinario .dr-install-table col.dr-col-ph   { width: 12mm; }
.dr-sheet-pinguinario .dr-install-table col.dr-col-sal  { width: 12mm; }
.dr-sheet-pinguinario .dr-install-table col.dr-col-temp { width: 13mm; }
.dr-sheet-pinguinario .dr-install-table col.dr-col-air  { width: 13mm; }
.dr-sheet-pinguinario .dr-install-table col.dr-col-obs  { width: auto; }

/* ── Pingüinario: Tareas y tabla de instalación adaptada (Pantalla) ──── */
.dr-sheet.dr-sheet-pinguinario .dr-tasks {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  padding-bottom: 2mm !important;
}

.dr-sheet.dr-sheet-pinguinario .dr-tasks .dr-lines {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  overflow: visible !important;
  gap: 2px !important;
}

.dr-sheet.dr-sheet-pinguinario .dr-line {
  min-height: 26px !important;
  height: auto !important;
  max-height: none !important;
  font-size: 0.8rem !important;
  line-height: 1.25 !important;
  position: relative !important;
  padding: 4px 6px !important;
}

.dr-sheet.dr-sheet-pinguinario .dr-install {
  position: relative !important;
  margin-top: 4px !important;
}

.dr-install-table th { text-align: center; vertical-align: middle; padding: 0; font-size: 8pt; }
.dr-install-table th.dr-th-inst { text-align: left; padding: 0 1.5mm; }
.dr-install-table th.dr-th-obs  { text-align: left; padding: 0 1.5mm; }
.dr-install-table th.dr-c-cloro-head { text-align: center; padding: 0; height: 3.8mm; font-size: 7.5pt; font-weight: 800; }
.dr-install-table th.dr-c-sub { font-size: 7pt; font-weight: 800; height: 3.8mm; text-align: center; padding: 0; letter-spacing: -0.2px; }
.dr-install-table td { height: 8mm; text-align: center; }
.dr-install-table td.dr-inst-name { text-align: left; }
.dr-install-table .dr-in { font-size: 8.5pt; padding: 0; text-align: center; }
.dr-install-table .dr-inst-name .dr-in,
.dr-install-table td:last-child .dr-in { text-align: left; padding: 0 1mm; }

/* Casillas */
.dr-chk {
  appearance: none; -webkit-appearance: none;
  width: 4.8mm; height: 4.8mm; margin: 0; vertical-align: middle;
  border: 1.4px solid #000; border-radius: 1px; background: #fff; cursor: pointer; position: relative;
}
.dr-chk:checked::after {
  content: ""; position: absolute; left: 1.1mm; top: .1mm; width: 1.2mm; height: 2.7mm;
  border: solid #000; border-width: 0 .6mm .6mm 0; transform: rotate(45deg);
}

/* Botones de edición (solo pantalla) */
.dr-add {
  align-self: flex-start; margin-top: 1mm;
  background: none; border: 1px dashed var(--gray-400, #aaa); color: var(--primary-700, #0a2647);
  font: inherit; font-size: 8pt; font-weight: 600; padding: 0 2mm; border-radius: 4px; cursor: pointer;
}
.dr-add:hover { background: #eaf4ff; }
.dr-x {
  position: absolute; right: 1mm; top: 50%; transform: translateY(-50%);
  width: 4.5mm; height: 4.5mm; line-height: 1; padding: 0;
  border: 0; border-radius: 50%; background: #fee2e2; color: #b91c1c; cursor: pointer; font-size: 10pt; opacity: 0;
}
.dr-line:hover .dr-x, tr:hover .dr-x { opacity: 1; }

/* ── Pesos Diarios Aves (Guacamayos y Tucanes) ────────────── */
.dr-sheet.dr-sheet-aves {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px;
}
.dr-sheet.dr-sheet-aves .dr-tasks {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative;
  padding-bottom: 1.5mm;
}
.dr-sheet.dr-sheet-aves .dr-tasks .dr-lines {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  overflow: visible !important;
}
.dr-sheet.dr-sheet-aves .dr-tasks .dr-line {
  min-height: 5mm;
  height: auto;
  max-height: none;
  font-size: 0.78rem;
  line-height: 1.25;
  margin-bottom: 3px;
  position: relative;
}

.dr-sheet.dr-sheet-aves .dr-bird-weights {
  position: relative;
  margin-top: 6px;
  padding-bottom: 2mm;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.dr-sheet.dr-sheet-aves .dr-install {
  position: relative;
  margin-top: 6px;
}
.dr-bird-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3mm;
  width: 100%;
}
.dr-bird-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.dr-bird-table col.dr-col-b-name { width: 55%; }
.dr-bird-table col.dr-col-b-wt   { width: 45%; }

.dr-bird-table th, .dr-bird-table td {
  border: 1.2px solid #222;
  height: 4.8mm;
  vertical-align: middle;
  padding: 0;
}
.dr-bird-table th {
  background: #e9ecef;
  font-size: 7.5pt;
  font-weight: 800;
  padding: 0 2mm;
  text-align: left;
}
.dr-bird-table th.dr-b-center {
  text-align: center;
}
.dr-b-name-text {
  font-size: 8.5pt;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.2px;
}
.dr-bird-table .dr-in {
  font-size: 8.5pt;
  text-align: center;
  font-weight: 700;
  padding: 0;
}

/* ── Amazonia: Tareas en 2 columnas y flujo optimizado ──────── */
.dr-sheet.dr-sheet-amazonia {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between;
}

.dr-sheet.dr-sheet-amazonia .dr-tasks {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  padding-bottom: 2mm !important;
}

.dr-sheet.dr-sheet-amazonia .dr-tasks .dr-lines {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  column-gap: 16px !important;
  row-gap: 3px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.dr-sheet.dr-sheet-amazonia .dr-line {
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 6px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 2px 0 !important;
  position: relative;
}

.dr-sheet.dr-sheet-amazonia .dr-line .dr-handle {
  padding: 0 2px !important;
  align-self: flex-start !important;
  margin-top: 2px !important;
}

.dr-sheet.dr-sheet-amazonia .dr-line .dr-chk,
.dr-sheet.dr-sheet-amazonia .dr-line .dr-task-chk {
  margin: 3px 2px 0 0 !important;
  flex-shrink: 0 !important;
}

.dr-sheet.dr-sheet-amazonia .dr-line .dr-in-time {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 12mm !important;
  font-size: 0.72rem !important;
  line-height: 1.2 !important;
  padding: 0 !important;
  align-self: flex-start !important;
  margin-top: 1px !important;
}

.dr-sheet.dr-sheet-amazonia .dr-line .dr-in-time[value=""],
.dr-sheet.dr-sheet-amazonia .dr-line .dr-in-time:placeholder-shown,
.dr-sheet.dr-sheet-amazonia .dr-line .dr-in-time:empty {
  display: none !important;
}

.dr-sheet.dr-sheet-amazonia .dr-line .dr-task-content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

.dr-sheet.dr-sheet-amazonia .dr-line .dr-in {
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
}

.dr-sheet.dr-sheet-amazonia .dr-task-notes {
  font-size: 0.7rem !important;
  color: #475569 !important;
  font-style: italic !important;
  line-height: 1.15 !important;
  margin-top: 1px !important;
  padding-left: 0 !important;
}

/* ── Tablas Instalación y Temperaturas Hábitats Amazonía (°C) ──────────────── */
.dr-sheet.dr-sheet-amazonia .dr-install {
  padding: 2.2mm 2mm 1.5mm;
}

.dr-sheet.dr-sheet-amazonia .habitat-temperatures-section,
.dr-sheet.dr-sheet-amazonia .dr-install-amazonia-temps {
  margin-top: 12px !important;
}

/* Alineación de columnas de la tabla de parámetros de agua en Amazonía */
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-inst { width: 22%; }
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-time { width: 8%; }
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-ph   { width: 6.5%; }
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-cc   { width: 6%; }
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-cl   { width: 6%; }
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-ct   { width: 6%; }
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-sal  { width: 6.5%; }
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-temp { width: 7.5%; }
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-obs  { width: 31.5%; }

.dr-sheet.dr-sheet-amazonia .dr-amz-water-table th,
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table td {
  height: auto !important;
  min-height: 24px;
  padding: 4px 6px;
  line-height: 1.35;
  vertical-align: middle;
  font-size: 0.76rem;
  text-align: center;
}

.dr-sheet.dr-sheet-amazonia .dr-amz-water-table th.dr-th-inst,
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table td.dr-inst-name,
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table th.dr-th-obs,
.dr-sheet.dr-sheet-amazonia .dr-amz-water-table td:last-child {
  text-align: left;
}

.dr-amz-temp-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}
.dr-amz-temp-table col.dr-col-amz-hab { width: 28%; }
.dr-amz-temp-table col.dr-col-amz-max { width: 10%; }
.dr-amz-temp-table col.dr-col-amz-cur { width: 10%; }
.dr-amz-temp-table col.dr-col-amz-min { width: 10%; }
.dr-amz-temp-table col.dr-col-amz-obs { width: 42%; }

.dr-amz-temp-table th,
.dr-amz-temp-table td {
  height: auto !important;
  min-height: 22px;
  padding: 3px 5px;
  line-height: 1.3;
  vertical-align: middle;
}

.dr-amz-temp-table td.dr-amz-hab-name {
  text-align: left;
  font-weight: 700;
  font-size: 0.76rem;
  color: #0f172a;
  padding: 3px 5px;
  line-height: 1.3;
}

.dr-amz-temp-table td.dr-amz-obs-cell .dr-in {
  text-align: left;
  padding: 1px 4px;
}

.dr-amz-temp-table td.cell-disabled {
  background-color: #f8fafc !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cline x1='0' y1='100%25' x2='100%25' y2='0' stroke='%23e2e8f0' stroke-width='1'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  cursor: not-allowed !important;
  user-select: none;
  text-align: center;
}

.dr-amz-temp-table td.cell-disabled .input-disabled,
.dr-amz-temp-table td.cell-disabled input:disabled {
  background: transparent !important;
  color: #94a3b8 !important;
  font-weight: bold !important;
  cursor: not-allowed !important;
  pointer-events: none;
  text-align: center;
  width: 100%;
  border: 0;
}

/* ── Cara B: Hoja de Sesiones (Mamíferos Marinos) ────────── */
.dr-back-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto 1rem;
  width: 210mm;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  gap: 8px;
}

.dr-sheet-sessions {
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  height: auto;
  padding: 6mm 8mm;
  background: #fff;
  color: #000;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .15);
  display: flex;
  flex-direction: column;
  gap: 2.5mm;
  font-size: 8pt;
}

/* Cara B: Cuadrícula de 2 columnas (Delfines a la izquierda, Leones a la derecha) */
.dr-sessions-2col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5mm;
  flex: 1;
}

.dr-sessions-col {
  display: flex;
  flex-direction: column;
  gap: 1.8mm;
}

.dr-sessions-col-header {
  font-size: 8pt;
  font-weight: 900;
  color: #0369a1;
  background: #f0f9ff;
  border-left: 3.5px solid #0284c7;
  padding: 0.8mm 2mm;
  border-radius: 2px;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dr-session-group-badge {
  font-size: 6.8pt;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  padding: 1px 4.5px;
  border-radius: 3px;
  margin-left: 4px;
}

.dr-sessions-head-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 1.5mm;
  margin-bottom: 0.5mm;
}
.dr-sessions-main-title {
  font-size: 10.5pt;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}
.dr-sessions-meta {
  font-size: 8.5pt;
  font-weight: 600;
  color: #334155;
}

.dr-session-group-box {
  border: 1.4px solid #1e293b;
  border-radius: 2.5mm;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dr-session-group-header {
  background: #f1f5f9;
  border-bottom: 1.2px solid #cbd5e1;
  padding: 1.2mm 2.5mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dr-session-group-name {
  font-weight: 800;
  font-size: 8.5pt;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 5px;
}
.dr-session-group-animals {
  font-size: 7.5pt;
  color: #475569;
}
.dr-session-group-animals strong {
  color: #0f172a;
}

.dr-table.dr-session-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8pt;
}
.dr-session-table th {
  background: #f8fafc;
  color: #1e293b;
  font-weight: 700;
  font-size: 7.2pt;
  padding: 1mm 1.5mm;
  border: 1px solid #cbd5e1;
  text-align: left;
}
.dr-session-table th.center, .dr-session-table td.center {
  text-align: center;
}
.dr-session-table td {
  border: 1px solid #e2e8f0;
  padding: 0;
  height: 5.4mm;
}
.dr-session-table tr:nth-child(even) td {
  background: #fafafa;
}
.dr-session-num {
  font-weight: 800;
  font-size: 8pt;
  color: #0f172a;
  padding: 0 1.5mm;
  text-align: center;
  background: #f1f5f9;
  width: 11mm;
}
.dr-session-table .dr-in {
  height: 100%;
  padding: 0 1.5mm;
  font-size: 8pt;
}
.dr-session-table .dr-in.center,
.dr-session-table .dr-in.dr-center,
.dr-center {
  text-align: center;
}
.dr-session-add-btn {
  background: transparent;
  border: none;
  color: #0284c7;
  font-size: 7.5pt;
  font-weight: 700;
  cursor: pointer;
  padding: 1px 6px;
  border-radius: 4px;
}
.dr-session-add-btn:hover {
  background: #e0f2fe;
}

.dr-session-bottom-notes {
  border: 1.4px solid #1e293b;
  border-radius: 2.5mm;
  padding: 2mm 3mm;
  flex: 1;
  min-height: 16mm;
  display: flex;
  flex-direction: column;
}
.dr-session-bottom-notes-title {
  font-weight: 800;
  font-size: 8pt;
  color: #0f172a;
  margin-bottom: 1mm;
}
.dr-session-notes-in {
  flex: 1;
  width: 100%;
  border: none;
  outline: none;
  font: inherit;
  font-size: 8pt;
  line-height: 5mm;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(5mm - 1px), #cbd5e1 calc(5mm - 1px), #cbd5e1 5mm);
  resize: none;
}

/* ── Impresión: A4 vertical ─────────────────────────────── */
@page { size: A4 portrait; margin: 7mm 8mm; }

@media print {
  body.dr-active {
    background: #fff !important; color: #000 !important;
    padding: 0 !important; margin: 0 !important;
    width: 100% !important; max-width: 100% !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  body.dr-active::after { display: none !important; content: none !important; }
  body.dr-active .app-header,
  body.dr-active .breadcrumbs,
  body.dr-active .dr-toolbar,
  body.dr-active .dr-back-divider,
  body.dr-active nav,
  body.dr-active .no-print { display: none !important; }

  body.dr-active #app, body.dr-active .layout-container { display: block !important; margin: 0 !important; padding: 0 !important; width: 100% !important; }
  body.dr-active .main-content,
  body.dr-active .dr-page { padding: 0 !important; margin: 0 !important; max-width: 100% !important; width: 100% !important; }
  body.dr-active .dr-paper-wrap { overflow: visible !important; padding: 0 !important; width: 100% !important; }
  body.dr-active #dr-sheet-host { width: 100% !important; max-width: 198mm !important; margin: 0 auto !important; }

  /* ── PREVENIR CUALQUIER SALTO INTERNO DE PÁGINA ── */
  body.dr-active .dr-sheet,
  body.dr-active .dr-sheet > *,
  body.dr-active .dr-box,
  body.dr-active .dr-tasks,
  body.dr-active .dr-records,
  body.dr-active .dr-install,
  body.dr-active table,
  body.dr-active tr,
  body.dr-active tbody {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* ── CARA A: PARTE DIARIO (ESTRICTAMENTE 1 PÁGINA COMPLETA CON FLUJO FLEXIBLE) ── */
  body.dr-active .dr-sheet {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 198mm !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 1.5mm 1.5mm !important;
    box-shadow: none !important;
    margin: 0 auto !important;
    overflow: visible !important;
    gap: clamp(1.2mm, 0.3vh, 2mm) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    page-break-after: auto !important;
    break-after: auto !important;
  }
  body.dr-active .dr-sheet .dr-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 1.5mm !important;
    border-bottom: 1.2px solid #222 !important;
    margin-bottom: 0 !important;
    flex: 0 0 auto !important;
    height: 12.5mm !important;
    box-sizing: border-box !important;
  }
  body.dr-active .dr-sheet .dr-header-logo-wrap {
    display: flex !important;
    align-items: center !important;
  }
  body.dr-active .dr-sheet .dr-header-logo {
    height: 10.5mm !important;
    width: auto !important;
    max-width: 38mm !important;
    display: block !important;
    object-fit: contain !important;
  }
  body.dr-active .dr-sheet .dr-header-title-wrap {
    text-align: center !important;
    flex: 1 !important;
    padding: 0 2mm !important;
  }
  body.dr-active .dr-sheet .dr-header-title {
    font-size: 10pt !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    text-align: center !important;
    letter-spacing: .02em !important;
  }
  body.dr-active .dr-sheet .dr-header-subtitle {
    font-size: 6.8pt !important;
    font-weight: 700 !important;
    letter-spacing: .05em !important;
    color: #444 !important;
    text-align: center !important;
    margin-top: 0.3mm !important;
  }
  body.dr-active .dr-sheet .dr-header-badge {
    padding: 1mm 2.5mm !important;
    font-size: 7.5pt !important;
    font-weight: 800 !important;
    border: 1.1px solid #333 !important;
    border-radius: 1.2mm !important;
    background: #f8fafc !important;
    white-space: nowrap !important;
  }
  body.dr-active .dr-sheet .dr-box {
    padding: 2.2mm 2mm 1.5mm !important;
    border-width: 1.1px !important;
    border-radius: 1.8mm !important;
    flex: none !important;
  }
  body.dr-active .dr-sheet .dr-box-title {
    font-size: 8.5pt !important;
    top: -2.2mm !important;
    line-height: 1 !important;
    padding: 0 1.2mm !important;
    font-weight: 800 !important;
    background: #fff !important;
  }
  body.dr-active .dr-sheet .dr-top {
    display: grid !important;
    grid-template-columns: 1.15fr 0.9fr 1.35fr !important;
    gap: 2.5mm !important;
    align-items: stretch !important;
    flex: 0 0 auto !important;
  }
  body.dr-active .dr-sheet .dr-weather {
    min-width: 175px !important;
    overflow: visible !important;
    padding: 2.2mm 2mm 1.5mm !important;
  }
  body.dr-active .dr-sheet .dr-date-main {
    font-size: 9.2pt !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
  }
  body.dr-active .dr-sheet .dr-date-dept {
    font-size: 7.5pt !important;
    margin-top: 0.5mm !important;
  }
  body.dr-active .dr-sheet .dr-weather-in {
    font-size: 7.4pt !important;
    line-height: 1.15 !important;
    padding: 0 1px !important;
  }
  body.dr-active .dr-sheet .dr-weather-next {
    font-size: 6.8pt !important;
    margin-top: 0.5mm !important;
    padding-top: 0.5mm !important;
  }
  body.dr-active .dr-sheet .dr-notes,
  body.dr-active .dr-sheet .important-notes-box {
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 55px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
  }
  body.dr-active .dr-sheet .dr-notes-in {
    font-size: 0.78rem !important; /* ~10.5px */
    line-height: 1.3 !important;
    min-height: 52px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    resize: none !important;
    background: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 16px,
      #cbd5e1 16px,
      #cbd5e1 17px
    ) !important;
    background-size: 100% 17px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body.dr-active .dr-sheet .dr-notes.has-notes .dr-notes-in,
  body.dr-active .dr-sheet .important-notes-box.has-notes .dr-notes-in {
    background: transparent !important;
  }
  body.dr-active .dr-sheet .dr-staff-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4px 8px !important;
    align-content: center !important;
    padding: 0.5mm 0 0 !important;
  }
  body.dr-active .dr-sheet .dr-staff-list.dr-staff-single {
    grid-template-columns: 1fr !important;
    align-content: center !important;
  }
  body.dr-active .dr-sheet .dr-staff-item {
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    min-height: 4.2mm !important;
    padding: 0.2mm 0.5mm !important;
    line-height: 1.15 !important;
  }
  body.dr-active .dr-sheet .dr-staff-item .dr-in-name {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body.dr-active .dr-sheet .dr-staff-list.dr-staff-single .dr-staff-item .dr-in-name {
    text-align: center !important;
  }
  body.dr-active .dr-sheet .dr-staff-name {
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
  }
  body.dr-active .dr-sheet .dr-tasks {
    padding: 1.8mm 2mm 1.2mm !important;
    flex: 0 0 auto !important;
  }
  body.dr-active .dr-sheet .dr-tasks .dr-lines {
    flex: none !important;
    gap: 0 !important;
  }
  body.dr-active .dr-sheet .dr-line {
    min-height: 4.8mm !important;
    max-height: none !important;
    height: auto !important;
    padding: 0.6mm 1mm !important;
    font-size: 7.9pt !important; /* ~10.5px */
    line-height: 1.2 !important;
    border-bottom: 1px solid #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    flex: none !important;
  }
  body.dr-active .dr-sheet .dr-line.dr-line-blank {
    border-bottom: 1px dashed #94a3b8 !important;
  }
  body.dr-active .dr-sheet .dr-line.dr-line-has-notes {
    height: auto !important;
    min-height: 6.8mm !important;
    max-height: none !important;
    padding: 0.6mm 1mm !important;
  }
  body.dr-active .dr-sheet .dr-task-notes {
    font-size: 6.8pt !important;
    color: #334155 !important;
    font-style: italic !important;
    line-height: 1.15 !important;
    padding-left: 0.5mm !important;
    margin-top: 0.2mm !important;
  }
  body.dr-active .dr-sheet .dr-in {
    font-size: 7.9pt !important; /* ~10.5px */
    height: 100% !important;
    line-height: 1.2 !important;
    padding: 0 0.6mm !important;
  }
  body.dr-active .dr-sheet .dr-in-time {
    flex: 0 0 11.5mm !important;
    font-size: 7.6pt !important;
    font-weight: 700 !important;
    margin-right: 1.5mm !important;
    padding: 0.2mm 0.5mm !important;
    border-radius: 1mm !important;
    border: 0.8px solid #cbd5e1 !important;
    background: #f8fafc !important;
    text-align: center !important;
  }
  body.dr-active .dr-sheet .dr-line .dr-in-time {
    display: none !important;
  }
  body.dr-active .dr-sheet .dr-chk {
    width: 3.4mm !important;
    height: 3.4mm !important;
    margin-right: 2mm !important;
    border: 1px solid #000 !important;
    flex-shrink: 0 !important;
  }
  body.dr-active .dr-sheet .dr-manual-box {
    display: inline-flex !important;
    width: 3.4mm !important;
    height: 3.4mm !important;
    font-size: 8.5pt !important;
    color: #111 !important;
    margin-right: 2mm !important;
    line-height: 1 !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }
  body.dr-active .dr-sheet .dr-in-manual::placeholder {
    color: transparent !important;
  }
  body.dr-active .dr-sheet .dr-records {
    display: none !important;
  }
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install-table col.dr-col-inst { width: 38mm !important; }
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install-table col.dr-col-time { width: 13mm !important; }
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install-table col.dr-col-ph   { width: 12mm !important; }
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install-table col.dr-col-sal  { width: 12mm !important; }
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install-table col.dr-col-temp { width: 13mm !important; }
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install-table col.dr-col-air  { width: 13mm !important; }
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install-table col.dr-col-obs  { width: auto !important; }
  body.dr-active .dr-sheet .dr-chk {
    width: 4mm !important;
    height: 4mm !important;
    border: 1.2px solid #000 !important;
  }
  body.dr-active .dr-sheet .dr-install {
    padding: 2.2mm 2mm 1.5mm !important;
    flex: 0 0 auto !important;
    height: auto !important;
  }
  body.dr-active .dr-sheet .dr-install-table {
    height: auto !important;
    table-layout: fixed !important;
    width: 100% !important;
  }
  body.dr-active .dr-sheet .dr-install-table th {
    font-size: 7.2pt !important;
    border: 1.1px solid #222 !important;
    background: #f1f5f9 !important;
    padding: 0 0.8mm !important;
  }
  body.dr-active .dr-sheet .dr-install-table th.dr-c-cloro-head,
  body.dr-active .dr-sheet .dr-install-table th.dr-c-sub {
    height: 3.5mm !important;
    font-size: 6.8pt !important;
    font-weight: 800 !important;
  }
  body.dr-active .dr-sheet .dr-install-table td {
    height: 6.8mm !important;
    max-height: 7.2mm !important;
    font-size: 7.8pt !important;
    border: 1.1px solid #222 !important;
    padding: 0 !important;
  }
  body.dr-active .dr-sheet .dr-install-table .dr-in {
    font-size: 7.8pt !important;
    height: 100% !important;
    min-height: 0 !important;
    line-height: 1.15 !important;
    padding: 0 0.8mm !important;
  }

  /* Caso especial Aves (pesos de guacamayos y tucanes) */
  body.dr-active .dr-sheet.dr-sheet-aves {
    display: flex !important;
    flex-direction: column !important;
    gap: 2.5mm !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.dr-active .dr-sheet.dr-sheet-aves .dr-box {
    padding: 1.8mm 1.8mm 1.2mm !important;
    position: relative !important;
  }
  body.dr-active .dr-sheet.dr-sheet-aves .dr-tasks {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    flex: 0 0 auto !important;
    padding-bottom: 1.5mm !important;
  }
  body.dr-active .dr-sheet.dr-sheet-aves .dr-tasks .dr-lines {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }
  body.dr-active .dr-sheet.dr-sheet-aves .dr-line {
    height: auto !important;
    min-height: 4.8mm !important;
    max-height: none !important;
    margin-bottom: 3px !important;
    font-size: 7.8pt !important;
    line-height: 1.25 !important;
    position: relative !important;
  }
  body.dr-active .dr-sheet.dr-sheet-aves .dr-records .dr-table td {
    height: 4.8mm !important;
  }
  body.dr-active .dr-sheet.dr-sheet-aves .dr-bird-weights {
    position: relative !important;
    margin-top: 2.5mm !important;
    height: auto !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
  }
  body.dr-active .dr-sheet.dr-sheet-aves .dr-bird-table td {
    height: 4.5mm !important;
  }
  body.dr-active .dr-sheet.dr-sheet-aves .dr-install {
    position: relative !important;
    margin-top: 2.2mm !important;
  }
  body.dr-active .dr-sheet.dr-sheet-aves .dr-install-table td {
    height: 5.5mm !important;
  }

  /* ── Caso especial Amazonia (Tareas en 2 columnas + 2 Tablas de Instalación en 1 sola hoja A4) ── */
  body.dr-active .dr-sheet.dr-sheet-amazonia {
    max-height: 100vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 1.2mm !important;
    padding: 0.8mm 1.5mm !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia > section,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-header,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-top,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-tasks,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-install,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-header {
    padding: 1.2mm 2mm !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-notes,
  body.dr-active .dr-sheet.dr-sheet-amazonia .important-notes-box {
    width: 100% !important;
    min-height: 55px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-notes-in {
    min-height: 52px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    line-height: 1.3 !important;
    font-size: 0.78rem !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-tasks {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    flex: 0 1 auto !important;
    padding: 1.4mm 1.8mm 0.8mm !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-tasks .dr-lines {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    column-gap: 12px !important;
    row-gap: 1.5px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-line {
    font-size: 0.7rem !important;
    line-height: 1.12 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 4px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-bottom: 1px solid #ddd !important;
    padding: 1px 0 !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-line .dr-chk,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-line .dr-task-chk {
    margin: 1px 4px 0 0 !important;
    font-size: 7.5pt !important;
    flex-shrink: 0 !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-line .dr-in-time {
    display: none !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-line .dr-task-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-line .dr-in {
    font-size: 0.7rem !important;
    line-height: 1.12 !important;
    padding: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-task-notes {
    font-size: 0.65rem !important;
    color: #475569 !important;
    font-style: italic !important;
    line-height: 1.08 !important;
    margin-top: 0.5px !important;
  }

  /* Ambas Tablas de Instalación (Agua + Temperaturas Hábitats Amazonía) equilibradas en 1 sola hoja A4 */
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-install {
    padding: 2mm 1.8mm 1.2mm !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .habitat-temperatures-section,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-install-amazonia-temps {
    margin-top: 12px !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-install .dr-box-title {
    font-size: 0.72rem !important;
    padding: 0 1.2mm !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-inst { width: 22% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-time { width: 8% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-ph   { width: 6.5% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-cc   { width: 6% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-cl   { width: 6% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-ct   { width: 6% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-sal  { width: 6.5% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-temp { width: 7.5% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table col.dr-col-obs  { width: 31.5% !important; }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table col.dr-col-amz-hab { width: 28% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table col.dr-col-amz-max { width: 10% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table col.dr-col-amz-cur { width: 10% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table col.dr-col-amz-min { width: 10% !important; }
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table col.dr-col-amz-obs { width: 42% !important; }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table th,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table th {
    border: 1px solid #000 !important;
    background: #e9ecef !important;
    padding: 2.5px 4px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.25 !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table td,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table td {
    border: 1px solid #000 !important;
    padding: 2.5px 4px !important;
    font-size: 0.72rem !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    line-height: 1.25 !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table td.dr-inst-name,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table td.dr-amz-hab-name {
    font-weight: 700 !important;
    font-size: 0.72rem !important;
    text-align: left !important;
    padding: 2.5px 4px !important;
    line-height: 1.25 !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-water-table .dr-in,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table .dr-in {
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 2px !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table td.cell-disabled {
    background-color: #f8fafc !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cline x1='0' y1='100%25' x2='100%25' y2='0' stroke='%23cbd5e1' stroke-width='0.9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table td.cell-disabled .input-disabled,
  body.dr-active .dr-sheet.dr-sheet-amazonia .dr-amz-temp-table td.cell-disabled input:disabled {
    color: #94a3b8 !important;
    font-weight: bold !important;
    font-size: 0.72rem !important;
    text-align: center !important;
  }

  /* ── Caso especial Pingüinario (Tareas fluidas y ajuste a 1 sola hoja) ── */
  body.dr-active .dr-sheet.dr-sheet-pinguinario {
    max-height: 100vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 2.5mm !important;
    padding: 1.5mm 1.5mm !important;
  }

  body.dr-active .dr-sheet.dr-sheet-pinguinario > section,
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-header,
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-top,
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-tasks,
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-tasks {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    flex: 0 1 auto !important;
    padding: 2mm 2.2mm 1.5mm !important;
  }

  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-tasks .dr-lines {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
    gap: 1.5px !important;
  }

  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-line {
    min-height: 5mm !important;
    height: auto !important;
    max-height: none !important;
    font-size: 7.8pt !important;
    line-height: 1.2 !important;
    border-bottom: 1px solid #bbb !important;
    padding: 1.2px 0 !important;
  }

  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install {
    position: relative !important;
    margin-top: 2.2mm !important;
  }

  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install-table td {
    height: 5.2mm !important;
    font-size: 8pt !important;
    padding: 0.5mm 1mm !important;
  }

  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install-table tr:has(.dr-inst-name:empty) td,
  body.dr-active .dr-sheet.dr-sheet-pinguinario .dr-install-table tr.dr-row-empty td {
    height: 4mm !important;
  }

  /* ── SALTO ENTRE CARA A Y CARA B (MAMÍFEROS MARINOS) ── */
  /* Solo Cara B lleva break-before para evitar página en blanco intermedia */
  body.dr-active .dr-sheet.dr-has-back {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  /* ── CARA B: SESIONES INDIVIDUALES (INTENTAR 1 PÁGINA O SALIR EN 2) ── */
  body.dr-active .dr-sheet-sessions {
    box-sizing: border-box !important;
    width: 198mm !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 1.5mm 0 1mm 0 !important;
    box-shadow: none !important;
    margin: 0 auto !important;
    overflow: visible !important;
    page-break-before: always !important;
    break-before: page !important;
    page-break-after: auto !important;
    break-after: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1mm !important;
  }
  body.dr-active .dr-sessions-head-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1.5px solid #0f172a !important;
    padding-bottom: 0.8mm !important;
    margin-bottom: 0.5mm !important;
  }
  body.dr-active .dr-sessions-main-title {
    font-size: 8.5pt !important;
    letter-spacing: 0.02em !important;
  }
  body.dr-active .dr-sessions-meta {
    font-size: 7.5pt !important;
  }
  body.dr-active .dr-sessions-2col-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2.5mm !important;
    flex: 1 !important;
    align-items: start !important;
  }
  body.dr-active .dr-sessions-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.8mm !important;
  }
  body.dr-active .dr-sessions-col-header {
    font-size: 6.8pt !important;
    padding: 0.3mm 1.2mm !important;
    border-left-width: 2.5px !important;
  }
  body.dr-active .dr-session-group-box {
    border: 1px solid #1e293b !important;
    border-radius: 1.5mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  body.dr-active .dr-session-group-header {
    padding: 0.3mm 1mm !important;
    line-height: 1.1 !important;
    border-bottom: 1px solid #cbd5e1 !important;
  }
  body.dr-active .dr-session-group-name {
    font-size: 7pt !important;
    gap: 3px !important;
  }
  body.dr-active .dr-session-group-badge {
    font-size: 5.8pt !important;
    padding: 0 2.5px !important;
  }
  body.dr-active .dr-session-table th {
    padding: 0.3mm 0.8mm !important;
    font-size: 6.2pt !important;
    height: 3.2mm !important;
    border: 0.8px solid #cbd5e1 !important;
  }
  body.dr-active .dr-session-table td {
    height: 3.6mm !important;
    font-size: 6.8pt !important;
    border: 0.8px solid #e2e8f0 !important;
  }
  body.dr-active .dr-session-num {
    width: 7.5mm !important;
    font-size: 6.8pt !important;
    padding: 0 !important;
  }
  body.dr-active .dr-session-table .dr-in {
    font-size: 6.8pt !important;
    height: 3.4mm !important;
    min-height: 0 !important;
    line-height: 1 !important;
    padding: 0 0.8mm !important;
  }

  body.dr-active .dr-in:focus { background: transparent; }
  body.dr-active .dr-notes-in { overflow: hidden; }
}
