/* Página Sistema. Só classes com o prefixo sy-. */
.sy-body { display: grid; gap: 14px; }
.sy-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.sy-tile { padding: 14px 16px; border-left: 3px solid var(--line); }
.sy-tile-ok { border-left-color: var(--ok); }
.sy-tile-warn { border-left-color: var(--warn); }
.sy-tile-bad { border-left-color: var(--bad); }
.sy-label { color: var(--muted); font-size: 12px; }
.sy-value { font-size: 24px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.sy-tile-bad .sy-value { color: var(--bad); }

.sy-cols { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 14px; align-items: start; }
@media (max-width: 980px) { .sy-cols { grid-template-columns: minmax(0, 1fr); } }

.sy-meter { height: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.sy-meter > div { height: 100%; background: var(--accent); }
.sy-meter-warn > div { background: var(--warn); }
.sy-meter-bad > div { background: var(--bad); }
.sy-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 10px; }
.sy-facts dt { color: var(--muted); }
.sy-facts dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Em tela estreita a tabela rola de lado dentro do cartão, em vez de espremer as colunas. */
.sy-body table { min-width: 540px; }
.sy-body th { white-space: nowrap; }

.sy-state { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sy-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sy-ok::before { background: var(--ok); }
.sy-stale::before { background: var(--warn); }
.sy-down::before { background: var(--bad); }
.sy-down { color: var(--bad); }
.sy-detail { color: var(--muted); overflow-wrap: anywhere; }

.sy-live, .sy-platform { display: grid; gap: 14px; }
.sy-platform { margin-top: 8px; }
.sy-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sy-section-head h2, .sy-platform > h2 { margin: 0; }
.sy-section-head p { margin: 3px 0 0; }
.sy-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sy-chart { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-width: 0; content-visibility: auto; contain-intrinsic-size: auto 600px auto 250px; }
.sy-chart svg { display: block; inline-size: 100%; block-size: 190px; overflow: visible; }
.sy-grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sy-line { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.sy-line-blue { stroke: #3b82f6; } .sy-line-purple { stroke: #a855f7; } .sy-line-green { stroke: #22c55e; } .sy-line-orange { stroke: #f59e0b; }
.sy-chart figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sy-chart figcaption strong { color: var(--text); }
.sy-analytics { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); padding: 0; overflow: hidden; }
.sy-analytics > div { padding: 14px; border-inline-end: 1px solid var(--line); }
.sy-analytics dt { color: var(--muted); font-size: 12px; }
.sy-analytics dd { margin: 4px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sy-table-card { padding: 0; overflow: hidden; content-visibility: auto; contain-intrinsic-size: auto 700px auto 420px; }
.sy-table-card > h2 { padding: 14px 16px 4px; }
.sy-table-region { max-inline-size: 100%; max-block-size: min(520px, 70vh); overflow: auto; container-type: inline-size; }
.sy-table-region:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.sy-table-region table { margin: 0; min-width: 760px; border-collapse: separate; border-spacing: 0; }
.sy-table-region thead { position: sticky; inset-block-start: 0; z-index: 2; background: var(--panel); }
.sy-table-region tbody th { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--panel); }
.sy-table-region td, .sy-table-region th { font-variant-numeric: tabular-nums; }
.sy-container-table td:nth-child(n+3) { text-align: end; white-space: nowrap; }

@media (max-width: 1080px) { .sy-chart-grid { grid-template-columns: 1fr; } .sy-analytics { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .sy-analytics { grid-template-columns: repeat(2, 1fr); } .sy-section-head { align-items: flex-start; } }
@media (prefers-reduced-motion: reduce) { .sy-line { transition: none; } }

/* Gráficos vivos: área em degradê, brilho na linha e ponto pulsante no valor atual. */
.sy-chart { background: linear-gradient(180deg, #111a33, #0b1020); border-color: #27345c; }
.sy-chart svg { block-size: 200px; }
.sy-chart .sy-grid line { stroke: #ffffff14; }
.sy-chart .sy-line { fill: none; stroke-width: 2.6; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px currentColor); }
.sy-chart figcaption { color: #b9c4e4; }
.sy-chart figcaption strong { color: #f1f5ff; }
.sy-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.sy-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sy-legend i { inline-size: 10px; block-size: 10px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.sy-axis { display: flex; justify-content: space-between; margin-top: 4px; color: #8e9ab3; font-size: 11px; font-variant-numeric: tabular-nums; }
.sy-pulse { opacity: .5; transform-box: fill-box; transform-origin: center; animation: sy-pulse 2s ease-out infinite; }
@keyframes sy-pulse { from { transform: scale(.5); opacity: .7; } to { transform: scale(2.2); opacity: 0; } }
.sy-draw, .sy-history-body .sy-area { transform-box: fill-box; transform-origin: bottom; animation: sy-grow .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes sy-grow { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
.sy-history-body { display: grid; gap: 14px; }
.sy-history { display: grid; gap: 14px; }
.sy-ranges { inline-size: auto; }
.sy-ranges .btn[aria-pressed="true"] { background: linear-gradient(135deg, #2563eb, #7c3aed); border-color: #7c3aed; color: #fff; }
.sy-bar { block-size: 6px; margin: 6px 0 4px; border-radius: 99px; background: #ffffff14; overflow: hidden; }
.sy-bar > div { block-size: 100%; border-radius: 99px; background: linear-gradient(90deg, #22d3ee, #4ade80); }
.sy-tile-warn .sy-bar > div { background: linear-gradient(90deg, #facc15, #fb923c); }
.sy-tile-bad .sy-bar > div { background: linear-gradient(90deg, #fb923c, #f43f5e); }
@media (prefers-reduced-motion: reduce) { .sy-pulse, .sy-draw, .sy-history-body .sy-area { animation: none; } }
