/* Inventorio's own styles (on top of styles.css): the panel's tabs and the Majątek lists on phones. */
#v-admin > #nav { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-start; margin: 4px 0 8px; }
#v-admin > #nav a { display: inline-block; width: auto; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: inherit; font-weight: 600; }
#v-admin > #nav a.on { background: var(--accent, #2f6f5f); border-color: transparent; color: var(--accent-ink, #fff); }
/* four tabs in one row on a phone (375 px: Majątek, Wydatki, Kalendarz, Papiery with their badges) */
@media (max-width: 420px) { #v-admin > #nav { gap: 4px; } #v-admin > #nav a { padding: 6px 8px; font-size: 13px; } }
.tiles .tile .big { overflow-wrap: anywhere; }
/* the estimate from RCN inside the asset form */
#rcn-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; min-width: 0; }
#rcn-box legend { font-weight: 600; padding: 0 4px; }
#rcn-box details summary { cursor: pointer; }
#rcn-box .ledger li { display: flex; justify-content: space-between; gap: 8px; }
#rcn-box label.pick { display: flex; flex-direction: row; align-items: flex-start; color: var(--ink); font-size: 14px; gap: 8px; margin: 0; font-weight: 400; cursor: pointer; }
#rcn-box label.pick input { margin-top: 3px; flex: none; width: auto; }
#rcn-box li:has(input[name="pick"]:not(:checked)) { opacity: .5; } /* a sale left out of the estimate */
#rcn-box [data-rcn-list] .ledger { max-height: 360px; overflow-y: auto; }
@media (max-width: 640px) {
  /* a long name or note takes the whole line; the amount and the buttons go below it */
  #start-main .ledger li, #cal-main .ledger li { grid-template-columns: 1fr auto; row-gap: 4px; }
  #start-main .ledger li > span:first-child, #cal-main .ledger li > span:first-child { grid-column: 1 / -1; }
  #assets-card .ledger li .n .hint { display: block; font-weight: 400; } /* "(50% z 820 000 zł)" under the amount */
}
/* Wartość netto w czasie (monthsui.js): one series in the accent colour, a recessive grid, the tooltip over the chart */
#months-card .chart-wrap { position: relative; max-width: 100%; overflow: hidden; touch-action: pan-y; }
#months-card svg { display: block; max-width: 100%; height: auto; outline-offset: 2px; }
#months-card svg .grid { stroke: var(--line); stroke-width: 1; }
#months-card svg .zero { stroke: var(--muted); stroke-width: 1; }
#months-card svg .ax { fill: var(--muted); font-size: 12px; }
#months-card svg .lbl { fill: var(--ink); font-size: 12px; font-weight: 600; }
#months-card svg .gapline { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; }
#months-card svg .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
#months-card svg .dot { fill: var(--accent); stroke: var(--surface, #fff); stroke-width: 2; }
#months-card svg .hot { fill: var(--accent); stroke: var(--surface, #fff); stroke-width: 2; }
#months-card svg .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
#months-card svg .hit { fill: transparent; cursor: crosshair; }
#months-card .chart-tip { position: absolute; pointer-events: none; background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; line-height: 1.35; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
#months-card .table-wrap { overflow-x: auto; position: relative; }
#months-card table.months { width: 100%; border-collapse: collapse; font-size: 14px; }
#months-card table.months th, #months-card table.months td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
#months-card table.months .n { text-align: right; font-variant-numeric: tabular-nums; }
#months-card details summary { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#months-card, #months-card details, #months-card .table-wrap { min-width: 0; max-width: 100%; }
@media (max-width: 640px) {
  /* the table on a phone: the month, net worth and the changes; assets and liabilities on a wider screen */
  #months-card table.months .opt { display: none; }
  #months-card table.months th, #months-card table.months td { padding: 6px 4px; font-size: 13px; white-space: normal; }
  #months-card table.months td:first-child { white-space: nowrap; }
}
#months-card .nw { white-space: nowrap; }
/* Kalendarz (duesui.js): the count on the tab, late in warning colour, months as sections */
#nav .nav-n { display: inline-block; min-width: 1.4em; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 12px; line-height: 1.5; text-align: center; }
#nav .nav-n[hidden] { display: none; }
#cal-main .tiles .tile.warn .big { color: var(--warn); }
#exp-main .tiles .tile.warn .big { color: var(--bad); }
#exp-main .exp-head { margin: 8px 0 -4px; }
[data-in-confirm] input { width: 7.5em; }
#cushion-card .cushion-head { align-items: flex-end; }
#cushion-card .big { font-size: 26px; font-weight: 700; }
#cushion-card .cushion-min { text-align: right; }
#cushion-card .cushion-min .big { font-size: 18px; }
.cushion-bar { height: 10px; border-radius: 6px; background: color-mix(in srgb, var(--ok) 15%, transparent); overflow: hidden; }
.cushion-bar span { display: block; height: 100%; background: var(--ok); border-radius: 6px; }
.cushion-bar.low { background: color-mix(in srgb, var(--warn) 18%, transparent); }
.cushion-bar.low span { background: var(--warn); }
.cushion-how summary { cursor: pointer; font-weight: 600; }
.cushion-how > * + * { margin-top: 8px; }
#start-main .tiles a.tile.warn .big { color: var(--warn); }
#cal-main .due-month h4 { margin: 10px 0 4px; }
#cal-main #due-sug .ledger li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
/* "Konto i dane": a button at the top like the bell and the feedback (index.html #acc-btn); open – only the colour */
#acc-btn.on { color: var(--accent); border-color: var(--accent); }
/* Kalendarz – the month view (duesgrid.js) and the list / month switch */
#cal-main .seg, #exp-main .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
#cal-main .seg button, #exp-main .seg button { border: 0; border-radius: 0; background: transparent; }
#cal-main .seg button.on, #exp-main .seg button.on { background: var(--accent); color: var(--accent-ink); }
#cal-main .cal-head { flex-wrap: wrap; gap: 6px; }
#cal-main .cal-title { margin: 0 4px; min-width: 9em; text-align: center; }
#cal-main table.cal-grid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px; }
#cal-main table.cal-grid td, #cal-main table.cal-grid th { border: 0; padding: 0; background: none; vertical-align: top; }
#cal-main table.cal-grid th { font-size: 12px; font-weight: 500; color: var(--muted); padding: 2px 0; }
#cal-main .cal-day { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; min-height: 86px; padding: 4px 5px;
  text-align: left; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 12px; line-height: 1.25; cursor: pointer; overflow: hidden; }
#cal-main .cal-day.past { opacity: .6; }
#cal-main .cal-day.has { background: color-mix(in srgb, var(--accent) 7%, transparent); }
#cal-main .cal-day.soon { border-color: var(--accent); }
#cal-main .cal-day.late { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); opacity: 1; }
#cal-main .cal-day.today .cal-n { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; }
#cal-main .cal-day.picked { outline: 2px solid var(--ink); outline-offset: 1px; }
#cal-main .cal-n { align-self: flex-start; font-weight: 600; font-size: 13px; }
#cal-main .cal-it { display: flex; align-items: center; gap: 4px; min-width: 0; padding-left: 5px; border-left: 2px solid var(--accent); }
#cal-main .cal-it > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kind-ico.mini { width: 18px; height: 18px; border-radius: 5px; margin: 0; }
.kind-ico.mini svg { width: 13px; height: 13px; }
#cal-main .cal-it.rata { border-left-color: var(--muted); }
#cal-main .cal-it.late { border-left-color: var(--warn); }
#cal-main .cal-more { color: var(--muted); }
#cal-main .cal-sum { margin-top: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
#cal-main .cal-dot { display: none; }
#cal-main .cal-legend .cal-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 2px solid var(--accent); vertical-align: -1px; }
#cal-main .cal-legend .cal-key.late { border-color: var(--warn); }
#cal-main .cal-legend .cal-key.rata { border-color: var(--muted); }
#cal-main .cal-it.in { border-left-color: var(--ok); }
#cal-main .cal-legend .cal-key.in { border-color: var(--ok); }
#cal-main .due-in .in-amt { color: var(--ok); }
#cal-main .due-day h4 { margin: 8px 0 4px; }
@media (max-width: 640px) {
  /* a phone: the number, how many and the colour; the names and amounts – in the day's list under the grid */
  #cal-main table.cal-grid { border-spacing: 2px; }
  #cal-main .cal-day { min-height: 44px; padding: 3px; align-items: center; }
  #cal-main .cal-n { align-self: center; }
  #cal-main .cal-it, #cal-main .cal-more, #cal-main .cal-sum { display: none; }
  #cal-main .cal-dot { display: block; font-size: 11px; line-height: 1; color: var(--muted); }
  #cal-main .cal-dot::before { content: '●'; margin-right: 1px; color: var(--accent); }
  #cal-main .cal-day.late .cal-dot::before { color: var(--warn); }
}
@media (max-width: 420px) {
  /* the top bar on a phone: the bell, feedback, account and sign-out buttons fit next to the logo */
  .topbar-user { gap: 3px; }
  .topbar-user button.small { padding: 3px 5px; }
}

/* ---------- Import z Landlordo (importui.js) ---------- */
#imp-card.row { gap: 10px; flex-wrap: wrap; }
#imp-card .imp-file { display: grid; gap: 4px; max-width: 100%; }
#imp-card .imp-file input { max-width: 100%; }
#imp-card h4 { margin: 6px 0 0; }
#imp-card .imp-list { list-style: none; margin: 0; padding: 0; display: grid; }
#imp-card .imp-row { display: grid; grid-template-columns: 1fr minmax(150px, 210px); gap: 6px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
#imp-card .imp-row:last-child { border-bottom: 0; }
#imp-card .imp-row.off { opacity: .65; }
#imp-card label.imp-pick { flex-direction: row; gap: 8px; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: normal; color: var(--ink); cursor: pointer; }
#imp-card label.imp-pick input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
#imp-card .imp-need { color: var(--warn); }
@media (max-width: 640px) {
  #imp-card .imp-row { grid-template-columns: 1fr; }
  #imp-card .imp-amt { padding-left: 26px; }
}

/* ---------- Wyceny finansów (finui.js) ---------- */
#fin-box textarea { width: 100%; font-family: inherit; }
#fin-box .fin-bonds { overflow-x: auto; max-width: 100%; }
#fin-box .fin-table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
#fin-box .fin-table th, #fin-box .fin-table td { text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#fin-box .fin-table th:first-child, #fin-box .fin-table td:first-child { text-align: left; }
#fin-box .fin-table tr.done td { opacity: .6; }
#asset-form label.counted input[name="value"] { background: color-mix(in srgb, var(--accent) 8%, transparent); }
#assets-card > .row.between > .row { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  /* a phone: each series a small card with labelled values instead of a wide table */
  #fin-box .fin-table thead { display: none; }
  #fin-box .fin-table, #fin-box .fin-table tbody, #fin-box .fin-table tr, #fin-box .fin-table td { display: block; width: auto; }
  #fin-box .fin-table tr { padding: 6px 0; border-bottom: 1px solid var(--line); }
  #fin-box .fin-table td { border: 0; padding: 1px 0; text-align: left; white-space: normal; }
  #fin-box .fin-table td[data-l] { display: flex; justify-content: space-between; gap: 8px; }
  #fin-box .fin-table td[data-l]::before { content: attr(data-l); color: var(--muted); }
}
#rcn-out > * + * { margin-top: 12px; } /* the estimate from sales and the cost of building again: two boxes */
/* the kind of an asset or a liability (kindicons.js): a tinted chip by the group */
.with-ico { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.with-ico > span:last-child { min-width: 0; }
.kind-ico { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--ico); background: color-mix(in srgb, var(--ico) 15%, transparent); margin-top: -3px; }
.kind-ico.g-nier { --ico: var(--water); }
.kind-ico.g-fin { --ico: var(--gas); }
.kind-ico.g-ruch { --ico: var(--brand-gold); }
.kind-ico.g-dlug { --ico: var(--bad); }
.kind-ico.g-due { --ico: var(--power); }
.kind-ico.g-in { --ico: var(--ok); }
@media (max-width: 560px) { .kind-ico { width: 30px; height: 30px; } .kind-ico svg { width: 18px; height: 18px; } }
#months-card .month-fix { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
#months-card tr.fixing td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
/* Stałe wydatki: the tile on Majątek is a link to the tab (fixedui.js) */
a.tile-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
a.tile-link:hover, a.tile-link:focus-visible { border-color: var(--accent); }
#exp-main .tiles-inline .tile { min-width: 220px; }
#exp-main h3 { margin: 0; }
/* Składniki majątku, Zobowiązania: folded lists (assetsui.js) – the header is the button: the title, how many, the total */
button.fold { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 2px 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
button.fold h3 { margin: 0; }
button.fold .fold-ch { display: inline-block; width: 1em; font-size: 20px; line-height: 1; transition: transform .15s; color: var(--muted); }
button.fold[aria-expanded="true"] .fold-ch { transform: rotate(90deg); }
button.fold:hover h3 { color: var(--accent); }

/* home page for visitors (index.html #v-home; the shared .home-* rules are in styles.css) */
.home-request h2{margin:0}
#v-home .home-photo img{object-position:60% 60%} /* the laptop stays in view when the photo is cut to the form's height */

/* attachments – encrypted files of warranties and deadlines (filesui.js) */
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; }
.file-chip [data-fl="open"] { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-add { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--line); border-radius: 8px; padding: 3px 8px; font-size: 13px; }
.file-add:focus-within { outline: 2px solid var(--accent); }
.file-msg { flex-basis: 100%; }
/* Wpływy w czasie (incomehistui.js): the table like the months', a bar – what came in, a mark – the plan */
#inc-hist table.months { width: 100%; border-collapse: collapse; font-size: 14px; }
#inc-hist table.months th, #inc-hist table.months td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: top; }
#inc-hist table.months .n { text-align: right; font-variant-numeric: tabular-nums; }
.inc-bar { display: block; position: relative; height: 6px; min-width: 90px; margin-top: 4px; border-radius: 3px; background: var(--line); }
.inc-bar i { position: absolute; left: 0; top: 0; bottom: 0; max-width: 100%; border-radius: 3px; background: var(--ok); }
.inc-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); }
.inc-yields { margin: 4px 0 0; padding-left: 18px; }
#inc-hist .table-wrap { overflow-x: auto; }
@media (max-width: 640px) { #inc-hist table.months .opt { display: none; } #inc-hist table.months th, #inc-hist table.months td { padding: 6px 4px; font-size: 13px; white-space: normal; } #inc-hist table.months td:first-child { white-space: nowrap; } .inc-bar { min-width: 60px; } }
#inc-hist, #inc-hist details, #inc-hist .table-wrap { min-width: 0; max-width: 100%; }
/* Teczka na wypadek (folderui.js): on the screen and printed (#print-area) */
.folder-doc h4 { margin: 18px 0 6px; }
.folder-doc .fo-text { white-space: pre-wrap; margin: 0; }
.folder-doc .fo-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.folder-doc .fo-note { margin: 2px 0 0; white-space: pre-wrap; }
.fo-contact { border-top: 1px solid var(--line); padding-top: 10px; }
#folder-form textarea { width: 100%; font-family: inherit; }
.folder-print { font: 11pt/1.45 "Source Serif 4", Georgia, serif; color: #111; }
.folder-print h3 { font-size: 18pt; margin: 0 0 4pt; }
.folder-print h4 { font-size: 12.5pt; color: #222; border-bottom: 1px solid #ccc; padding-bottom: 2pt; break-after: avoid; }
.folder-print li { break-inside: avoid; }
.folder-print .hint { color: #555; }
/* Wyciągi z banku – "Miesiąc po miesiącu" on Przepływy (txui.js) */
#tx-card, #tx-card details, #tx-card .table-wrap, #tx-card section { min-width: 0; max-width: 100%; }
#tx-card .tx-nav { align-items: center; gap: 10px; }
#tx-card .tx-nav strong { min-width: 9em; text-align: center; font-size: 17px; }
#tx-card .ok-t { color: var(--ok); font-weight: 600; } #tx-card .bad-t { color: var(--bad); font-weight: 600; }
#tx-card .tiles .tile.warn .big { color: var(--bad); }
#tx-card h4 { margin: 4px 0 0; }
#tx-card ul.tx-cats { list-style: none; margin: 0; padding: 0; }
#tx-card ul.tx-cats > li { display: block; border-bottom: 1px solid var(--line); padding: 0; }
#tx-card button.tx-cat { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(40px, 1fr) 10em; align-items: center; gap: 10px; width: 100%; padding: 8px 2px; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; text-decoration: none; }
#tx-card button.tx-cat:hover .tx-cat-name strong { text-decoration: underline; }
#tx-card .tx-bar { height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; }
#tx-card .tx-bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
#tx-card [data-tx-type="in"] .tx-bar span { background: var(--ok); }
#tx-card [data-tx-type="own"] .tx-bar span { background: var(--muted); }
#tx-card .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#tx-card ul.tx-ops { list-style: none; margin: 0 0 8px; padding: 0 0 0 10px; border-left: 3px solid var(--accent-soft); font-size: 14px; }
#tx-card ul.tx-ops > li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
#tx-card ul.tx-ops li > span:first-child { overflow-wrap: anywhere; }
#tx-card .tx-recat select { font-size: 13px; padding: 3px 6px; max-width: 12em; }
#tx-card div.tx-ops { padding: 0 0 8px 10px; }
#tx-card table.months { width: 100%; border-collapse: collapse; font-size: 14px; }
#tx-card table.months th, #tx-card table.months td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
#tx-card table.months tr.on td { background: var(--accent-soft); }
#tx-card details summary { cursor: pointer; }
#tx-card .table-wrap { overflow-x: auto; }
#tx-card [data-tx-imports] li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  #tx-card button.tx-cat { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  #tx-card button.tx-cat .tx-bar { grid-column: 1 / -1; grid-row: 2; }
  #tx-card ul.tx-ops > li { grid-template-columns: minmax(0, 1fr) auto; }
  #tx-card ul.tx-ops li .tx-recat { grid-column: 1 / -1; }
  #tx-card .tx-recat select { max-width: 100%; width: 100%; }
  #tx-card table.months .opt { display: none; }
  #tx-card table.months th, #tx-card table.months td { padding: 6px 4px; font-size: 13px; white-space: normal; }
}
/* Składnik – szczegóły (assetpageui.js): the name on Majątek leads to the asset's page */
.asset-link { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--muted); }
.asset-link:hover, .asset-link:focus-visible { color: var(--accent, inherit); border-bottom-style: solid; }
#asset-page .big-n { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
#asset-page h3 { margin: 0; }
#asset-tab h4 { margin: 12px 0 0; }
#asset-page .subtabs a .hint { margin-left: 5px; color: inherit; opacity: .75; }
@media (max-width: 480px) { #asset-page .subtabs { flex-wrap: wrap; } #asset-page .subtabs a { padding: 6px 10px; } }
/* Wyciągi – "Kategorie i reguły" (txmanage.js) */
#tx-card .tx-man-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start; }
#tx-card .tx-man-form .grow { flex: 1 1 14em; min-width: 0; width: auto; margin: 0; }
#tx-card .tx-man-form > * { margin: 0; }
#tx-card .tx-man-form select { max-width: 100%; }
#tx-card ul.tx-man > li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
#tx-card ul.tx-man > li > span:first-child { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; }
#tx-card ul.tx-man > li > .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
#tx-card ul.tx-man select { max-width: 16em; }
@media (max-width: 420px) { #tx-card ul.tx-man > li > .row { flex: 1 1 100%; } #tx-card ul.tx-man select { max-width: none; flex: 1; } }
/* Wyciągi – the year in bars (txchart.js); own series colours, validated (dataviz checks) on the light and the dark surface */
#tx-card { --txc-in: #16855a; --txc-out: #c9551f; }
:root[data-mode="dark"] #tx-card { --txc-in: #38a06d; --txc-out: #d96a30; }
#tx-card .tx-year h4 { margin: 0; }
#tx-card .tx-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; }
#tx-card .tx-legend .sw.out { margin-left: 10px; }
#tx-card .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
#tx-card .sw.in { background: var(--txc-in); } #tx-card .sw.out { background: var(--txc-out); }
#tx-card .chart-wrap { position: relative; max-width: 100%; overflow: hidden; touch-action: pan-y; }
#tx-card .chart-wrap svg { display: block; max-width: 100%; height: auto; outline: none; }
#tx-card .chart-wrap svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
#tx-card .chart-wrap svg .grid { stroke: var(--line); stroke-width: 1; opacity: .7; }
#tx-card .chart-wrap svg .zero { stroke: var(--muted); stroke-width: 1; }
#tx-card .chart-wrap svg .ax { fill: var(--muted); font-size: 11px; }
#tx-card .chart-wrap svg .ax.none { opacity: .45; }
#tx-card .chart-wrap svg .b-in { fill: var(--txc-in); }
#tx-card .chart-wrap svg .b-out { fill: var(--txc-out); }
#tx-card .chart-wrap svg .sel { fill: transparent; }
#tx-card .chart-wrap svg .sel.hover { fill: var(--accent-soft); opacity: .6; }
#tx-card .chart-wrap svg .sel.on { fill: var(--accent-soft); }
#tx-card .chart-wrap svg .hit { fill: transparent; cursor: pointer; }
#tx-card .chart-tip { position: absolute; pointer-events: none; background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; line-height: 1.4; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.15); }

/* Symulacja sprzedaży (saleui.js): the tab of a property's page */
#asset-tab .sale-src summary { cursor: pointer; font-weight: 600; }
#asset-tab .sale-cols { align-items: start; }
#asset-tab .sale-sc { margin: 0; }
#asset-tab .sale-sc h5, #asset-tab [data-sale-cmp] h5 { margin: 8px 0 0; }
#asset-tab .sale-sub { display: block; padding: 0 0 4px 14px; border-left: 2px solid var(--line, #ddd); }
#asset-tab .sale-sub .ledger li { font-size: .92em; }
#asset-tab [data-sale-missing] ul { margin: 6px 0 0; padding-left: 20px; }
#asset-tab .ledger li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
#asset-tab [data-sale-prepay] .form-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
