/* ==============================================
IDAN THEME OVERRIDE — append after app.css
Aligns font + UI colours to stylesheet-2.css
(does not touch map fill colours)
============================================== */

/* ── IDAN design tokens ── */
:root {
  --idan-blue:        #247dd9;
  --idan-blue-dark:   #1a5fa8;
  --idan-blue-light:  #ddeaf9;
  --idan-text:        #212529;
  --idan-muted:       #6c757d;
  --idan-border:      #e2e8f0;
  --idan-surface:     #f7f8fa;
  --idan-bg:          #ffffff;
}

/* ── Font ── */
body,
button,
input,
select,
textarea {
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

/* ── Prevent page scroll ── */
body {
  height: 100vh;
  overflow: hidden;
}

/* ── Datasource buttons ── */
.ds-btn {
  border-color: var(--idan-border);
  background:   var(--idan-bg);
  color:        var(--idan-text);
}

.ds-btn:hover {
  background: var(--idan-surface);
  color:      var(--idan-text);
}

.ds-btn.is-active {
  background:   var(--idan-blue);
  color:        #fff;
  border-color: var(--idan-blue);
}

.ds-btn.is-active:hover {
  background:   var(--idan-blue-dark);
  border-color: var(--idan-blue-dark);
}

/* ── "Ingen" button — grey when active, italic always ── */
.ds-btn--none {
  font-style: italic;
}

.ds-btn--none.is-active,
.ds-btn--none.is-active:hover {
  background:   #9ca3af !important;   /* grey — overrides blue .ds-btn.is-active */
  color:        #fff !important;
  border-color: #9ca3af !important;
}

/* ── Column pills ── */
.col-pill {
  border-color: var(--idan-border);
  background:   var(--idan-surface);
  color:        var(--idan-text);
}

.col-pill:hover {
  background: var(--idan-blue-light);
  color:      var(--idan-blue-dark);
}

.col-pill.is-active {
  background:   var(--idan-blue);
  color:        #fff;
  border-color: var(--idan-blue);
}

.col-pill.is-active:hover {
  background:   var(--idan-blue-dark);
  border-color: var(--idan-blue-dark);
}

/* Shared for both */
.col-pill,
.ds-btn {
  font-size:     11px;
  padding:       3px 10px;
  border-radius: 9999px;
  border:        1px solid #d1d5db;
  background:    #fff;
  color:         #374151;
  cursor:        pointer;
  transition:    all 0.15s;
}

.col-pill.is-active,
.ds-btn.is-active {
  background: #3b82f6;
  color:      #fff;
}

/* ── Feature tags ── */
.feature-tag {
  border-color: var(--idan-border);
  background:   var(--idan-surface);
  color:        var(--idan-text);
}

.feature-tag:hover {
  background: var(--idan-blue-light);
  color:      var(--idan-blue-dark);
}

/* .feature-tag.is-active colours are set dynamically via JS (applyFeatureTagActiveStyle)
   using the facility's own colour from DATAMODEL_FEATURES. The rules below act as
   a fallback only and are overridden by the inline styles applied by JS. */
.feature-tag.is-active          { background: var(--idan-blue); color: #fff; border-color: var(--idan-blue); }
.feature-tag.is-active:hover    { filter: brightness(0.88); }
/* keep the green/red select-all / deselect-all tags unchanged */
.feature-tag--all,
.feature-tag--all:hover,
.feature-tag--none,
.feature-tag--none:hover {}

/* Add a small spacer below the last row of feature tags */
#featuresTags {
  padding-bottom: 10px;
}

/* ── Toggle (Områdevælger) ── */
#infoToggle:checked ~ label .toggle-track,
#infoToggle:checked ~ .toggle-track {
  background-color: var(--idan-blue);
}

/* ── History toggle (Medtag historik in download panel) ── */
#historyToggle:checked ~ label .toggle-track {
  background-color: var(--idan-blue);
}
#historyToggle:checked ~ label .toggle-thumb {
  transform: translateX(1rem);
}

/* ── Selector mode buttons (single / lasso) ── */
.selector-mode-btn {
  background: var(--idan-bg);
  color:      var(--idan-muted);
  border:     1px solid var(--idan-border);
}

.selector-mode-btn:hover {
  background: var(--idan-surface);
  color:      var(--idan-text);
}

.selector-mode-btn.is-active {
  background:   var(--idan-blue);
  color:        #fff;
  border-color: var(--idan-blue);
}

/* ── Municipality toggle control ("Kommune navne") ── */
.mun-toggle-control {
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  background: rgba(255,255,255,0.97);
  border: 1px solid var(--idan-border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
  cursor: pointer;
  user-select: none;
}

/* ── Permanent municipality name labels ── */
.mun-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 10px;
  font-weight: 600;
  color: #333;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
  pointer-events: none;
}

/* ── Count text below the graph plot ── */
.pieovl-count {
  text-align: right;
  font-size: 11px;
  color: var(--idan-muted);
  padding: 4px 8px 0 0;
  flex-shrink: 0;
}
.pieovl-count:empty {
  display: none;
}

.mun-toggle-wrapper {
  display: flex;
  align-items: center;
}

.mun-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.mun-toggle-label span {
  color: var(--idan-text);
  font-weight: 500;
}

/* Custom toggle track & thumb — matches Områdevælger style */
#munToggleCheckbox:checked ~ .mun-toggle-label .mun-toggle-track,
#munToggleCheckbox:checked + .mun-toggle-label .mun-toggle-track {
  background-color: var(--idan-blue);
}

#munToggleCheckbox:checked ~ .mun-toggle-label .mun-toggle-thumb,
#munToggleCheckbox:checked + .mun-toggle-label .mun-toggle-thumb {
  transform: translateX(1rem);
}


/* ── Map legend ── */
.map-legend-control {
  font-family:  'Plus Jakarta Sans', Arial, sans-serif;
  border-color: var(--idan-border);
  background:   rgba(255,255,255,0.97);
}

.map-legend-title {
  color: var(--idan-muted);
}

.map-legend-range {
  color: var(--idan-text);
}

/* ── Stats overlay panel ── */
.pieovl-tab {
  background:   rgba(255, 255, 255, 0.9);
  border-color: var(--idan-border);
}

.pieovl-tab-icon {
  color: var(--idan-blue);
}

.pieovl-panel {
  background:   rgba(255, 255, 255, 0.85);
  border-color: var(--idan-border);
}

.pieovl-header {
  background:   rgba(255, 255, 255, 0.5);
  border-bottom-color: var(--idan-border);
  border-radius: 0 12px 0 0;
}

.pieovl-title {
  color: var(--idan-muted);
}

.pieovl-close {
  color: var(--idan-muted);
}

.pieovl-close:hover {
  color: var(--idan-text);
}

.pieovl-note {
  color: var(--idan-muted);
}

/* ═══════════════════════════════════════════════════════════════
   OVERLAY UI
   ═══════════════════════════════════════════════════════════════ */

.map-overlay-ui {
  display:        flex;
  flex-direction: column;
  align-items:    flex-end;
  gap:            0;           /* no gap — shared border collapses */
}

/* Each pieovl wrapper is the stacking context for its button + panel */
.pieovl {
  position: relative;
  display:  flex;
  flex-direction: column;
  align-items: flex-end;
}

/* ── Tab (toggle button) ── always on top */
.pieovl-tab {
  position: relative;
  z-index:  2;          /* sits above the sliding panel */
  cursor:   pointer;
}

/* ── Grouped button aesthetics ──
   reportButton →  top button (rounded top, squared bottom)
   tableButton  →  middle button (both top & bottom squared)
   graphButton  →  bottom button (squared top, rounded bottom)
*/
#reportOvl .pieovl-tab {
  border-bottom-right-radius: 0;
  border-bottom-left-radius:  0;
}

#tableOvl .pieovl-tab {
  border-top-right-radius: 0;
  border-top-left-radius:  0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius:  0;
  margin-top: -1px;       /* collapse shared border → no double line */
}

#graphOvl .pieovl-tab {
  border-top-right-radius: 0;
  border-top-left-radius:  0;
  margin-top: -1px;       /* collapse shared border → no double line */
}

/* ── Panel: hidden state — translated fully downward, out of view ── */
.pieovl-panel {
  position:       absolute;   /* positioned relative to .map-overlay-ui */
  bottom:         0;       /* flush against the bottom of the page */
  left:           0;
  z-index:        1;       /* sits behind the button */

  transform:      translateY(100%);
  opacity:        0;
  visibility:     hidden;
  pointer-events: none;

  transition:     transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

/* ── Panel: open state — slides up into view ── */
.pieovl-panel[aria-hidden="false"] {
  transform:      translateY(0);
  opacity:        1;
  visibility:     visible;
  pointer-events: auto;
}


/* ── Close button — sized for the left-arrow SVG ── */
.pieovl-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
}

.pieovl-close {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           34px;
  height:          34px;
  padding:         0;
  border:          none;
  background:      transparent;
  cursor:          pointer;
  flex-shrink:     0;
}

.pieovl-close svg {
  width:   18px;
  height:  18px;
  display: block;
}

/* ── Misc Tailwind colour overrides ── */
.text-indigo-600 {
  color: var(--idan-blue) !important;
}

.bg-indigo-50 {
  background-color: var(--idan-blue-light) !important;
}

.border-gray-200 {
  border-color: var(--idan-border) !important;
}

.border-gray-300 {
  border-color: var(--idan-border) !important;
}

/* ── Open‑state styling for overlay tabs ── */
.pieovl.is-open .pieovl-tab {
  background: var(--idan-blue);   /* blue background when the panel is open */
}

/* Ensure the icon inside the open tab turns white */
.pieovl.is-open .pieovl-tab .pieovl-tab-icon {
  color: #fff;                    /* white icon */
}

/* ════════════════════════════════════════════════════════════════
   TABLE PANEL STYLES
   ════════════════════════════════════════════════════════════════ */

/* Multiselect dropdowns in table panel */
#tableControls select {
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--idan-border);
  background: var(--idan-bg);
  color: var(--idan-text);
  border-radius: 6px;
}

#tableControls select:focus {
  outline: none;
  border-color: var(--idan-blue);
  box-shadow: 0 0 0 2px var(--idan-blue-light);
}

#tableControls select option {
  padding: 3px 6px;
}

/* ── Selected tags (municipality, datasource, dataset) ── */
.selected-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 24px;
  margin-top: 3px; /* mt-1.5 equivalent */
}


.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 8px;
  border-radius: 9999px;
  background: var(--idan-muted);
  color: #fff;
  border: 1px solid var(--idan-muted);
  transition: all 0.15s ease;
}

.selected-tag:hover {
  background: var(--idan-muted);
  opacity: 0.85;
}

.selected-tag button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}

.selected-tag button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Municipality tags (blue - keep existing for distinction) */
#selectedMunicipalityTags .selected-tag {
  background: var(--idan-blue-light);
  color: var(--idan-blue-dark);
  border-color: var(--idan-blue);
}

#selectedMunicipalityTags .selected-tag button {
  color: var(--idan-blue-dark);
}

#selectedMunicipalityTags .selected-tag button:hover {
  background: var(--idan-blue);
  color: #fff;
}

/* ── Section labels with spacer ── */
.table-section-label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: var(--idan-text);
  margin-bottom: 6px; /* mb-1.5 equivalent */
  margin-top: 16px;   /* mt-4 equivalent */
}

.table-section-label:first-child {
  margin-top: 0;
}

/* ── Panel footer ── */
.table-panel-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  background: var(--idan-bg);
  border-top: 1px solid var(--idan-border);
  border-radius: 0 0 12px 12px;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

/* ── Download button ── */
#downloadTableBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--idan-blue);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-width: 180px;
}

#downloadTableBtn:hover:not(:disabled) {
  background: var(--idan-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(36, 125, 217, 0.3);
}

#downloadTableBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Panel content area (scrollable) ── */
.pieovl-panel {
  display: flex;
  flex-direction: column;
  max-height: 85vh; /* slightly larger panel */
}

.pieovl-header {
  flex-shrink: 0;
}

.pieovl-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#tableMount {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 8px; /* spacer above footer */
}

#tableWindow {
  max-height: 85vh;
}

#tableControls {
  padding: 0px;
  flex: 1;
  overflow-y: auto;
}

.pieovl-panel {
  width: 420px;
  min-width: 0;
  min-height: 0;
}

/* Scrollbar styling for multiselect */
#tableMunicipalitySelect::-webkit-scrollbar,
#tableDatasourceSelect::-webkit-scrollbar,
#tableDatasetSelect::-webkit-scrollbar {
  width: 6px;
}

#tableMunicipalitySelect::-webkit-scrollbar-track,
#tableDatasourceSelect::-webkit-scrollbar-track,
#tableDatasetSelect::-webkit-scrollbar-track {
  background: var(--idan-surface);
  border-radius: 3px;
}

#tableMunicipalitySelect::-webkit-scrollbar-thumb,
#tableDatasourceSelect::-webkit-scrollbar-thumb,
#tableDatasetSelect::-webkit-scrollbar-thumb {
  background: var(--idan-blue);
  border-radius: 3px;
}

#tableMunicipalitySelect::-webkit-scrollbar-thumb:hover,
#tableDatasourceSelect::-webkit-scrollbar-thumb:hover,
#tableDatasetSelect::-webkit-scrollbar-thumb:hover {
  background: var(--idan-blue-dark);
}

/* Table container */
#tableContainer {
  border: 1px solid var(--idan-border);
  border-radius: 8px;
  background: var(--idan-bg);
  max-height: 450px;
  overflow: auto;
}

/* Table styling */
#tableContainer table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}

#tableContainer th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--idan-surface);
  font-weight: 600;
  color: var(--idan-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--idan-border);
}

#tableContainer td {
  border-bottom: 1px solid var(--idan-border);
  vertical-align: middle;
}

#tableContainer tbody tr:hover {
  background: var(--idan-surface);
}

#tableContainer tbody tr:last-child td {
  border-bottom: none;
}

/* Table header: first column (Kommune) */
#tableContainer th:first-child,
#tableContainer td:first-child {
  min-width: 160px;
  font-weight: 500;
}

/* Numeric columns right-aligned */
#tableContainer th:not(:first-child),
#tableContainer td:not(:first-child) {
  text-align: right;
}

/* Loading / empty states */
#tableContainer .text-center {
  padding: 2rem 1rem;
  color: var(--idan-muted);
}

#tableContainer .text-red-600 {
  color: #dc2626;
  padding: 1rem;
}

/* Buttons in table panel */
#tableControls button {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.15s;
}

#fetchTableBtn {
  background: var(--idan-blue);
  color: #fff;
  border: none;
}

#fetchTableBtn:hover:not(:disabled) {
  background: var(--idan-blue-dark);
}

#fetchTableBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#downloadTableBtn {
  background: var(--idan-blue);
  color: #fff;
  border: none;
}

#downloadTableBtn:hover:not(:disabled) {
  background: var(--idan-blue-dark);
}

#downloadTableBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#downloadGraphPngBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--idan-blue);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-width: 180px;
}

#downloadGraphPngBtn:hover:not(:disabled) {
  background: var(--idan-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(36, 125, 217, 0.3);
}

#downloadGraphPngBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
/* ════════════════════════════════════════════════════════════════
   DESCRIPTION INFO ICON + MODAL
   ════════════════════════════════════════════════════════════════ */

/* ── Info icon wrapper ── */
.info-icon-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

/* ── Info icon button ── */
.info-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: var(--idan-blue);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.info-icon-btn:hover {
  background: var(--idan-blue-dark);
  transform: scale(1.1);
}

.info-icon-btn:focus-visible {
  outline: 2px solid var(--idan-blue);
  outline-offset: 2px;
}

.info-icon-wrapper.hidden {
  display: none;
}

/* ── Description modal overlay ── */
.desc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.desc-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Description modal ── */
.desc-modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  width: 90%;
  max-width: 440px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  transform: translateY(8px);
  transition: transform 0.2s;
}

.desc-modal-overlay.is-open .desc-modal {
  transform: translateY(0);
}

/* ── Modal header ── */
.desc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px 16px;
  border-bottom: 1px solid var(--idan-border);
  flex-shrink: 0;
}

.desc-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--idan-text);
  line-height: 1.3;
}

.desc-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--idan-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.desc-modal-close:hover {
  background: var(--idan-surface);
  color: var(--idan-text);
}

/* ── Modal body ── */
.desc-modal-body {
  padding: 14px 16px 18px 16px;
  overflow-y: auto;
  flex: 1;
  font-size: 13px;
  line-height: 1.6;
  color: var(--idan-text);
}

.desc-modal-body p {
  margin: 0 0 8px 0;
}

.desc-modal-body p:last-child {
  margin-bottom: 0;
}

/* ════════════════════════════════════════════════════════════════
   REPORT PANEL STYLES
   ════════════════════════════════════════════════════════════════ */

#reportWindow {
  max-height: 85vh;
}

#reportMount {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 8px;
}

#reportControls {
  padding: 0px;
  flex: 1;
  overflow-y: auto;
}

/* Report municipality tags (read-only, no remove button) */
#reportMunicipalityTags .selected-tag {
  background: var(--idan-blue-light);
  color: var(--idan-blue-dark);
  border-color: var(--idan-blue);
  font-size: 10px;
  padding: 3px 10px;
}

/* Red warning tags when 2+ municipalities selected */
#reportMunicipalityTags .selected-tag.is-warning {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* Warning text */
.report-warning {
  margin-top: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
}

.report-warning.hidden {
  display: none;
}

/* Blue info warning (no municipality selected) */
.report-warning.is-info {
  color: var(--idan-blue-dark);
  background: var(--idan-blue-light);
  border-color: var(--idan-blue);
}

/* Report content area */
.report-content {
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--idan-text);
}

.report-content.hidden {
  display: none;
}

/* Report title */
.report-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--idan-text);
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--idan-blue);
}

/* Datasource heading */
.report-datasource-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--idan-blue-dark);
  margin: 20px 0 4px 0;
}

/* Datasource description */
.report-datasource-desc {
  font-size: 11px;
  color: var(--idan-muted);
  margin: 0 0 12px 0;
}
.report-datasource-desc > :first-child {
  margin-top: 0;
}
.report-datasource-desc > :last-child {
  margin-bottom: 0;
}

/* Dataset name */
.report-dataset-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--idan-text);
  margin: 12px 0 2px 0;
}

/* Dataset description */
.report-dataset-desc {
  font-size: 11px;
  color: var(--idan-muted);
  margin: 0 0 8px 0;
}
.report-dataset-desc > :first-child {
  margin-top: 0;
}
.report-dataset-desc > :last-child {
  margin-bottom: 0;
}

/* Col-group sub-heading (Befolkningsgruppe in report) */
.report-colgroup-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--idan-muted);
  margin: 8px 0 2px 0;
}

/* Report table */
.report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 16px 0;
  font-size: 11px;
}

.report-table th {
  background: var(--idan-surface);
  font-weight: 600;
  color: var(--idan-muted);
  text-align: right;
  padding: 6px 8px;
  border: 1px solid var(--idan-border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
}

.report-table th:first-child {
  text-align: left;
  min-width: 120px;
}

.report-table td {
  padding: 5px 8px;
  border: 1px solid var(--idan-border);
  vertical-align: middle;
}

.report-table .report-row-label {
  font-weight: 500;
  color: var(--idan-text);
  text-align: left;
}

.report-table .report-row-value {
  text-align: right;
  color: var(--idan-text);
}

.report-table tbody tr:nth-child(even) {
  background: var(--idan-surface);
}

/* Prevent page breaks inside tables */
.report-table-block {
  page-break-inside: avoid;
  break-inside: avoid;
}

/* Report download button */
#downloadReportBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--idan-blue);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-width: 180px;
}

#downloadReportBtn:hover:not(:disabled) {
  background: var(--idan-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(36, 125, 217, 0.3);
}

#downloadReportBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
