:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", sans-serif;
  background: #101310;
  color: #e8ece5;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #101310; }
button, input { font: inherit; }
.topbar { height: 64px; display: flex; align-items: center; padding: 0 28px; border-bottom: 1px solid #30362f; background: #161a16; }
.brand { color: #dce5c9; font-size: 14px; font-weight: 800; letter-spacing: 0; }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup img { width: 34px; height: 34px; }
.subtitle { margin-top: 2px; color: #747c72; font-size: 10px; text-transform: uppercase; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.muted { color: #747c72; font-size: 11px; }
main { width: min(1380px, calc(100% - 40px)); margin: 28px auto 60px; }
.button { min-height: 32px; border: 1px solid #414a3d; border-radius: 4px; padding: 0 12px; color: #dfe6d8; background: #252b24; cursor: pointer; }
.button:hover { border-color: #83956d; background: #2d352a; }
.button:disabled { opacity: .45; cursor: wait; }
.button.primary { background: #7f945e; color: #11150e; border-color: #9bac7a; font-weight: 700; }
.button.danger { color: #e3aaa4; border-color: #65433f; background: #2a1f1e; }
.button.small { min-height: 26px; padding: 0 8px; font-size: 10px; }
.login-panel { min-height: calc(100vh - 150px); display: grid; place-items: center; }
.login-panel form { width: min(360px, 100%); border: 1px solid #353c33; border-radius: 6px; padding: 24px; background: #181d18; }
.login-panel h1 { margin: 0 0 6px; font-size: 17px; }
.login-panel p { margin: 0 0 22px; color: #81897e; font-size: 11px; }
.login-panel label { display: grid; gap: 6px; margin-bottom: 14px; color: #aeb5a9; font-size: 11px; }
.login-panel input { height: 36px; border: 1px solid #3a4238; border-radius: 4px; padding: 0 10px; color: #edf1e8; background: #111511; outline: none; }
.login-panel input:focus { border-color: #8ea370; }
.login-panel .button { width: 100%; margin-top: 4px; }
.error-text { min-height: 18px; margin-top: 10px; color: #d78980; font-size: 11px; }
.metric-band { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #343b32; background: #181d18; }
.metric-band div { min-height: 92px; padding: 18px 20px; border-right: 1px solid #343b32; }
.metric-band div:last-child { border-right: 0; }
.metric-band span { display: block; color: #7d8679; font-size: 10px; text-transform: uppercase; }
.metric-band strong { display: block; margin-top: 11px; color: #f0f3eb; font-size: 27px; font-variant-numeric: tabular-nums; }
.section-block { margin-top: 22px; border-top: 1px solid #353c33; padding-top: 16px; }
.section-block.compact { min-width: 0; }
.section-heading { display: flex; align-items: center; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 13px; }
.section-heading p { margin: 4px 0 0; color: #727b70; font-size: 10px; }
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mode-panel { border: 1px solid #353d34; border-radius: 6px; background: #171c17; }
.mode-header { display: flex; align-items: center; height: 44px; padding: 0 14px; border-bottom: 1px solid #30372f; }
.mode-title { font-size: 13px; font-weight: 800; }
.mode-badge { margin-left: 8px; padding: 2px 6px; border-radius: 3px; background: #273521; color: #a8c181; font-size: 9px; }
.mode-actions { margin-left: auto; display: flex; gap: 7px; }
.stream-row { display: grid; grid-template-columns: 80px minmax(0, 1fr) 90px; align-items: center; min-height: 62px; padding: 10px 14px; border-bottom: 1px solid #292f28; }
.stream-row:last-child { border-bottom: 0; }
.stream-name { color: #aab2a6; font-size: 10px; text-transform: uppercase; }
.stream-version { overflow: hidden; color: #e4e9df; font: 11px Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.stream-meta { color: #697167; font-size: 9px; }
.stream-size { text-align: right; color: #99a293; font: 10px Consolas, monospace; }
.split-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.table { border: 1px solid #343b32; background: #171b17; }
.table-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px; align-items: center; min-height: 35px; padding: 0 11px; border-bottom: 1px solid #2b312a; font-size: 10px; }
.table-row:last-child { border-bottom: 0; }
.table-row span:last-child { text-align: right; color: #b5c0ac; font-family: Consolas, monospace; }
.wide .table-row { grid-template-columns: 80px 58px minmax(180px, 1fr) 125px 85px; gap: 10px; }
.wide .table-row span:last-child { text-align: right; }
.empty { padding: 24px; text-align: center; color: #6e766c; font-size: 10px; }
.status-ok { color: #a8bf83; }
.status-error { color: #d88980; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 360px; border: 1px solid #4a5544; border-radius: 4px; padding: 11px 14px; background: #20271e; color: #e3eadb; font-size: 11px; box-shadow: 0 10px 30px #0008; }
@media (max-width: 820px) {
  .topbar { padding: 0 16px; }
  main { width: min(100% - 24px, 1380px); margin-top: 16px; }
  .metric-band { grid-template-columns: repeat(2, 1fr); }
  .metric-band div:nth-child(2) { border-right: 0; }
  .metric-band div:nth-child(-n+2) { border-bottom: 1px solid #343b32; }
  .mode-grid, .split-section { grid-template-columns: 1fr; }
  .wide { overflow-x: auto; }
  .wide .table-row { min-width: 700px; }
}
