/* Página pública de status do StatusOK (cliente). Cor de destaque do cliente em --accent. */
:root { --ink: #0B1220; --muted: #475467; --subtle: #667085; --line: #E4E7EC; --bg: #F7F8FA; --card: #FFFFFF;
  --ok: #079455; --ok-bg: #ECFDF3; --deg: #CA8A04; --deg-bg: #FEFBE8; --par: #EA580C; --par-bg: #FFF4ED; --maj: #D92D20; --maj-bg: #FEF3F2; --mnt: #2563EB; --mnt-bg: #EFF6FF; --nd: #E4E7EC;
  --accent: #4A3AD6; color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; min-width: 0; }
.logo { max-height: 36px; max-width: 220px; display: block; }
.logo-text { font: 700 20px/1.2 "Inter Tight", Inter, sans-serif; letter-spacing: -.02em; }
.top-r { display: flex; align-items: center; gap: 12px; }
.top-r select { height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; padding: 0 8px; }
.link { font-weight: 500; text-decoration: none; color: var(--muted); }
.link:hover { color: var(--ink); }
main.wrap { padding-top: 32px; padding-bottom: 40px; }
.banner { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-radius: 14px; color: #fff; margin-bottom: 28px; background: var(--ok); }
.banner h1 { margin: 0; font: 700 21px/1.3 "Inter Tight", Inter, sans-serif; letter-spacing: -.01em; }
.bn-icon { width: 30px; height: 30px; flex: none; border-radius: 50%; background: rgba(255,255,255,.22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.bn-minor { background: var(--deg); } .bn-major { background: var(--par); } .bn-critical { background: var(--maj); } .bn-maintenance { background: var(--mnt); }
.bn-minor .bn-icon, .bn-major .bn-icon, .bn-critical .bn-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5v6M10 14.5v.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.bn-maintenance .bn-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='5.5' fill='none' stroke='white' stroke-width='2'/%3E%3Cpath d='M10 7v3l2 1.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.comps { display: grid; gap: 14px; }
.list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.group { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; font-weight: 600; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary .g-name { display: inline-flex; align-items: center; gap: 8px; }
.group > summary .g-name::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--subtle); border-bottom: 2px solid var(--subtle); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.group[open] > summary .g-name::before { transform: rotate(45deg); }
.group > .list { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.comp { padding: 16px 20px; border-top: 1px solid var(--line); }
.list .comp:first-child { border-top: 0; }
.comp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comp-name { font-weight: 500; display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.help { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); color: var(--subtle); font-size: 11px; cursor: help; flex: none; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.st-ok { color: var(--ok); } .st-deg { color: var(--deg); } .st-par { color: var(--par); } .st-maj { color: var(--maj); } .st-mnt { color: var(--mnt); }
.bars { display: flex; gap: 2px; margin-top: 12px; height: 34px; }
.b { flex: 1; min-width: 2px; border-radius: 2px; background: var(--ok); opacity: .9; }
.b:hover { opacity: 1; transform: scaleY(1.08); }
.b.deg { background: var(--deg); } .b.par { background: var(--par); } .b.maj { background: var(--maj); } .b.mnt { background: var(--mnt); } .b.nd { background: var(--nd); }
.legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12.5px; color: var(--subtle); }
.updated { margin-top: 18px; color: var(--subtle); font-size: 13px; }
.foot { border-top: 1px solid var(--line); background: var(--card); }
.foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; font-size: 13.5px; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.powered b { color: var(--ink); font-family: "Inter Tight", Inter, sans-serif; }
.powered b span { color: #4A3AD6; }
.nf { padding: 80px 20px; text-align: center; }
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .banner { padding: 16px; } .banner h1 { font-size: 18px; }
  .comp, .group > summary { padding: 14px 16px; }
  .bars { height: 28px; gap: 1px; }
  .bars .b:nth-child(-n+60) { display: none; }  /* celular: últimos 30 dias */
  .legend span:first-child { visibility: hidden; }
}

/* ---- incidentes e manutenções ---- */
.events { display: grid; gap: 14px; margin-bottom: 24px; }
.events > h2, .past > h2, .month > h2 { font: 700 18px/1.3 "Inter Tight", Inter, sans-serif; margin: 6px 0 2px; letter-spacing: -.01em; }
.inc { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--deg); border-radius: 12px; padding: 16px 20px; }
.inc.imp-none { border-left-color: var(--subtle); } .inc.imp-minor { border-left-color: var(--deg); } .inc.imp-major { border-left-color: var(--par); }
.inc.imp-critical { border-left-color: var(--maj); } .inc.imp-maintenance { border-left-color: var(--mnt); }
.inc.st-resolved, .inc.st-postmortem, .inc.st-completed { border-left-color: var(--ok); }
.inc.imp-maintenance.st-completed { border-left-color: var(--mnt); }
.inc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.inc-head a { text-decoration: none; } .inc-head a:hover h3 { text-decoration: underline; }
.inc h3 { margin: 0; font: 600 16.5px/1.35 Inter, sans-serif; }
.pill { flex: none; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #F2F4F7; color: var(--muted); }
.inc.st-investigating .pill, .inc.st-identified .pill { background: var(--par-bg); color: #9A3412; }
.inc.st-monitoring .pill { background: var(--deg-bg); color: #854D0E; }
.inc.st-resolved .pill, .inc.st-completed .pill, .inc.st-postmortem .pill { background: var(--ok-bg); color: #067647; }
.inc.st-scheduled .pill, .inc.st-in_progress .pill, .inc.st-verifying .pill { background: var(--mnt-bg); color: #1E40AF; }
.window { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.tl { list-style: none; margin: 12px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.tl li { position: relative; }
.tl li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--subtle); }
.tl li:first-child::before { border-color: var(--ink); background: var(--ink); }
.tl-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }
.tl-st { font-weight: 600; }
.tl-head time { color: var(--subtle); }
.tl-body { margin-top: 2px; color: var(--ink); overflow-wrap: anywhere; }
.affects { margin: 12px 0 0; font-size: 13px; color: var(--subtle); }
.past { margin-top: 34px; display: grid; gap: 4px; }
.day { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.day h4 { margin: 0; font: 600 15px/1.3 Inter, sans-serif; }
.day > .muted, .muted { color: var(--subtle); margin: 0; font-size: 14px; }
.month { display: grid; gap: 12px; margin-bottom: 28px; }
.h1 { font: 700 26px/1.2 "Inter Tight", Inter, sans-serif; letter-spacing: -.02em; margin: 8px 0 20px; }
.btn-more { display: inline-block; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; font-weight: 500; }

/* ---- assinatura (botão, diálogo), feeds e página de preferências ---- */
.sub-btn { height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: 600 14px/1 Inter, sans-serif; cursor: pointer; white-space: nowrap; }
.sub-btn:hover { filter: brightness(1.08); }
.sub-dlg { border: 0; border-radius: 16px; padding: 0; width: min(480px, calc(100vw - 24px)); box-shadow: 0 24px 60px rgba(16, 24, 40, .25); color: var(--ink); }
.sub-dlg::backdrop { background: rgba(11, 18, 32, .45); }
.sub-dlg form { padding: 22px 24px; display: grid; gap: 10px; }
.sub-dlg h2 { margin: 0; font: 700 20px/1.3 "Inter Tight", Inter, sans-serif; }
.lbl { font-weight: 600; font-size: 14px; }
.inp, .prefs select { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; color: var(--ink); background: var(--card); }
.inp:focus, .prefs select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; padding: 0; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 14.5px; cursor: pointer; }
.chk.sub { padding-left: 24px; }
.sub-comps summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.sub-comps { display: grid; gap: 6px; }
.sub-comps[open] { padding-bottom: 4px; }
.sub-ts:empty { display: none; }
.sub-msg:empty { display: none; }
.sub-msg { padding: 10px 12px; border-radius: 10px; font-size: 14px; background: var(--maj-bg); color: #912018; }
.sub-msg.ok { background: var(--ok-bg); color: #067647; }
.sub-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; margin-top: 4px; }
.btn-primary { height: 42px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 600 15px/1 Inter, sans-serif; cursor: pointer; }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-primary.danger { background: var(--maj); }
.btn-link { border: 0; background: none; padding: 8px 4px; font: 500 14.5px/1 Inter, sans-serif; color: var(--muted); cursor: pointer; }
.btn-link.danger { color: var(--maj); }
.small { font-size: 13px; }
.feeds { margin-top: 10px; color: var(--subtle); font-size: 13px; }
.feeds a { color: var(--muted); }
.prefs { max-width: 620px; }
.prefs .card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: grid; gap: 18px; margin-bottom: 8px; }
.prefs .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prefs .row2 label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.note { padding: 12px 14px; border-radius: 10px; background: var(--ok-bg); color: #067647; margin: 0 0 16px; }
.note.warn { background: var(--deg-bg); color: #854D0E; }
@media (max-width: 640px) { .prefs .row2 { grid-template-columns: 1fr; } .sub-btn { padding: 0 10px; font-size: 13px; } }
