/* Extracted from ecosystem.css — Finance workspace (led-* / analytics / wallets). */
/* Load after ecosystem.css and before ecosystem_platform.css. */

 /* Finance workspace : dense operational tables with explicit financial meaning. */
    .led-context-strip {
        display:flex; align-items:stretch; gap:6px; margin:0 0 5px; min-width:0;
    }
    .led-context-strip .led-strip { flex:0 0 auto; margin:0; }
    .led-context-strip .led-recon { flex:1 1 280px; min-width:0; }
    body.pro.focus-workspace #led-balances:not(:empty),
    body[data-ledframe="led-reconcile"] #led-balances:not(:empty) {
        padding:5px 7px; margin-bottom:4px;
    }
    body.pro.focus-workspace .led-context-strip { gap:5px; }
    body.pro.focus-workspace .led-strip-kpi { padding:5px 8px; min-height:30px; font-size:11px; }
    body.pro.focus-workspace .led-strip-kpi b { font-size:13px; }
    body.pro.focus-workspace .led-recon-btn {
        min-height:var(--ui-control-h, 44px); padding:0 var(--ui-space-3, 12px); font-size:14px;
    }
    .led-top-actions { margin-top:4px; }
    .led-sheet-lead {
        margin: 6px 0 0;
        font-size: 12px;
        line-height: 1.35;
        max-width: 72ch;
    }
    .ui-actions.column {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin: 8px 0;
    }
    .ui-actions.column .cp-pick-deal {
        justify-content: flex-start;
        text-align: left;
        min-height: 36px;
    }
    .fin-empty {
        display:flex; flex-direction:column; align-items:center; justify-content:center;
        min-height:72px; padding:12px; text-align:center; border:1px dashed rgba(127,127,127,.23);
        border-radius:8px; background:rgba(127,127,127,.035); box-sizing:border-box;
    }
    .fin-empty b { font-size:var(--ui-body-size,14px); }
    .fin-empty span { margin-top:3px; max-width:52ch; font-size:var(--ui-secondary-size,12px); line-height:1.35; color:var(--tg-theme-hint-color,#777); }
    .fin-empty-action { margin-top:7px; }
    .fin-empty-cell { padding:7px !important; white-space:normal !important; }

 #grid.price-narrow { border-radius:8px; }
    body[data-view="ledger"] #grid > thead > tr > th {
        color:var(--tg-theme-text-color,#111);
        background:rgba(51,144,236,.085);
    }
    body[data-view="ledger"] button.del,
    body[data-view="ledger"] .del {
        color:#8f1212;
        background:color-mix(in srgb, #d11 14%, var(--tg-theme-bg-color,#fff));
        border-color:color-mix(in srgb, #8f1212 28%, transparent);
    }
 #grid.price-narrow > thead > tr > th,
 #grid.price-narrow > tbody > tr > td { padding:4px 6px; }
 #grid.price-narrow > thead > tr > th {
        color:var(--tg-theme-text-color,#111);
        background:rgba(51,144,236,.085);
    }
 #grid.price-narrow td.pr-avg-live {
  font-weight: 650;
  color: var(--tg-theme-text-color, #111);
  background: color-mix(in srgb, var(--tg-theme-link-color, #3390ec) 14%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tg-theme-link-color, #3390ec) 45%, transparent);
  border-radius: 8px;
 }
 #grid.price-narrow input {
        min-height:27px; padding:3px 5px; border-radius:8px; box-sizing:border-box;
        font-size:var(--ui-financial-size,13px); text-align:right; font-variant-numeric:tabular-nums;
    }
 #grid.price-narrow .pr-info-row td { padding:4px; }
 #grid.price-narrow .pr-note { padding:5px 7px; border-radius:8px; font-size:var(--ui-secondary-size,12px); line-height:1.35; }
 #grid.price-narrow .cur-hdr td {
        min-height:27px; padding:5px 7px; background:color-mix(in srgb,var(--tg-theme-secondary-bg-color,#eee) 70%,transparent);
        font-size:var(--ui-body-size,14px);
    }
 #grid.price-narrow .cur-chev { display:inline-block; width:16px; color:var(--ui-muted-strong,#4b5563); }
 #grid.price-narrow .cur-hdr small {
        margin-left:8px; font-size:var(--ui-secondary-size,12px); font-weight:500;
        color:var(--ui-muted-strong,#4b5563);
    }
    #grid .cur-hdr small,
    #grid .pr-data-row td.txt > small,
    #grid .pr-fee-row .ft-head > small,
    #grid .led-derived-rate-row td.txt > small {
        margin-inline-start:12px;
    }
    .pr-asset {
        display:flex; flex-direction:column; align-items:flex-start; gap:4px;
        min-width:0; white-space:normal;
    }
    .pr-provenance {
        display:block; margin:0; line-height:1.35; font-weight:400;
        white-space:normal; overflow-wrap:break-word; opacity:.72;
    }
 #grid.price-narrow .cur-hdr > td,
 #grid.price-narrow .cur-hdr b {
        color:var(--tg-theme-text-color,#111);
    }
 #grid.price-narrow .led-cur-hdr,
 #grid.price-narrow .led-fee-hint .led-hint-sub {
        color:var(--tg-theme-text-color,#111);
        opacity:1;
    }
 #grid.price-narrow .pr-data-row td { height:30px; }
 #grid.price-narrow tr.is-saving { opacity:.58; }
 #grid.price-narrow tr.is-saved td:first-child { border-left:2px solid var(--pos,#1a8d3e); }
 #grid.price-narrow tr.is-invalid td:first-child { border-left:2px solid var(--neg,#d11); }
    .pr-cabinet-line {
        display:grid; grid-template-columns:minmax(180px,1fr) auto auto auto; align-items:center;
        gap:6px; padding:3px 1px;
    }
    .pr-cabinet-line > span { display:flex; flex-direction:column; min-width:0; }
    .pr-cabinet-line small { font-size:var(--ui-secondary-size,12px); opacity:.78; }
    .pr-cabinet-line label { display:flex; align-items:center; gap:3px; font-size:var(--ui-secondary-size,12px); }
    .pr-cabinet-line i { opacity:.55; font-style:normal; }
    .pr-cabinet-line .btn, .pr-data-row .btn { min-height:36px; padding:6px 10px; font-size:var(--ui-interactive-size,13px); }
    .led-svc-add-row .btn-primary { min-height:36px; padding:8px 12px; }
    .svc-actions { flex-wrap:nowrap; gap:4px; }
    .svc-actions .btn, .svc-actions .del { min-height:36px; padding:6px 10px; font-size:var(--ui-interactive-size,13px); }
    .pr-fee-row > td { height:auto; white-space:normal; vertical-align:top; }
    .pr-fee-row .led-rate-note-ok, .pr-fee-row .led-rate-note-bad {
        margin-top:4px; white-space:normal; line-height:1.4; font-size:var(--ui-secondary-size,12px);
    }
    .pr-row-actions { display:flex; justify-content:flex-end; gap:5px; margin-top:8px; }
    .pr-row-actions .rk, .pr-row-actions .btn { min-height:36px; padding:6px 10px; font-size:var(--ui-interactive-size,13px); }

    .fin-summary-row > td { padding:3px !important; border:0; }
    .fin-summary-section {
        overflow:hidden; border:1px solid rgba(127,127,127,.15); border-radius:8px;
        background:var(--tg-theme-bg-color,#fff);
    }
    .fin-summary-section > header {
        display:flex; align-items:center; justify-content:space-between; gap:8px;
        min-height:27px; padding:4px 7px; background:rgba(127,127,127,.055);
    }
    .fin-summary-section > header b { font-size:11px; }
    .fin-summary-section > header span { font-size:10px; color:var(--tg-theme-hint-color,#777); font-variant-numeric:tabular-nums; }
    .fin-mini-table { width:100%; border-collapse:collapse; font-size:11px; }
    .fin-mini-table th, .fin-mini-table td { padding:3px 7px; border-bottom:1px solid rgba(127,127,127,.08); }
    .fin-mini-table tbody tr:last-child td { border-bottom:0; }
    .fin-flow.is-in { color:var(--pos,#168d73); font-weight:650; }
    .fin-flow.is-out { color:var(--neg,#d11); font-weight:650; }
    .fin-flow.is-zero { opacity:.62; }
 /* Inventory / FX netto: short is directional risk, not an error — keep calm. */
    .fin-qty-short { color:var(--tg-theme-hint-color,#6f7782); font-weight:650; }
 /* Summary capital — analytics density (KPI grid + one table), not dash glass cards */
    .fin-cap-summary { width:100%; min-width:0; }
    .fin-cap-kpis { margin:0; }
    .fin-cap-section-head {
        display:flex; align-items:center; justify-content:space-between; gap:8px;
        flex-wrap:wrap; margin:0 0 8px;
    }
    .fin-cap-section-head h3 { margin:0; flex:1 1 auto; min-width:0; }
    .fin-cap-mode { flex:0 0 auto; }
    body.lite .fin-cap-section-head .fin-cap-mode { flex:1 1 100%; }
    .fin-cap-table-wrap {
        width:100%; overflow:auto; border:1px solid rgba(127,127,127,.12); border-radius:8px;
        background:var(--tg-theme-bg-color,#fff);
    }
    .fin-cap-assets, .fin-cap-fx { margin:0; }
    .fin-cap-asset-row { cursor:pointer; }
    .fin-cap-asset-row:hover td { background:rgba(51,144,236,.07); }
    .fin-cap-recon-ok {
        margin:0; padding:6px 10px; border-radius:8px; font-size:12px; font-weight:650;
        color:#0f6f31; background:rgba(15,111,49,.09);
        border-left:3px solid #0f6f31;
    }
    .fin-cap-recon-meta {
        display:block; margin-top:4px; font-size:11px; color:var(--tg-theme-hint-color,#777);
        font-weight:500;
    }
    .fin-cap-alert-compact {
        display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between;
        gap:8px 10px; margin:0; padding:8px 10px; border-radius:8px;
        border:1px solid color-mix(in srgb, var(--warn,#d97706) 35%, rgba(127,127,127,.2));
        background:color-mix(in srgb, var(--warn,#d97706) 8%, var(--tg-theme-bg-color,#fff));
        font-size:12px; line-height:1.35;
    }
    .fin-cap-alert-compact-main { display:grid; gap:2px; min-width:0; flex:1 1 180px; }
    .fin-cap-alert-k {
        font-size:11px; font-weight:700; letter-spacing:.02em; text-transform:uppercase;
        color:var(--tg-theme-hint-color,#68717d);
    }
    .led-summary-actions { margin:0 0 6px; justify-content:flex-end; }
    body.lite .fin-cap-assets, body.lite .fin-cap-fx { font-size:13px; }
    body.lite .fin-cap-assets th, body.lite .fin-cap-fx th { font-size:11px; }
    body.lite .fin-cap-assets td, body.lite .fin-cap-fx td { padding:8px 10px; }
    body.lite .fin-cap-asset-row { min-height:44px; }
    html[data-theme="dark"] .fin-cap-table-wrap {
        border-color:rgba(255,255,255,.1);
        background:color-mix(in srgb, var(--tg-theme-secondary-bg-color,#2b3949) 70%, transparent);
    }
    html[data-theme="dark"] .fin-cap-recon-ok {
        color:#8ee6a3; background:rgba(76,217,100,.08); border-left-color:#8ee6a3;
    }
    html[data-theme="dark"] .fin-cap-alert-compact {
        background:color-mix(in srgb, var(--warn,#d97706) 12%, var(--tg-theme-secondary-bg-color,#2b3949));
        border-color:color-mix(in srgb, var(--warn,#d97706) 40%, rgba(255,255,255,.12));
    }
    html[data-theme="dark"] .fin-cap-asset-row:hover td { background:rgba(98,160,219,.12); }
 #grid.reconcile-grid td.fin-flow.is-in,
 #grid.transfers-grid td.fin-flow.is-in { color:var(--pos,#168d73); }
 #grid.reconcile-grid td.fin-flow.is-out,
 #grid.transfers-grid td.fin-flow.is-out { color:var(--neg,#d11); }
 #grid.reconcile-grid td.fin-flow b,
 #grid.transfers-grid td.fin-flow b { font-weight:700; }
 #grid .led-th { font-weight:650; letter-spacing:.01em; }
 #grid > thead > tr > th.led-th {
        background:rgba(51,144,236,.085); color:var(--tg-theme-text-color,#1f2328);
        border-bottom:1px solid rgba(51,144,236,.16);
    }
 #grid > tbody > tr.led-row > td { transition:background-color .12s ease; }
 #grid > tbody > tr.led-row:nth-child(even) > td { background:rgba(127,127,127,.045); }
 #grid > tbody > tr.led-row:nth-child(even) > td.led-freeze-1,
 #grid > tbody > tr.led-row:nth-child(even) > td.led-freeze-2 { background:rgba(127,127,127,.085); }
 #grid > tbody > tr.led-row:hover > td { background:rgba(51,144,236,.08); }
 #grid > tbody > tr.led-row:hover > td.led-freeze-1,
 #grid > tbody > tr.led-row:hover > td.led-freeze-2 { background:rgba(51,144,236,.13); }
 #grid .led-strong { font-weight:700; color:var(--tg-theme-text-color,#1f2328); }
 #grid .led-flow-cell { font-variant-numeric:tabular-nums; white-space:nowrap; }
 #grid .led-flow-cell .led-dir {
        display:inline-block; width:1.05em; margin-right:2px; opacity:.72; font-weight:700;
    }
 #grid .led-col-date { color:var(--tg-theme-hint-color,#74808c); font-size:10.5px; }
 #grid .led-col-counterparty, #grid .led-col-tx-hash { font-size:10.8px; }
 #grid .led-col-flag { text-align:center; min-width:46px; }
 #grid .led-col-action { width:1%; white-space:nowrap; }
 #grid .led-col-number, #grid .led-col-amount, #grid .led-col-balance,
 #grid .led-col-debt, #grid .led-col-value { font-variant-numeric:tabular-nums; }
 #grid .led-col-wallet, #grid .led-col-address, #grid .led-col-tx-hash {
        overflow:hidden; text-overflow:ellipsis;
    }
 #grid .led-freeze-2 {
        position:sticky; left:var(--led-freeze-2-left, 128px); z-index:2;
        background:var(--tg-theme-bg-color,#fff);
    }
 #grid > thead > tr > th.led-freeze-2 {
        z-index:4; background:rgba(51,144,236,.11);
    }
 #grid > thead > tr > th.led-freeze-1 {
        z-index:4; background:rgba(51,144,236,.11);
    }
    @media (max-width:760px) {
 #grid .led-freeze-2 { position:static; left:auto; }
    }

 /* Finance summary mini-tables */
    .fin-mini-table th {
        font-size:9px; font-weight:650; text-transform:uppercase; letter-spacing:.03em;
        color:var(--tg-theme-hint-color,#74808c); background:rgba(127,127,127,.045);
    }
    .fin-mini-table .led-mini-row:nth-child(even) td { background:rgba(127,127,127,.035); }
    .fin-mini-table .led-mini-row:hover td { background:rgba(51,144,236,.07); }
    .fin-mini-table b { font-variant-numeric:tabular-nums; }

 /* Analytics / P&L / Stats */
    body.pro #grid.analytics-grid { width:100%; max-width:760px; min-width:0; table-layout:fixed; }
 #grid.analytics-grid > thead > tr > th.led-ana-title {
        width:42%; background:rgba(51,144,236,.10); border-bottom:1px solid rgba(51,144,236,.16);
    }
 #grid.analytics-grid > thead > tr > th.led-ana-toolbar {
        text-align:right; background:rgba(51,144,236,.10); border-bottom:1px solid rgba(51,144,236,.16);
    }
 #grid.analytics-grid .led-ana-period-sel {
        max-width:160px; min-height:28px; margin-left:auto; font-size:11px;
    }
 #grid.analytics-grid .led-ana-kpi-cell {
        padding:4px 6px 6px !important; background:rgba(127,127,127,.035);
        border-bottom:1px solid rgba(127,127,127,.10);
    }
 #grid.analytics-grid .led-ana-kpi-table { width:100%; table-layout:fixed; }
 #grid.analytics-grid .led-ana-kpi-table .led-ana-label {
        width:58%; padding:4px 6px; font-size:11px; line-height:1.25;
    }
 #grid.analytics-grid .led-ana-kpi-table .led-ana-val {
        width:42%; padding:4px 6px; text-align:right; font-size:11.5px;
        font-variant-numeric:tabular-nums;
    }
 #grid.analytics-grid .led-ana-kpi-table .led-ana-kpi-main { background:rgba(51,144,236,.07); }
 #grid.analytics-grid .led-ana-kpi-table .led-ana-kpi-main .led-ana-val { font-size:12.5px; }
 #grid.analytics-grid .led-ana-section > td {
        padding:6px 7px 3px; font-size:10px; letter-spacing:.02em;
        border-top:1px solid rgba(127,127,127,.12); color:var(--tg-theme-hint-color,#74808c);
    }
 #grid.analytics-grid .led-ana-cols > td {
        padding:3px 6px; font-size:9px; text-transform:uppercase; letter-spacing:.03em;
        color:var(--tg-theme-hint-color,#74808c); background:rgba(127,127,127,.055);
    }
 #grid.analytics-grid .led-ana-row > td { padding:3px 6px; font-size:10.5px; line-height:1.2;
        font-variant-numeric:tabular-nums; }
 #grid.analytics-grid .led-ana-pair { overflow:hidden; text-overflow:ellipsis; }
 #grid.analytics-grid .led-ana-row:nth-child(even) > td { background:rgba(127,127,127,.04); }
 #grid.analytics-grid .led-ana-row:hover > td { background:rgba(51,144,236,.08); }
 #grid.analytics-grid .led-ana-row-dim { opacity:.72; }
 #grid.analytics-grid .led-ana-count { color:var(--tg-theme-hint-color,#74808c); font-size:10px; }
 #grid.analytics-grid .led-ana-net { font-weight:700; }
 #grid.analytics-grid .led-ana-net + small {
        display:block; margin-top:1px; font-size:9px; color:var(--tg-theme-hint-color,#74808c);
    }
 #grid.analytics-grid .led-ana-trend .led-trend-bar {
        display:inline-block; height:6px; min-width:2px; margin-right:5px; border-radius:8px;
        background:linear-gradient(90deg, rgba(51,144,236,.55), rgba(51,144,236,.22));
        vertical-align:middle;
    }

 /* Ops sheets: referrals, supplier payments, expenses */
 #grid.ops-grid .led-row-dim { opacity:.55; }
 #grid.ops-grid .led-col-action { width:1%; white-space:nowrap; }

 /* FX position */
    body.pro #grid.fx-grid { width:100%; max-width:1080px; min-width:0; }
 #grid.fx-grid .led-fx-tag {
        margin-left:4px; padding:1px 5px; border-radius:8px; font-size:9px; font-weight:650;
        color:var(--tg-theme-hint-color,#74808c); background:rgba(127,127,127,.10);
    }
 #grid.fx-grid .led-forms-meta { font-size:10px; color:var(--tg-theme-hint-color,#74808c); line-height:1.35; }
 #grid.fx-grid .sheet-total > td { border-top:1px solid rgba(127,127,127,.14); background:rgba(127,127,127,.05); }

 /* Wallets */
    body.pro #grid.wallets-grid { width:100%; max-width:1120px; min-width:0; }
 #grid.wallets-grid .led-warn-amt { color:var(--neg,#d11111); font-weight:700; }
 #grid.wallets-grid .sheet-total > td { border-top:1px solid rgba(127,127,127,.14); background:rgba(127,127,127,.05); }

 /* Summary composite */
    body.pro #grid.summary-grid { width:100%; max-width:1120px; min-width:0; table-layout:auto; }
 #grid.summary-grid .fin-summary-section { box-shadow:0 2px 10px rgba(0,0,0,.04); }

 /* Counterparty modal */
 #cp-card .led-cp-kpis {
        display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:4px 0 8px;
    }
 #cp-card .led-cp-kpi {
        display:flex; flex-direction:column; gap:2px; min-width:0; padding:7px 8px;
        border:1px solid rgba(127,127,127,.12); border-radius:8px; background:rgba(127,127,127,.045);
    }
 #cp-card .led-cp-kpi > span {
        font-size:9px; text-transform:uppercase; letter-spacing:.03em;
        color:var(--tg-theme-hint-color,#74808c);
    }
 #cp-card .led-cp-kpi > b { font-size:12px; font-variant-numeric:tabular-nums; }
 #cp-card .led-cp-name label,
 #cp-card .led-cp-address label { font-size:10px; opacity:.75; }
 #cp-card .led-cp-address .mono-cp {
        display:block; overflow:hidden; text-overflow:ellipsis; font-size:10.5px;
    }
 #cp-card .led-cp-row { padding:3px 0; border-bottom:1px solid rgba(127,127,127,.08); }
 #cp-card .led-cp-row:last-child { border-bottom:0; }
 #cp-card .led-cp-row > b { font-variant-numeric:tabular-nums; }
    @media (max-width:520px) {
 #cp-card .led-cp-kpis { grid-template-columns:1fr; }
    }

 /* Shift close Δ column */
 #grid.shift-grid .sc-diff.led-strong { font-weight:700; }

    #led-cards.cash-desk-grid {
        --cash-desk-mark: var(--tg-theme-button-color, #3390ec);
    }
    body.lite #led-cards.cash-desk-grid,
    body.lite #led-cards.cash-tasks-grid { grid-template-columns:1fr; padding:0 8px; box-sizing:border-box; }
    body.lite .cash-tasks-head, body.lite .cash-zone-head { padding:0 9px; }
    body.pro #led-cards.cash-desk-grid,
    body.pro #led-cards.cash-tasks-grid {
        grid-template-columns:1fr;
        grid-template-rows:minmax(0,1fr);
        align-items:stretch; gap:10px; height:100%; min-height:0;
    }
    body.pro #led-cards.cash-desk-grid > .cash-room,
    body.pro #led-cards.cash-tasks-grid > .cash-room {
        min-width:0; min-height:0;
        display:flex; flex-direction:column; gap:8px;
    }
    body.pro #led-cards.cash-tasks-grid > .cash-room-tasks {
        overflow:auto; height:100%;
    }
    body.pro #led-cards.cash-desk-grid > .cash-room-desks { min-height:0; overflow:auto; }
    body.pro #led-cards.cash-desk-grid.cash-multi > .cash-room-desks {
        display:grid; grid-template-columns:minmax(220px,280px) minmax(0,1fr);
        align-items:start; gap:10px;
    }
    body.pro #led-cards.cash-desk-grid.cash-single > .cash-room-desks {
        display:flex; flex-direction:column; align-items:stretch; width:100%;
    }
    body.pro #led-cards.cash-desk-grid > .cash-room-desks .cash-desk-work { display:block; margin-top:0; }
    body.pro #led-cards.cash-desk-grid > .cash-room-desks .cash-desk-registry { max-height:none; }
    body.pro #grid-wrap.cash-scroll-frame {
        height:var(--cash-frame-height,calc(100dvh - 220px));
        max-height:var(--cash-frame-height,calc(100dvh - 220px));
        overflow:hidden; overscroll-behavior:contain;
        scrollbar-gutter:stable; box-sizing:border-box; padding-right:3px; padding-bottom:10px;
    }
    .cash-desk-registry {
        padding:8px 9px !important;
        position:sticky; top:0; z-index:2;
        max-height:min(70dvh,560px); overflow:auto;
    }
    .cash-reg-head, .cash-zone-head {
        display:flex; flex-direction:column; align-items:stretch; gap:8px;
        margin-bottom:6px;
    }
    .cash-reg-head b { font-size:13px; letter-spacing:-.1px; }
    .cash-reg-title { display:inline-flex; align-items:baseline; gap:6px; }
    .cash-reg-tools {
        display:flex; flex-direction:column; align-items:stretch; gap:8px;
        width:100%; margin-left:0;
    }
    .wallets-analysis .wallets-analysis-table { width:100%; }
    .wallets-analysis .wallets-panel-head { margin-bottom:2px; }
    .wallets-table-wrap { overflow:auto; }
    .cash-reg-list { display:grid; gap:4px; }
    .cash-reg-row {
        display:grid; gap:3px; width:100%; text-align:left;
        padding:9px 10px; border-radius:8px; cursor:pointer;
        border:1px solid rgba(127,127,127,.14);
        background:color-mix(in srgb,var(--tg-theme-secondary-bg-color,rgba(127,127,127,.06)) 88%,transparent);
        color:inherit; font:inherit; box-sizing:border-box;
        transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
    }
    html[data-theme="light"] .rk.cash-reg-row.is-active,
    html[data-theme="dark"] .rk.cash-reg-row.is-active,
    .rk.cash-reg-row.is-active {
        border-color:color-mix(in srgb,var(--cash-desk-mark,#3390ec) 55%,transparent);
        background:color-mix(in srgb,var(--cash-desk-mark,#3390ec) 18%,var(--tg-theme-secondary-bg-color,rgba(127,127,127,.08)));
        box-shadow:inset 3px 0 0 var(--cash-desk-mark,#3390ec);
    }
    .cash-reg-row.is-active .cash-reg-name b { font-weight:750; }
    html[data-theme="dark"] .rk.cash-reg-row.is-active {
        background:color-mix(in srgb,var(--cash-desk-mark,#3390ec) 26%,rgba(12,18,26,.72));
        border-color:color-mix(in srgb,var(--cash-desk-mark,#3390ec) 70%,transparent);
        box-shadow:inset 3px 0 0 var(--cash-desk-mark,#3390ec);
    }
    .cash-reg-name { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
    .cash-reg-name b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .cash-reg-summary {
        display:flex; flex-wrap:wrap; gap:4px 8px;
        font-size:11px; color:var(--tg-theme-hint-color,#68717d);
    }
    .cash-reg-bal { font-variant-numeric:tabular-nums; font-weight:650; }
    @media (max-width:900px) {
        body.pro #led-cards.cash-desk-grid.cash-multi > .cash-room-desks {
            grid-template-columns:1fr;
        }
        .cash-desk-registry {
            position:static; max-height:none;
        }
    }
    @media (max-width:760px) {
        #led-cards.cash-desk-grid,
        #led-cards.cash-desk-grid.cash-multi,
        #led-cards.cash-tasks-grid,
        body.pro #led-cards.cash-desk-grid.cash-multi,
        body.lite #led-cards.cash-desk-grid,
        body.lite #led-cards.cash-tasks-grid {
            grid-template-columns:1fr !important;
            padding:0 8px; box-sizing:border-box;
        }
        body.pro #grid-wrap.cash-scroll-frame {
            height:auto; overflow-y:auto;
        }
        .cash-tasks-head, .cash-zone-head { padding:0 9px; }
        .cash-reg-tools {
            width:100%; align-items:stretch;
        }
        .cash-desk-operate,
        .cash-ops-main,
        .cash-more { width:100%; max-width:100%; }
        .cash-more-menu button {
            min-height:40px; white-space:normal; overflow:visible; text-align:left;
        }
        .cash-reg-list { width:100%; min-width:0; }
        .cash-reg-row { min-width:0; }
    }
    .cash-desk-card,
    html[data-theme="light"] .ecosystem-card.cash-desk-card,
    html[data-theme="dark"] .ecosystem-card.cash-desk-card {
        padding:10px 10px 10px 12px !important; cursor:default;
        border-color:rgba(127,127,127,.18);
        box-shadow:inset 3px 0 0 var(--cash-desk-mark,#3390ec),0 3px 14px rgba(0,0,0,.045);
        background:color-mix(in srgb,var(--tg-theme-bg-color,#fff) 92%,rgba(127,127,127,.08));
    }
    html[data-theme="dark"] .ecosystem-card.cash-desk-card {
        box-shadow:inset 3px 0 0 var(--cash-desk-mark,#3390ec),0 10px 30px rgba(0,0,0,.18);
    }
    #led-cards.cash-phone {
        padding:0 !important;
        gap:0;
    }
    body.pro #grid-wrap.cash-scroll-frame:has(#led-cards.cash-phone),
    #grid-wrap.cash-scroll-frame:has(#led-cards.cash-phone) {
        padding:0;
        height:auto;
        max-height:none;
        overflow:visible;
        scrollbar-gutter:auto;
    }
    #led-cards.cash-phone > .cash-room-desks { gap:0; }
    #led-cards.cash-phone .ecosystem-card.cash-desk-card,
    html[data-theme="light"] #led-cards.cash-phone .ecosystem-card.cash-desk-card,
    html[data-theme="dark"] #led-cards.cash-phone .ecosystem-card.cash-desk-card {
        padding:8px !important;
        border:1px solid var(--ui-border) !important;
        border-radius:var(--ui-card-radius, var(--ui-radius-md, 8px));
        box-shadow:var(--ui-shadow);
        background:var(--ui-surface-raised);
    }
    #led-cards.cash-phone .cash-desk-head {
        flex-direction:column; align-items:stretch; flex-wrap:nowrap; gap:8px;
        margin:0; padding:0; background:transparent; position:static;
    }
    html[data-theme="dark"] #led-cards.cash-phone .cash-desk-head { background:transparent; }
    #led-cards.cash-phone .cash-desk-ident { flex:none; width:100%; }
    body.pro #led-cards.cash-desk-grid.cash-phone > .cash-room-desks,
    #led-cards.cash-phone > .cash-room-desks,
    #led-cards.cash-phone .cash-desk-card {
        overflow:visible;
    }
    #led-cards.cash-phone .cash-desk-pick {
        display:flex; justify-content:space-between; align-items:center;
        width:100%; max-width:none; min-height:44px; padding:0 12px;
        border:1px solid var(--ui-border,rgba(127,127,127,.18)) !important;
        border-radius:8px; background:var(--ui-surface-muted,rgba(127,127,127,.08));
        box-shadow:none !important;
        color:inherit; text-align:left; cursor:pointer;
    }
    #led-cards.cash-phone .cash-desk-pick.is-static { cursor:default; }
    #led-cards.cash-phone .cash-desk-pick .cash-desk-title {
        font-size:15px; font-weight:650; min-width:0;
    }
    #led-cards.cash-phone .cash-desk-head-acts {
        width:100%; margin-left:0; justify-content:flex-start; flex-wrap:nowrap;
    }
    #led-cards.cash-phone .cash-balance-wrap { margin-top:4px; }
    #led-cards.cash-phone .fin-empty {
        min-height:0; padding:8px 2px; border:0; background:transparent;
        text-align:left; align-items:flex-start;
    }
    #led-cards.cash-phone .cash-more-menu {
        position:fixed; left:16px; right:16px; top:auto; width:auto; min-width:0;
        max-width:none; bottom:calc(86px + env(safe-area-inset-bottom)); z-index:90;
    }
    .cash-desk-head {
        display:flex; align-items:center; justify-content:space-between; gap:10px;
        position:sticky; top:0; z-index:4; flex-wrap:wrap;
        padding:2px 0 8px;
        background:color-mix(in srgb,var(--tg-theme-bg-color,#fff) 92%,rgba(127,127,127,.08));
    }
    html[data-theme="dark"] .cash-desk-head {
        background:color-mix(in srgb,var(--tg-theme-secondary-bg-color,#1c2733) 42%,var(--tg-theme-bg-color,#0e141b));
    }
    .cash-desk-head > span:first-child,
    .cash-desk-ident {
        display:flex; flex-direction:row; align-items:center; min-width:0; flex:1 1 8rem; gap:6px;
    }
    .cash-desk-pick {
        display:inline-flex; align-items:center; gap:6px; min-width:0; max-width:100%;
        min-height:44px; padding:0 4px 0 0; border:0; background:none;
        color:inherit; text-align:left; cursor:pointer;
    }
    .cash-desk-pick .cash-desk-title { min-width:0; }
    .cash-desk-add {
        flex:0 0 auto; min-width:44px; min-height:44px; padding:0 10px;
        border:1px solid rgba(127,127,127,.18); border-radius:8px;
        background:transparent; color:inherit;
    }
    .cash-desk-head-acts {
        display:inline-flex; align-items:center; justify-content:flex-end; gap:6px;
        flex:0 1 auto; margin-left:auto;
    }
    .cash-desk-head .cash-more { width:auto; flex:0 0 auto; }
    .cash-desk-title,
    .cash-desk-head b {
        font-size:18px; font-weight:750; letter-spacing:-.02em; line-height:1.2;
        overflow:hidden; text-overflow:ellipsis;
    }
    .cash-status { padding:2px 7px; border-radius:8px; font-size:9.5px; font-weight:650; }
    #choice-sheet .ms-item .cash-status { margin-left:auto; flex:0 0 auto; }
    .cash-status.is-open { color:#168d73; background:rgba(22,141,115,.10); }
    .cash-status.is-closed { color:var(--tg-theme-hint-color,#777); background:rgba(127,127,127,.09); }
    .cash-desk-work { min-width:0; }
    body.pro .cash-single .cash-desk-work {
        display:grid; grid-template-columns:minmax(270px,.85fr) minmax(360px,1.15fr);
        align-items:start; gap:9px; margin-top:6px;
    }
    .cash-balance-wrap { overflow-x:auto; margin-top:5px; border-radius:8px; }
    .cash-balance-table { width:100%; border-collapse:collapse; font-size:10.5px; white-space:nowrap; }
    .cash-balance-table thead { position:sticky; top:0; z-index:2; }
    .cash-balance-table th {
        padding:4px 5px; background:var(--tg-theme-secondary-bg-color,#f2f2f2);
        font-size:9px; font-weight:650;
        text-transform:uppercase; letter-spacing:.025em; color:var(--tg-theme-hint-color,#74808c);
    }
    .cash-balance-table td { padding:5px; font-variant-numeric:tabular-nums; }
    .cash-balance-table .cash-bal-row:nth-child(even) td { background:rgba(127,127,127,.04); }
    .cash-balance-table .cash-bal-row:hover td { background:rgba(51,144,236,.08); }
    .cash-balance-table .led-col-asset b { font-size:11px; }
    .cash-desk-operate { min-width:0; }
    .cash-move-form {
        display:grid; grid-template-columns:80px 105px 90px minmax(120px,1fr) auto;
        align-items:end; gap:4px; margin-top:6px; padding:6px;
        border:1px solid rgba(127,127,127,.10); border-radius:8px; background:rgba(127,127,127,.045);
    }
    .cash-move-field { display:flex; flex-direction:column; gap:2px; min-width:0; }
    .cash-move-field.ecosystem-field-row {
        display:flex; flex-direction:column; gap:2px; min-width:0;
    }
    .cash-move-field > span,
    .cash-move-field > label {
        padding-left:2px; color:var(--ui-muted-strong, var(--tg-theme-hint-color,#4a5560)); font-size:12px;
        text-transform:uppercase; letter-spacing:.03em;
    }
    .cash-move-field > input, .cash-move-field > select {
        min-width:0; width:100% !important; min-height:44px; box-sizing:border-box;
    }
    .cash-move-form > .cd-save { min-height:31px; padding-inline:10px; }
    .cash-ops-main { display:flex; align-items:center; flex-wrap:wrap; gap:4px; margin-top:5px; }
    .cash-closed-note {
        margin-top:6px; padding:9px; border:1px dashed rgba(127,127,127,.18); border-radius:8px;
        color:var(--tg-theme-hint-color,#777); font-size:10.5px; text-align:center;
    }
    .cash-log { margin-top:5px; }
    .cash-more { position:relative; }
    .cash-more > summary { list-style:none; cursor:pointer; }
    .cash-more > summary::-webkit-details-marker { display:none; }
    .cash-more-menu {
        position:absolute; right:0; top:calc(100% + 3px); z-index:9; display:grid; gap:3px;
        min-width:220px; padding:6px; border:1px solid rgba(127,127,127,.18); border-radius:8px;
        background:var(--tg-theme-bg-color,#fff); box-shadow:0 10px 28px rgba(0,0,0,.16);
    }
    .cash-more-menu.is-floating {
        position:fixed; right:auto; bottom:auto; z-index:90; overflow-y:auto;
        box-sizing:border-box;
    }
    .cash-more-menu button { width:100%; min-height:30px; text-align:left; }

    .fin-modal-form { display:flex; flex-direction:column; gap:7px; padding-top:2px; }
    .fin-modal-form > .frow {
        display:grid; grid-template-columns:142px minmax(0,1fr); align-items:center;
        gap:8px; margin:0;
    }
    .fin-modal-form > .frow > label { min-width:0; font-size:10.5px; line-height:1.25; opacity:.78; }
    .fin-modal-form > .frow > input,
    .fin-modal-form > .frow > select { width:100% !important; min-height:33px; box-sizing:border-box; }
    .fin-modal-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
    .fin-modal-grid > .frow {
        display:grid; grid-template-columns:1fr; align-items:stretch; gap:3px; margin:0;
    }
    .fin-modal-grid > .frow > label { font-size:9.5px; opacity:.68; }
    .fin-modal-grid > .frow > input,
    .fin-modal-grid > .frow > select { width:100% !important; min-height:33px; box-sizing:border-box; }
    .fin-modal-note {
        padding:7px 9px; border-radius:8px; background:rgba(127,127,127,.06);
        color:var(--ui-muted-strong, var(--tg-theme-hint-color,#4a5560)); font-size:10px; line-height:1.38;
        opacity:1;
    }
    body.pro .overlay .fin-modal-form .fbtns {
        justify-content:flex-end; margin-top:1px;
    }
    body.pro .overlay .fin-modal-form .fbtns button {
        min-width:150px; min-height:34px;
    }
    .cash-shift-counts {
        display:grid; grid-template-columns:1fr 1fr; gap:6px;
        max-height:42vh; overflow-y:auto;
    }
    .cash-shift-counts > .frow,
    .cash-shift-counts > .ecosystem-field-row {
        display:grid; grid-template-columns:1fr; align-items:stretch; gap:3px; margin:0;
    }
    .cash-shift-counts > .frow > label,
    .cash-shift-counts > .ecosystem-field-row > label { font-size:9.5px; opacity:.7; }
    .cash-shift-counts > .frow > input,
    .cash-shift-counts > .ecosystem-field-row > input { width:100% !important; min-height:32px; box-sizing:border-box; }

    body.pro #grid.shift-grid { width:100%; max-width:920px; min-width:0; table-layout:fixed; }
 #grid.shift-grid .shift-intro-row > td,
 #grid.shift-grid .shift-onchain-row > td,
 #grid.shift-grid .shift-action-row > td { padding:5px; }
    .shift-intro {
        display:flex; flex-direction:column; align-items:flex-start; gap:6px;
        padding:7px 8px; border-radius:8px; background:rgba(51,144,236,.065);
    }
    .shift-intro > span { display:flex; flex-direction:column; min-width:0; }
    .shift-intro b { font-size:11.5px; }
    .shift-intro small {
        margin-top:2px;
        color:var(--ui-muted-strong, color-mix(in srgb, var(--tg-theme-text-color,#111) 90%, #1f2937));
        font-size:9.5px;
    }
    .shift-intro i {
        flex:0 0 auto; padding:3px 7px; border-radius:8px; background:rgba(127,127,127,.09);
        color:var(--ui-muted-strong, color-mix(in srgb, var(--tg-theme-text-color,#111) 90%, #1f2937));
        font-size:9px; font-style:normal;
    }
    .shift-count-row td { height:32px; padding:4px 7px !important; }
    .shift-count-row .sc-cnt { width:100% !important; min-height:27px; box-sizing:border-box; }
    .shift-onchain-row > td > div {
        display:flex; align-items:center; justify-content:space-between; gap:8px;
        padding:7px 8px; border:1px solid rgba(127,127,127,.12); border-radius:8px;
    }
    .shift-onchain-row span { display:flex; flex-direction:column; }
    .shift-onchain-row small {
        margin-top:2px;
        color:var(--ui-muted-strong, color-mix(in srgb, var(--tg-theme-text-color,#111) 90%, #1f2937));
        font-size:9.5px;
    }
    .shift-onchain-row strong { font-size:12px; font-variant-numeric:tabular-nums; }
    .shift-close-bar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; }
    .shift-close-bar input { width:100% !important; min-height:32px; box-sizing:border-box; }
    .shift-close-bar button { min-height:32px; }
    .shift-last-row td { padding:6px 8px !important; font-size:9.5px; }

    .ban-workspace {
        display:flex; flex-direction:column; gap:10px;
        width:100%; min-width:0; max-width:none; box-sizing:border-box;
    }
    body.pro #led-cards > .ban-workspace { grid-column:1 / -1; }
    .ban-products {
        position:relative; display:flex; flex-direction:column; gap:7px; padding:10px;
        overflow:hidden; border:1px solid var(--ui-border,rgba(128,128,128,.2));
        border-radius:8px; background:var(--tg-theme-bg-color,#fff);
        width:100%; box-sizing:border-box;
    }
    .ban-provider-banner { display:flex; align-items:center; justify-content:space-between; gap:8px; }
    .ban-product-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
    .ban-product-card {
        display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 8px; padding:9px;
        border-radius:8px; background:var(--tg-theme-secondary-bg-color,#f1f1f1);
    }
    .ban-product-card > div:first-child { display:flex; flex-direction:column; }
    .ban-product-card > div:first-child > b { font-size:var(--ui-body-size,14px); }
    .ban-product-card small, .ban-product-card > span {
        color:var(--ui-muted-strong, color-mix(in srgb, var(--tg-theme-text-color,#111) 90%, #1f2937));
        font-size:var(--ui-secondary-size,12px);
    }
    .ban-product-card > strong { grid-row:1; grid-column:2; font-size:22px; }
    .ban-product-card > span { grid-row:2; grid-column:2; text-align:right; }
    .ban-pack-actions { grid-column:1 / -1; display:flex; gap:4px; flex-wrap:wrap; margin-top:5px; }
    .ban-pack-actions button { min-height:36px; padding:6px 10px; font-size:var(--ui-interactive-size,13px); }
    .ban-provider-status, .ban-provider-banner {
        display:flex; flex-direction:column; gap:2px;
        margin:0 0 8px; padding:9px 10px; border-radius:8px;
        border:1px solid rgba(127,127,127,.16);
        background:rgba(127,127,127,.06);
    }
    .ban-provider-status b, .ban-provider-banner b { font-size:var(--ui-body-size,14px); }
    .ban-provider-status span, .ban-provider-banner span {
        color:var(--tg-theme-hint-color,#68717d); font-size:var(--ui-secondary-size,12px); line-height:1.35;
    }
    .ban-products[data-provider-state="coming_soon"] .ban-product-grid,
    .ban-products[data-provider-state="unavailable"] .ban-product-grid { opacity:.62; }
    .ban-primary-grid.is-disabled, .rcard.is-disabled { opacity:.58; }
 /* Full-width stack by default — dual columns felt like phone strips on Pro. */
    .ban-primary-grid { display:grid; grid-template-columns:1fr; gap:10px; }
    @media (min-width:1100px) {
        .ban-primary-grid { grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); }
    }
    .ban-panel { padding:10px !important; margin:0 !important; cursor:default; }
    .ban-panel > header {
        display:flex; align-items:flex-start; justify-content:space-between; gap:8px; margin-bottom:7px;
    }
    .ban-panel > header > span { display:flex; flex-direction:column; min-width:0; }
    .ban-panel > header b { font-size:var(--ui-body-size,14px); }
    .ban-panel > header small {
        margin-top:2px;
        color:var(--ui-muted-strong, color-mix(in srgb, var(--tg-theme-text-color,#111) 90%, #1f2937));
        font-size:var(--ui-secondary-size,12px);
    }
    .ban-panel > header i {
        flex:0 0 auto; padding:3px 7px; border-radius:8px; background:rgba(127,127,127,.09);
        color:var(--ui-muted-strong, color-mix(in srgb, var(--tg-theme-text-color,#111) 90%, #1f2937));
        font-size:var(--ui-secondary-size,12px); font-style:normal;
    }
    .ban-panel > p {
        margin:0 0 8px;
        color:var(--ui-muted-strong, color-mix(in srgb, var(--tg-theme-text-color,#111) 90%, #1f2937));
        font-size:var(--ui-body-size,14px); line-height:1.4;
    }
    .ban-check-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px; }
    .ban-check-form input, .ban-check-form button { min-height:44px; box-sizing:border-box; }
    .ban-check-form input { width:100% !important; text-align:left; font-size:var(--ui-interactive-size,13px); }
    .ban-result:empty { display:none; }
    .ban-result {
        margin-top:7px; padding:7px 8px; border-radius:8px; background:rgba(127,127,127,.06);
        font-size:var(--ui-body-size,14px); overflow-wrap:anywhere;
    }
    .ban-watch-list, .ban-history-list { display:flex; flex-direction:column; gap:4px; }
    .ban-watch-list { max-height:180px; overflow-y:auto; }
    .ban-watch-row {
        display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:6px;
        min-height:31px; padding:4px 6px; border-radius:8px; background:rgba(127,127,127,.045);
    }
    .ban-watch-row > span { display:flex; flex-direction:column; min-width:0; }
    .ban-watch-row code {
        overflow:hidden;
        color:var(--ui-muted-strong, color-mix(in srgb, var(--tg-theme-text-color,#111) 90%, #1f2937));
        font-size:var(--ui-secondary-size,12px); text-overflow:ellipsis;
    }
    .ban-watch-row em { font-size:var(--ui-secondary-size,12px); font-style:normal; }
    .ban-watch-form {
        display:grid; grid-template-columns:100px minmax(0,1fr) auto; gap:5px; margin-top:7px;
    }
    .ban-watch-form input, .ban-watch-form button { min-height:32px; box-sizing:border-box; }
    .ban-watch-form input { width:100% !important; text-align:left; }
    .ban-history-panel { min-height:84px; }
    .ban-history-row {
        display:grid; grid-template-columns:130px minmax(110px,auto) minmax(0,1fr); align-items:center;
        gap:8px; min-height:27px; padding:3px 6px; border-radius:8px; background:rgba(127,127,127,.035);
    }
    .ban-history-row span, .ban-history-row small {
        color:var(--ui-muted-strong, color-mix(in srgb, var(--tg-theme-text-color,#111) 90%, #1f2937));
        font-size:var(--ui-secondary-size,12px);
    }
    .ban-panel .fin-empty { min-height:62px; }

 #cross-rates .modal { width:min(560px,calc(100vw - 18px)); }
    .cr-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:5px; }
    .cr-toolbar label { font-size:11px; font-weight:650; }
    .cr-row {
        display:grid; grid-template-columns:minmax(80px,1fr) 18px minmax(120px,1.2fr) auto;
        align-items:center; gap:5px; min-height:31px; padding:3px 5px; border-bottom:1px solid rgba(127,127,127,.10);
    }
    .cr-row i { opacity:.45; font-style:normal; }
    .cr-row b { text-align:right; font-variant-numeric:tabular-nums; }
    .cr-row .rk { min-height:25px; padding:2px 7px; font-size:10px; }
    .confirm-impact {
        display:flex; flex-direction:column; gap:3px; padding:9px; border-radius:8px;
        background:linear-gradient(135deg,rgba(51,144,236,.11),rgba(91,107,214,.05));
    }
    .confirm-impact b { font-size:17px; }
    .confirm-impact span, .confirm-list { font-size:11.5px; line-height:1.4; }
    .confirm-list { margin:7px 0; padding-left:20px; }

 #assets-modal .modal { width:min(620px,calc(100vw - 18px)); }
    .asset-create { display:grid; grid-template-columns:minmax(130px,1fr) 120px auto; gap:5px; }
    .asset-tools { display:flex; align-items:center; gap:6px; margin-top:6px; }
    .asset-tools > input { flex:1 1 auto; min-width:120px; }
    .asset-filter { display:flex; gap:3px; }
    .asset-list { display:grid; gap:6px; margin-top:7px; }
    .asset-group { overflow:hidden; border:1px solid rgba(127,127,127,.14); border-radius:8px; }
    .asset-group > header {
        display:flex; justify-content:space-between; align-items:center; min-height:26px;
        padding:3px 7px; background:rgba(127,127,127,.055);
    }
    .asset-group > header span { font-size:9.5px; opacity:.58; }
    .asset-row {
        display:grid; grid-template-columns:minmax(100px,1fr) auto auto; align-items:center;
        gap:6px; min-height:31px; padding:3px 7px; border-top:1px solid rgba(127,127,127,.09);
    }
    .asset-row[hidden], .asset-group[hidden] { display:none !important; }
    .asset-row.is-archive { opacity:.65; }
    .asset-main { display:flex; flex-direction:column; min-width:0; }
    .asset-main small { font-size:9px; opacity:.58; }
    .asset-state { padding:2px 6px; border-radius:8px; font-size:9px; }
    .asset-state.is-active { color:#168d73; background:rgba(22,141,115,.10); }
    .asset-state.is-archive { background:rgba(127,127,127,.10); }
    .asset-actions { display:flex; gap:3px; }
    .asset-actions button { min-height:25px; padding:2px 6px; font-size:9.5px; }

    html[data-theme="dark"] .fin-summary-section,
    html[data-theme="dark"] .cash-more-menu,
    html[data-theme="dark"] .cash-create-popover { border-color:rgba(255,255,255,.11); }
    html[data-theme="dark"] #grid > thead > tr > th.led-th,
    html[data-theme="dark"] #grid.reconcile-grid > thead > tr > th.led-th,
    html[data-theme="dark"] #grid.transfers-grid > thead > tr > th.led-th {
        background:rgba(51,144,236,.16); border-bottom-color:rgba(51,144,236,.24);
    }
    html[data-theme="dark"] #grid > thead > tr > th.led-freeze-1,
    html[data-theme="dark"] #grid > thead > tr > th.led-freeze-2 {
        background:rgba(51,144,236,.20);
    }

    @media (max-width:760px) {
        .led-context-strip { flex-direction:column; }
        .led-context-strip .led-recon { flex-basis:auto; }
        .led-context-strip .led-strip { display:grid; grid-template-columns:1fr 1fr; }
        .led-context-strip .led-strip-kpi { min-width:0; padding:5px 7px; }
        .led-context-strip .led-strip-kpi b { font-size:12.5px; }
 #grid.price-narrow {
            display:block; width:100%; min-width:0; max-width:100%; table-layout:fixed;
        }
 #grid.price-narrow > tbody { display:block; width:100%; }
 #grid.price-narrow > tbody > tr { width:100%; box-sizing:border-box; }
 #grid.price-narrow > tbody > .pr-info-row,
 #grid.price-narrow > tbody > .pr-cabinet-row,
 #grid.price-narrow > tbody > .cur-hdr { display:block; }
 #grid.price-narrow > tbody > .pr-info-row > td,
 #grid.price-narrow > tbody > .pr-cabinet-row > td,
 #grid.price-narrow > tbody > .cur-hdr > td {
            display:block; width:100%; box-sizing:border-box;
        }
        .pr-cabinet-line { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
        .pr-cabinet-line > span { grid-column:1/-1; }
        .pr-cabinet-line .btn { grid-column:1/-1; }
 #grid.price-narrow > thead { display:none; }
 #grid.price-narrow > tbody > tr[data-role="row"] {
            display:grid; grid-template-columns:1fr 1fr; gap:3px; padding:5px;
            border-bottom:1px solid rgba(127,127,127,.12);
        }
 #grid.price-narrow > tbody > tr[data-role="row"] > td {
            display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center;
            gap:5px; min-width:0; padding:2px !important; border:0;
        }
 #grid.price-narrow > tbody > tr[data-role="row"] > td:first-child {
            grid-column:1/-1; display:block; padding-left:2px !important;
        }
 #grid.price-narrow > tbody > tr[data-role="row"] > td[data-label]::before {
            content:attr(data-label); font-size:var(--ui-secondary-size,12px); color:var(--tg-theme-hint-color,#777);
        }
 #grid.price-narrow > tbody > tr.led-derived-rate-row {
            display:grid; grid-template-columns:1fr; gap:2px;
        }
 #grid.price-narrow > tbody > tr.led-derived-rate-row > td {
            display:block; grid-column:1 / -1; width:100%; min-width:0;
            box-sizing:border-box; overflow-wrap:break-word; word-break:normal;
        }
 #grid.price-narrow > tbody > tr[data-role="row"] input { width:82px; }
 #grid.price-narrow > tbody > .pr-data-row {
            display:grid; grid-template-columns:minmax(95px,1fr) 72px 72px auto; align-items:center;
        }
 #grid.price-narrow > tbody > .pr-data-row > td { display:block; padding:4px 3px; }
 #grid.price-narrow > tbody > .pr-data-row > td[data-label]::before {
            content:attr(data-label); display:block; margin-bottom:2px; font-size:var(--ui-secondary-size,12px);
            color:var(--tg-theme-hint-color,#777);
        }
        .pr-fee-row { display:block; height:auto; }
        .pr-fee-row > td { display:block; width:100% !important; height:auto; white-space:normal; }
        .cash-create-popover {
            position:absolute; right:0; left:auto; grid-template-columns:minmax(160px,1fr) auto;
            width:min(320px,calc(100vw - 24px)); max-width:calc(100vw - 24px);
        }
        body.pro .cash-single .cash-desk-work { display:block; margin-top:0; }
        .cash-move-form { grid-template-columns:1fr 1fr; }
        .cash-ref-field { grid-column:1/-1; }
        .cash-move-form .cd-save { grid-column:1/-1; min-height:38px; }
        .cash-more-menu {
            position:absolute; left:auto; right:0; top:auto; bottom:calc(100% + 4px);
            width:min(260px,calc(100vw - 24px)); min-width:220px; max-width:calc(100vw - 24px);
        }
        .fin-modal-form > .frow { grid-template-columns:1fr; gap:3px; }
        .fin-modal-grid, .cash-shift-counts { grid-template-columns:1fr; }
        .fin-modal-form .fbtns button { width:100%; max-width:none; }
 #grid.shift-grid > thead { display:none; }
 #grid.shift-grid, #grid.shift-grid > tbody { display:block; width:100%; }
 #grid.shift-grid > tbody > tr { display:grid; width:100%; box-sizing:border-box; }
 #grid.shift-grid .shift-count-row {
            grid-template-columns:minmax(90px,1fr) 1fr 1fr 54px; align-items:center;
        }
 #grid.shift-grid .shift-count-row > td { display:block; min-width:0; border:0; }
 #grid.shift-grid .shift-count-row > td::before {
            content:attr(data-label); display:block; margin-bottom:2px;
            color:var(--tg-theme-hint-color,#777); font-size:8px;
        }
        .shift-intro, .shift-onchain-row > td > div { align-items:flex-start; flex-direction:column; }
        .shift-intro i { align-self:flex-start; }
        .shift-close-bar { grid-template-columns:1fr; }
        .ban-product-grid { grid-template-columns:1fr; }
        .ban-watch-form { grid-template-columns:90px minmax(0,1fr); }
        .ban-watch-form button { grid-column:1/-1; }
        .ban-history-row { grid-template-columns:1fr auto; }
        .ban-history-row small { grid-column:1/-1; }
        .cr-row { grid-template-columns:1fr 18px 1fr; }
        .cr-row .rk { grid-column:1/-1; justify-self:end; }
        .asset-create { grid-template-columns:1fr 110px; }
        .asset-create button { grid-column:1/-1; min-height:38px; }
        .asset-tools { align-items:stretch; flex-direction:column; }
        .asset-filter { overflow-x:auto; width:100%; }
        .asset-filter .rk { flex:1 0 auto; }
        .asset-row { grid-template-columns:1fr auto; }
        .asset-actions { grid-column:1/-1; justify-content:flex-end; }
        .asset-actions button { min-height:34px; padding:5px 9px; }
        .led-grps, .led-shs, .led-focus-tabs {
            flex-wrap:wrap; max-width:100%; overflow:visible;
        }
        .led-grps .rk, .led-shs .rk { flex:0 0 auto; white-space:nowrap; }
        .rq-tools-strip { display:grid; grid-template-columns:minmax(0,1fr); overflow:visible; }
        .rq-bulk-group, .rq-page-group { width:100%; margin:0; }
        .rq-page-group { overflow:visible; flex-wrap:wrap; }
        .rq-bulk-note { min-width:0; overflow-wrap:break-word; word-break:normal; }
    }

#led-filters .led-filters-more {
  flex: 1 1 10rem;
  min-width: 0;
}

#led-filters .led-filters-more > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

#led-filters .led-filters-more > summary::-webkit-details-marker {
  display: none;
}

#led-filters .led-filters-more-body {
  display: flex;
  flex-wrap: wrap;
  gap: inherit;
  margin-top: 6px;
}

#led-filters .led-filters-more-body > :where(select, input) {
  flex: 1 1 10rem;
  min-width: 0;
}

/* Phone: tasks stay compact — no Compact/Table switch. Same signal as financeUseCards(). */
body.lite .cash-tasks-view-toggle,
body.lite .cash-tasks-view-toggle .rv,
html.tg-phone .cash-tasks-view-toggle,
html.tg-phone .cash-tasks-view-toggle .rv {
  display: none !important;
}
@media (max-width: 700px) {
  .cash-tasks-view-toggle,
  .cash-tasks-view-toggle .rv { display: none !important; }
}

/* Finance analytics, wallet cards, and ledger utilities moved to ecosystem_finance_analytics.css. */

#cash-create-modal.overlay,
#cash-post-modal.overlay {
  align-items: center;
}
#cash-create-modal .modal,
#cash-post-modal .modal {
  width: min(440px, 96vw);
  max-width: 440px;
  margin-bottom: 0;
}
#cash-post-modal .cash-move-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
#cash-post-modal .cash-ref-field,
#cash-post-modal .cash-move-form > .cd-save {
  grid-column: 1 / -1;
}
#cash-post-modal .cash-move-form > .cd-save {
  min-height: 44px;
}

/* Phone drawer = more-sheet. Lite, Telegram phone, Pro bottom bar (≤700), or JS flag. */
body.lite #cash-create-modal.overlay,
html.tg-phone #cash-create-modal.overlay,
#cash-create-modal.cash-phone-sheet.overlay,
body.lite #cash-post-modal.overlay,
html.tg-phone #cash-post-modal.overlay,
#cash-post-modal.cash-phone-sheet.overlay {
  align-items: flex-end;
  justify-content: stretch;
  padding: 0 0 calc(78px + env(safe-area-inset-bottom));
  background: rgb(0 0 0 / 16%);
  backdrop-filter: blur(2px);
  overflow: hidden;
}
body.lite #cash-create-modal .modal,
html.tg-phone #cash-create-modal .modal,
#cash-create-modal.cash-phone-sheet .modal,
body.lite #cash-post-modal .modal,
html.tg-phone #cash-post-modal .modal,
#cash-post-modal.cash-phone-sheet .modal {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: auto;
  max-height: min(72vh, 560px);
  margin: 0;
  padding: 8px 10px 12px;
  display: block;
  overflow: auto;
  border: 0 !important;
  border-radius: 8px 8px 0 0 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .18);
  background: var(--tg-theme-bg-color, #fff);
}
body.lite :is(#cash-create-modal, #cash-post-modal) .modal-head,
html.tg-phone :is(#cash-create-modal, #cash-post-modal) .modal-head,
.cash-phone-sheet :is(.modal-head) {
  border-bottom: 0;
  margin-bottom: 4px;
}
body.lite :is(#cash-create-modal, #cash-post-modal) .ecosystem-form,
html.tg-phone :is(#cash-create-modal, #cash-post-modal) .ecosystem-form,
.cash-phone-sheet .ecosystem-form,
body.lite :is(#cash-create-modal, #cash-post-modal) .ecosystem-field-row,
html.tg-phone :is(#cash-create-modal, #cash-post-modal) .ecosystem-field-row,
.cash-phone-sheet .ecosystem-field-row {
  flex: none !important;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
body.lite #cash-create-modal .ecosystem-field-row,
html.tg-phone #cash-create-modal .ecosystem-field-row,
#cash-create-modal.cash-phone-sheet .ecosystem-field-row,
body.lite #cash-post-modal .ecosystem-field-row,
html.tg-phone #cash-post-modal .ecosystem-field-row,
#cash-post-modal.cash-phone-sheet .ecosystem-field-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
body.lite #cash-post-modal .cash-move-form,
html.tg-phone #cash-post-modal .cash-move-form,
#cash-post-modal.cash-phone-sheet .cash-move-form {
  grid-template-columns: 1fr;
}
body.lite #cash-create-modal #cd-name,
html.tg-phone #cash-create-modal #cd-name,
#cash-create-modal.cash-phone-sheet #cd-name {
  width: 100%;
  min-height: 38px;
  height: 38px;
  max-height: 44px;
  flex: none;
  padding: 8px 10px;
}

/* Same breakpoint as Pro bottom #tabs — do not wait for body.lite. */
@media (max-width: 700px) {
  #cash-create-modal.overlay,
  #cash-post-modal.overlay {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0 0 calc(78px + env(safe-area-inset-bottom));
    background: rgb(0 0 0 / 16%);
    backdrop-filter: blur(2px);
    overflow: hidden;
  }
  #cash-create-modal .modal,
  #cash-post-modal .modal {
    position: relative;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: auto;
    max-height: min(72vh, 560px);
    margin: 0;
    padding: 8px 10px 12px;
    display: block;
    overflow: auto;
    border: 0 !important;
    border-radius: 8px 8px 0 0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .18);
    background: var(--tg-theme-bg-color, #fff);
  }
  #cash-create-modal .modal-head,
  #cash-post-modal .modal-head {
    border-bottom: 0;
    margin-bottom: 4px;
  }
  #cash-create-modal .ecosystem-form,
  #cash-post-modal .ecosystem-form,
  #cash-create-modal .ecosystem-field-row,
  #cash-post-modal .ecosystem-field-row {
    flex: none !important;
    min-height: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  #cash-create-modal .ecosystem-field-row,
  #cash-post-modal .ecosystem-field-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  #cash-post-modal .cash-move-form {
    grid-template-columns: 1fr;
  }
  #cash-create-modal #cd-name {
    width: 100%;
    min-height: 38px;
    height: 38px;
    max-height: 44px;
    flex: none;
    padding: 8px 10px;
  }
}
