/* Zakładka Status - kolory serii wg palety (ciemny motyw domyślny, jasny przez data-theme) */
:root { --st-s1: #3987e5; --st-s2: #d95926; --st-s3: #199e70; --st-track: rgba(150,160,180,.28);
  --st-good: #0ca30c; --st-warning: #fab219; --st-serious: #ec835a; --st-critical: #d03b3b; --st-info: #8f9bb3; }
:root[data-theme="light"] { --st-s1: #2a78d6; --st-s2: #eb6834; --st-s3: #1baf7a; --st-track: #e3e6ec; --st-info: #6b7487; }

#statusRoot { display: flex; flex-direction: column; gap: 16px; }
.card-lite { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.card-lite h4 { margin: 0 0 10px; font-size: .95rem; }
.st-note { display: block; color: var(--muted); font-size: .8rem; margin-top: 6px; }
.st-empty { color: var(--muted); padding: 12px 0; }

.st-top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.st-score { display: flex; align-items: baseline; gap: 2px; padding: 14px 18px; border-radius: 14px; border: 2px solid currentColor; }
.st-score strong { font-size: 2.6rem; line-height: 1; }
.st-score span { color: var(--muted); }
.st-top-info { flex: 1 1 260px; min-width: 0; }
.st-top-info h2 { margin: 0 0 6px; }
.st-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.st-range { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st-range button { width: auto; margin: 0; }

.st-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .82rem;
  border: 1px solid currentColor; white-space: nowrap; color: var(--text); }
.st-badge .st-ico { font-size: .8rem; }
.st-good { color: var(--st-good); } .st-warning { color: var(--st-warning); } .st-serious { color: var(--st-serious); }
.st-critical { color: var(--st-critical); } .st-info { color: var(--st-info); }
.st-badge.st-good .st-ico { color: var(--st-good); } .st-badge.st-warning .st-ico { color: var(--st-warning); }
.st-badge.st-serious .st-ico { color: var(--st-serious); } .st-badge.st-critical .st-ico { color: var(--st-critical); }
.st-badge.st-good, .st-badge.st-warning, .st-badge.st-serious, .st-badge.st-critical, .st-badge.st-info { color: var(--text); border-color: var(--border); }
.st-score.st-good strong { color: var(--st-good); } .st-score.st-warning strong { color: var(--st-warning); }
.st-score.st-serious strong { color: var(--st-serious); } .st-score.st-critical strong { color: var(--st-critical); }

.st-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.st-cat { background: var(--panel); border: 1px solid var(--border); border-left: 4px solid currentColor; border-radius: 10px;
  padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; }
.st-cat-ico { grid-row: span 3; font-size: 1.1rem; }
.st-cat-name, .st-cat strong, .st-cat small { color: var(--text); }
.st-cat strong { font-size: 1.15rem; }
.st-cat small { color: var(--muted); }

.st-findings h2 { margin-top: 0; }
.st-finding { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.st-finding-body { min-width: 0; flex: 1; color: var(--text); }
.st-finding-title { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.st-finding-cat { color: var(--muted); font-size: .8rem; }
.st-finding-detail { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.st-finding-advice { font-size: .88rem; margin-top: 3px; overflow-wrap: anywhere; }

.st-donuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.st-donut-wrap { position: relative; display: flex; justify-content: center; }
.st-arc { transition: stroke-width .15s; cursor: default; }
.st-arc:hover { stroke-width: 22; }
.st-donut-val { font-size: 22px; font-weight: 700; fill: var(--text); }
.st-donut-sub { font-size: 11px; fill: var(--muted); }
.st-legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: .86rem; }
.st-legend li { display: flex; align-items: center; gap: 8px; }
.st-legend b { margin-left: auto; font-weight: 600; }
.st-legend-inline { flex-direction: row; flex-wrap: wrap; margin: 0; gap: 4px 14px; }
.st-legend-inline b { margin-left: 0; }
.st-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.st-sw-line { height: 3px; width: 14px; border-radius: 2px; }

.st-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.st-chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 6px; }
.st-chart-head h4 { margin: 0; }
.st-chart-wrap { position: relative; }
.st-svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.st-grid { stroke: var(--border); stroke-width: 1; opacity: .5; }
.st-axis { fill: var(--muted); font-size: 11px; }
.st-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.st-threshold { stroke: var(--st-warning); stroke-width: 1; stroke-dasharray: 5 4; opacity: .8; }
.st-tip { position: absolute; top: 4px; z-index: 5; min-width: 140px; background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; font-size: .8rem; box-shadow: 0 4px 14px rgba(0,0,0,.25); pointer-events: none; }
.st-donut .st-tip { top: auto; bottom: -6px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.st-tip.hidden { display: none; }
.st-tip-row { display: flex; align-items: center; gap: 6px; }

.st-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.st-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.st-table th, .st-table td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.st-kv .st-table th { color: var(--muted); font-weight: 500; width: 42%; }
.st-kv .st-table td { overflow-wrap: anywhere; }
.st-grid-table th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.st-grid-table td { white-space: nowrap; }
@media (max-width: 700px) {
  .st-charts, .st-details { grid-template-columns: 1fr; }
  .st-donuts { grid-template-columns: 1fr 1fr; }
  .st-score strong { font-size: 2rem; }
  .st-donut svg { width: 120px; height: 120px; }
}
@media (max-width: 420px) { .st-donuts { grid-template-columns: 1fr; } }
.st-finding-title b { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .st-finding { flex-direction: column; gap: 6px; }
  .st-finding-title { display: block; }
  .st-finding-cat { display: block; }
}
.st-grid-table td:only-child { white-space: normal; overflow-wrap: anywhere; }
.st-update-btn { width: auto; margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.st-update-ico { font-weight: 700; }
.st-update-panel { display: flex; flex-direction: column; gap: 10px; }
.st-update-panel.hidden { display: none; }
.st-update-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.st-update-head button { width: auto; margin: 0 0 0 auto; }
.st-update-log { max-height: 260px; overflow: auto; background: rgba(0,0,0,.25); color: var(--text); border-radius: 8px;
  padding: 10px; font-size: .75rem; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
:root[data-theme="light"] .st-update-log { background: #f2f4f7; }
.st-range-on { width: auto; margin: 0; }
.st-power-btn { width: auto; margin: 0; }
.st-power-off { border-color: var(--st-critical) !important; }
