/* «Статистика» (30.09, переделано): итоги, живые карточки «Сейчас в REAPER», люди и главы с полосой времени. */
.st-page { display: flex; flex-direction: column; gap: 18px; padding-bottom: 24px; }
.st-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.st-seg { display: inline-flex; background: #111a29; border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.st-seg button { background: none; border: 0; color: var(--muted); padding: 6px 14px; border-radius: 7px; font-weight: 600; }
.st-seg button.on { background: #24324a; color: var(--text); }
.st-linked { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 8px 0; }
.st-linked i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.st-linked.warn { color: var(--amber); }
.st-linked.warn i { background: var(--amber); }
#st-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

#st-connect:empty { display: none; }
.st-connect {
  display: flex; gap: 18px; align-items: center; padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(135deg, #17213a, #131b2c); border: 1px solid #34466e;
}
.st-connect-icon { width: 44px; height: 44px; border-radius: 12px; background: #24335a; display: grid; place-items: center; flex: 0 0 44px; }
.st-connect b { font-size: 15px; }
.st-steps { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 6px; }
.st-steps div { display: flex; gap: 10px; align-items: baseline; }
.st-steps i { font-style: normal; width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; background: #2b3a5c; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.st-connect kbd { background: #202c44; border: 1px solid #34466e; border-radius: 5px; padding: 0 5px; font: inherit; font-size: 12px; }
.st-connect .primary { white-space: nowrap; }

.st-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.st-kpi-tile { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-kpi-tile span { color: var(--muted); font-size: 12px; }
.st-kpi-tile b { font-size: 28px; font-weight: 800; letter-spacing: 0.2px; }
.st-kpi-tile i { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.st-sec { display: flex; flex-direction: column; gap: 10px; }
.st-sec-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.st-pulse { width: 8px; height: 8px; border-radius: 50%; background: #ff6b78; box-shadow: 0 0 0 0 rgba(255, 107, 120, 0.6); animation: st-pulse 1.8s infinite; }
@keyframes st-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 120, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(255, 107, 120, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 120, 0); } }
.st-empty { color: var(--muted); background: var(--card); border: 1px dashed var(--border); border-radius: 12px; padding: 14px 16px; }

.st-live { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.st-lc { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; position: relative; overflow: hidden; }
.st-lc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone); }
.st-lc-top { display: flex; align-items: center; gap: 10px; }
.st-lc-top b { font-size: 15px; }
.st-lc-ch { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; }
.st-lc-timer { font-size: 46px; font-weight: 800; letter-spacing: 1px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.st-lc.tone-done .st-lc-timer, .st-lc.tone-idle .st-lc-timer { color: #9fb0c9; }
.st-lc-cap { color: var(--muted); font-size: 12px; }
.st-lc-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.st-lc-foot b { color: var(--text); }

.tone-rec { --tone: #ff6b78; } .tone-listen { --tone: #6cb6ff; } .tone-work { --tone: var(--green); }
.tone-render { --tone: #b7a6ff; } .tone-done { --tone: #b7a6ff; } .tone-idle { --tone: #6b7a93; }
.st-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 16%, transparent); }
.st-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.st-badge.tone-rec i { animation: st-blink 1s steps(2, start) infinite; }
@keyframes st-blink { to { visibility: hidden; } }

.st-face { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; overflow: hidden; }
.st-face img { width: 100%; height: 100%; object-fit: cover; }
.st-cover { width: 34px; height: 48px; flex: 0 0 34px; border-radius: 6px; display: grid; place-items: center; font-weight: 800; overflow: hidden; }
.st-cover.lg { width: 42px; height: 60px; flex-basis: 42px; font-size: 18px; }
.st-cover img { width: 100%; height: 100%; object-fit: cover; }
.st-cover.unknown { background: #3a3222; color: var(--amber); border: 1px dashed #6b5a36; }
.st-ch-text { display: flex; flex-direction: column; min-width: 0; }
.st-ch-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ch-text b.warn { color: var(--amber); }
.st-ch-text span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.st-person { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.st-person + .st-person { margin-top: 12px; }
.st-person-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #111a29; border-bottom: 1px solid var(--border); }
.st-person-head b { font-size: 14px; }
.st-person-head .muted { margin-left: auto; font-size: 12px; }
.st-online { font-size: 11px; font-weight: 700; color: #ff8a94; background: rgba(255, 107, 120, 0.14); padding: 2px 8px; border-radius: 999px; }
.st-rows { display: flex; flex-direction: column; }
.st-row { display: grid; grid-template-columns: minmax(150px, 0.9fr) minmax(240px, 2fr) 150px 120px 110px; gap: 18px; align-items: center; padding: 10px 16px 10px 28px; }
.st-row + .st-row { border-top: 1px solid #1f2a3d; }
.st-row:hover { background: #172134; }
.st-ch { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st-time-top { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.st-time-top b { font-size: 15px; }
.st-time-top span { color: var(--muted); font-size: 12px; }
.st-time-top em { font-style: normal; margin-left: auto; color: var(--muted); font-size: 12px; }
.st-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #1c2638; gap: 2px; }
.st-bar i { display: block; height: 100%; }
.st-takes, .st-render { display: flex; flex-direction: column; }
.st-takes b, .st-render b { font-size: 15px; }
.st-takes span, .st-render span { color: var(--muted); font-size: 12px; }
.st-last { color: var(--muted); font-size: 12px; text-align: right; }

.st-c-record { background: #ff6b78; } .st-c-listen { background: #6cb6ff; } .st-c-other { background: #5fd6a4; }
.st-c-render { background: #b7a6ff; } .st-c-idle { background: #3b4760; }
.st-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 12px; padding: 2px 4px; }
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-legend i { width: 10px; height: 10px; border-radius: 3px; }

/* КПД: минут работы на минуту хрона; зоны — норма / жёлтая / красная (30.09) */
.z-green { --z: #5fd6a4; } .z-yellow { --z: #e8c070; } .z-red { --z: #ff6b78; }
.st-kpd { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 15px; color: var(--z); }
.st-kpd i { width: 9px; height: 9px; border-radius: 50%; background: var(--z); }
.st-kpd.sm { font-size: 13px; gap: 5px; }
.st-kpd.sm i { width: 7px; height: 7px; }
.st-kpi-tile.z-green b, .st-kpi-tile.z-yellow b, .st-kpi-tile.z-red b { color: var(--z); }
.st-kpi-tile.z-green, .st-kpi-tile.z-yellow, .st-kpi-tile.z-red { border-color: color-mix(in srgb, var(--z) 45%, var(--border)); }
.st-kpd-cell { display: flex; flex-direction: column; gap: 2px; }
.st-kpd-cell > span { color: var(--muted); font-size: 12px; }
.st-inwork { color: var(--muted); font-weight: 700; font-size: 14px; }
.st-z-green { background: #5fd6a4; } .st-z-yellow { background: #e8c070; } .st-z-red { background: #ff6b78; }

.st-rating { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.st-rate { display: grid; grid-template-columns: 34px 30px minmax(140px, 1fr) minmax(200px, 2fr) 110px 170px; gap: 12px; align-items: center; padding: 10px 16px; }
.st-rate + .st-rate { border-top: 1px solid #1f2a3d; }
.st-rate.me { background: #17223a; }
.st-place { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #1f2a40; color: var(--muted); }
.st-rate:nth-child(1) .st-place { background: #4a3b12; color: #ffd66b; }
.st-rate:nth-child(2) .st-place { background: #34394a; color: #d8dde8; }
.st-rate:nth-child(3) .st-place { background: #43301f; color: #e8a86b; }
.st-rate-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-rate-name em { font-style: normal; font-size: 11px; color: var(--accent); margin-left: 6px; }
.st-rate-track { position: relative; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(95, 214, 164, 0.25), rgba(232, 192, 112, 0.25) 55%, rgba(255, 107, 120, 0.3)); }
.st-rate-track .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #5fd6a4; transform: translateX(-1px); }
.st-rate-track .mark.red { background: #ff6b78; }
.st-rate-track .dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--z);
  border: 2px solid var(--card); transform: translate(-50%, -50%); }
.st-rate-vol { color: var(--muted); font-size: 12px; text-align: right; }

.st-series + .st-series { border-top: 1px solid var(--border); }
.st-series-head { display: grid; grid-template-columns: 42px minmax(160px, 1fr) 150px 110px 150px 90px; gap: 16px; align-items: center; padding: 12px 16px; }
.st-series-progress, .st-series-num { display: flex; flex-direction: column; gap: 2px; }
.st-series-progress b, .st-series-num > b { font-size: 15px; }
.st-series-progress span, .st-series-num > span { color: var(--muted); font-size: 12px; }
.st-prog { display: block; height: 5px; border-radius: 999px; background: #1c2638; overflow: hidden; margin-top: 3px; }
.st-prog i { display: block; height: 100%; background: var(--green); }
.st-ch-no { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: #1f2a40; display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.st-person-sum { margin-left: auto; color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 1100px) {
  .st-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-row, .st-series-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .st-rate { grid-template-columns: 34px 30px minmax(0, 1fr) 110px; }
  .st-rate-track, .st-rate-vol { display: none; }
  .st-last { text-align: left; }
}
@media (max-width: 640px) {
  .st-row { grid-template-columns: minmax(0, 1fr); }
  .st-connect { flex-direction: column; align-items: stretch; }
}
