/* Due Maglie — "Finanze" page (finance.js): same navy / cyan language as the Squadra stadium card and the market.
   Income green (#37f59a), expenses red (#ff4d6d / #ffb3bd), prizes gold. Dark only, like the rest of the app. */
.fin-page { gap: 22px; --fin-in: #37f59a; --fin-out: #ff6b85; --fin-out-2: #ffb3bd; --fin-gold: #ffd25a; }
.fin-page .club-back { margin-bottom: -14px; }
.fin-page .is-pos { color: var(--fin-in); }
.fin-page .is-neg { color: var(--fin-out-2); }

/* 1. header: cash + three stats */
.fin-hero {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px;
  clip-path: polygon(0 0, 96% 0, 100% 9%, 100% 100%, 4% 100%, 0 91%);
  background: radial-gradient(110% 120% at 0% 0%, rgba(60, 242, 255, .22), transparent 60%), linear-gradient(160deg, rgba(60, 242, 255, .12), rgba(20, 28, 52, .95) 35%, rgba(10, 14, 28, .97) 75%, rgba(123, 92, 255, .2));
}
.fin-cash-l { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--cl-cyan); }
.fin-cash { margin: 0 0 8px; font-size: 16px; color: var(--cl-muted-2); }
.fin-cash b { font: italic 800 44px/1 var(--cl-head); color: var(--cl-ink); text-shadow: 0 0 22px rgba(60, 242, 255, .35); overflow-wrap: anywhere; }
.fin-stats .club-stat { padding: 7px 4px 6px; }
.fin-stats .club-stat-l { font-size: 9.5px; letter-spacing: .12em; text-align: center; line-height: 1.25; }
.fin-stats .club-stat-v { font-size: 22px; }
.fin-stats .fin-net { border-top-color: rgba(120, 170, 255, .45); }
.fin-stats .fin-net.is-pos { border-top-color: var(--fin-in); }
.fin-stats .fin-net.is-neg { border-top-color: var(--fin-out); }
.fin-stats .fin-net.is-pos .club-stat-v { color: var(--fin-in); }
.fin-stats .fin-net.is-neg .club-stat-v { color: var(--fin-out-2); }
.fin-stats .fin-net .econ-sub { color: var(--cl-muted); }

/* section frame */
.fin-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fin-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; padding-bottom: 6px; border-bottom: 1px solid rgba(60, 242, 255, .25); }
.fin-h2 { margin: 0; font: italic 800 21px/1.1 var(--cl-head); text-transform: uppercase; }
.fin-sec-sub { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cl-muted); }
.fin-note { margin: 0; font-size: 14px; line-height: 1.35; color: var(--cl-muted-2); }

/* 2. bars of the week */
.fin-h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 4px 0 0; font: 700 12px/1.2 var(--cl-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--cl-muted); }
.fin-h3 b { font: italic 800 20px/1 var(--cl-head); letter-spacing: 0; }
.fin-h3.is-in b { color: var(--fin-in); }
.fin-h3.is-out b { color: var(--fin-out-2); }
.fin-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.fin-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: end; }
.fin-bar-l { display: flex; flex-direction: column; min-width: 0; font-size: 14.5px; line-height: 1.2; overflow-wrap: anywhere; }
.fin-bar-l small { font-size: 11.5px; font-weight: 600; color: var(--cl-muted); }
.fin-bar-v { font: 800 17px/1 var(--cl-head); }
.fin-bar.is-in .fin-bar-v { color: var(--fin-in); }
.fin-bar.is-out .fin-bar-v { color: var(--fin-out-2); }
.fin-bar.is-zero .fin-bar-l, .fin-bar.is-zero .fin-bar-v { color: var(--cl-muted); }
.fin-bar-t { grid-column: 1 / -1; height: 9px; transform: skewX(-12deg); background: rgba(120, 170, 255, .12); overflow: hidden; }
.fin-bar-t span { display: block; height: 100%; }
.fin-bar.is-in .fin-bar-t span { background: linear-gradient(90deg, #1fbf74, var(--fin-in)); }
.fin-bar.is-out .fin-bar-t span { background: linear-gradient(90deg, #c2304d, var(--fin-out)); }
.fin-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 2px 0 0; padding: 8px 10px; background: rgba(5, 7, 13, .6); border-left: 3px solid var(--cl-cyan); font: 700 12px/1.2 var(--cl-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--cl-muted); }
.fin-total b { font: italic 800 24px/1 var(--cl-head); letter-spacing: 0; color: var(--cl-ink); }
.fin-total.is-pos { border-left-color: var(--fin-in); color: var(--cl-muted); }
.fin-total.is-neg { border-left-color: var(--fin-out); color: var(--cl-muted); }
.fin-total.is-pos b { color: var(--fin-in); }
.fin-total.is-neg b { color: var(--fin-out-2); }

/* 3. balance chart: SVG line stretched in the box, HTML labels and markers on top */
.fin-chart-sum { margin: 0; font-size: 14px; color: var(--cl-muted-2); }
.fin-chart-sum b { font: italic 800 26px/1 var(--cl-head); color: var(--cl-ink); }
.fin-chart-sum span { font-weight: 700; }
.fin-chart { margin: 0; padding: 10px 10px 6px; background: rgba(5, 7, 13, .6); border: 1px solid rgba(120, 170, 255, .18); }
.fin-plot { position: relative; height: 150px; margin: 6px 4px 16px; }
.fin-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fin-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed rgba(120, 170, 255, .2); }
.fin-grid span { position: absolute; left: 0; bottom: 2px; padding: 0 3px; font-size: 10.5px; font-weight: 700; line-height: 1; color: var(--cl-muted); background: rgba(5, 7, 13, .7); }
.fin-mk-w { position: absolute; bottom: -14px; width: 4px; height: 10px; margin-left: -2px; background: var(--fin-out); box-shadow: 0 0 6px rgba(255, 77, 109, .7); }
.fin-mk-p { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; transform: rotate(45deg); background: var(--fin-gold); border: 2px solid #0a0f1f; box-shadow: 0 0 8px rgba(255, 210, 90, .8); }
.fin-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #e9fdff; box-shadow: 0 0 0 3px rgba(60, 242, 255, .35), 0 0 12px rgba(60, 242, 255, .9); }
.fin-xl { display: flex; justify-content: space-between; gap: 8px; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cl-muted); }
.fin-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; font-size: 12.5px; color: var(--cl-muted-2); }
.fin-legend span { display: inline-block; flex: none; margin-left: 8px; }
.fin-legend span:first-child { margin-left: 0; }
.fin-lg-c { width: 16px; height: 3px; background: #3cf2ff; box-shadow: 0 0 6px rgba(60, 242, 255, .8); }
.fin-lg-w { width: 4px; height: 12px; background: var(--fin-out); }
.fin-lg-p { width: 9px; height: 9px; transform: rotate(45deg); background: var(--fin-gold); }

/* 4. what is coming */
.fin-up { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fin-up-i { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; background: rgba(14, 20, 38, .8); border-left: 3px solid rgba(120, 170, 255, .45); }
.fin-up-i.is-in { border-left-color: var(--fin-in); }
.fin-up-i.is-out { border-left-color: var(--fin-out); }
.fin-up-i.is-works { border-left-color: #ffb400; }
.fin-up-ico { display: grid; place-items: center; width: 34px; height: 34px; transform: skewX(-12deg); background: rgba(60, 242, 255, .12); color: var(--cl-cyan); }
.fin-up-i.is-in .fin-up-ico { color: var(--fin-in); background: rgba(55, 245, 154, .12); }
.fin-up-i.is-out .fin-up-ico { color: var(--fin-out-2); background: rgba(255, 77, 109, .14); }
.fin-up-i.is-works .fin-up-ico { color: #ffc23d; background: rgba(255, 180, 0, .14); }
.fin-ico { transform: skewX(12deg); }
.fin-up-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fin-up-t b { font-size: 15px; line-height: 1.2; }
.fin-up-t small { font-size: 12.5px; line-height: 1.3; color: var(--cl-muted-2); overflow-wrap: anywhere; }
.fin-up-a { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.fin-up-a b { font: 800 18px/1.05 var(--cl-head); white-space: nowrap; }
.fin-up-a small { font-size: 11.5px; line-height: 1.2; color: var(--cl-muted); }
.fin-up-i.is-in .fin-up-a b { color: var(--fin-in); }
.fin-up-i.is-out .fin-up-a b { color: var(--fin-out-2); }

/* 5. this season vs the previous one */
.fin-tab-wrap { max-width: 100%; overflow-x: auto; }
.fin-tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.fin-tab th, .fin-tab td { padding: 6px 6px; text-align: right; border-bottom: 1px solid rgba(120, 170, 255, .12); }
.fin-tab th:first-child { text-align: left; padding-left: 0; font-weight: 600; }
.fin-tab thead th { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cl-cyan); vertical-align: bottom; }
.fin-tab thead th small { display: block; margin-top: 2px; font-size: 10.5px; letter-spacing: .04em; text-transform: none; color: var(--cl-muted); white-space: nowrap; }
.fin-tab tbody td { font-weight: 700; white-space: nowrap; }
.fin-tab tbody tr.is-in td { color: var(--fin-in); }
.fin-tab tbody tr.is-out td { color: var(--fin-out-2); }
.fin-tab tfoot th, .fin-tab tfoot td { font-weight: 700; color: var(--cl-muted-2); white-space: nowrap; }
.fin-tab tfoot th { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--cl-muted); }
.fin-tab .fin-tab-net th, .fin-tab .fin-tab-net td { border-bottom: 0; border-top: 2px solid rgba(60, 242, 255, .35); }
.fin-tab .fin-tab-net td { font: italic 800 19px/1 var(--cl-head); color: var(--cl-ink); }
.fin-tab .fin-tab-net td.is-pos { color: var(--fin-in); }
.fin-tab .fin-tab-net td.is-neg { color: var(--fin-out-2); }

/* 6. every movement */
.fin-chips { gap: 6px; }
.fin-chips .club-chip { min-height: 38px; padding: 0 11px; font-size: 13.5px; }
.fin-ledger { margin-top: 10px; }
.fin-li { padding: 7px 8px; }
.fin-li .econ-li-k { font-size: 14.5px; }
.fin-li-a { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.fin-li-a b { font: 800 17px/1.05 var(--cl-head); }
.fin-li.is-in .fin-li-a b { color: var(--fin-in); }
.fin-li.is-out .fin-li-a b { color: var(--fin-out-2); }
.fin-li-a small { font-size: 11px; color: var(--cl-muted); white-space: nowrap; }
.fin-li:focus-visible { outline: 2px solid var(--cl-cyan); outline-offset: 1px; }
.fin-more, .fin-retry { align-self: flex-start; margin: 10px 0 0 6px; }
.fin-skel { height: 120px; margin-top: 10px; }

/* Squadra stadium card: the two links (market, finances) side by side */
.econ-links { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 6px; }
.econ-links .econ-mkt { margin-left: 0; }
.econ-links .econ-fin { border-color: var(--cl-cyan); background: rgba(60, 242, 255, .12); box-shadow: 0 0 14px rgba(60, 242, 255, .3); }
