/* Lactia Report Studio — Sprint 10.0 */
#m-tools-report-studio .tools-report-studio-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rs-studio-lead {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--texto-suave, #64748b);
  line-height: 1.45;
}

.rs-howto {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--texto-base, #334155);
  line-height: 1.5;
}

.rs-howto li {
  margin-bottom: 4px;
}

.rs-howto-tip {
  margin: 0 0 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-base, #334155);
  line-height: 1.45;
  border: var(--borde-fino, 1px solid #cbd5e1);
  border-radius: 10px;
  background: var(--gris-50, #f8fafc);
}

.rs-filters-card .fr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rs-finca-ro {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-base, #334155);
}

#rs-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rs-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  height: 36px;
  max-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--gris-300, #cbd5e1);
  border-radius: 12px;
  background: var(--gris-0, #fff);
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-base, #334155);
  cursor: pointer;
  box-sizing: border-box;
}

.rs-cat-tab.active,
#m-tools-report-studio.modal-pebble-vida .modal-serio-body .rs-cat-tab.active {
  background: var(--manto-btn-b2-bg, linear-gradient(180deg, #475569, #334155)) !important;
  border: 1px solid var(--manto-btn-b2-border, #334155) !important;
  color: var(--manto-btn-b2-color, #f8fafc) !important;
  -webkit-text-fill-color: var(--manto-btn-b2-color, #f8fafc) !important;
  box-shadow: var(--manto-btn-b2-shadow, 0 1px 2px rgba(15, 23, 42, 0.12)) !important;
}

.rs-cat-tab.active span,
#m-tools-report-studio .rs-cat-tab.active .rs-cat-tab__emo {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

.rs-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.rs-report-card {
  border: 1px solid var(--gris-300, #cbd5e1);
  border-radius: 12px;
  background: var(--gris-0, #fff);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--manto-serio-panel-drop, 0 1px 2px rgba(15, 23, 42, 0.06));
}

.rs-report-card__head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.rs-report-card__ico {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.rs-report-card__tit {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--texto-fuerte, #0f172a);
  line-height: 1.3;
}

.rs-report-card__desc {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--texto-suave, #64748b);
  line-height: 1.4;
}

.rs-report-card__fields {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--texto-base, #334155);
  line-height: 1.4;
}

.rs-report-card__fields-lbl {
  font-weight: 800;
  color: var(--texto-suave, #64748b);
}

.rs-report-card__acts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rs-report-card--executive .rs-report-card__acts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 520px) {
  .rs-report-card--executive .rs-report-card__acts {
    grid-template-columns: 1fr 1fr;
  }
  .rs-report-card--executive .rs-btn-pdf {
    grid-column: 1 / -1;
  }
}

.rs-catalog-empty,
.rs-preview-empty {
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-suave, #64748b);
  border: 1px dashed var(--gris-300, #cbd5e1);
  border-radius: 10px;
  background: var(--gris-50, #f8fafc);
}

.rs-preview-meta {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--texto-suave, #64748b);
}

.rs-preview-table-wrap {
  overflow: auto;
  max-height: 220px;
  border: 1px solid var(--gris-300, #cbd5e1);
  border-radius: 10px;
  background: var(--gris-0, #fff);
}

.rs-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.rs-preview-table th,
.rs-preview-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--gris-200, #e2e8f0);
  text-align: left;
  white-space: nowrap;
}

.rs-preview-table th {
  position: sticky;
  top: 0;
  background: var(--gris-100, #f1f5f9);
  font-weight: 800;
  color: var(--texto-fuerte, #0f172a);
}

/* Sprint 10.4 — programación automática */
.rs-schedule-lead {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--texto-suave, #64748b);
  line-height: 1.45;
}

.rs-schedule-form.fr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rs-schedule-email-fg {
  grid-column: 1 / -1;
}

.rs-schedule-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--texto-base, #334155);
}

.rs-schedule-chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.rs-schedule-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

/* Botones de acción del cuerpo — 36px */
#m-tools-report-studio.modal-compact-actions .modal-serio-body .btn,
#m-tools-report-studio.modal-compact-actions .modal-serio-body button,
#m-tools-report-studio.modal-compact-actions .modal-serio-body label.btn,
#m-tools-report-studio.modal-compact-actions .modal-serio-body .rs-cat-tab,
#m-tools-report-studio .rs-report-card__acts .btn,
#m-tools-report-studio .rs-schedule-acts .btn,
#m-tools-report-studio .rs-schedule-item__acts .btn,
#m-tools-report-studio .rs-schedule-item__acts button {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  border-radius: 12px !important;
  box-sizing: border-box;
}

#m-tools-report-studio .rs-catalog-host {
  min-height: 80px;
}

#m-tools-report-studio .rs-catalog-host .rs-catalog-grid {
  min-height: 40px;
}

/* Pie: Cerrar ancho completo (misma piel gris-ok que Regresar) */
#m-tools-report-studio.bitacora-serio-v2.modal-nuevo .ani-serio-v2-footer-shell .tools-report-studio-foot-row {
  justify-content: stretch !important;
}

#m-tools-report-studio.bitacora-serio-v2.modal-nuevo .ani-serio-v2-footer-shell .tools-report-studio-foot-row .bit-bitacora-foot-cancel {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: var(--manto-btn-gris-ok-bg) !important;
  color: var(--manto-btn-gris-ok-color) !important;
  -webkit-text-fill-color: var(--manto-btn-gris-ok-color) !important;
  border: var(--manto-btn-gris-ok-border) !important;
  box-shadow: var(--manto-btn-gris-ok-shadow) !important;
}

#m-tools-report-studio.bitacora-serio-v2.modal-nuevo .tools-report-studio-foot-row .bit-bitacora-foot-cancel-ico {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.rs-schedule-empty {
  margin: 0;
  font-size: 12px;
  color: var(--texto-muted, #94a3b8);
}

.rs-schedule-list,
.rs-schedule-runs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rs-schedule-item {
  padding: 10px 12px;
  border: var(--borde-fino, 1px solid #cbd5e1);
  border-radius: 10px;
  background: var(--gris-0, #fff);
  display: grid;
  gap: 8px;
}

.rs-schedule-item__main {
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-fuerte, #0f172a);
}

.rs-schedule-item__meta {
  font-size: 11px;
  color: var(--texto-suave, #64748b);
}

.rs-schedule-history-tit {
  margin: 8px 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--texto-fuerte, #0f172a);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rs-schedule-run {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  border: var(--borde-fino, 1px solid #cbd5e1);
  background: var(--gris-50, #f8fafc);
  font-size: 11px;
}

.rs-schedule-run--completed {
  border-color: #86efac;
}

.rs-schedule-run--failed {
  border-color: #fca5a5;
}

.rs-schedule-run--pending_client_export {
  border-color: #fcd34d;
}

.rs-schedule-run__tit {
  font-weight: 800;
  color: var(--texto-fuerte, #0f172a);
}

.rs-schedule-run__st {
  font-weight: 700;
  color: var(--texto-suave, #64748b);
}

@media (max-width: 520px) {
  .rs-schedule-form.fr {
    grid-template-columns: 1fr;
  }
}
