/* GeoSV - Reportes diarios */
#btn-rt-report-daily.hidden { display: none !important; }

.modal.report-modal-shell {
  max-width: min(1480px, calc(100vw - 28px));
}

.report-modal-shell .modal-body {
  padding: 0;
  overflow: hidden;
}

.report-builder {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  height: min(78vh, 820px);
  min-height: 560px;
  background: var(--bg-secondary);
}

.report-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-right: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgba(250,92,0,0.12), rgba(15,23,42,0.06));
}

.report-project-badge {
  padding: 12px;
  border: 1px solid rgba(250,92,0,0.25);
  border-radius: 14px;
  background: rgba(250,92,0,0.08);
}

.report-project-badge strong,
.report-project-badge span {
  display: block;
}

.report-project-badge strong {
  color: var(--text-primary);
  font-size: 13px;
}

.report-project-badge span {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.report-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-tab {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.report-tab:hover {
  color: var(--text-primary);
  border-color: rgba(250,92,0,0.25);
}

.report-tab.active {
  color: #fff;
  border-color: rgba(250,92,0,0.55);
  background: linear-gradient(135deg, rgba(250,92,0,0.95), rgba(255,132,40,0.78));
  box-shadow: 0 8px 18px rgba(250,92,0,0.24);
}

.report-main {
  min-width: 0;
  overflow: auto;
  padding: 18px 18px 96px;
}

.report-section { display: none; }
.report-section.active { display: block; }

.report-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.report-section-head h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
}

.report-section-head span {
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.report-grid {
  display: grid;
  gap: 12px;
}

.report-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-field.span-2 { grid-column: 1 / -1; }

.report-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-field > span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.report-field input,
.report-field select,
.report-field textarea,
.report-table input,
.report-table select,
.report-file-meta input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  padding: 7px 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.report-field textarea {
  resize: vertical;
  min-height: 88px;
}

.report-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.report-table-wrap {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: auto;
  background: var(--bg-primary);
}

.report-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 9px;
  text-align: left;
}

.report-table td {
  padding: 7px;
  border-top: 1px solid var(--border-color);
}

.report-icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  cursor: pointer;
}

.report-icon-btn:hover {
  color: var(--danger);
  border-color: rgba(239,68,68,0.4);
}

.report-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-file-panel {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px;
  background: var(--bg-primary);
  min-width: 0;
}

.report-file-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.report-file-head h4 {
  margin: 0;
  color: var(--text-primary);
}

.report-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
}

.report-file-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
}

.report-file-thumb {
  width: 62px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-file-icon {
  color: var(--text-secondary);
  font-size: 20px;
}

.report-file-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.report-file-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 12px;
}

.report-file-meta span {
  color: var(--text-secondary);
  font-size: 11px;
}

.report-empty-file {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 92px;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.report-preview-cover {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(250,92,0,0.95), rgba(37,99,235,0.78));
  color: #fff;
  margin-bottom: 14px;
}

.report-preview-cover span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .9;
}

.report-preview-cover h2 {
  margin: 4px 0;
  font-size: 24px;
}

.report-preview-cover p {
  margin: 0;
  opacity: .88;
  font-size: 12px;
}

.report-preview-cover strong {
  white-space: nowrap;
  font-size: 18px;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.report-kpi {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-primary);
}

.report-kpi i {
  color: var(--primary);
  margin-bottom: 8px;
}

.report-kpi span,
.report-kpi strong {
  display: block;
}

.report-kpi span {
  color: var(--text-secondary);
  font-size: 11px;
}

.report-kpi strong {
  color: var(--text-primary);
  font-size: 16px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-preview-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  background: var(--bg-primary);
}

.report-preview-card.wide { grid-column: 1 / -1; }
.report-preview-card h4 { margin: 0 0 10px; color: var(--text-primary); }
.report-preview-card p { color: var(--text-secondary); font-size: 13px; line-height: 1.55; }
.report-preview-card p strong { color: var(--text-primary); }
.report-preview-card .muted { color: var(--text-secondary); opacity: .75; }

.report-map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  border: 1px dashed var(--border-color);
  border-radius: 14px;
  color: var(--text-secondary);
  background: radial-gradient(circle at center, rgba(250,92,0,0.08), transparent 60%);
}

.report-map-placeholder i { color: var(--primary); font-size: 22px; }

.report-preview-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.report-preview-photos div {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.035);
}

.report-preview-photos span,
.report-preview-photos strong { display: block; }
.report-preview-photos span { color: var(--text-secondary); font-size: 11px; }
.report-preview-photos strong { color: var(--text-primary); font-size: 12px; margin-top: 4px; }

@media (max-width: 980px) {
  .report-builder { grid-template-columns: 1fr; height: 82vh; }
  .report-sidebar { border-right: 0; border-bottom: 1px solid var(--border-color); }
  .report-tabs { flex-direction: row; overflow: auto; }
  .report-tab { white-space: nowrap; }
  .report-grid.two, .report-file-grid, .report-preview-grid { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-section-head { display: block; }
  .report-section-head span { display: block; text-align: left; margin-top: 6px; }
}


/* Ajustes reporte diario PMAR - formularios y vista estilo Rec. Enaka */
.report-modal-shell {
  --report-primary: #A80F3B;
  --report-primary-dark: #7F0D2E;
  --report-primary-light: #F4D9E2;
  --report-bg-dark: #1F1F1F;
  --report-bg-darker: #141313;
  --report-bg-panel: #252322;
  --report-bg-input: #34302E;
  --report-border: #5A5550;
  --report-text: #FFFFFF;
  --report-muted: #9B9790;
  --report-secondary: #D8D5CF;
}

.report-modal-shell .modal-body {
  padding: 0;
  overflow: hidden;
}

.report-modal-shell .report-builder {
  background: var(--report-bg-darker);
}

.report-modal-shell .report-sidebar {
  background: linear-gradient(180deg, rgba(168,15,59,0.18), rgba(31,31,31,0.92));
  border-right-color: var(--report-border);
}

.report-modal-shell .report-project-badge {
  border-color: rgba(168,15,59,.35);
  background: rgba(168,15,59,.12);
}

.report-modal-shell .report-tab.active {
  border-color: rgba(168,15,59,.75);
  background: linear-gradient(135deg, var(--report-primary), var(--report-primary-dark));
  box-shadow: 0 8px 18px rgba(168,15,59,.26);
}

.report-modal-shell .report-tab:hover {
  border-color: rgba(168,15,59,.32);
}

.report-field input,
.report-field select,
.report-field textarea,
.report-table input,
.report-table select,
.report-file-meta input {
  background: var(--report-bg-input);
  border-color: var(--report-border);
  color: var(--report-text);
}

.report-field input[readonly],
.report-table input[readonly] {
  opacity: .84;
  cursor: default;
  background: rgba(52,48,46,.65);
}

.report-field select option,
.report-table select option {
  background: var(--report-bg-input);
  color: var(--report-text);
}

.report-field input[type="date"],
.report-table input[type="date"] {
  color-scheme: dark;
}

.report-field input[type="number"],
.report-table input[type="number"] {
  color-scheme: dark;
}

.report-toolbar {
  gap: 8px;
}

.report-toolbar-split {
  justify-content: space-between;
  align-items: center;
}

.report-rich-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
}

.report-format-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--report-border);
  border-radius: 8px;
  background: var(--report-bg-input);
  color: var(--report-secondary);
  cursor: pointer;
}

.report-format-btn:hover {
  border-color: rgba(168,15,59,.55);
  color: #fff;
  background: rgba(168,15,59,.18);
}

.report-description-cell {
  min-width: 420px;
  width: 55%;
}

.report-rich-editor {
  width: 100%;
  min-height: 86px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--report-border);
  border-radius: 9px;
  padding: 8px 10px;
  background: var(--report-bg-input);
  color: var(--report-text);
  font-size: 12px;
  line-height: 1.45;
  outline: none;
  white-space: normal;
}

.report-rich-editor:empty::before {
  content: attr(placeholder);
  color: var(--report-muted);
  pointer-events: none;
}

.report-rich-editor:focus {
  border-color: rgba(168,15,59,.75);
  box-shadow: 0 0 0 2px rgba(168,15,59,.14);
}

.report-rich-editor ul,
.report-rich-editor ol,
.report-preview-card ul,
.report-preview-card ol {
  padding-left: 18px;
  margin: 4px 0;
}

.report-rich-editor p,
.report-rich-editor div {
  margin: 0 0 4px;
}

.report-table[data-report-table="personnel"] {
  min-width: 1080px;
}

.report-table[data-report-table="activities"] {
  min-width: 920px;
}

.report-table[data-report-table="activities"] th:nth-child(1) { width: 220px; }
.report-table[data-report-table="activities"] th:nth-child(2) { width: 180px; }
.report-table[data-report-table="activities"] th:nth-child(4) { width: 44px; }

.report-preview-cover--enaka {
  align-items: center;
  background: var(--report-bg-panel);
  border: 1px solid var(--report-border);
  border-radius: 12px;
  color: var(--report-text);
  box-shadow: 0 8px 16px rgba(0,0,0,.38);
  position: relative;
  overflow: hidden;
}

.report-preview-cover--enaka::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--report-primary), var(--report-primary-light));
}

.report-preview-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.report-preview-sv {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--report-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  flex: 0 0 auto;
}

.report-preview-cover--enaka h2 em {
  color: var(--report-primary-light);
  font-style: normal;
}

.report-preview-logo-col {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.report-preview-logo-col img {
  height: 72px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.report-kpis--enaka .report-kpi,
.report-preview-grid--enaka .report-preview-card {
  background: var(--report-bg-panel);
  border-color: rgba(216,213,207,.35);
}

.report-kpis--enaka .report-kpi i,
.report-preview-grid--enaka h4,
.report-map-placeholder i {
  color: var(--report-primary);
}

.report-map-placeholder {
  background: radial-gradient(circle at center, rgba(168,15,59,.09), transparent 62%);
  border-color: var(--report-border);
}

@media (max-width: 980px) {
  .report-toolbar-split { align-items: stretch; flex-direction: column; }
  .report-description-cell { min-width: 280px; width: auto; }
  .report-preview-logo-col img { display: none; }
}

/* Reportes PMAR - fix3 */
.report-project-badge-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.report-project-badge-btn:hover {
  border-color: rgba(168,15,59,.75);
  box-shadow: 0 0 0 2px rgba(168,15,59,.16);
}

.report-list-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.report-list-datebox {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 190px;
}

.report-list-datebox label {
  color: var(--report-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.report-list-datebox input,
.report-export-controls input[type="checkbox"] {
  color-scheme: dark;
}

.report-import-json-btn {
  cursor: pointer;
  white-space: nowrap;
}

.report-list-datebox input {
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--report-border);
  background: var(--report-bg-input);
  color: var(--report-text);
  padding: 0 10px;
}

.report-list-wrap {
  border: 1px solid var(--report-border);
  border-radius: 12px;
  overflow: auto;
  background: rgba(20,20,20,.28);
}

.report-master-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  font-size: 12px;
}

.report-master-table th,
.report-master-table td {
  border-bottom: 1px solid rgba(216,213,207,.22);
  padding: 10px;
  text-align: left;
  color: var(--report-text);
}

.report-master-table th {
  position: sticky;
  top: 0;
  background: rgba(29,34,35,.96);
  color: var(--report-muted);
  text-transform: uppercase;
  font-size: 10px;
  z-index: 1;
}

.report-master-table tr:hover td {
  background: rgba(168,15,59,.08);
}

.report-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
  background: rgba(216,213,207,.14);
  color: var(--report-text);
}

.report-status-pill.draft { background: rgba(245,124,0,.18); color: #ffca7a; }
.report-status-pill.final { background: rgba(45,156,91,.18); color: #8ee6ad; }
.report-status-pill.archived { background: rgba(145,158,171,.18); color: #cbd5df; }

.report-empty-list,
.report-list-loading {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--report-muted);
  text-align: center;
  padding: 24px;
}

.report-empty-list i,
.report-list-loading i {
  color: var(--report-primary);
  font-size: 24px;
}

.report-empty-list strong { color: var(--report-text); }
.report-empty-list.is-error i { color: #ff6b6b; }

.report-preview-map {
  width: 100%;
  height: 420px;
  border: 1px solid var(--report-border);
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  position: relative;
}

.report-map-loading {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--report-muted);
}

.report-map-note {
  background: rgba(20,20,20,.84);
  color: #f4f4f4;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  font-size: 12px;
}

.report-preview-photos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-photo-figure {
  margin: 0;
  border: 1px solid rgba(216,213,207,.28);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(20,20,20,.28);
}

.report-photo-figure img,
.report-photo-empty {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--report-muted);
  background: rgba(0,0,0,.28);
}

.report-photo-figure figcaption {
  padding: 9px 10px;
  color: var(--report-text);
  font-size: 12px;
  line-height: 1.35;
}

.report-export-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  padding-right: 12px;
  flex-wrap: wrap;
}

.report-export-controls span {
  color: var(--report-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-export-controls label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--report-text);
  font-size: 12px;
}

.report-builder select,
.report-builder select option,
.report-field select option,
.report-table select option {
  background: #223137 !important;
  color: #f2f6f7 !important;
}

.report-table[data-report-table="activities"] {
  min-width: 1120px;
}

.report-table[data-report-table="activities"] th:nth-child(1) { width: 220px; }
.report-table[data-report-table="activities"] th:nth-child(2) { width: 190px; }
.report-table[data-report-table="activities"] th:nth-child(3) { width: auto; min-width: 560px; }
.report-table[data-report-table="activities"] th:nth-child(4) { width: 44px; }

.report-rich-editor ul,
.report-rich-editor ol {
  margin: 6px 0 6px 22px;
  padding-left: 18px;
}

.report-rich-editor li {
  margin: 4px 0;
  padding-left: 3px;
}

.report-rich-editor strong,
.report-preview-card strong,
.export-activity strong {
  font-weight: 800;
}

@media (max-width: 980px) {
  .report-preview-photos-grid { grid-template-columns: 1fr; }
  .report-preview-map { height: 320px; }
}

/* fix4: controles coherentes con el dashboard oscuro */
.report-builder select,
.report-field select,
.report-table select {
  appearance: auto;
  -webkit-appearance: menulist;
  background-color: var(--report-bg-input) !important;
  color: var(--report-text) !important;
  border-color: var(--report-border) !important;
  color-scheme: dark;
}

.report-builder select option,
.report-field select option,
.report-table select option {
  background-color: var(--report-bg-input) !important;
  color: var(--report-text) !important;
}

.report-field input[type="number"],
.report-table input[type="number"] {
  color-scheme: normal;
  background-color: var(--report-bg-input) !important;
}

.report-field input[type="number"]::-webkit-inner-spin-button,
.report-table input[type="number"]::-webkit-inner-spin-button,
.report-field input[type="number"]::-webkit-outer-spin-button,
.report-table input[type="number"]::-webkit-outer-spin-button {
  opacity: .75;
  filter: grayscale(1) brightness(.9);
}

.report-rich-editor--field {
  min-height: 96px;
  max-height: 260px;
  display: block;
}

.report-map-tools {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 12px;
}

.report-switch-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--report-border);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: var(--report-text);
  font-size: 12px;
  user-select: none;
}

.report-switch-line input {
  accent-color: var(--report-primary);
}

.report-map-label {
  border: 1px solid rgba(168,15,59,.72) !important;
  border-radius: 6px !important;
  background: rgba(20,19,19,.88) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 3px 6px !important;
  box-shadow: 0 4px 10px rgba(0,0,0,.35) !important;
}

.report-map-label::before {
  display: none !important;
}

.report-preview-map.report-map-labels-off .report-map-label {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.report-preview-map.report-map-labels-off .leaflet-tooltip.report-map-label {
  display: none !important;
}

/* fix5: controles internos del mapa */
.report-preview-card-map {
  order: 99;
}

.report-map-control-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(216,213,207,.32);
  border-radius: 12px;
  background: rgba(20,19,19,.88);
  color: var(--report-text, #f2f2f2);
  box-shadow: 0 8px 20px rgba(0,0,0,.32);
  backdrop-filter: blur(8px);
}

.report-map-label-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.report-map-label-toggle i {
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
  position: relative;
  transition: background .18s ease, border-color .18s ease;
}

.report-map-label-toggle i::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  top: 1px;
  left: 1px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  transition: transform .18s ease;
}

.report-map-label-toggle.is-on i {
  background: var(--report-primary, #A80F3B);
  border-color: rgba(168,15,59,.95);
}

.report-map-label-toggle.is-on i::after {
  transform: translateX(14px);
}

.report-map-center-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.report-map-center-btn:hover {
  background: rgba(168,15,59,.88);
  border-color: rgba(168,15,59,.95);
}

.report-master-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.report-master-table th:last-child,
.report-master-table td:last-child {
  text-align: right;
  min-width: 360px;
}

.report-master-actions .btn-sm {
  min-height: 28px;
  padding: 6px 9px;
  font-size: 11px;
}

.report-master-actions .btn-danger {
  background: rgba(220, 53, 69, .18);
  border-color: rgba(220, 53, 69, .42);
  color: #ffb8c0;
}

.report-master-actions .btn-danger:hover {
  background: rgba(220, 53, 69, .28);
  border-color: rgba(220, 53, 69, .7);
  color: #fff;
}

/* Fix fecha dd/mm/yyyy con calendario nativo auxiliar */
.report-date-field {
  gap: 6px;
}

.report-list-datebox .report-date-field {
  gap: 5px;
}

.report-date-control {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.report-date-control input[data-date-text] {
  width: 100%;
  min-height: 34px;
  padding-right: 42px;
}

.report-date-native {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 30px !important;
  height: 28px;
  min-height: 28px !important;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}

.report-date-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  width: 30px;
  height: 28px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--report-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  cursor: pointer;
}

.report-date-btn:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.report-table-date-field {
  display: block;
}

.report-table-date-field > span {
  display: none;
}

.report-table-date-field .report-date-control input[data-date-text] {
  min-width: 118px;
}

/* fix11: editor multiline estable basado en textarea */
textarea.report-rich-editor {
  display: block;
  resize: vertical;
  font-family: inherit;
  white-space: pre-wrap;
  tab-size: 2;
}

textarea.report-rich-editor::placeholder {
  color: var(--report-muted);
}

textarea.report-rich-editor.report-rich-editor--field {
  min-height: 112px;
}

.report-description-cell textarea.report-rich-editor {
  min-height: 120px;
}

/* fix13: capas del proyecto + leyenda/mapa */
.report-project-layers-panel {
  grid-column: 1 / -1;
  margin-bottom: 12px;
}

.report-file-hint {
  color: var(--text-secondary, #b8c2cc);
  font-size: 12px;
}

.report-project-layer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.report-project-layer-group {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,.035);
}

.report-project-layer-group > strong {
  display: block;
  color: var(--report-text, #fff);
  font-size: 12px;
  margin-bottom: 8px;
}

.report-project-layer-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  color: var(--report-secondary, #d8d5cf);
  font-size: 12px;
  cursor: pointer;
}

.report-project-layer-row input {
  accent-color: var(--report-primary, #A80F3B);
}

.report-layer-mini-swatch,
.report-legend-symbol--polygon {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--layer-color, #A80F3B);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 0 0 2px rgba(0,0,0,.22);
  color: #fff;
  font-size: 8px;
}
.report-layer-mini-swatch span { font-size: 8px; line-height: 1; }

.report-project-layer-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-map-legend {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 460;
  width: min(245px, calc(100% - 92px));
  max-height: calc(100% - 92px);
  overflow: auto;
  padding: 10px 11px;
  border: 1px solid rgba(216,213,207,.32);
  border-radius: 14px;
  background: rgba(20,19,19,.90);
  color: var(--report-text, #fff);
  box-shadow: 0 10px 26px rgba(0,0,0,.38);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.report-map-legend > strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 12px;
  letter-spacing: .02em;
}

.report-map-legend-list {
  display: grid;
  gap: 7px;
}

.report-map-legend-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--report-secondary, #d8d5cf);
}

.report-legend-symbol {
  flex: 0 0 auto;
}
.report-legend-symbol--line {
  width: 18px;
  height: 10px;
  display: inline-block;
  position: relative;
}
.report-legend-symbol--line::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 3px solid var(--layer-color, #A80F3B);
  transform: translateY(-50%);
  border-radius: 999px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.4));
}
.report-legend-symbol--point {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.report-point-symbol {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--layer-color, #A80F3B);
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,.55));
}
.report-point-symbol i {
  color: var(--layer-color, #A80F3B) !important;
  font-size: 20px;
  line-height: 1;
}
.report-point-marker,
.report-point-marker .report-point-symbol {
  background: transparent !important;
  border: 0 !important;
}

.report-map-legend-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-map-legend em {
  color: var(--report-muted, #9b9790);
  font-size: 11px;
  font-style: normal;
}

.report-preview-map.report-map-labels-off .leaflet-tooltip,
.report-preview-map.report-map-labels-off .report-map-label,
.leaflet-container.report-map-labels-off .leaflet-tooltip,
.leaflet-container.report-map-labels-off .report-map-label {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.report-preview-map .leaflet-control-scale {
  margin-left: 12px !important;
  margin-bottom: 12px !important;
}

.report-preview-map .leaflet-control-scale-line {
  border: 2px solid rgba(255,255,255,.9) !important;
  border-top: 0 !important;
  color: #fff !important;
  background: rgba(20,19,19,.80) !important;
  text-shadow: 0 1px 2px #000 !important;
  font-weight: 800;
}

@media (max-width: 760px) {
  .report-map-legend {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 44px;
    transform: none;
    width: auto;
    max-height: 110px;
  }

  .report-map-legend-list {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}


/* fix14: evita que el footer flotante corte la vista del reporte */
.report-modal-shell .modal-body {
  max-height: calc(100vh - 132px);
}
.report-modal-shell .modal-footer {
  flex-wrap: wrap;
  gap: 10px;
}
.report-preview {
  padding-bottom: 26px;
}
.report-preview-card-map {
  margin-bottom: 24px;
}


/* fix15: exportación limpia y controles estables del mapa del reporte */
.report-map-label-toggle {
  border: 0;
  background: transparent;
  padding: 0;
}
.report-map-label-toggle.is-off span {
  color: rgba(255,255,255,.72);
}
.report-map-label-toggle.is-off i {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.20);
}
.report-map-label-toggle.is-off i::after {
  transform: translateX(0);
}
.report-preview-map.report-map-labels-off .leaflet-tooltip,
.report-preview-map.report-map-labels-off .report-map-label,
.leaflet-container.report-map-labels-off .leaflet-tooltip,
.leaflet-container.report-map-labels-off .report-map-label {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.report-main {
  padding-bottom: 126px;
}
.report-preview-card-map {
  margin-bottom: 58px;
}
.report-export-surface,
.report-export-surface .report-export-clean {
  background: #fff !important;
  color: #1e2528;
}
.report-export-surface .report-export-clean {
  padding: 0 !important;
}
.report-export-surface .report-preview-grid,
.report-export-surface .report-kpis,
.report-export-surface .report-preview {
  background: transparent !important;
}
.report-export-surface .report-preview-card,
.report-export-surface .report-kpi,
.report-export-photo-row-block {
  break-inside: avoid;
  page-break-inside: avoid;
}
.report-export-photo-row-block {
  margin: 12px 0;
}

/* fix16: norte, exportación legible y separación visual de actividades */
.report-map-north {
  width: 34px;
  height: 46px;
  border-radius: 10px;
  background: rgba(20, 19, 19, .88);
  border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
  color: #fff;
  display: grid;
  place-items: center;
  line-height: 1;
  margin: 10px 0 0 10px !important;
  user-select: none;
}
.report-map-north span {
  color: var(--report-primary, #A80F3B);
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
  transform: translateY(2px);
}
.report-map-north strong {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  transform: translateY(-3px);
}
.report-activity-preview-block {
  border: 1px solid rgba(216, 213, 207, .28);
  border-left: 5px solid var(--report-primary, #A80F3B);
  border-radius: 12px;
  padding: 10px 11px;
  margin: 10px 0;
  background: rgba(255,255,255,.035);
}
.report-activity-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.report-activity-preview-head span {
  background: #e7e2da;
  color: #1e2528;
  border: 1px solid rgba(216, 213, 207, .85);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.report-activity-preview-head strong { color: var(--report-text, #fff); }
.report-activity-preview-head em {
  color: var(--report-muted, #b8c2cc);
  font-style: normal;
  font-size: 12px;
}
.report-activity-preview-body {
  color: var(--report-secondary, #d8d5cf);
  font-size: 13px;
  line-height: 1.55;
}
.report-activity-preview-body ul,
.report-activity-preview-body ol { margin: 5px 0 5px 24px; }
.report-activity-preview-body p { margin: 4px 0; }
.report-export-map-snapshot {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: inherit;
  background: #fff;
}
.report-export-surface,
.report-export-surface .report-export-clean {
  --report-bg-panel: #f7f5f2;
  --report-bg-card: #f7f5f2;
  --report-bg-input: #fff;
  --report-text: #1e2528;
  --report-secondary: #3a454a;
  --report-muted: #667176;
  --report-border: #d8d5cf;
  --text-primary: #1e2528;
  --text-secondary: #5f6a70;
  --border-color: #d8d5cf;
  --bg-primary: #f7f5f2;
  --bg-secondary: #fff;
  background: #fff !important;
  color: #1e2528 !important;
}
.report-export-surface .report-preview-card,
.report-export-surface .report-kpi,
.report-export-surface .report-export-photo-row-block,
.report-export-surface .report-photo-figure,
.report-export-surface .report-activity-preview-block {
  background: #f7f5f2 !important;
  border-color: #d8d5cf !important;
  color: #1e2528 !important;
  box-shadow: none !important;
}
.report-export-surface .report-preview-card h4,
.report-export-surface .report-kpi strong,
.report-export-surface .report-preview-card strong,
.report-export-surface .report-activity-preview-head strong,
.report-export-surface .report-photo-figure figcaption {
  color: #1e2528 !important;
}
.report-export-surface .report-preview-card p,
.report-export-surface .report-preview-card span,
.report-export-surface .report-activity-preview-body,
.report-export-surface .report-kpi span,
.report-export-surface .muted {
  color: #5f6a70 !important;
  opacity: 1 !important;
}
.report-export-surface .report-activity-preview-head span {
  background: #e7e2da !important;
  color: #1e2528 !important;
  border-color: #d8d5cf !important;
}
.report-export-surface .report-preview-cover {
  background: transparent !important;
  color: #1e2528 !important;
  border-color: transparent !important;
}
.report-export-surface .report-preview-cover h2,
.report-export-surface .report-preview-cover span,
.report-export-surface .report-preview-cover p,
.report-export-surface .report-preview-logo-col strong {
  color: #1e2528 !important;
}
.report-export-surface .report-preview-cover h2 em { color: #A80F3B !important; }
.report-export-surface .report-preview-sv { background: #A80F3B !important; color: #fff !important; }
.report-export-surface .report-preview-map {
  background: #fff !important;
}

/* fix17: leyenda robusta, captura de mapa sin controles y export respetando vista */
.report-map-legend {
  z-index: 920 !important;
  width: min(310px, calc(100% - 120px)) !important;
  max-height: calc(100% - 112px) !important;
  padding: 13px 14px !important;
  overflow: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.report-map-legend > strong {
  display: block !important;
  flex: 0 0 auto !important;
  color: #fff !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding-bottom: 7px !important;
  border-bottom: 1px solid rgba(255,255,255,.16) !important;
}
.report-map-legend-list {
  display: grid !important;
  gap: 8px !important;
  min-width: 0 !important;
}
.report-map-legend-item {
  min-height: 18px !important;
}
.report-map-legend-item span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.25 !important;
}
.report-preview-map.report-map-exporting .report-map-control-box,
.report-preview-map.report-map-exporting .leaflet-control-zoom {
  display: none !important;
}
.report-export-surface .report-map-legend {
  width: 280px !important;
  max-height: calc(100% - 120px) !important;
}
.report-export-surface .report-map-legend > strong {
  color: #fff !important;
}
@media (max-width: 760px) {
  .report-map-legend {
    width: auto !important;
    max-height: 140px !important;
  }
}


/* fix18: leyenda de exportación fuera del mapa y captura sin recorte */
.report-preview-map.report-map-exporting-clean .report-map-legend,
.report-preview-map.report-map-exporting-clean .leaflet-control-zoom,
.report-preview-map.report-map-exporting-clean .report-map-control-box {
  display: none !important;
}
.report-export-surface .report-preview-card-map .report-preview-map {
  height: auto !important;
  min-height: 0 !important;
  background: #fff !important;
  overflow: visible !important;
}
.report-export-surface .report-preview-card-map .report-export-map-snapshot {
  border: 1px solid #d8d5cf;
  border-radius: 12px;
  background: #fff;
}
.report-export-map-legend-horizontal {
  margin-top: 8px;
  border: 1px solid #d8d5cf;
  border-radius: 12px;
  background: #fff;
  color: #1e2528;
  padding: 10px 12px;
  page-break-inside: avoid;
  break-inside: avoid;
}
.report-export-map-legend-horizontal > strong {
  display: block;
  color: #1e2528 !important;
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 8px;
  text-transform: none;
}
.report-export-map-legend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
  align-items: start;
}
.report-export-map-legend-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  font-size: 11px;
  color: #1e2528;
  min-width: 0;
}
.report-export-map-legend-item .report-legend-symbol--polygon {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--layer-color, #A80F3B);
  border: 1px solid rgba(0,0,0,.28);
  box-shadow: none;
}
.report-export-map-legend-item .report-legend-symbol--point .report-point-symbol,
.report-export-map-legend-item .report-point-symbol {
  width: 16px;
  height: 16px;
}
.report-export-map-legend-item .report-point-symbol i {
  font-size: 16px;
}
.report-export-map-legend-item .report-legend-symbol--line {
  width: 20px;
}
.report-export-map-legend-item span {
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .report-export-map-legend-grid { grid-template-columns: 1fr; }
}

/* fix19: controles numéricos integrados y KPIs con texto largo */
.report-number-control {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.report-number-control input[data-number-input] {
  width: 100%;
  padding-right: 34px !important;
  -moz-appearance: textfield;
}

.report-number-control input[data-number-input]::-webkit-outer-spin-button,
.report-number-control input[data-number-input]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.report-number-control.readonly input[data-number-input] {
  padding-right: 10px !important;
}

.report-number-stepper {
  position: absolute;
  top: 3px;
  right: 3px;
  bottom: 3px;
  width: 26px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(63,83,94,.92);
}

.report-number-stepper button {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #cbd6db;
  font-size: 9px;
  cursor: pointer;
}

.report-number-stepper button + button {
  border-top: 1px solid rgba(255,255,255,.1);
}

.report-number-stepper button:hover {
  background: rgba(168,15,59,.35);
  color: #fff;
}

.report-kpis--report {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.report-kpis--report .report-kpi:nth-child(-n+3) { grid-column: span 4; }
.report-kpis--report .report-kpi:nth-child(n+4) { grid-column: span 3; }

.report-kpis--report .report-kpi strong {
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.report-export-surface .report-kpis--report {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
}

.report-export-surface .report-kpis--report .report-kpi:nth-child(-n+3) { grid-column: span 4; }
.report-export-surface .report-kpis--report .report-kpi:nth-child(n+4) { grid-column: span 3; }

.report-export-surface .report-kpis--report .report-kpi {
  min-width: 0;
}

.report-export-surface .report-kpis--report .report-kpi strong {
  font-size: 15px;
  line-height: 1.25;
}

@media (max-width: 1180px) {
  .report-kpis--report { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-kpis--report .report-kpi:nth-child(n) { grid-column: auto; }
}


/* fix21: simbología de leyenda coherente con geometría y puntos estilo GeoSV */
.report-map-legend-item[data-legend-kind="point"] .report-legend-symbol--point,
.report-export-map-legend-item[data-legend-kind="point"] .report-legend-symbol--point {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.report-map-legend-item[data-legend-kind="line"] .report-legend-symbol--line,
.report-export-map-legend-item[data-legend-kind="line"] .report-legend-symbol--line {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* fix22: Reporte Diario PMAR - encaje en pantallas grandes, fotos por fila y resumen ejecutivo */
.modal.report-modal-shell.modal-fullscreen {
  width: min(1500px, calc(100vw - 40px));
  height: auto;
  max-height: calc(100vh - 28px);
}

.report-modal-shell .modal-body {
  flex: 0 1 auto;
  max-height: calc(100vh - 132px);
  overflow: hidden;
}

.report-modal-shell .report-builder {
  height: clamp(560px, calc(100vh - 172px), 760px);
  min-height: 0;
}

.report-modal-shell .report-main {
  padding-bottom: 42px;
}

.report-photo-front-select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--report-border);
  border-radius: 9px;
  padding: 7px 10px;
  background: var(--report-bg-input);
  color: var(--report-text);
  font-size: 12px;
  outline: none;
  color-scheme: dark;
}

.report-preview-photos-grid,
.report-preview-photos-grid--export {
  display: flex !important;
  flex-direction: column;
  gap: 14px;
}

.report-photo-figure--row {
  display: grid;
  grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 10px;
}

.report-photo-figure--row .report-photo-visual,
.report-photo-figure--row .report-photo-visual img,
.report-photo-figure--row .report-photo-empty {
  width: 100%;
  height: 230px;
  border-radius: 10px;
  overflow: hidden;
}

.report-photo-figure--row .report-photo-visual img {
  object-fit: cover;
  display: block;
}

.report-photo-figure--row figcaption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
}

.report-photo-figure--row figcaption strong {
  color: var(--report-primary-light);
  font-size: 13px;
}

.report-photo-figure--row figcaption p {
  margin: 0;
  color: var(--report-text);
  font-size: 13px;
  line-height: 1.55;
}

.report-photo-figure--row figcaption span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border: 1px solid rgba(216,213,207,.26);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--report-secondary);
  background: rgba(255,255,255,.045);
  font-size: 11px;
  font-weight: 700;
}

.report-resource-card {
  overflow: hidden;
}

.report-resource-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.report-resource-head h4 {
  margin: 0 0 4px;
}

.report-resource-head span,
.report-resource-composition > span,
.report-resource-days > span,
.report-resource-equipment > span {
  display: block;
  color: var(--report-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.report-resource-head > strong {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(168,15,59,.24);
  color: var(--report-primary-light);
  border: 1px solid rgba(168,15,59,.42);
  font-size: 14px;
}

.report-resource-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.report-resource-kpis > div,
.report-resource-kpi-mini {
  border: 1px solid rgba(216,213,207,.25);
  border-radius: 12px;
  padding: 10px;
  background: rgba(20,20,20,.24);
}

.report-resource-kpi-split {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.report-resource-kpi-mini {
  min-width: 0;
}

.report-resource-kpis span {
  display: block;
  color: var(--report-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.report-resource-kpis strong {
  display: block;
  margin-top: 4px;
  color: var(--report-text);
  font-size: 16px;
}

.report-resource-visual-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 14px;
  align-items: start;
}

.report-resource-composition,
.report-resource-days,
.report-resource-equipment {
  border: 1px solid rgba(216,213,207,.22);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,.035);
  min-width: 0;
}

.report-resource-stack {
  display: flex;
  height: 20px;
  overflow: hidden;
  border-radius: 999px;
  margin: 12px 0 8px;
  background: rgba(216,213,207,.16);
}

.report-resource-stack i {
  display: block;
  min-width: 0;
  height: 100%;
}

.report-resource-stack .qualified { background: var(--report-primary); }
.report-resource-stack .unqualified { background: rgba(216,213,207,.58); }

.report-resource-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--report-muted);
  font-size: 11px;
}

.report-resource-legend em { font-style: normal; }

.report-resource-day-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
  color: var(--report-secondary);
}

.report-resource-day-row div {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(216,213,207,.14);
}

.report-resource-day-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--report-primary), var(--report-primary-light));
}

.report-resource-day-row strong,
.report-resource-equipment-row strong {
  color: var(--report-text);
  font-size: 11px;
  text-align: right;
}

.report-resource-equipment-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(216,213,207,.12);
  color: var(--report-secondary);
  font-size: 11px;
}

.report-resource-equipment-row:last-child { border-bottom: 0; }

@media (min-width: 1600px) {
  .modal.report-modal-shell.modal-fullscreen {
    width: min(1420px, calc(100vw - 56px));
  }
}

@media (max-width: 1180px) {
  .report-resource-kpis,
  .report-resource-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .modal.report-modal-shell.modal-fullscreen {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .report-modal-shell .report-builder {
    height: calc(100vh - 112px);
  }

  .report-photo-figure--row,
  .report-resource-kpis,
  .report-resource-visual-grid {
    grid-template-columns: 1fr;
  }

  .report-photo-figure--row .report-photo-visual,
  .report-photo-figure--row .report-photo-visual img,
  .report-photo-figure--row .report-photo-empty {
    height: 210px;
  }
}


/* fix23: Reporte Diario PMAR - centrado mapa proyecto, validación de semana y recursos en dos columnas */
.report-resource-visual-grid.report-resource-visual-grid--two {
  grid-template-columns: minmax(280px, .92fr) minmax(420px, 1.35fr);
  align-items: stretch;
}

.report-resource-left-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.report-resource-left-column .report-resource-composition,
.report-resource-left-column .report-resource-equipment,
.report-resource-visual-grid--two .report-resource-days {
  height: auto;
}

.report-resource-visual-grid--two .report-resource-days {
  min-height: 100%;
}

.report-resource-head span {
  text-transform: none;
  letter-spacing: .015em;
}

.report-resource-head span::first-letter {
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .report-resource-visual-grid.report-resource-visual-grid--two {
    grid-template-columns: 1fr;
  }
}

/* fix24: frentes monitoreados ejecutivos, gantt semanal y exportación legible */
.report-preview-logo-col {
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(216,213,207,.55);
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}

.report-preview-logo-col img {
  display: block;
  height: 62px;
  padding: 2px 4px;
  background: #fff;
}

.report-fronts-section {
  overflow: hidden;
}

.report-fronts-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.report-fronts-section-head h4 {
  margin: 0 0 4px;
}

.report-fronts-section-head span,
.report-fronts-gantt-title span {
  display: block;
  color: var(--report-muted, var(--text-secondary));
  font-size: 11px;
  line-height: 1.35;
}

.report-fronts-section-head > strong {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(168,15,59,.35);
  background: rgba(168,15,59,.16);
  color: var(--report-primary-light, #F4D9E2);
  font-size: 12px;
}

.report-fronts-daily-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.report-front-card {
  border: 1px solid rgba(216,213,207,.22);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.035);
  min-width: 0;
}

.report-front-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.report-front-card-head span,
.report-front-card-grid span {
  display: block;
  color: var(--report-muted, var(--text-secondary));
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.report-front-card-head strong {
  display: block;
  margin-top: 3px;
  color: var(--report-text, var(--text-primary));
  font-size: 14px;
}

.report-front-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(168,15,59,.18);
  border: 1px solid rgba(168,15,59,.32);
  color: var(--report-primary-light, #F4D9E2);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.report-front-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.report-front-card-grid div {
  border: 1px solid rgba(216,213,207,.14);
  border-radius: 10px;
  padding: 8px;
  background: rgba(20,20,20,.16);
}

.report-front-card-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--report-secondary, var(--text-primary));
  font-size: 12px;
  overflow-wrap: anywhere;
}

.report-front-card p {
  margin: 0;
  padding-top: 9px;
  border-top: 1px solid rgba(216,213,207,.12);
  color: var(--report-secondary, var(--text-secondary));
}

.report-fronts-gantt-block {
  border: 1px solid rgba(216,213,207,.18);
  border-radius: 14px;
  padding: 12px;
  background: rgba(20,20,20,.16);
}

.report-fronts-gantt-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.report-fronts-gantt-title strong {
  color: var(--report-text, var(--text-primary));
}

.report-front-gantt {
  overflow-x: auto;
  padding-bottom: 2px;
}

.report-front-gantt-header,
.report-front-gantt-row {
  display: grid;
  gap: 5px;
  align-items: stretch;
  min-width: 620px;
}

.report-front-gantt-header {
  margin-bottom: 6px;
}

.report-front-gantt-header > strong,
.report-front-gantt-header span,
.report-front-gantt-row > strong,
.report-front-gantt-row span {
  border: 1px solid rgba(216,213,207,.16);
  border-radius: 8px;
  min-height: 28px;
}

.report-front-gantt-header > strong,
.report-front-gantt-row > strong {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--report-secondary, var(--text-primary));
  background: rgba(255,255,255,.035);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-front-gantt-header span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--report-muted, var(--text-secondary));
  background: rgba(255,255,255,.035);
}

.report-front-gantt-header em {
  color: var(--report-secondary, var(--text-primary));
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.report-front-gantt-header small {
  font-size: 9px;
}

.report-front-gantt-row {
  margin-top: 5px;
}

.report-front-gantt-row span {
  display: grid;
  place-items: center;
  background: rgba(216,213,207,.06);
}

.report-front-gantt-row span.is-active {
  border-color: rgba(168,15,59,.55);
  background: rgba(168,15,59,.18);
}

.report-front-gantt-row span.is-active i {
  display: block;
  width: 78%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--report-primary, #A80F3B), var(--report-primary-light, #F4D9E2));
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
}

.report-front-gantt-placeholder,
.report-front-gantt-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px;
  background: rgba(168,15,59,.08);
  color: var(--report-secondary, var(--text-secondary));
  font-size: 12px;
}

.report-front-gantt-warning {
  margin-bottom: 8px;
  border: 1px solid rgba(255,193,7,.35);
  background: rgba(255,193,7,.10);
}

.report-export-surface .report-preview-logo-col {
  background: #fff !important;
  border: 1px solid #d8d5cf !important;
  box-shadow: none !important;
}

.report-export-surface .report-preview-logo-col img {
  background: #fff !important;
}

.report-export-surface .report-resource-card,
.report-export-surface .report-resource-composition,
.report-export-surface .report-resource-days,
.report-export-surface .report-resource-equipment,
.report-export-surface .report-front-card,
.report-export-surface .report-fronts-gantt-block {
  background: #f7f5f2 !important;
  border-color: #d8d5cf !important;
  color: #1e2528 !important;
}

.report-export-surface .report-resource-kpis > div,
.report-export-surface .report-resource-kpi-mini,
.report-export-surface .report-front-card-grid div,
.report-export-surface .report-front-gantt-header > strong,
.report-export-surface .report-front-gantt-header span,
.report-export-surface .report-front-gantt-row > strong,
.report-export-surface .report-front-gantt-row span {
  background: #fff !important;
  border-color: #e3dfd8 !important;
}

.report-export-surface .report-resource-kpi-split {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.report-export-surface .report-fronts-section-head span,
.report-export-surface .report-front-card-head span,
.report-export-surface .report-front-card-grid span,
.report-export-surface .report-fronts-gantt-title span,
.report-export-surface .report-front-gantt-header span,
.report-export-surface .report-front-gantt-header small,
.report-export-surface .report-resource-head span,
.report-export-surface .report-resource-kpis span,
.report-export-surface .report-resource-legend,
.report-export-surface .report-resource-day-row,
.report-export-surface .report-resource-equipment-row,
.report-export-surface .report-front-card p {
  color: #5f6a70 !important;
  opacity: 1 !important;
}

.report-export-surface .report-fronts-section-head > strong,
.report-export-surface .report-resource-head > strong,
.report-export-surface .report-front-status {
  background: #f4d9e2 !important;
  border-color: #d894aa !important;
  color: #7F0D2E !important;
}

.report-export-surface .report-resource-stack,
.report-export-surface .report-resource-day-row div,
.report-export-surface .report-front-gantt-row span {
  background: #e7e2da !important;
}

.report-export-surface .report-resource-stack .qualified,
.report-export-surface .report-resource-day-row i,
.report-export-surface .report-front-gantt-row span.is-active i {
  background: #A80F3B !important;
}

.report-export-surface .report-resource-stack .unqualified {
  background: #9B9790 !important;
}

.report-export-surface .report-front-gantt-row span.is-active {
  background: #f4d9e2 !important;
  border-color: #A80F3B !important;
}

@media (max-width: 980px) {
  .report-fronts-daily-grid,
  .report-front-card-grid {
    grid-template-columns: 1fr;
  }
}

/* fix26: encabezado PMAR sin isotipo SV y wordmark Rio Tinto limpio */
.report-preview-cover--enaka .report-preview-brand {
  gap: 0;
}

.report-preview-cover--enaka .report-preview-sv {
  display: none !important;
}

.report-preview-logo-col.report-preview-logo-col--wordmark {
  min-width: 206px;
  justify-content: center;
  padding: 11px 18px;
  background: #fff !important;
  border: 1px solid rgba(216,213,207,.72) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
}

.report-rio-wordmark {
  display: block;
  color: #C8102E;
  background: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
  white-space: nowrap;
  text-rendering: geometricPrecision;
}

.report-export-surface .report-preview-logo-col.report-preview-logo-col--wordmark {
  background: #fff !important;
  border: 1px solid #d8d5cf !important;
  box-shadow: none !important;
}

.report-export-surface .report-rio-wordmark {
  color: #C8102E !important;
  background: #fff !important;
}

@media (max-width: 980px) {
  .report-preview-logo-col.report-preview-logo-col--wordmark { display: none; }
}

/* fix24: Reporte Diario PMAR Mara - controles dependientes y registro fotográfico */
.report-table input:disabled,
.report-table select:disabled,
.report-table textarea:disabled,
.report-input-disabled {
  opacity: .58;
  cursor: not-allowed;
  background: rgba(255,255,255,.045) !important;
  color: var(--report-muted) !important;
}

.report-photo-figure--row {
  grid-template-columns: minmax(330px, 50%) minmax(0, 1fr);
}

.report-photo-figure--row .report-photo-visual,
.report-photo-figure--row .report-photo-visual img,
.report-photo-figure--row .report-photo-empty {
  height: 345px;
}

.report-photo-figure--row .report-photo-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.28);
}

.report-photo-figure--row .report-photo-visual img {
  object-fit: contain;
}

.report-photo-figure--row figcaption p b {
  color: var(--report-primary-light);
}

.report-photo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.report-photo-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border: 1px solid rgba(216,213,207,.26);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--report-secondary);
  background: rgba(255,255,255,.045);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .report-photo-figure--row .report-photo-visual,
  .report-photo-figure--row .report-photo-visual img,
  .report-photo-figure--row .report-photo-empty {
    height: 315px;
  }
}

/* PMAR Mara: popup y menú contextual de features en mapa de reporte */
.report-preview-map .leaflet-popup.report-map-popup .leaflet-popup-content-wrapper {
  background: rgba(24, 25, 26, .95);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  box-shadow: 0 10px 24px rgba(0,0,0,.38);
  overflow: hidden;
}

.report-preview-map .leaflet-popup.report-map-popup .leaflet-popup-content {
  margin: 0;
  min-width: 176px;
  max-width: 320px;
  line-height: 1.3;
}

.report-preview-map .leaflet-popup.report-map-popup .leaflet-popup-tip {
  background: rgba(24, 25, 26, .95);
  border: 1px solid rgba(255,255,255,.12);
}

.report-preview-map .leaflet-popup.report-map-popup .leaflet-popup-close-button {
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  line-height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  z-index: 2;
}

.report-preview-map .leaflet-popup.report-map-popup .leaflet-popup-close-button:hover {
  background: var(--report-primary, #A80F3B);
  color: #fff;
}

.report-map-popup-content {
  display: grid;
  gap: 3px;
  padding: 12px 46px 12px 14px;
}

.report-map-popup-content strong,
.report-map-popup-content span {
  display: block;
  max-width: 250px;
  overflow-wrap: anywhere;
}

.report-map-popup-content strong {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.report-map-popup-content span {
  color: var(--report-secondary, #d8d5cf);
  font-size: 11px;
}

.report-preview-map.report-map-exporting .leaflet-popup.report-map-popup .leaflet-popup-close-button {
  display: none !important;
}

.report-preview-map.report-map-exporting .leaflet-popup.report-map-popup .leaflet-popup-content {
  min-width: 180px;
  max-width: 340px;
}

.report-preview-map.report-map-exporting .report-map-popup-content {
  padding: 12px 14px;
}

.report-preview-map.report-map-exporting .report-map-popup-content strong,
.report-preview-map.report-map-exporting .report-map-popup-content span {
  max-width: 300px;
}

.report-feature-context-menu {
  position: absolute;
  z-index: 1200;
  min-width: 158px;
  max-width: 240px;
  padding: 6px;
  border: 1px solid rgba(216,213,207,.34);
  border-radius: 12px;
  background: rgba(20,19,19,.94);
  color: #fff;
  box-shadow: 0 14px 30px rgba(0,0,0,.44);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.report-feature-context-title {
  padding: 6px 8px 7px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: var(--report-secondary, #d8d5cf);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-feature-context-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  padding: 8px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.report-feature-context-menu button:hover {
  background: rgba(168,15,59,.88);
}

.report-feature-context-menu button i {
  width: 15px;
  color: #FFD43B;
  text-align: center;
}

.report-map-legend-item.is-highlight .report-map-legend-label,
.report-map-legend-item.is-highlight span {
  color: #fff;
  font-weight: 900;
}

.report-map-legend-item.is-highlight .report-legend-symbol--polygon {
  box-shadow: 0 0 0 2px rgba(255,212,59,.32), 0 0 10px rgba(255,212,59,.5);
}

.report-preview-map .leaflet-tooltip.report-map-label,
.report-preview-map .report-map-label {
  padding: 5px 8px !important;
  line-height: 1.22 !important;
  max-width: 190px !important;
  white-space: normal !important;
  text-align: left !important;
}

/* Exportación con barra de progreso y trazabilidad de pasos */
.report-export-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(12, 16, 20, .78);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.report-export-progress-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.report-export-progress-card {
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(31,37,42,.98), rgba(20,24,28,.98));
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
  color: #fff;
  overflow: hidden;
}

.report-export-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.report-export-progress-head div {
  min-width: 0;
}

.report-export-progress-head strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
}

.report-export-progress-head span {
  display: block;
  margin-top: 3px;
  color: #d8d5cf;
  font-size: 12px;
  line-height: 1.35;
}

.report-export-progress-head b {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #A80F3B;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  text-align: center;
  box-shadow: 0 0 0 4px rgba(168,15,59,.18);
}

.report-export-progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}

.report-export-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #A80F3B, #FFD43B);
  transition: width .25s ease;
}

.report-export-progress-current {
  padding: 12px 13px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.065);
}

.report-export-progress-current strong,
.report-export-progress-current span {
  display: block;
}

.report-export-progress-current strong {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}

.report-export-progress-current span {
  margin-top: 4px;
  color: #d8d5cf;
  font-size: 12px;
  line-height: 1.4;
}

.report-export-progress-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-export-progress-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 800;
}

.report-export-progress-steps li i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.report-export-progress-steps li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-export-progress-steps li.is-complete {
  color: #fff;
  background: rgba(255,255,255,.075);
}

.report-export-progress-steps li.is-complete i {
  background: #66d17a;
}

.report-export-progress-steps li.is-active {
  color: #fff;
  border-color: rgba(255,212,59,.55);
  background: rgba(168,15,59,.28);
}

.report-export-progress-steps li.is-active i {
  background: #FFD43B;
  box-shadow: 0 0 0 4px rgba(255,212,59,.18);
}

.report-export-progress-log {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(0,0,0,.18);
  overflow: hidden;
}

.report-export-progress-log > strong {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.report-export-progress-log ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: auto;
  scrollbar-width: thin;
}

.report-export-progress-log li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #d8d5cf;
  font-size: 11px;
  line-height: 1.35;
}

.report-export-progress-log li i {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: #FFD43B;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.report-export-progress-log li.is-done i {
  background: rgba(102,209,122,.20);
  color: #66d17a;
}

.report-export-progress-log li.is-error i {
  background: rgba(255,91,91,.20);
  color: #ff7a7a;
}

.report-export-progress-overlay.is-complete .report-export-progress-head b {
  background: #2d9b50;
  box-shadow: 0 0 0 4px rgba(45,155,80,.18);
}

.report-export-progress-overlay.is-complete .report-export-progress-track i {
  background: linear-gradient(90deg, #2d9b50, #66d17a);
}

.report-export-progress-overlay.is-error .report-export-progress-head b {
  background: #b83737;
  box-shadow: 0 0 0 4px rgba(184,55,55,.18);
}

.report-export-progress-overlay.is-error .report-export-progress-track i {
  background: linear-gradient(90deg, #b83737, #ff7a7a);
}

@media (max-width: 620px) {
  .report-export-progress-overlay {
    padding: 12px;
  }

  .report-export-progress-card {
    padding: 14px;
    border-radius: 16px;
  }

  .report-export-progress-head {
    align-items: stretch;
    flex-direction: column;
  }

  .report-export-progress-head b {
    align-self: flex-start;
  }

  .report-export-progress-steps {
    grid-template-columns: 1fr;
  }
}

/* PMAR Mara v252: color automático para archivos espaciales cargados por usuario */
.report-spatial-color-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-width: 0;
  padding: 3px 7px;
  border: 1px solid rgba(216,213,207,.20);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: var(--report-secondary);
  font-size: 10px;
  line-height: 1.15;
}

.report-spatial-color-note i {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--layer-color, var(--report-primary));
  box-shadow: 0 0 0 2px rgba(255,255,255,.08);
}

.report-spatial-color-note span {
  color: inherit;
  font-size: inherit;
  white-space: nowrap;
}

.report-export-surface .report-resource-panel {
  background: #fff !important;
  border: 1px solid #e3dfd8 !important;
  border-radius: 12px !important;
  padding: 12px !important;
  color: #1e2528 !important;
}

.report-export-surface .report-resource-panel h3 {
  color: #5f6a70 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .03em !important;
}

/* PMAR Mara v254: selector de color clickeable para capas del proyecto y archivos espaciales */
.report-color-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.report-color-picker i,
.report-color-picker span {
  pointer-events: none;
}

.report-color-picker input[type="color"] {
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  opacity: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.report-color-picker--layer {
  width: 18px;
  height: 18px;
  justify-content: center;
}

.report-color-picker--layer input[type="color"] {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
}

.report-color-picker--layer .report-layer-mini-swatch,
.report-color-picker--spatial i {
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.report-color-picker:hover .report-layer-mini-swatch,
.report-color-picker:hover i {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(255,255,255,.14), 0 0 0 5px rgba(168,15,59,.18);
  border-color: rgba(255,255,255,.9);
}

.report-project-layer-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

/* PMAR Mara v255: menú de color para capas y leyenda de vista previa */
.report-color-menu {
  position: fixed;
  z-index: 999999;
  padding: 12px;
  border: 1px solid rgba(216,213,207,.36);
  border-radius: 14px;
  background: rgba(28,35,38,.98);
  color: var(--report-text, #fff);
  box-shadow: 0 18px 48px rgba(0,0,0,.48);
  backdrop-filter: blur(10px);
}

.report-color-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.report-color-menu-head strong {
  display: block;
  font-size: 12px;
  color: #fff;
}

.report-color-menu-head span {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  color: var(--report-secondary, #d8d5cf);
  font-size: 11px;
}

.report-color-menu-head button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
}

.report-color-menu-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  font-size: 11px;
  color: var(--report-secondary, #d8d5cf);
}

.report-color-menu-custom input[type="color"] {
  width: 40px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.report-color-menu-presets {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.report-color-menu-presets button {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 9px;
  background: var(--preset-color, #A80F3B);
  box-shadow: 0 0 0 2px rgba(0,0,0,.22);
  cursor: pointer;
}

.report-color-menu-presets button:hover,
.report-map-legend-symbol-btn:hover .report-legend-symbol,
.report-map-legend-symbol-btn:focus-visible .report-legend-symbol {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(255,255,255,.16), 0 0 0 5px rgba(168,15,59,.20);
}

.report-map-legend-symbol-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.report-map-legend-symbol-btn .report-legend-symbol {
  transition: transform .15s ease, box-shadow .15s ease;
}

.report-map-legend-symbol-btn .report-legend-symbol--line {
  width: 20px;
}

.report-map-legend-symbol-btn .report-legend-symbol--point {
  width: 20px;
  height: 20px;
}


/* PMAR Mara v256: exportación sin Word y recursos en dos columnas fijas */
.report-export-surface .report-resource-visual-grid.report-resource-visual-grid--two {
  display: grid !important;
  grid-template-columns: minmax(280px, .92fr) minmax(420px, 1.35fr) !important;
  gap: 14px !important;
  align-items: stretch !important;
}

.report-export-surface .report-resource-left-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  min-width: 0 !important;
}

.report-export-surface .report-resource-visual-grid--two .report-resource-days {
  min-height: 100% !important;
}

.report-export-surface .report-resource-left-column .report-resource-composition,
.report-export-surface .report-resource-left-column .report-resource-equipment,
.report-export-surface .report-resource-visual-grid--two .report-resource-days {
  height: auto !important;
}


/* PMAR Mara v257: leyenda de mapa exportado robusta y mapa 20% más alto */
.report-preview-map {
  height: 504px !important;
}

.report-export-surface .report-preview-card-map .report-export-map-snapshot {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

.report-export-map-legend-horizontal {
  display: block !important;
  visibility: visible !important;
}

.report-export-map-legend-horizontal > strong,
.report-export-map-legend-grid,
.report-export-map-legend-item {
  visibility: visible !important;
}

@media (max-width: 760px) {
  .report-preview-map {
    height: 384px !important;
  }
}

/* Guardias PMAR Mara */
.report-tab.is-disabled,
.report-tab:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.report-guard-toolbar {
  align-items: flex-end;
  flex-wrap: wrap;
}

.report-guard-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.4fr);
  gap: 16px;
  align-items: start;
}

.report-guard-panel {
  border: 1px solid rgba(168, 15, 59, 0.28);
  border-radius: 16px;
  background: rgba(37, 35, 34, 0.96);
  padding: 14px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

.report-guard-panel h4 {
  margin: 0 0 10px;
  color: var(--report-text);
  font-size: 14px;
  font-weight: 900;
}

.report-guard-cards {
  display: grid;
  gap: 10px;
}

.report-guard-card {
  border: 1px solid rgba(216, 213, 207, 0.18);
  border-left: 4px solid var(--report-muted);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.report-guard-card.is-active {
  border-left-color: var(--report-primary);
  background: rgba(168, 15, 59, 0.16);
  box-shadow: inset 0 0 0 1px rgba(168, 15, 59, 0.24);
}

.report-guard-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.report-guard-card-head strong {
  display: block;
  font-size: 13px;
  color: var(--report-text);
}

.report-guard-card-head span,
.report-guard-card-meta,
.report-guard-current {
  color: var(--report-muted);
  font-size: 12px;
}

.report-guard-card-head em {
  border-radius: 999px;
  padding: 3px 8px;
  background: #f4d9e2;
  border: 1px solid #d894aa;
  color: #7F0D2E;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.report-guard-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.report-guard-card-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(216, 213, 207, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
}

.report-guard-note {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(216, 213, 207, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--report-muted);
  font-size: 12px;
}

.report-guard-note i {
  color: var(--report-primary);
}

.report-locked-day {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 10px;
  padding: 0 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(216, 213, 207, 0.18);
  color: var(--report-text);
}

.report-locked-day strong {
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .report-guard-layout {
    grid-template-columns: 1fr;
  }
}


/* v263 - Guardias anidadas y personal bloqueado por día */
.report-list-wrap {
  overflow: visible;
  border-radius: 16px;
  padding: 0;
  background: transparent;
}

.report-guard-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.report-guard-folder {
  border: 1px solid rgba(216, 213, 207, 0.18);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(37, 35, 34, 0.96), rgba(27, 25, 24, 0.98));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  min-width: 0;
}

.report-guard-folder.is-active {
  border-color: rgba(168, 15, 59, 0.58);
  box-shadow: 0 0 0 1px rgba(168, 15, 59, 0.22), 0 18px 40px rgba(0, 0, 0, 0.34);
}

.report-guard-folder-head,
.report-guard-folder-actions,
.report-guard-inline-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.report-guard-folder-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.report-guard-folder-title i {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 15, 59, 0.18);
  color: var(--report-primary);
}

.report-guard-folder-title strong {
  display: block;
  color: var(--report-text);
  font-size: 15px;
  font-weight: 900;
}

.report-guard-folder-title span {
  display: block;
  color: var(--report-muted);
  font-size: 12px;
  margin-top: 2px;
}

.report-guard-folder-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.report-guard-folder-meta span,
.report-guard-folder-meta em,
.report-guard-selected {
  border: 1px solid rgba(216, 213, 207, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255,255,255,0.045);
  color: var(--report-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.report-guard-folder-meta em,
.report-guard-selected {
  color: #ffd4df;
  border-color: rgba(168, 15, 59, 0.48);
  background: rgba(168, 15, 59, 0.16);
}

.report-guard-folder-actions {
  margin-top: 10px;
}

.report-guard-inline-controls {
  justify-content: flex-start;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid rgba(216, 213, 207, 0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
}

.report-guard-inline-controls .report-list-datebox {
  width: min(240px, 100%);
}

.report-nested-report-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.report-nested-report-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(216, 213, 207, 0.16);
  border-radius: 14px;
  padding: 11px;
  background: rgba(255,255,255,0.04);
  min-width: 0;
}

.report-nested-report-main,
.report-nested-report-metrics,
.report-nested-report-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.report-nested-report-main {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.report-nested-report-main strong {
  color: var(--report-text);
  font-size: 13px;
}

.report-nested-report-main span,
.report-nested-report-metrics span {
  color: var(--report-muted);
  font-size: 11px;
}

.report-nested-report-actions {
  justify-content: flex-end;
}

.report-empty-list-compact {
  min-height: 96px;
}

[data-report-table="personnel"] tr.is-readonly {
  opacity: 0.72;
}

[data-report-table="personnel"] tr.is-editable {
  background: rgba(168, 15, 59, 0.08);
}

.report-locked-day {
  gap: 6px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 94px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.report-locked-day small {
  color: var(--report-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.report-locked-day.is-editable small {
  color: #ffd4df;
}

@media (max-width: 980px) {
  .report-nested-report-card {
    grid-template-columns: 1fr;
  }
  .report-nested-report-actions {
    justify-content: flex-start;
  }
}


/* v264 - Guardias compactas, sin ZIP/duplicar visibles y responsable controlado */
.report-guard-folder {
  padding: 12px;
}

.report-guard-folder-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) auto auto minmax(300px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.report-guard-folder-head {
  display: none;
}

.report-guard-folder-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.report-guard-inline-controls {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  justify-content: flex-end;
  gap: 8px;
}

.report-guard-inline-controls .report-list-datebox {
  width: 210px;
  min-width: 190px;
}

.report-nested-report-grid {
  margin-top: 10px;
  gap: 7px;
}

.report-nested-report-card {
  grid-template-columns: 116px minmax(360px, 1fr) auto;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
}

.report-nested-report-date {
  min-width: 0;
}

.report-nested-report-date strong {
  display: block;
  color: var(--report-text);
  font-size: 13px;
  line-height: 1.15;
}

.report-nested-report-date span {
  display: block;
  color: var(--report-muted);
  font-size: 10px;
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.report-nested-report-info {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 0;
}

.report-nested-report-info span {
  color: var(--report-muted);
  font-size: 11px;
  white-space: nowrap;
}

.report-nested-report-info i {
  color: var(--report-primary);
  opacity: .95;
}

.report-nested-report-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.report-nested-report-actions .btn {
  min-height: 30px;
  padding: 0 10px;
}

@media (max-width: 1180px) {
  .report-guard-folder-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .report-guard-folder-actions,
  .report-guard-inline-controls {
    justify-content: flex-start;
  }
  .report-nested-report-card {
    grid-template-columns: 1fr;
  }
  .report-nested-report-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}


/* v265 - UI guardias más limpia, sin fecha externa y logos SV/Rio en exportado */
.report-guard-stack {
  padding: 0 4px 4px;
}

.report-guard-folder {
  padding: 16px !important;
  overflow: hidden;
}

.report-guard-folder-row {
  grid-template-columns: minmax(280px, 1fr) auto auto !important;
  gap: 14px !important;
  align-items: center !important;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(216,213,207,.12);
}

.report-guard-folder-title {
  min-width: 0;
}

.report-guard-folder-meta {
  justify-content: center;
  min-width: max-content;
}

.report-guard-folder-actions,
.report-guard-inline-controls {
  justify-content: flex-end !important;
  min-width: max-content;
}

.report-guard-inline-controls {
  margin: 0 !important;
  padding: 0 !important;
}

.report-guard-inline-controls .btn,
.report-guard-folder-actions .btn,
.report-nested-report-actions .btn {
  white-space: nowrap;
}

.report-nested-report-grid {
  margin-top: 10px !important;
}

.report-nested-report-card {
  grid-template-columns: 120px minmax(260px, 1fr) auto !important;
  padding: 8px 10px !important;
  column-gap: 10px !important;
  overflow: hidden;
}

.report-nested-report-info {
  overflow: hidden;
}

.report-nested-report-actions {
  justify-content: flex-end;
  padding-right: 0;
}

.report-preview-logo-col.report-preview-logo-col--dual {
  min-width: 306px;
  gap: 10px;
  padding: 10px 14px;
}

.report-sv-export-logo {
  width: 78px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(216,213,207,.72);
  padding: 5px;
  box-sizing: border-box;
}

.report-export-surface .report-sv-export-logo {
  border-color: #d8d5cf !important;
  box-shadow: none !important;
}

@media (max-width: 1180px) {
  .report-guard-folder-row {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }
  .report-guard-folder-meta,
  .report-guard-folder-actions,
  .report-guard-inline-controls {
    justify-content: flex-start !important;
    min-width: 0;
  }
  .report-nested-report-card {
    grid-template-columns: 1fr !important;
  }
  .report-nested-report-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}


/* v266 - Ajuste fino UI guardias: toolbar agrupada y acciones en una sola línea */
.report-list-toolbar.report-guard-toolbar.report-guard-toolbar--clean {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  padding: 12px 16px !important;
  margin: 8px 0 12px !important;
  border: 1px solid rgba(216,213,207,.10) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.025) !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.report-guard-toolbar-left,
.report-guard-toolbar-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.report-guard-toolbar-right {
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.report-guard-folder {
  padding: 18px 20px !important;
  overflow: visible !important;
}

.report-guard-folder-row {
  grid-template-columns: minmax(320px, 1fr) auto auto !important;
  gap: 14px 18px !important;
  align-items: center !important;
  padding-bottom: 14px !important;
}

.report-guard-folder-meta {
  justify-content: flex-end !important;
  min-width: max-content !important;
}

.report-guard-folder-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-top: 0 !important;
  min-width: max-content !important;
  flex-wrap: nowrap !important;
}

.report-guard-folder-actions .btn,
.report-guard-toolbar--clean .btn {
  min-height: 34px;
  white-space: nowrap;
}

.report-guard-folder-actions .btn.btn-primary {
  padding-inline: 16px;
}

.report-nested-report-grid {
  margin-top: 8px !important;
}

@media (max-width: 1180px) {
  .report-guard-folder-row {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }
  .report-guard-folder-meta,
  .report-guard-folder-actions {
    justify-content: flex-start !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
  }
}

@media (max-width: 680px) {
  .report-list-toolbar.report-guard-toolbar.report-guard-toolbar--clean {
    align-items: stretch !important;
  }
  .report-guard-toolbar-left,
  .report-guard-toolbar-right {
    width: 100%;
    justify-content: flex-start;
  }
}


/* v287: Reporte Diario - UI GeoSV, exportación mantiene identidad Rio Tinto clara */
.report-modal-shell {
  --report-primary: var(--primary, #fa5c00);
  --report-primary-dark: var(--primary-dark, #d94e00);
  --report-primary-light: var(--primary-light, #ff7b2e);
  --report-bg-dark: var(--bg-dark, #1e272e);
  --report-bg-darker: var(--bg-darker, #151b20);
  --report-bg-panel: var(--bg-panel, #263238);
  --report-bg-input: var(--bg-input, #37474f);
  --report-border: var(--border-color, #455a64);
  --report-text: var(--text-primary, #ecf0f1);
  --report-muted: var(--text-muted, #78909c);
  --report-secondary: var(--text-secondary, #b0bec5);
}

.report-modal-shell .report-builder {
  background: var(--report-bg-darker);
}

.report-modal-shell .report-sidebar {
  background: linear-gradient(180deg, rgba(250,92,0,.14), rgba(21,27,32,.94));
  border-right-color: var(--report-border);
}

.report-modal-shell .report-project-badge {
  border-color: rgba(250,92,0,.35);
  background: rgba(250,92,0,.10);
}

.report-modal-shell .report-tab.active {
  border-color: rgba(250,92,0,.78);
  background: linear-gradient(135deg, var(--report-primary), var(--report-primary-dark));
  box-shadow: 0 8px 18px rgba(250,92,0,.25);
}

.report-modal-shell .report-tab:hover,
.report-project-badge-btn:hover {
  border-color: rgba(250,92,0,.46);
}

.report-project-badge-btn:hover {
  box-shadow: 0 0 0 2px rgba(250,92,0,.15);
}

.report-format-btn:hover,
.report-map-center-btn:hover,
.report-feature-context-menu button:hover {
  background: rgba(250,92,0,.88);
  border-color: rgba(250,92,0,.95);
  color: #fff;
}

.report-rich-editor:focus {
  border-color: rgba(250,92,0,.75);
  box-shadow: 0 0 0 2px rgba(250,92,0,.14);
}

.report-master-table tr:hover td {
  background: rgba(250,92,0,.08);
}

.report-empty-list i,
.report-list-loading i,
.report-map-placeholder i,
.report-kpis--enaka .report-kpi i,
.report-preview-grid--enaka h4,
.report-map-north span {
  color: var(--report-primary) !important;
}

.report-map-placeholder {
  background: radial-gradient(circle at center, rgba(250,92,0,.09), transparent 62%);
}

.report-map-label {
  border-color: rgba(250,92,0,.72) !important;
}

.report-switch-line input,
.report-project-layer-row input,
.report-map-label-toggle input {
  accent-color: var(--report-primary);
}

.report-map-label-toggle.is-on i {
  background: var(--report-primary);
  border-color: rgba(250,92,0,.95);
}

.report-activity-preview-block {
  border-left-color: var(--report-primary);
}

.report-preview-cover--enaka::before,
.report-resource-day-row i,
.report-front-gantt-row span.is-active i {
  background: linear-gradient(90deg, var(--report-primary), var(--report-primary-light));
}

.report-preview-cover--enaka h2 em,
.report-photo-figure--row figcaption strong,
.report-photo-figure--row figcaption p b,
.report-resource-head > strong,
.report-fronts-section-head > strong,
.report-front-status {
  color: var(--report-primary-light);
}

.report-preview-sv,
.report-resource-stack .qualified {
  background: var(--report-primary);
}

.report-resource-head > strong,
.report-fronts-section-head > strong,
.report-front-status {
  background: rgba(250,92,0,.20);
  border-color: rgba(250,92,0,.38);
}

.report-front-gantt-row span.is-active {
  border-color: rgba(250,92,0,.55);
  background: rgba(250,92,0,.18);
}

.report-map-control-box,
.report-feature-context-menu {
  border-color: rgba(69,90,100,.72);
}

/* La superficie de exportación queda explícitamente con paleta Rio Tinto clara. */
.report-export-surface,
.report-export-surface .report-export-clean {
  --report-primary: #A80F3B;
  --report-primary-dark: #7F0D2E;
  --report-primary-light: #F4D9E2;
}

/* v289: Reporte Diario PMAR Zafranal - soporte logo Teck en vista previa */
.report-preview-logo-col .report-client-logo {
  max-width: 148px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.28);
  padding: 8px 12px;
}
.report-preview-logo-col .report-client-logo--teck {
  width: 148px;
}


/* v291: Reporte Diario - exportado Teck y UI sin fondos degradados */
.report-modal-shell .report-sidebar,
.report-modal-shell .report-tab.active,
.report-guard-folder,
.report-export-progress-card,
.report-preview-cover--enaka::before,
.report-resource-day-row i,
.report-front-gantt-row span.is-active i,
.report-preview-cover--enaka,
.report-map-placeholder,
.report-export-progress-track i {
  background-image: none !important;
}

.report-modal-shell .report-sidebar {
  background: var(--report-bg-darker) !important;
}

.report-modal-shell .report-tab.active {
  background: var(--report-primary) !important;
}

.report-guard-folder {
  background: var(--report-bg-panel) !important;
}

.report-preview-cover--enaka::before,
.report-resource-day-row i,
.report-front-gantt-row span.is-active i,
.report-export-progress-track i {
  background: var(--report-primary) !important;
}

.report-map-placeholder {
  background: rgba(250,92,0,.06) !important;
}

.report-export-surface.report-export-surface--zafranal,
.report-export-surface.report-export-surface--zafranal .report-export-clean {
  --report-primary: #FA5C00;
  --report-primary-dark: #102050;
  --report-primary-light: #FFF1E8;
  --report-bg-dark: #FFFFFF;
  --report-bg-darker: #FFFFFF;
  --report-bg-panel: #F7F9FC;
  --report-bg-card: #F7F9FC;
  --report-bg-input: #FFFFFF;
  --report-text: #182233;
  --report-secondary: #3D4A5F;
  --report-muted: #66758B;
  --report-border: #DCE4EF;
  --text-primary: #182233;
  --text-secondary: #5F6D82;
  --border-color: #DCE4EF;
  --bg-primary: #F7F9FC;
  --bg-secondary: #FFFFFF;
}

.report-export-surface.report-export-surface--zafranal .report-preview-cover--enaka {
  background: #FFFFFF !important;
  border: 1px solid #DCE4EF !important;
  border-top: 4px solid #FA5C00 !important;
  color: #182233 !important;
  box-shadow: none !important;
}

.report-export-surface.report-export-surface--zafranal .report-preview-cover--enaka::before {
  background: #FA5C00 !important;
}

.report-export-surface.report-export-surface--zafranal .report-preview-cover--enaka h2,
.report-export-surface.report-export-surface--zafranal .report-preview-cover--enaka span,
.report-export-surface.report-export-surface--zafranal .report-preview-cover--enaka p,
.report-export-surface.report-export-surface--zafranal .report-preview-logo-col strong {
  color: #182233 !important;
}

.report-export-surface.report-export-surface--zafranal .report-preview-cover--enaka h2 em {
  color: #102050 !important;
}

.report-export-surface.report-export-surface--zafranal .report-preview-grid--enaka .report-preview-card,
.report-export-surface.report-export-surface--zafranal .report-kpis--enaka .report-kpi,
.report-export-surface.report-export-surface--zafranal .report-resource-card,
.report-export-surface.report-export-surface--zafranal .report-resource-composition,
.report-export-surface.report-export-surface--zafranal .report-resource-days,
.report-export-surface.report-export-surface--zafranal .report-resource-equipment,
.report-export-surface.report-export-surface--zafranal .report-front-card,
.report-export-surface.report-export-surface--zafranal .report-fronts-gantt-block,
.report-export-surface.report-export-surface--zafranal .report-activity-preview-block,
.report-export-surface.report-export-surface--zafranal .report-photo-figure {
  background: #F7F9FC !important;
  border-color: #DCE4EF !important;
  color: #182233 !important;
  box-shadow: none !important;
}

.report-export-surface.report-export-surface--zafranal .report-resource-kpis > div,
.report-export-surface.report-export-surface--zafranal .report-resource-kpi-mini,
.report-export-surface.report-export-surface--zafranal .report-front-card-grid div,
.report-export-surface.report-export-surface--zafranal .report-front-gantt-header > strong,
.report-export-surface.report-export-surface--zafranal .report-front-gantt-header span,
.report-export-surface.report-export-surface--zafranal .report-front-gantt-row > strong,
.report-export-surface.report-export-surface--zafranal .report-front-gantt-row span {
  background: #FFFFFF !important;
  border-color: #E3E9F2 !important;
}

.report-export-surface.report-export-surface--zafranal .report-preview-grid--enaka h4,
.report-export-surface.report-export-surface--zafranal .report-resource-panel h3,
.report-export-surface.report-export-surface--zafranal .report-kpis--enaka .report-kpi strong,
.report-export-surface.report-export-surface--zafranal .report-preview-card strong {
  color: #102050 !important;
}

.report-export-surface.report-export-surface--zafranal .report-kpis--enaka .report-kpi i,
.report-export-surface.report-export-surface--zafranal .report-preview-grid--enaka h4,
.report-export-surface.report-export-surface--zafranal .report-map-placeholder i {
  color: #FA5C00 !important;
}

.report-export-surface.report-export-surface--zafranal .report-fronts-section-head > strong,
.report-export-surface.report-export-surface--zafranal .report-resource-head > strong,
.report-export-surface.report-export-surface--zafranal .report-front-status,
.report-export-surface.report-export-surface--zafranal .report-front-gantt-row span.is-active {
  background: #FFF1E8 !important;
  border-color: #F3B27A !important;
  color: #102050 !important;
}

.report-export-surface.report-export-surface--zafranal .report-resource-stack .qualified,
.report-export-surface.report-export-surface--zafranal .report-resource-day-row i,
.report-export-surface.report-export-surface--zafranal .report-front-gantt-row span.is-active i {
  background: #FA5C00 !important;
}

/* v316 Rec. Enaka daily report: activity photos fit/contain and larger export cells */
.report-file-grid--single {
  grid-template-columns: 1fr;
}

.report-activity-photo-cell {
  min-width: 260px;
  vertical-align: top;
}

.report-activity-photo-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 240px;
}

.report-activity-photo-upload {
  width: max-content;
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.report-activity-photo-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.report-activity-photo-mini {
  display: grid;
  grid-template-columns: 42px minmax(120px, 1fr) 32px;
  gap: 7px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}

.report-activity-photo-thumb {
  width: 42px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.06);
  color: var(--text-secondary);
}

.report-activity-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: rgba(255,255,255,.04);
}

.report-activity-photo-mini input {
  min-height: 32px;
  font-size: 12px;
}

.report-activity-preview-block--with-photos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 45%);
  gap: 16px;
  align-items: start;
}

.report-activity-preview-photos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-activity-preview-photos .report-photo-figure--row {
  grid-template-columns: 1fr;
  gap: 8px;
}

.report-activity-preview-photos .report-photo-figure--row .report-photo-visual,
.report-activity-preview-photos .report-photo-figure--row .report-photo-visual img,
.report-activity-preview-photos .report-photo-figure--row .report-photo-empty {
  height: 245px;
}

.report-activity-preview-photos .report-photo-figure--row .report-photo-visual img {
  object-fit: contain;
  background: #f1eee8;
}

.report-activity-preview-photos .report-photo-figure--row figcaption {
  min-height: auto;
}

@media (max-width: 920px) {
  .report-activity-preview-block--with-photos {
    grid-template-columns: 1fr;
  }
  .report-activity-photo-cell {
    min-width: 220px;
  }
}

/* v317 Rec. Enaka export: keep activity photos complete and allow internal pagination */
.report-export-surface .report-activity-preview-block--with-photos,
.report-export-surface .report-export-activity-row-block,
.report-export-surface .report-activity-preview-photos,
.report-export-surface .report-activity-preview-photos .report-photo-figure,
.report-export-surface .report-preview-card:has(.report-activity-preview-block) {
  break-inside: auto !important;
  page-break-inside: auto !important;
}

.report-export-surface .report-export-activity-row-block {
  width: 100% !important;
  box-sizing: border-box !important;
}

.report-export-surface .report-activity-preview-block--with-photos {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 46%) !important;
  align-items: start !important;
}

.report-export-surface .report-activity-preview-photos .report-photo-figure--row {
  grid-template-columns: 1fr !important;
}

.report-export-surface .report-activity-preview-photos .report-photo-visual,
.report-export-surface .report-activity-preview-photos .report-photo-empty {
  width: 100% !important;
  height: 285px !important;
  min-height: 285px !important;
  max-height: 285px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f1eee8 !important;
  overflow: hidden !important;
}

.report-export-surface .report-activity-preview-photos .report-photo-visual img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #f1eee8 !important;
  display: block !important;
}


/* v321 Historial de reportes: estado de sincronización */
.report-history-status {
  display: none;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: rgba(255,255,255,.82);
  font-size: 13px;
  line-height: 1.35;
}
.report-history-status.is-loading,
.report-history-status.is-error,
.report-history-status.is-ready {
  display: flex;
}
.report-history-status.is-loading {
  border-color: rgba(250,92,0,.32);
  color: #ffd9c2;
}
.report-history-status.is-error {
  border-color: rgba(255,90,90,.45);
  color: #ffd0d0;
  background: rgba(255,64,64,.08);
}
.report-history-status.is-ready {
  border-color: rgba(54,211,153,.30);
  color: #c9f7e7;
}
.report-history-error {
  min-height: 180px;
}

/* v292: Reporte Diario - restaurar visibilidad del modal de exportación y barra de progreso.
   v291 quitó background-image a la tarjeta; como el fondo anterior era un gradient,
   la tarjeta quedaba visualmente transparente. Estas reglas fijan fondos sólidos. */
.report-export-progress-overlay {
  background: rgba(8, 12, 16, .84) !important;
  backdrop-filter: blur(10px);
}

.report-export-progress-card {
  background: #1b2025 !important;
  background-image: none !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: 0 24px 86px rgba(0,0,0,.62) !important;
  color: #fff !important;
}

.report-export-progress-track {
  background: rgba(255,255,255,.18) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
}

.report-export-progress-track i {
  display: block !important;
  min-width: 4px;
  background: var(--report-primary, #FA5C00) !important;
  opacity: 1 !important;
}

.report-export-progress-current,
.report-export-progress-steps li,
.report-export-progress-log {
  background: rgba(255,255,255,.075) !important;
  border-color: rgba(255,255,255,.14) !important;
}

.report-export-progress-head b {
  background: var(--report-primary, #FA5C00) !important;
  color: #fff !important;
}
