/* verwaltung-indexierung.css — Indexierung / Wertsicherung + VPI-Grafik */

.vw-ix { padding-bottom: 40px; }
.ix-stat-hint { color: var(--ink-3); font-weight: 600; }

/* ── Datenquelle ───────────────────────────────────────────── */
.ix-source { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; margin-bottom: 18px; }
.ix-source-l { display: flex; align-items: center; gap: 13px; min-width: 0; }
.ix-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; position: relative; }
.ix-dot.is-live { background: #0E9F6E; box-shadow: 0 0 0 4px #0E9F6E22; }
.ix-dot.is-cache { background: #D98014; box-shadow: 0 0 0 4px #D9801422; }
.ix-source-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.ix-source-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ix-refresh { height: 40px; flex-shrink: 0; }
.ix-source-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ix-basesel { display: flex; flex-direction: row; align-items: center; gap: 9px; }
.ix-basesel > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); white-space: nowrap; }
.ix-basesel select {
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  height: 40px; min-width: 220px; padding: 0 32px 0 13px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23697080' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none; cursor: pointer; transition: border-color .12s;
}
.ix-basesel select:hover { border-color: var(--accent); }
.ix-basesel select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft, #F78E111A); }

/* ── Chart-Panel ───────────────────────────────────────────── */
.ix-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px 16px; margin-bottom: 20px; }
.ix-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.ix-panel-head h2, .ix-panel-head h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.ix-panel-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.ix-proj { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ix-proj-label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.ix-proj-box { display: flex; align-items: baseline; gap: 3px; background: var(--accent-soft); border-radius: 10px; padding: 7px 12px; }
.ix-proj-input { width: 46px; border: 0; background: transparent; font: inherit; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--accent); text-align: right; outline: none; -moz-appearance: textfield; }
.ix-proj-input::-webkit-outer-spin-button, .ix-proj-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ix-proj-box span { font-size: 14px; font-weight: 800; color: var(--accent); }

.ix-panel-body { margin: 14px 0 6px; }
.ix-chart-ph { height: 210px; background: linear-gradient(180deg, #F4F6F9, #fff); border-radius: 12px; }

/* Plot mit Y-Achse */
.ix-plot { display: flex; gap: 8px; align-items: flex-start; }
.ix-yaxis { position: relative; width: 40px; height: 210px; flex-shrink: 0; }
.ix-yaxis span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); font-weight: 600; white-space: nowrap; line-height: 1; font-variant-numeric: tabular-nums; }
.ix-plot-main { flex: 1; min-width: 0; }
.ix-chart-wrap { position: relative; height: 210px; }
.ix-chart { width: 100%; height: 210px; display: block; }
.ix-today-dot {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); border: 2.5px solid #fff;
  transform: translate(-50%, -50%); pointer-events: none;
  box-shadow: 0 0 0 1px var(--accent-line, rgba(0,0,0,.08));
}
.ix-xaxis { position: relative; height: 18px; margin-top: 4px; }
.ix-xaxis span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--ink-3); font-weight: 600; }

.ix-legend { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line-2); margin-top: 6px; }
.ix-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.ix-lg-real { display: inline-block; width: 16px; height: 3px; border-radius: 2px; background: var(--accent); }
.ix-lg-proj { display: inline-block; width: 16px; height: 0; border-top: 2px dashed var(--accent); opacity: .8; }
.ix-lg-today { display: inline-block; width: 0; height: 14px; border-left: 2px dashed var(--ink-3); }
.ix-presets { display: flex; gap: 8px; margin-left: auto; }
.ix-preset { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .14s ease; }
.ix-preset:hover { border-color: #D5DDE8; background: var(--line-2); }
.ix-preset.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Tabelle ───────────────────────────────────────────────── */
.ix-tablebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.ix-tablebar h2, .ix-tablebar h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ink); }
.ix-table { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 12px; }
.ix-thead, .ix-row { display: grid; grid-template-columns: 1.9fr 1.45fr 1.2fr 1.2fr 1fr 1fr 1.05fr 1.05fr; gap: 14px; align-items: center; padding: 13px 22px; }
.ix-thead { background: #FAFBFC; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-3); }
.ix-row { border-bottom: 1px solid var(--line-2); transition: background .12s ease; }
.ix-row:last-child { border-bottom: 0; }
.ix-row:hover { background: #FBFCFE; }
.ix-row.is-muted { opacity: 0.62; }
.ix-cell { min-width: 0; }
.ix-num { text-align: right; }
.ix-strong { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-strong.num { font-variant-numeric: tabular-nums; }
.ix-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-days { font-weight: 700; }
.ix-days.is-due { color: #DC2626; }
.ix-days.is-soon { color: #C76A0E; }
.ix-days.is-far { color: #0E9F6E; }
.ix-mieter { border: 0; background: none; padding: 0; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ix-mieter:hover { color: var(--accent); }
.ix-new { color: var(--accent); }
.ix-delta { color: #0E9F6E; }

.ix-badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.ix-badge.is-due { background: #FEF2F2; color: #DC2626; }
.ix-badge.is-soon { background: var(--accent-soft); color: #C76A0E; }
.ix-badge.is-wait { background: #EFF4FE; color: #3B74D6; }
.ix-badge.is-ok { background: #ECFDF5; color: #0E9F6E; }
.ix-badge.is-none { background: var(--line-2); color: var(--ink-3); }

@media (max-width: 1080px) {
  .ix-thead { display: none; }
  .ix-row { grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 16px 18px; }
  .ix-cell.ix-c-main { grid-column: 1 / -1; }
  .ix-num { text-align: left; }
  .ix-cell.ix-c-status { grid-column: 1 / -1; }
  /* Gestapelte Zellen behalten ihre Spalten-Labels */
  .ix-row .ix-cell[data-l]::before {
    content: attr(data-l);
    display: block;
    font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--ink-3); margin-bottom: 3px;
  }
}
@media (max-width: 620px) {
  .ix-source { flex-direction: column; align-items: stretch; }
  .ix-source-actions { justify-content: space-between; }
  .ix-basesel { flex: 1; }
  .ix-basesel select { width: 100%; }
  .ix-panel-head { flex-direction: column; }
  .ix-legend { gap: 12px; }
  .ix-presets { margin-left: 0; width: 100%; }
  .ix-row { grid-template-columns: 1fr; }
}

/* ── Zeile klickbar ────────────────────────────────────────── */
.ix-row.is-click { cursor: pointer; }

/* ── Erinnerungen / anstehende Anpassungen ─────────────────── */
.ix-rem { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-top: 20px; overflow: hidden; }
.ix-rem-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.ix-rem-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.ix-rem-count { background: var(--accent-soft); color: #C76A0E; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.ix-rem-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ix-lead { display: flex; align-items: center; gap: 9px; }
.ix-lead-label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.ix-seg { display: inline-flex; background: #F1F3F6; border-radius: 9px; padding: 3px; gap: 2px; }
.ix-seg button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-3); padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.ix-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.09); }

.ix-rem-list { }
.ix-rem-item { display: grid; grid-template-columns: 1.5fr 1.25fr auto; gap: 18px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line-2); }
.ix-rem-item:last-child { border-bottom: 0; }
.ix-rem-item.done { opacity: 0.5; }
.ix-rem-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.ix-rem-obj { font-size: 13px; color: var(--ink-3); margin-top: 1px; }
.ix-rem-fig { min-width: 0; }
.ix-rem-when { font-size: 12px; font-weight: 800; color: var(--ink-3); }
.ix-rem-when.is-due { color: #DC2626; }
.ix-rem-when.is-soon { color: #C76A0E; }
.ix-rem-amt { font-size: 13px; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ix-rem-amt strong { color: var(--ink); }
.ix-rem-delta { color: #0E9F6E; font-weight: 700; }
.ix-rem-actions { display: flex; align-items: center; gap: 8px; }
.ix-iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; color: var(--ink-2); transition: all .12s ease; }
.ix-iconbtn.ix-wide { width: auto; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 700; }
.ix-iconbtn:hover { background: #FBFCFE; border-color: var(--accent); color: var(--accent); }
.ix-iconbtn:disabled { opacity: 0.45; cursor: not-allowed; }
.ix-iconbtn.ix-check.on { background: #ECFDF5; border-color: #0E9F6E; color: #0E9F6E; }
.ix-rem-prep { height: 36px; padding: 0 15px; border: 0; border-radius: 9px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.ix-rem-prep:hover { filter: brightness(1.06); }
.ix-rem-empty { padding: 22px 20px; color: var(--ink-3); font-size: 13px; }

/* ── Aktions-Modal ─────────────────────────────────────────── */
.ix-modal-ov { position: fixed; inset: 0; background: rgba(17,20,24,.5); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 1000; }
.ix-modal { background: #fff; border-radius: 18px; width: min(640px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.ix-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: #fff; z-index: 1; }
.ix-modal-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.ix-modal-sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.ix-modal-body { padding: 18px 24px 6px; }
.ix-calc { width: 100%; border-collapse: collapse; }
.ix-calc td { padding: 9px 0; font-size: 14px; color: var(--ink-2); border-bottom: 1px solid var(--line-2); vertical-align: top; }
.ix-calc td:last-child { text-align: right; font-weight: 700; color: var(--ink); white-space: nowrap; padding-left: 18px; font-variant-numeric: tabular-nums; }
.ix-calc .ix-calc-hl td { color: var(--accent); font-size: 16px; border-bottom: 0; padding-top: 11px; }
.ix-calc .ix-calc-hl:first-of-type td { padding-top: 14px; }
.ix-note { display: flex; gap: 11px; align-items: flex-start; border-radius: 11px; padding: 12px 14px; font-size: 13px; line-height: 1.5; margin-top: 14px; }
.ix-note svg { flex-shrink: 0; margin-top: 1px; }
.ix-note.is-info { background: #EFF4FE; border: 1px solid #CFE0FA; color: #2C5BA6; }
.ix-note.is-urgent, .ix-note:not(.is-info) { background: #FFF7ED; border: 1px solid #FCD9A8; color: #92590F; }
.ix-note strong { font-weight: 800; }
.ix-modal-foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px 22px; border-top: 1px solid var(--line-2); position: sticky; bottom: 0; background: #fff; }
.ix-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 10px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: all .12s ease; }
.ix-btn:hover { border-color: var(--accent); color: var(--accent); }
.ix-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ix-btn.primary:hover { filter: brightness(1.06); color: #fff; }
.ix-btn.ghost { margin-left: auto; border-color: transparent; color: var(--ink-3); }
.ix-btn.ghost:hover { color: var(--ink); border-color: var(--line); }
.ix-btn.ghost.is-done { color: #0E9F6E; }

/* Anpassungs-Historie (Audit-Trail im Modal) */
.ix-hist { margin-top: 16px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.ix-hist-h { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.ix-hist-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: baseline;
  padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px;
}
.ix-hist-row:last-child { border-bottom: 0; }
.ix-hist-date { font-weight: 700; color: var(--ink); }
.ix-hist-amt { color: var(--ink-2); }
.ix-hist-amt strong { color: var(--ink); }
.ix-hist-pct { font-weight: 700; color: #1F8A4D; text-align: right; }
.ix-hist-meta { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); }

@media (max-width: 760px) {
  .ix-rem-head { flex-direction: column; align-items: stretch; }
  .ix-rem-item { grid-template-columns: 1fr; gap: 10px; }
  .ix-rem-actions { flex-wrap: wrap; }
  .ix-modal-foot .ix-btn.ghost { margin-left: 0; }
}
.ix-hist-undo { grid-column: 1 / -1; justify-self: start; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; } /* Funktions-Audit I1 */
.ix-btn[disabled] { opacity: .6; cursor: not-allowed; }
.ix-modal-foot .ix-confirm { flex-basis: 100%; margin: 0 0 4px; }
.ix-hinweise { margin: 4px 0 0; padding-left: 18px; }
/* Funktions-Audit I6 */
.ix-aus { margin-top: 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; }
.ix-aus-head { width: 100%; text-align: left; font: inherit; font-weight: 700; padding: 12px 16px; background: none; border: 0; cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.ix-aus-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line-2); }
.ix-source-warn { margin-top: 6px; font-size: 13px; color: #92400E; max-width: 760px; }
/* Funktions-Audit I16: Status vollständig lesbar (umbrechen statt abschneiden) */
.ix-c-status .ix-badge { white-space: normal; line-height: 1.35; text-align: left; }
/* Funktions-Audit I17 */
.ix-lauf-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0 14px; }
.ix-modal.ix-modal-wide { max-width: 980px; width: calc(100vw - 32px); }
.ix-lauf-top { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.ix-lauf-top select, .ix-lauf-jd { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.ix-lauf-jd { width: 110px; }
table.ix-lauf { width: 100%; }
table.ix-lauf th { text-align: left; font-size: 12px; color: var(--ink-3); padding: 6px 8px; }
table.ix-lauf td { padding: 8px; vertical-align: top; }
.ix-warn { color: #B45309; font-weight: 600; }
@media (max-width: 720px) { table.ix-lauf thead { display: none; } table.ix-lauf tr { display: grid; grid-template-columns: 28px 1fr; gap: 4px 8px; border-bottom: 1px solid var(--line-2); padding: 8px 0; } table.ix-lauf td { padding: 2px 0; } table.ix-lauf td:nth-child(n+3) { grid-column: 2; } }
table.ix-lauf td.num { white-space: nowrap; }
table.ix-lauf td:last-child { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
table.ix-lauf input[type="date"] { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; max-width: 150px; }
