/* Finance screen styles. Only new rules; everything else comes from app.css and its tokens. */
.warn-t { color: var(--warn); } .accent-t { color: var(--accent-t); }
.fx-tb { justify-content: space-between; }
.fx-tb-r { display: flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.fx-click { cursor: pointer; border-radius: 8px; } .fx-click:hover { background: var(--surface2); }
.fx-sh { margin: 4px 0 10px; } .fx-sh h3 { font-size: 15px; }
.fx-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); }
.fx-chk-l { display: inline-flex; align-items: center; gap: 8px; }
.fx-file { display: none; }
.fx-paste { font-size: 12.5px; line-height: 1.5; white-space: pre; overflow: auto; }
.fx-pv-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.fx-pv { max-height: 280px; overflow: auto; }

/* cash position and to-do */
.fx-cash { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.fx-cash-l { flex: 1 1 260px; display: grid; gap: 6px; min-width: 0; }
.fx-cash-r { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-align: start; transition: background .12s; }
.fx-cash-r:hover { background: var(--surface2); }
.fx-cash-r .grow { display: grid; min-width: 0; } .fx-cash-r b { font-weight: 600; } .fx-cash-r small { font-size: 12px; }
.fx-todo { display: grid; gap: 4px; }
.fx-todo-r { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface2); }
.fx-todo-r .grow { display: grid; } .fx-todo-r small { font-size: 12.5px; }
.fx-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.fx-bar-c { display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--surface2); }
.fx-bar { height: 9px; } .fx-bar.over i { background: linear-gradient(90deg, var(--orange), var(--yellow)); } .fx-bar.ok i { background: var(--good); }

/* banking */
.fx-banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.fx-bank { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); text-align: start; transition: border-color .15s, box-shadow .15s; }
.fx-bank:hover { border-color: var(--line-strong); }
.fx-bank.on { border-color: var(--orange); box-shadow: var(--ring), var(--sh-2); }
.fx-bank.off { opacity: .55; }
.fx-bank-t { flex: 1; min-width: 0; display: grid; } .fx-bank-t b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fx-bank-t small { font-size: 12px; }
.fx-add { border-style: dashed; background: transparent; box-shadow: none; } .fx-add .att-ic { background: var(--surface3); color: var(--ink2); }
.fx-badge { position: absolute; top: -7px; inset-inline-end: 12px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--grad-btn); box-shadow: var(--glow); }
.fx-sumrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; padding: 14px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.fx-sumrow > div { display: grid; gap: 4px; align-content: start; justify-items: start; } .fx-sumrow b { font: 700 18px var(--head); letter-spacing: -.02em; }
.fx-wb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.fx-lines-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.fx-lines-b { max-height: 640px; overflow-y: auto; }
.fx-line { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); text-align: start; transition: background .12s; position: relative; }
.fx-line:last-child { border-bottom: 0; } .fx-line:hover { background: var(--surface2); }
.fx-line.on { background: var(--grad-soft); } .fx-line.on::before { content: ''; position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); }
.fx-line-d { width: 46px; flex: none; font-size: 12px; color: var(--ink3); font-weight: 600; }
.fx-line-t { display: grid; min-width: 0; } .fx-line-t b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fx-line-t small { font-size: 12px; font-weight: 600; }
.fx-panel { display: grid; gap: 20px; }
.fx-big { font: 800 22px var(--head); letter-spacing: -.02em; white-space: nowrap; }
.fx-sug { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface); flex-wrap: wrap; }
.fx-sug .grow { display: grid; min-width: 180px; } .fx-sug b { font-weight: 600; font-size: 14px; }
.fx-sug-r { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.fx-conf { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.fx-conf-b { width: 64px; height: 6px; border-radius: 6px; background: var(--surface3); overflow: hidden; } .fx-conf-b i { display: block; height: 100%; border-radius: inherit; background: var(--ink3); }
.fx-conf.good .fx-conf-b i { background: var(--good); } .fx-conf.warn .fx-conf-b i { background: var(--orange); }
.fx-conf.good b { color: var(--good); } .fx-conf.warn b { color: var(--warn); }
.fx-create { padding-top: 16px; border-top: 1px dashed var(--line2); }
.fx-rule-f { display: grid; grid-template-columns: 1fr 1fr 1.3fr auto; gap: 12px; align-items: end; padding-top: 6px; }

/* tables */
.tbl tr.fx-grp td { background: var(--surface2); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink3); padding: 8px 16px; }
.tbl tr.fx-open td { color: var(--ink3); font-size: 12.5px; font-weight: 600; background: var(--surface2); }
.tbl tr.fx-arch { opacity: .6; }
.fx-memo { font-weight: 600; font-size: 13.5px; }
.fx-ind { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0; } .fx-ind .code { min-width: 0; }
.fx-d { margin-inline-start: 52px; }
.fx-chk { margin-top: 12px; }
.fx-hist { max-height: 360px; overflow-y: auto; }
.fx-cur { display: grid; gap: 8px; }
.fx-code { font: 800 20px var(--head); letter-spacing: -.02em; }
.fx-rate { font: 750 28px var(--head); letter-spacing: -.03em; }
.fx-warn { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; color: var(--ink2); font-size: 13.5px; }

/* budget grid */
.fx-bud { min-width: 1180px; } .fx-bud td, .fx-bud th { padding: 8px 6px; } .fx-bud th:first-child, .fx-bud td:first-child { padding-inline-start: 18px; }
.fx-bud .fx-stick { position: sticky; inset-inline-start: 0; z-index: 2; background: var(--surface); min-width: 230px; box-shadow: 1px 0 0 var(--line); }
.fx-bud th.fx-stick { background: var(--surface2); z-index: 3; }
.fx-bud tbody tr:hover .fx-stick { background: var(--surface2); }
.fx-cell { width: 84px; height: 34px; padding: 0 8px; border-radius: 9px; font-size: 13px; text-align: end; }
.fx-fill { opacity: 0; margin-inline-start: 4px; } .fx-bud tr:hover .fx-fill, .fx-fill:focus-visible { opacity: 1; }
.fx-addrow { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface2); }

@media (max-width: 1024px) { .fx-wb { grid-template-columns: 1fr; } .fx-lines-b { max-height: 320px; } .fx-rule-f { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .fx-rule-f { grid-template-columns: 1fr; } .fx-tb-r { margin-inline-start: 0; } .fx-bar-c { padding: 12px; }
  .fx-sug-r { width: 100%; justify-content: space-between; } .fx-big { font-size: 18px; }
  .fx-addrow { flex-direction: column; align-items: stretch; } .fx-fill { opacity: 1; }
  .fx-d { margin-inline-start: 0; }
}

[dir=rtl] .fx-line.on::before { border-radius: 3px 0 0 3px; }
[dir=rtl] .fx-bud .fx-stick { box-shadow: -1px 0 0 var(--line); }
.fx-paste { direction: ltr; }
[dir=rtl] .fx-paste { text-align: left; }
.fx-bud .fx-cell { direction: ltr; }
