/* =========================================================
   Guardian UI — B Style Compatible
   Works with existing markup
   ========================================================= */

/* ---------- Global ---------- */

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

/* ---------- Layout ---------- */

.section,
.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.section-tight {
  padding: 16px;
}

/* ---------- Headings ---------- */

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.section-hint,

.helper-text {
  font-size: 0.75rem;
  color: var(--muted);
    margin: 2px 0 12px 0;
  line-height: 1.3;
}

/* ---------- Inputs ---------- */

label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.15);
}

/* ---------- Buttons ---------- */

button,
.btn,
.primary-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

button.secondary,
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

button:hover,
.primary-btn:hover {
  background: var(--primary-hover);
}

button.secondary:hover {
  background: rgba(201,168,76,0.08);
}

/* ---------- Tables ---------- */

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tbody tr:hover {
  background: rgba(201,168,76,0.05);
}

/* ---------- Numbers ---------- */

td.number,
.text-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Income / Result Emphasis ---------- */

.total,
.strong {
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

/* ---------- Inline chips (events later) ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(201,168,76,0.12);
  color: var(--primary);
  font-weight: 500;
}

/* ---------- Utility ---------- */

.hidden {
  display: none !important;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }


/* Feature flag – scenario sidebar currently disabled */
.feature-scenarios {
  display: none;
}

.advanced-section {
  margin-top: 0.75rem;
    border-top: 1px dashed var(--border-subtle);
  padding-top: 0.75rem;
}

.advanced-toggle {
  background: transparent;
  font-size: 0.8rem;
  color: var(--muted);
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.advanced-toggle:hover {
  background: transparent;
  color: var(--text);
  text-decoration: underline;
}

.advanced-content {
  display: none;
}

.advanced-inner {
  margin-top: 0.5rem;
  padding-left: .075rem;
  border-left: 2px solid var(--border-subtle);
}

.advanced-inner .field {
  max-width: 420px;
}

.advanced-toggle .chevron {
  font-size: 0.8em;
  transition: transform 0.2s ease;
}

.advanced-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}


/* =========================
   Income Advanced – Wage growth UI
   ========================= */

/* Fladere container: mindre "boks i boks" */
#income-advanced .advanced-inner {
  border-left: none;
  padding-left: 0;
}

/* En rolig headerlinje */
#income-advanced .helper-text {
  margin: 0 0 12px 0;
  font-weight: 600;
  color: var(--text);
}

/* =========================
   Wage growth – Premium cards
   ========================= */

.wg-panel {
  margin-top: 12px;
}

.wg-header {
  margin-bottom: 10px;
}

.wg-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.wg-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Selve valgkortene */
.wg-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

/* Hover – meget subtil */
.wg-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

/* Skjul radio visuelt – men behold semantik */
.wg-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Valgt kort */
.wg-card:has(input[type="radio"]:checked) {
  border-color: rgba(0,0,0,0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Kort-indhold */
.wg-card-body strong {
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
}

.wg-desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Badge (Standard) */
.wg-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(0,0,0,0.02);
  margin-left: 8px;
}

/* Reveal area (inputfelter) */
.wg-reveal {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.wg-card:has(input[type="radio"]:checked) .wg-reveal {
  display: block;
}

/* Inputs */
.wg-reveal input {
  max-width: 220px;
}

.wg-help {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}
.wg-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subtle-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 16px 0;
}

.wg-card--toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wg-card--toggle {
  cursor: pointer;
}

.wg-card--toggle input:checked + .wg-card-body {
  border-color: var(--accent, #C9A84C);
  background: rgba(201,168,76, 0.06);
}

.wg-badge-active {
  background: #e6f4f1;
  color: #C9A84C;
  border: 1px solid #99d5cc;
}

.hidden {
  display: none;
}
.wg-card-toggle input[type="checkbox"],
.wg-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.field:has(+ .helper-text) {
  margin-bottom: 4px;
}

.helper-text {
  margin-top: 0;
}

/* =========================================
   Layout – single source of truth
   ========================================= */

.wealth-layout {
  display: grid;
  grid-template-columns: 1fr; /* default: én kolonne */
  gap: 20px;
  align-items: start;
}

@media (min-width: 1200px) {
  .guardian-container {
    max-width: 1440px;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }

  .wealth-layout {
    grid-template-columns: minmax(0, 1.35fr) 560px; /* højre stabil */
    gap: 24px;
  }

  .wealth-main,
  #tab-report,
  #tab-report .report-card {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .wealth-summary { position: static; }
}

/* Sticky panel */
.wealth-summary {
  position: sticky;
  top: 24px;
  }

/* Collapsed state */
.wealth-summary[data-state="collapsed"] {
  width: 48px;
}

.wealth-summary[data-state="collapsed"] .wealth-summary-header,
.wealth-summary[data-state="collapsed"] #summary-box-content,
.wealth-summary[data-state="collapsed"] #run-full-sim-sticky {
  display: none;
}


/* Fallback: also hide via second rule */
.feature-scenarios {
  display: none;
}

@media (max-width: 1100px) {
  .wealth-layout { grid-template-columns: 1fr; }
  .wealth-summary { position: static; }
}

/* Mobil opsætning */
@media (max-width: 1100px) {
  .wealth-summary {
    position: static;
  }

  .mobile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
  }
}


.wealth-summary .std-table td,
.wealth-summary .std-table th {
  padding: 6px 8px;
}

@media (min-width: 1200px) {
  #tab-report.tab-panel--wide {
    max-width: none;
  }
}


.wealth-summary-card {
  padding: 16px 18px;
position: relative;
  border-left: 4px solid var(--primary);
  background: linear-gradient(
    180deg,
    rgba(201,168,76,0.04),
    transparent 120px
  );
}

.wealth-summary-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.wealth-summary-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.col-pension {
  background: rgba(201,168,76,0.06);
  font-weight: 600;
}

.wealth-summary tbody tr:hover {
  background: rgba(201,168,76,0.03);
}

.summary-meta {
  font-size: 0.75rem;
  margin-bottom: 10px;
}

/* Tabs til navigation */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.wealth-tabs {
  display: flex;
  gap: 10px;
  margin: 12px 0 18px;
}

/* Basis-tab */
.wealth-tab {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s ease;
}

/* Hover – kun hvis aktiv */
.wealth-tab:not(.disabled):hover {
  background: rgba(201,168,76,0.08);
}

/* Aktiv tab */
.wealth-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* PDF export-knap – skiller sig ud fra tabs med fil-ikon-stil */
.pdf-export-btn {
  margin-left: auto;
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pdf-export-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.pdf-export-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Disabled / kommer senere */
.wealth-tab.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: repeating-linear-gradient(
    45deg,
    #f7f7f7,
    #f7f7f7 6px,
    var(--surface-2) 6px,
    var(--surface-2) 12px
  );
}

.tab-badge {
  margin-left: 6px;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #555;
}

/* Case Layout */

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

.case-card{
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
  color: var(--text);
}

.case-card:hover {
  border-color: rgba(201,168,76,0.35);
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.case-title{ font-weight: 650; }
.case-sub{ font-size:.8rem; margin-top:4px; color: var(--muted); }

.case-tags{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.case-tags .tag{
  font-size:.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.18);
  color: rgba(201,168,76,1);
}

.case-card::before {
  content: "";
  display: block;
  height: 4px;
  width: 28px;
  border-radius: 999px;
  background: rgba(201,168,76,0.4);
  margin-bottom: 10px;
}

.case-active-card{
  border-left: 4px solid var(--primary);
  background: linear-gradient(180deg, rgba(201,168,76,0.05), transparent 120px);
}

.case-active-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.case-active-title{ font-weight: 700; font-size: 1rem; }
.case-active-sub{ font-size: .8rem; margin-top: 2px; }

.case-story{
  font-size: .9rem;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-line;
}

.hidden{ display:none !important; }

.case-gallery-head {
  margin-bottom: 20px;
}

/* Info Icon */

.info-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.info-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  cursor: help;
  background: var(--surface);
}

.info-icon:hover .info-tooltip,
.info-icon:focus .info-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.info-tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 240px;
  padding: 10px;
  border-radius: 10px;
  background: #111;
  color: white;
  font-size: 0.75rem;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

/* Rapport Card */

.report-card .report-head {
  display: flex;
  flex-direction: column;   /* 👈 nøglen */
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 10px;
}


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

.report-block{
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
}

.report-block h3{
  margin: 0 0 6px 0;
  font-size: 1rem;
}

/* Fortolkningstekst under sensitivitetstabeloverskrifter */
.sens-interpret {
  margin: 0 0 10px 0;
  font-size: 0.82rem;
  color: var(--text-muted, #666);
  line-height: 1.5;
}

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

.report-kpi{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(201,168,76,0.03);
}

.report-kpi .kpi-label{
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.report-kpi .kpi-value{
  font-weight: 700;
}

tr.row-net-savings {
  font-weight: 600;
  border-top: 2px solid #ccc;
}

tr.row-net-savings td {
  background-color: rgba(201,168,76,0.08);
}

tr.row-subtotal {
  font-weight: 500;
}

tr.row-subtotal td {
  padding-top: 6px;
  border-top: 1px solid var(--border);
}


.summary-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px 0;
  }


tr.section-row td {
  padding: 10px 8px;
  font-weight: 600;
  background: var(--surface-2);
  border-top: 2px solid var(--border);
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(201,168,76,0.12);
  color: #C9A84C;
  font-size: 11px;
  font-weight: 600;
  cursor: help;
}


.global-tooltip {
  position: fixed;
  transform: translate(-50%, -100%);
  background: #111827;
  color: white;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  max-width: 280px;
  z-index: 10000;
  display: none;
  pointer-events: none;
}

#networthMountain {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  background: var(--surface-2);
}

.guardian-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.guardian-switch-label {
  font-size: 0.8rem;
  color: #333;
  white-space: nowrap;
}

.guardian-switch-input {
  display: none;
}

/* 40% mindre track */
.guardian-switch-track {
  width: 28px;     /* før 44px */
  height: 14px;    /* før 24px */
  background: #d1d5db;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.25s ease;
  display: inline-block;
}

/* 40% mindre thumb */
.guardian-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;     /* før 18px */
  height: 10px;    /* før 18px */
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform 0.25s ease;
}

/* Checked state */
.guardian-switch-input:checked + .guardian-switch-track {
  background: #C9A84C;
}

.guardian-switch-input:checked + .guardian-switch-track .guardian-switch-thumb {
  transform: translateX(14px); /* justeret til den nye bredde */
}



.graph-explainer-toggle {
  background: none;
  border: none;
  color: #C9A84C;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  margin: 4px 0;
  padding: 0;
}

.graph-explainer {
  font-size: 0.85rem;
  color: #374151;
  background: #f9fafb;
  border-left: 4px solid #C9A84C;
  padding: 12px 16px;
  margin-top: 8px;
  border-radius: 6px;
  line-height: 1.6;
}

.graph-explainer strong {
  color: #C9A84C;
  font-weight: 600;
}

#networth-mode-label {
  font-size: 0.8rem;         /* mindre tekst */
  color: #374151;            /* neutral grå */
  font-weight: 500;
  margin-left: 4px;          /* lidt luft fra switch */
  line-height: 1;            /* matcher switch-højde */
  display: inline-block;
  vertical-align: middle;    /* sikrer alignment */
}


.info-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(201,168,76,0.12);
  color: #C9A84C;
  font-size: 11px;
  cursor: help;
}

.info-tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 260px;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
}

.info-icon:hover .info-tooltip,
.info-icon:focus .info-tooltip {
  opacity: 1;
}


.report-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.report-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 680px;   /* forhindrer “flydende” linje */
  line-height: 1.45;
}


@media (min-width: 1200px) {

  /* Mindre aggressiv sidebredde */
  .guardian-container{
    max-width: 1320px;   /* prøv 1280–1440 */
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Hold højre kolonne stabil og giv venstre “nok”, men ikke ekstremt */
  .wealth-layout{
    grid-template-columns: minmax(0, 1.35fr) 560px; /* prøv 520–620px */
    gap: 20px;
    align-items: start;
  }

  /* Venstre kolonne må gerne være flydende */
  .wealth-main{
    max-width: none;
    width: 100%;
  }

  /* Rapportkort må fylde venstre kolonne */
  #tab-report .report-card{
    max-width: none;
  }
}

/* =========================================================
   Width fix: allow app to use more of the screen
   ========================================================= */

/* Overstyr evt. max-width fra style.css/style_B.css */
.page-wrapper{
  max-width: 1440px;   /* prøv 1360 / 1440 / 1600 */
  width: 100%;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Hvis du vil have endnu mere på ultrawide */
@media (min-width: 1600px){
  .page-wrapper{ max-width: 1600px; }
}

/* Sørg for at grid’en faktisk fylder wrapperen */
.wealth-layout{
  width: 100%;
}

/* Balancér de to kolonner (justér efter smag) */
@media (min-width: 1200px){
  .wealth-layout{
    grid-template-columns: minmax(0, 1.6fr) 740px; /* fx 560–700px */
    gap: 20px;
  }
}

/* =========================================================
   2.2 Formue-bro (table-bridge)
   Desktop: ingen scrollbar, ingen klip, max 740px
   Mobile: scroll
   ========================================================= */

/* 1) Sørg for at 2.2 ikke arver global klipning */
.guardian-report-table.table-bridge{
  overflow-x: visible; /* override tableformat.css overflow-x:hidden */
}

/* 2) Wrapper: 740px max på desktop */
.guardian-report-table.table-bridge .guardian-table-scroll{
  width: min(740px, 100%);
  max-width: 740px;
  overflow-x: visible;   /* desktop: ingen scroll */
  overflow-y: hidden;
  border-radius: 12px;
}

/* 3) Overstyr global min-width:820px (MEGET VIGTIG) */
.guardian-report-table.table-bridge .guardian-table-scroll .guardian-std-table{
  min-width: 0 !important;   /* override tableformat.css min-width:820px */
}

/* 4) Table layout */
.guardian-report-table.table-bridge table.guardian-std-table{
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
  letter-spacing: -0.1px;
  font-variant-numeric: tabular-nums;
}

/* 5) Cell basics */
.guardian-report-table.table-bridge table.guardian-std-table th,
.guardian-report-table.table-bridge table.guardian-std-table td{
  box-sizing: border-box;
  padding: 4px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--border);
}

/* 6) Icon / label */
.guardian-report-table.table-bridge th.guardian-cell-icon,
.guardian-report-table.table-bridge td.guardian-cell-icon{
  width: 20px;
  max-width: 20px;
  white-space: nowrap;
  text-align: center;
  padding: 0 2px;
}

.guardian-report-table.table-bridge th.guardian-cell-label,
.guardian-report-table.table-bridge td.guardian-cell-label{
  width: 220px;        /* 20 + 220 = 240 */
  max-width: 220px;
  white-space: nowrap;
}

/* 7) Number columns: fordeles på resten */
.guardian-report-table.table-bridge th.guardian-cell-number,
.guardian-report-table.table-bridge td.guardian-cell-number{
  width: calc((100% - 240px) / var(--bridge-cols, 5));
  white-space: nowrap;
  text-align: right;
  padding-left: 4px;
  padding-right: 4px;
}

/* ---------------------------------------------------------
   Smalle vinduer: scroll
   --------------------------------------------------------- */
@media (max-width: 1100px){
  .guardian-report-table.table-bridge .guardian-table-scroll{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    /* skjul scrollbar hvor muligt */
    scrollbar-width: none;
  }
  .guardian-report-table.table-bridge .guardian-table-scroll::-webkit-scrollbar{
    height: 0;
  }

  .guardian-report-table.table-bridge table.guardian-std-table{
    width: max-content;
    table-layout: auto;
    font-size: 13px;
    letter-spacing: 0;
  }

  .guardian-report-table.table-bridge table.guardian-std-table thead th{
    white-space: nowrap;
  }

  .guardian-report-table.table-bridge .guardian-cell-label{
    width: auto;
    max-width: none;
  }

  .guardian-report-table.table-bridge .guardian-cell-number,
  .guardian-report-table.table-bridge th.guardian-cell-number{
    width: auto;
    min-width: 72px;
    max-width: none;
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* ---------------------------------------------------------
   Info-collapsible component
   --------------------------------------------------------- */ 
.guardian-collapsible{
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--surface-2);
}

.guardian-collapsible__summary{
  cursor: pointer;
  list-style: none;
}

.guardian-collapsible__summary::-webkit-details-marker{ display:none; }

.guardian-collapsible__title{
  font-weight: 650;
  font-size: 0.95rem;
}

.guardian-collapsible__body{
  margin-top: 8px;
  font-size: 0.9rem;
}

.guardian-collapsible-list{
  margin: 0;
  padding-left: 18px;
}


.guardian-input {
  height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
}

.discreet-link {
  color: #888;
  font-size: 0.75rem;
  color: var(--muted);
    margin: 2px 0 12px 0;
  line-height: 1.3;
}

.discreet-link:hover {
  color: #444;
}

.ga-grid-2 {
  margin-bottom: 24px;
}

/* =========================================================
   Udlejningsejendomme — modul
   ========================================================= */

/* Individuel ejendoms-kort */
.rental-property-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e0e4ea);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

/* Header-bar i kort */
.rental-prop-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.rental-prop-title {
  font-weight: 650;
  font-size: 0.95rem;
  flex: 1;
  min-width: 120px;
}

/* Sektions-divider inde i kortet */
.rental-section-divider {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border, #e0e4ea);
}

/* 2-kolonne form-layout */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-bottom: 8px;
}

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

/* Label + input i form-rows */
.form-row-2col label,
.rental-property-card > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--text, #1a2233);
}

.rental-property-card input[type="text"],
.rental-property-card input[type="number"],
.rental-property-card select {
  height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--border, #d9dde3);
  border-radius: 8px;
  background: var(--bg, #f7f9fc);
  font-size: 0.88rem;
  color: var(--text, #1a2233);
}

.rental-property-card input:focus,
.rental-property-card select:focus {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 1px;
}

/* Planlagt salg toggle */
.rental-sale-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

.rental-sale-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

/* =========================================================
   Rapport — udlejnings-tabeller
   ========================================================= */

/* Tabellerne bruger .guardian-std-table via renderReport,
   men vi kan tilføje et specifikt highlight-mønster her */
.rental-overview-table th,
.rental-cashflow-table th {
  white-space: nowrap;
}
}
/* =========================================================
   Events Section — Premium redesign
   ========================================================= */

/* Section card wrapper — separates each event type */
.event-section-card {
  border: 1px solid var(--border);
  border-radius: var(--radius, 10px);
  padding: 18px 20px;
  margin-bottom: 14px;
  background: var(--surface-2);
}

/* Section header row: icon + title/sub on left, action button on right */
.evt-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.evt-header-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* Icon box — subtle gold-tinted square */
.evt-icon-box {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(201,168,76,0.10);
  border: 1px solid rgba(201,168,76,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #C9A84C);
}

.evt-header-text {
  flex: 1;
  min-width: 0;
}

/* Uppercase micro-label (category name) */
.evt-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
}

/* Subtitle / description */
.evt-section-sub {
  font-size: 0.78rem;
  color: var(--muted-2);
  line-height: 1.4;
  white-space: normal;
}

/* Action button on the right */
.evt-add-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary, #C9A84C);
  background: rgba(201,168,76,0.07);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  margin-top: 2px;
}
.evt-add-btn:hover {
  background: rgba(201,168,76,0.13);
  border-color: rgba(201,168,76,0.50);
}

/* Multi-button group */
.evt-btn-group {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  margin-top: 2px;
}

/* Empty state text */
.evt-empty {
  font-size: 0.82rem;
  color: var(--muted-2);
  font-style: italic;
  padding: 6px 2px 4px;
}

/* =========================================================
   Indtastning — Compact & consistent redesign
   ========================================================= */

/* Tighter card margin in the input section */
.page-wrapper > .card,
.page-wrapper > section.card {
  margin-bottom: 16px;
}

/* Compact card headings with subtle rule */
.card > h2:first-child,
.card > h2:first-of-type {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* More compact inputs across all input cards */
.card input[type="number"],
.card input[type="text"],
.card select {
  padding: 8px 10px;
  font-size: 0.875rem;
}

/* Tighter field spacing */
.field {
  margin-bottom: 14px;
}

/* 2-column grid default for most card inputs (used with .ga-grid-2) */
.ga-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-bottom: 14px;
}

@media (max-width: 560px) {
  .ga-grid-2 { grid-template-columns: 1fr; }
}

/* Advanced toggle: tighter, more refined */
.advanced-section {
  margin-top: 14px;
  padding-top: 12px;
}

.advanced-toggle {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted-2);
  gap: 5px;
}

.advanced-toggle:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Rental property card: fix white fallback */
.rental-property-card {
  background: var(--surface-2);
}

/* Loan block compact layout */
.rental-property-card input[type="text"],
.rental-property-card input[type="number"],
.rental-property-card select {
  background: var(--surface);
}

/* Case gallery: compact cards */
.case-gallery-card .my-scen-card {
  padding: 10px 12px;
}
