/* Extracted from ecosystem.css — Dashboard + Lite home surfaces. */
/* Load after ecosystem.css and before ecosystem_deals.css. */

/* --- from ecosystem.css L1193-L1316 --- */
 /* dashboard */
 #dash { margin-bottom:8px; }
 #dash[data-mode="compact"] { margin-bottom:6px; }
    .dash-compact-line { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
    .dash-kpi-main, .dash-kpi-recon, .dash-kpi-debt {
        min-height:34px; padding:6px 10px; font-size:14px;
    }
    .dash-kpi-main b, .dash-kpi-recon b, .dash-kpi-debt b { font-variant-numeric:tabular-nums; }
    .dash-kpi-main { font-weight:600; }
    .dash-chip-row { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
    .dash-chip-row.compact .rk { min-height:32px; padding:6px 10px; font-size:12px; }
 /* Dashboard financial narrative: one primary book-capital card, then wallet reality and
 an explicit reconciliation state. Glass is reserved for this hierarchy anchor only. */
    .dash-financial {
        display:grid; grid-template-columns:minmax(0,2.1fr) minmax(250px,1fr);
        gap:8px; margin-bottom:6px; align-items:stretch;
    }
    .dash-financial.is-calm { grid-template-columns:1fr; }
    .dash-fin-capital {
        display:grid; grid-template-columns:minmax(220px,1.15fr) minmax(260px,1fr);
        min-width:0; overflow:hidden; border:1px solid rgba(51,144,236,.18);
        border-radius:16px;
        background:
            radial-gradient(circle at 0 0, rgba(255,255,255,.48), transparent 42%),
            linear-gradient(135deg, rgba(51,144,236,.18), rgba(106,92,255,.07));
        box-shadow:0 8px 26px -20px rgba(31,111,208,.75), inset 0 1px 0 rgba(255,255,255,.45);
        backdrop-filter:saturate(135%) blur(14px);
        -webkit-backdrop-filter:saturate(135%) blur(14px);
    }
    .dash-fin-hero {
        display:flex; flex-direction:column; justify-content:center; align-items:flex-start;
        min-width:0; min-height:106px; padding:14px 16px; border:0; cursor:pointer;
        color:inherit; text-align:left; font:inherit; background:transparent;
    }
    .dash-fin-kicker {
        font-size:12px; font-weight:650; color:var(--tg-theme-hint-color,#6f7782);
        letter-spacing:.01em;
    }
    .dash-fin-value {
        margin-top:3px; font-size:30px; line-height:1.05; font-weight:760;
        letter-spacing:-.025em; font-variant-numeric:tabular-nums;
    }
    .dash-fin-value small { font-size:12px; font-weight:650; letter-spacing:0; opacity:.68; }
    .dash-fin-caption {
        margin-top:6px; max-width:34ch; font-size:11px; line-height:1.3;
        color:var(--tg-theme-hint-color,#727b86);
    }
    .dash-fin-breakdown {
        display:flex; flex-direction:column; justify-content:center; gap:2px;
        min-width:0; padding:9px;
        border-left:1px solid rgba(127,127,127,.13);
        background:rgba(255,255,255,.24);
    }
    .dash-fin-row {
        display:flex; align-items:center; justify-content:space-between; gap:10px;
        width:100%; min-height:28px; padding:5px 7px; border:0; border-radius:8px;
        cursor:pointer; color:inherit; font:inherit; font-size:12px; background:transparent;
    }
    .dash-fin-row:hover { background:rgba(127,127,127,.08); }
    .dash-fin-row span { color:var(--tg-theme-hint-color,#747b84); }
    .dash-fin-row b { white-space:nowrap; font-variant-numeric:tabular-nums; }
    .dash-fin-ok, .dash-fin-muted {
        margin:3px 7px 0; padding-top:5px; border-top:1px solid rgba(127,127,127,.12);
        font-size:11px; line-height:1.25;
    }
    .dash-fin-ok { color:var(--pos,#1a8d3e); font-weight:650; }
    .dash-fin-muted { color:var(--tg-theme-hint-color,#888); }
    .dash-fin-alert {
        display:flex; flex-direction:column; justify-content:center; min-width:0;
        padding:13px 14px; border:1px solid rgba(209,17,17,.19); border-left:3px solid var(--neg,#d11);
        border-radius:14px; background:linear-gradient(135deg, rgba(209,17,17,.075), rgba(209,17,17,.025));
        box-shadow:0 7px 24px -22px rgba(209,17,17,.8);
    }
    .dash-fin-alert-k {
        font-size:10px; font-weight:700; letter-spacing:.055em; text-transform:uppercase;
        color:var(--neg,#d11); opacity:.82;
    }
    .dash-fin-alert strong {
        margin-top:4px; font-size:17px; line-height:1.15; color:var(--neg,#d11);
        font-variant-numeric:tabular-nums;
    }
    .dash-fin-alert > span:not(.dash-fin-alert-k) {
        margin-top:5px; font-size:11px; line-height:1.35; color:var(--tg-theme-hint-color,#777);
    }
    .dash-fin-alert-actions { display:flex; gap:5px; flex-wrap:wrap; margin-top:9px; }
    .dash-fin-alert-actions .rk { min-height:28px; padding:5px 9px; font-size:11px; }
    .dash-fin-secondary { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 6px; }
    .dash-fin-secondary .rk { min-height:30px; padding:5px 9px; font-size:11px; }
    .dash-sec-head {
        display:flex; align-items:center; justify-content:space-between; gap:10px;
        flex:1; min-width:0;
    }
 /* Titles stay one horizontal line — never letter-stack in a squeezed column. */
    .dash-sec-head .dash-sec-title {
        margin:0; flex:0 1 auto; min-width:max-content; max-width:55%;
        white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }
    .dash-sec-summary {
        flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
        font-size:11px; font-weight:500; color:var(--tg-theme-hint-color,#777);
        font-variant-numeric:tabular-nums; text-align:right;
    }
    .dash-sec .collap-h { min-height:28px; }
    .dash-sec .collap.closed .collap-h { min-height:30px; }
    @media (max-width:760px) {
      .dash-financial { grid-template-columns:1fr; }
      .dash-fin-capital { grid-template-columns:1fr; }
      .dash-fin-breakdown {
          border-left:0; border-top:1px solid rgba(127,127,127,.13);
          background:rgba(255,255,255,.18);
      }
      .dash-fin-hero { min-height:92px; padding:13px 14px; }
      .dash-fin-value { font-size:28px; }
    }
    body.lite .dash-financial { grid-template-columns:1fr; }
    body.lite .dash-fin-capital { grid-template-columns:1fr; }
    body.lite .dash-fin-breakdown {
        border-left:0; border-top:1px solid rgba(127,127,127,.13);
        background:rgba(255,255,255,.18);
    }
    body.lite .dash-fin-hero { min-height:92px; padding:13px 14px; }
    body.lite .dash-fin-row { min-height:42px; padding:8px 7px; font-size:13px; }
    body.lite .dash-fin-alert { padding:13px; }
    body.lite .dash-fin-alert-actions .rk { min-height:42px; padding:8px 11px; font-size:13px; }

/* --- from ecosystem.css L1343-L1354 --- */
    html[data-theme="dark"] .dash-fin-capital {
        background:
            radial-gradient(circle at 0 0, rgba(255,255,255,.08), transparent 42%),
            linear-gradient(135deg, rgba(82,136,193,.19), rgba(106,92,255,.09));
        border-color:rgba(143,163,181,.18);
        box-shadow:inset 0 1px 0 rgba(255,255,255,.07);
    }
    html[data-theme="dark"] .dash-fin-breakdown { background:rgba(23,33,43,.28); }
    html[data-theme="dark"] .dash-fin-alert {
        background:linear-gradient(135deg, rgba(255,91,91,.11), rgba(255,91,91,.035));
        border-color:rgba(255,91,91,.2); border-left-color:var(--neg,#ff5b5b);
    }

/* --- from ecosystem.css L1698-L1700 --- */
 /* §19: dashboard info panel — compact tables, 2-col grid in Pro */
    .dash-sec { border:1px solid var(--tg-theme-hint-color,#e0e0e0); border-radius:10px;
        padding:8px 10px; margin-top:8px; background:var(--tg-theme-bg-color,#fff); }

/* --- from ecosystem.css L1898-L2007 --- */
    .dash-grid { display:block; }
    body.pro .dash-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(360px,1fr));
        gap:8px; align-items:start; }
    body.pro .dash-grid .dash-sec { margin-top:0; }
    body.pro[data-view="dash"] .ovh {
        display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:6px;
    }
    body.pro[data-view="dash"] .ovh .ovt { min-width:0; width:100%; }
    body.pro[data-view="dash"] .ovh .ovt-hero { grid-column:1 / -1; }
    body.pro.focus-workspace[data-view="dash"] .ovh {
        grid-template-columns:minmax(260px,2.15fr) minmax(140px,1fr) minmax(140px,1fr);
    }
    body.pro.focus-workspace[data-view="dash"] .ovh .ovt-hero {
        grid-column:auto; text-align:left; padding:8px 12px; min-height:74px;
    }
    body.pro.focus-workspace[data-view="dash"] .ovh .ovt-hero .ovv { font-size:30px; }
    body.pro.focus-workspace[data-view="dash"] .ovh .ovt:not(.ovt-hero) { min-height:74px; }
    body.pro.focus-workspace[data-view="dash"] .dash-chip-row.compact {
        flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; margin:4px 0 0;
    }
    body.pro.focus-workspace[data-view="dash"] .dash-chip-row.compact::-webkit-scrollbar { display:none; }
    body.pro.focus-workspace[data-view="dash"] .dash-chip-row.compact .rk {
        flex:0 0 auto; min-height:30px; padding:5px 10px;
    }
    .dash-core-grid { display:grid; gap:8px; margin-top:6px; grid-template-columns:minmax(0, 1fr); }
    .dash-finance-jump-row { margin:8px 0 0; }
    .dash-finance-jump { min-height:44px; }
 /* Wide Pro only: Balances + Cash side-by-side. Narrow / focus / Lite → stack. */
    @media (min-width:701px) {
      body.pro:not(.focus-workspace) .dash-core-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); align-items:stretch; }
    }
    body.pro .dash-core-grid.is-single { grid-template-columns:minmax(0, 1fr); }
    body.pro .dash-core-grid .dash-sec { margin-top:0; display:flex; }
    body.pro .dash-core-grid .dash-sec details { display:flex; flex:1; flex-direction:column; }
    body.pro .dash-core-grid .dash-sec .dash-sec-body { flex:1; overflow:auto; }
    body.pro .dash-grid .dash-sec .dash-sec-body { max-height:260px; overflow:auto; }

/* --- from ecosystem.css L4032-L4099 --- */
/* Dashboard flat sections */
.dash-sec.ecosystem-card {
  margin-top: 8px;
  padding: 10px 11px;
}

.dash-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  list-style: none;
}

.dash-sec-head::-webkit-details-marker { display: none; }
.dash-sec-head::before {
  content: "▸";
  flex: 0 0 auto;
  color: var(--tg-theme-hint-color, #68717d);
}
.dash-sec details[open] > .dash-sec-head::before { content: "▾"; }

.dash-sec-title {
  flex: 0 1 auto;
  min-width: max-content;
  max-width: 55%;
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-sec-summary {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  color: var(--tg-theme-hint-color, #68717d);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-sec-body {
  overflow: auto;
  max-height: 260px;
}

body.pro .dash-core-grid .dash-sec {
  display: flex;
  flex-direction: column;
}

body.pro .dash-core-grid .dash-sec details {
  display: flex;
  flex: 1;
  flex-direction: column;
}

body.pro .dash-core-grid .dash-sec-body {
  flex: 1;
}

/* --- from ecosystem.css L4329-L4406 --- */
.dash-modal-toolbar,
.dash-modal-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.dash-quick-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.dash-today-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--tg-theme-secondary-bg-color, #f1f1f1);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
}
.dash-today-chips { opacity: .85; }
.dash-period-row { margin-bottom: 6px; }
.dash-config-btn { margin-left: 6px; }
.dash-more-row { opacity: .72; }
.dash-meta-dim { opacity: .6; }
.dash-preset-row { flex-wrap: wrap; margin-bottom: 6px; }
.dash-recon-actions { margin-top: 10px; }

.dash-onboard-card {
  border-left: 3px solid var(--tg-theme-button-color, #3390ec);
}
.dash-onboard-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-onboard-step {
  align-items: center;
  margin: 2px 0;
}
.dash-onboard-ico {
  font-size: 17px;
  margin-right: 8px;
}
.dash-onboard-label {
  flex: 1;
}
.dash-onboard-label.is-done {
  opacity: .55;
  text-decoration: line-through;
}
.dash-onboard-label.is-muted {
  opacity: .55;
}
.dash-onboard-hide {
  margin-left: auto;
  padding: 2px 9px;
  min-height: auto;
  font-size: 13px;
}

.dash-req-stepper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px;
  margin: 4px 0;
}
.dash-step { white-space: nowrap; }
.dash-step-done { color: var(--pos, #1a8d3e); font-weight: 600; }
.dash-step-cur { color: var(--tg-theme-button-color, #3390ec); font-weight: 600; }
.dash-step-pend { color: var(--ui-muted, var(--tg-theme-hint-color, #5a6573)); font-weight: 400; }
.dash-step-sep { opacity: .4; margin: 0 3px; }

.dash-fin-value, .dash-fin-row b, .attn-badge {
  font-variant-numeric: tabular-nums;
}
.attn-inbox {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.attn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  min-height: 40px;
  padding: 8px 12px;
}
.attn-label { min-width: 0; }
.attn-badge {
  flex: 0 0 auto;
  min-width: 1.6em;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: color-mix(in srgb, var(--tg-theme-hint-color, #708090) 18%, transparent);
}


