/* =====================================================================
   Página de status — /status (tema escuro, como os status pages de infraestrutura)
   ===================================================================== */
.st {
    --st-bg: #0f1218;
    --st-card: #171b23;
    --st-card-2: #1d222c;
    --st-line: #262c38;
    --st-text: #e7eaf0;
    --st-muted: #8b93a3;
    --st-ok: #01e152;
    --st-ok-text: #34d872;
    --st-warn: #f5b301;
    --st-down: #f0453a;
    --st-info: #4c8dff;
    --st-none: #2a303c;
    --st-ease: cubic-bezier(.2, .8, .2, 1);
    background: var(--st-bg);
    color: var(--st-text);
    padding-bottom: 72px;
}
.st *, .st *::before, .st *::after { box-sizing: border-box; }
.st-wrap { width: min(860px, calc(100% - 32px)); margin-inline: auto; }

/* ---------- topo ---------- */
.st-hero { padding: 22px 0 46px; background: radial-gradient(900px 360px at 50% -40%, rgba(1, 225, 82, .14), transparent 70%); }
.st-tabs { display: flex; justify-content: center; gap: 6px; padding-bottom: 18px; border-bottom: 1px solid var(--st-line); overflow-x: auto; scrollbar-width: none; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; color: var(--st-muted); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .18s, color .18s; }
.st-tab:hover { color: var(--st-text); background: rgba(255, 255, 255, .04); }
.st-tab.is-active { color: #fff; background: var(--st-card-2); }
.st-tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--st-info); color: #fff; font-size: 11px; }
.st-overall { display: grid; justify-items: center; gap: 10px; padding-top: 56px; text-align: center; }
.st-overall-icon {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    background: var(--st-ok); color: #04210f; font-size: 24px;
    box-shadow: 0 0 0 8px rgba(1, 225, 82, .12), 0 0 34px rgba(1, 225, 82, .35);
    animation: st-pop .5s var(--st-ease) both;
}
.st-overall.is-warn .st-overall-icon { background: var(--st-warn); color: #2a1d00; box-shadow: 0 0 0 8px rgba(245, 179, 1, .14), 0 0 34px rgba(245, 179, 1, .3); }
.st-overall.is-down .st-overall-icon { background: var(--st-down); color: #fff; box-shadow: 0 0 0 8px rgba(240, 69, 58, .16), 0 0 34px rgba(240, 69, 58, .35); }
.st-overall.is-info .st-overall-icon { background: var(--st-info); color: #fff; box-shadow: 0 0 0 8px rgba(76, 141, 255, .16), 0 0 34px rgba(76, 141, 255, .3); }
.st-overall.is-muted .st-overall-icon { background: var(--st-card-2); color: var(--st-muted); box-shadow: none; }
.st-overall h1 { margin: 6px 0 0; color: #fff; font: 700 clamp(26px, 4.4vw, 36px)/1.15 var(--font-display, inherit); letter-spacing: -.01em; }
.st-updated { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--st-muted); font-size: 14px; }
.st-live { width: 8px; height: 8px; border-radius: 50%; background: var(--st-ok); box-shadow: 0 0 0 0 rgba(1, 225, 82, .6); animation: st-ping 2s infinite; }
.st.is-refreshing .st-live { background: var(--st-info); }
@keyframes st-ping { 0% { box-shadow: 0 0 0 0 rgba(1, 225, 82, .55); } 70% { box-shadow: 0 0 0 9px rgba(1, 225, 82, 0); } 100% { box-shadow: 0 0 0 0 rgba(1, 225, 82, 0); } }
@keyframes st-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- corpo ---------- */
.st-body { display: grid; gap: 18px; }
.st-panel { display: grid; gap: 14px; animation: st-fade .35s var(--st-ease) both; }
.st-panel[hidden] { display: none; }
@keyframes st-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.st-h2 { margin: 6px 0 4px; color: #fff; font-size: 20px; }
.st-month { margin: 14px 0 0; color: var(--st-muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.st-group { border: 1px solid var(--st-line); border-radius: 16px; background: var(--st-card); overflow: hidden; }
.st-group summary { display: flex; align-items: center; gap: 12px; padding: 18px 22px; cursor: pointer; list-style: none; }
.st-group summary::-webkit-details-marker { display: none; }
.st-group summary:hover { background: rgba(255, 255, 255, .02); }
.st-group-name { flex: 1; color: #fff; font-weight: 700; font-size: 15px; }
.st-chevron { color: var(--st-muted); transition: transform .2s var(--st-ease); }
.st-group:not([open]) .st-chevron { transform: rotate(-90deg); }
.st-list { margin: 0; padding: 0 22px 8px; list-style: none; }
.st-item { padding: 16px 0 18px; border-top: 1px solid var(--st-line); }
.st-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.st-item-name { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-weight: 600; font-size: 15px; min-width: 0; }
.st-item-state { display: inline-flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.st-item-state small { color: var(--st-muted); font-weight: 500; font-size: 12px; }
.st-info { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--st-muted); cursor: help; }
.st-info:hover, .st-info:focus-visible { color: #fff; background: rgba(255, 255, 255, .06); }

.st-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--st-none); }
.is-ok > .st-dot, .st-dot.is-ok { background: var(--st-ok); box-shadow: 0 0 0 3px rgba(1, 225, 82, .16); }
.is-warn > .st-dot, .st-dot.is-warn { background: var(--st-warn); box-shadow: 0 0 0 3px rgba(245, 179, 1, .18); }
.is-down > .st-dot, .st-dot.is-down { background: var(--st-down); box-shadow: 0 0 0 3px rgba(240, 69, 58, .2); animation: st-blink 1.4s infinite; }
.is-info > .st-dot, .st-dot.is-info { background: var(--st-info); }
@keyframes st-blink { 50% { opacity: .45; } }
.st-item-state.is-ok { color: var(--st-ok-text); }
.st-item-state.is-warn { color: var(--st-warn); }
.st-item-state.is-down { color: var(--st-down); }
.st-item-state.is-info { color: var(--st-info); }
.st-item-state.is-muted { color: var(--st-muted); }

.st-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--st-card-2); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.st-pill.is-ok { color: var(--st-ok-text); }
.st-pill.is-warn { color: var(--st-warn); }
.st-pill.is-down { color: var(--st-down); }
.st-pill.is-info { color: var(--st-info); }
.st-pill.is-muted { color: var(--st-muted); }

/* barras de 90 dias */
.st-bars { display: flex; gap: 2px; height: 34px; margin-top: 12px; }
.st-bar { flex: 1; min-width: 2px; border-radius: 2px; background: var(--st-none); transition: transform .15s, filter .15s; cursor: default; }
.st-bars .st-bar:hover { transform: scaleY(1.12); filter: brightness(1.25); }
.st-bar.is-operational { background: var(--st-ok); }
.st-bar.is-degraded { background: var(--st-warn); }
.st-bar.is-down { background: var(--st-down); }
.st-bars-legend { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--st-muted); font-size: 12px; }
.st-legend-up { color: var(--st-text); font-weight: 600; }
.st-legend-from .is-30 { display: none; }

.st-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; color: var(--st-muted); font-size: 13px; }
.st-legend span { display: inline-flex; align-items: center; gap: 7px; }
.st-legend .st-bar { display: inline-block; flex: none; width: 10px; height: 16px; }
.st-note { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0; color: var(--st-muted); font-size: 13px; text-align: center; }

/* avisos ativos e eventos */
.st-incident, .st-event { border: 1px solid var(--st-line); border-radius: 16px; background: var(--st-card); padding: 18px 22px; }
.st-incident { border-left: 4px solid var(--st-warn); }
.st-incident.is-down { border-left-color: var(--st-down); background: linear-gradient(90deg, rgba(240, 69, 58, .08), var(--st-card) 40%); }
.st-incident.is-warn { background: linear-gradient(90deg, rgba(245, 179, 1, .07), var(--st-card) 40%); }
.st-incident.is-info { border-left-color: var(--st-info); background: linear-gradient(90deg, rgba(76, 141, 255, .08), var(--st-card) 40%); }
.st-incident header { display: flex; gap: 12px; align-items: flex-start; }
.st-incident header > i { margin-top: 2px; font-size: 18px; }
.st-incident.is-down header > i { color: var(--st-down); }
.st-incident.is-warn header > i { color: var(--st-warn); }
.st-incident.is-info header > i { color: var(--st-info); }
.st-incident header strong { display: block; color: #fff; font-size: 16px; }
.st-incident header span { color: var(--st-muted); font-size: 13px; }
.st-incident-msg { margin: 10px 0 0 30px; color: var(--st-text); font-size: 14px; }
.st-event header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.st-event header strong { color: #fff; font-size: 16px; }
.st-event-meta { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--st-muted); font-size: 13px; }
.st-timeline { display: grid; gap: 12px; margin: 14px 0 0; padding: 0 0 0 18px; list-style: none; border-left: 2px solid var(--st-line); }
.st-timeline li { position: relative; display: grid; gap: 2px; font-size: 14px; color: var(--st-text); }
.st-timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--st-card); border: 2px solid var(--st-muted); }
.st-timeline li:first-child::before { border-color: var(--st-ok); background: var(--st-ok); }
.st-timeline b { color: #fff; font-size: 13px; }
.st-timeline time { color: var(--st-muted); font-size: 12px; }

.st-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; border: 1px dashed var(--st-line); border-radius: 16px; color: var(--st-muted); text-align: center; }
.st-empty i { font-size: 28px; color: var(--st-ok); }
.st-empty strong { color: #fff; }

.st-help { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 8px; padding: 20px 22px; border: 1px solid var(--st-line); border-radius: 16px; background: linear-gradient(120deg, rgba(1, 225, 82, .09), var(--st-card) 55%); }
.st-help strong { display: block; color: #fff; font-size: 15px; }
.st-help span { color: var(--st-muted); font-size: 14px; }
.st-help-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.st-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--st-line); background: var(--st-card-2); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; transition: transform .18s var(--st-ease), border-color .18s; }
.st-btn:hover { transform: translateY(-2px); border-color: var(--st-muted); }
.st-btn.is-primary { background: var(--st-ok); border-color: var(--st-ok); color: #04210f; }

.st-tooltip { position: fixed; z-index: 60; max-width: 260px; padding: 8px 11px; border-radius: 10px; background: #fff; color: #1a1e24; font-size: 12.5px; line-height: 1.45; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); pointer-events: none; }

@media (max-width: 680px) {
    .st-hero { padding-bottom: 32px; }
    .st-tabs { justify-content: flex-start; }
    .st-overall { padding-top: 36px; }
    .st-group summary { padding: 16px; }
    .st-list { padding: 0 16px 6px; }
    .st-item-head { align-items: flex-start; }
    .st-item-state { flex-direction: column; align-items: flex-end; gap: 0; }
    .st-bars .st-bar:nth-child(-n+60) { display: none; }
    .st-legend-from .is-90 { display: none; }
    .st-legend-from .is-30 { display: inline; }
    .st-incident, .st-event { padding: 16px; }
    .st-event header { flex-direction: column; align-items: flex-start; }
    .st-help { flex-direction: column; align-items: stretch; }
    .st-help-actions .st-btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .st *, .st *::before { animation: none !important; transition: none !important; }
}
