/* Platform console pages and the workbench's credits page. Same paper-and-ink system as the rest. */

.lede { color: var(--ink-2); max-width: 720px; margin: 0 0 14px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-sm); color: var(--ink-3); margin-bottom: 12px; }
.back-link:hover { color: var(--ink); }
.section-row { display: flex; align-items: center; gap: 10px; }
.section-row .section-title { margin-bottom: 10px; }
.table-more { display: flex; justify-content: center; padding: 10px; border-top: 1px solid var(--rule-soft); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

/* notices */
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: var(--text-sm); }
.notice.rose { background: var(--rose-wash); color: var(--rose-deep); border: 1px solid var(--rose-soft); }

/* KPI row: one number per card, the note under it */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi strong { font: 600 26px/1.15 var(--font-numeral); color: var(--ink); }
.kpi small { font-size: 11.5px; }

/* clients table */
.console-tenants tbody tr { cursor: pointer; }
.console-tenants tbody tr:hover td { background: var(--rose-wash); }
.console-tenants td small { display: block; margin-top: 2px; }
.console-tenants .tag { margin-left: 6px; }
.console-tenants .spark-cell { display: inline-flex; vertical-align: middle; margin-right: 8px; }
.health-dots { display: inline-flex; gap: 4px; }
.health-dot { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; font: 600 11px/1 var(--font-numeral); }
.health-dot.ok { background: var(--celadon-soft); color: #3c5c4c; }
.health-dot.warn { background: var(--ochre-soft); color: #7c5a22; }
.health-dot.fail { background: var(--rose-soft); color: var(--rose-deep); }

/* client detail head: balance first, facts beside it, actions at the end */
.tenant-head { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 18px 22px; }
.tenant-balance { display: flex; flex-direction: column; gap: 2px; padding-right: 26px; border-right: 1px solid var(--rule-soft); }
.tenant-balance strong { font: 600 34px/1.1 var(--font-numeral); }
.tenant-balance strong.low { color: var(--rose); }
.tenant-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; margin: 0; }
.tenant-facts div { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.tenant-facts dt { font-size: 11.5px; color: var(--ink-3); flex: none; width: 48px; }
.tenant-facts dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }

/* usage: chart and the breakdown side by side */
.console-usage { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.console-usage .chart-sheet { margin-bottom: 0; }
.console-usage .hint { padding: 0 14px 12px; }
.usage-people { padding: 16px 18px; }
.usage-people .plain-list li { flex-direction: row; justify-content: space-between; border-bottom: 1px dashed var(--rule-soft); padding-bottom: 6px; }

/* ledger */
.ledger td small { display: block; margin-top: 2px; }
.ledger .numeral.minus { color: var(--ink-2); }
.ledger .numeral.plus { color: var(--celadon); font-weight: 600; }

/* pricing */
.credit-value { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 20px; margin-bottom: 14px; }
.credit-value div { display: flex; flex-direction: column; gap: 3px; }
.credit-value strong { font: 600 22px/1.2 var(--font-numeral); }
.pricing td small { display: block; margin-top: 2px; font-size: 11.5px; }
.pricing td { vertical-align: top; }

/* providers */
.provider-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.provider-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.provider-card.is-disabled { opacity: .6; }
.provider-card header strong { font: 600 16px/1.3 var(--font-display); }
.provider-card dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.provider-card dt { font-size: 11px; letter-spacing: .08em; color: var(--ink-3); }
.provider-card dd { margin: 2px 0 0; font-size: var(--text-sm); overflow-wrap: anywhere; }
.provider-card footer { flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--rule-soft); padding-top: 10px; margin-top: auto; }

/* workbench credits page */
.credit-hero { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; position: relative; overflow: hidden; }
.credit-hero div { display: flex; flex-direction: column; gap: 4px; }
.credit-hero strong { font: 600 40px/1.05 var(--font-numeral); }
.credit-hero > svg { color: var(--ochre); opacity: .55; }
.credit-hero.low { background: linear-gradient(90deg, var(--sheet), var(--ochre-soft)); }
.credit-hero.empty-balance { background: linear-gradient(90deg, var(--sheet), var(--rose-soft)); }
.credit-hero.empty-balance strong { color: var(--rose); }
.price-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.price-item { padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.price-item strong { font-weight: 600; }
.price-item .numeral { font: 600 18px/1.2 var(--font-numeral); color: var(--ink); }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tenant-head { grid-template-columns: 1fr; gap: 14px; }
  .tenant-balance { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--rule-soft); padding-bottom: 12px; }
  .tenant-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .kpi-grid, .provider-grid, .console-usage, .grid-3 { grid-template-columns: 1fr; }
  .tenant-facts { grid-template-columns: 1fr; }
  .credit-value { flex-direction: column; align-items: flex-start; }
  .credit-hero strong { font-size: 34px; }
}

/* collectors: the small platform code and messages sit under the main text */
.console-collectors td small { display: block; margin-top: 2px; }
.console-collectors tbody tr { cursor: pointer; }
