@font-face {
  font-family: 'Albert Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/vendor/fonts/albert-sans-400.woff2) format('woff2');
}
@font-face {
  font-family: 'Albert Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/vendor/fonts/albert-sans-500.woff2) format('woff2');
}
@font-face {
  font-family: 'Albert Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/vendor/fonts/albert-sans-600.woff2) format('woff2');
}
@font-face {
  font-family: 'Albert Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/vendor/fonts/albert-sans-700.woff2) format('woff2');
}

:root {
  --ink: #14213D;
  --ink-2: #1D2D4F;
  --canvas: #F5F7FB;
  --surface: #FFFFFF;
  --line: #E3E8F0;
  --signal: #0E8F7E;
  --signal-deep: #0B7568;
  --signal-soft: #E6F4F1;
  --signal-bright: #5ED1BE;
  --text: #253048;
  --muted: #5B6478;
  --sent: #15803D;
  --queued: #B45309;
  --failed: #B91C1C;
  --idle: #8A93A6;
}

.app { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--text);
  font-family: 'Albert Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.app *, .app *::before, .app *::after { box-sizing: border-box; }
.app h1, .app h2, .app h3 { margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.app h1 { font-size: 28px; line-height: 1.2; }
.app h1.h-page { font-size: 22px; }
.app h2 { font-size: 17px; line-height: 1.35; }
.app p { margin: 0; }
.app a { color: var(--signal-deep); text-decoration: underline; text-decoration-color: rgba(11,117,104,.35); text-underline-offset: 3px; }
.app a:hover { text-decoration-color: currentColor; }
.app .code-line code, .app .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.app .num { font-variant-numeric: tabular-nums; }
.app .muted { color: var(--muted); }
.app .small { font-size: 13px; }
.app .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app :focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
.app svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app svg.i-sm { width: 16px; height: 16px; }

/* ---------- Estrutura ---------- */
.app .shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.app .side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--ink); color: rgba(255,255,255,.78);
  display: flex; flex-direction: column; padding: 22px 14px 18px; }
.app .main { padding: 36px 48px 72px; min-width: 0; }
.app .content { max-width: 760px; }
.app .topbar { display: none; }

.app .brand { display: block; padding: 0 10px 22px; color: #fff; text-decoration: none; line-height: 1.25; }
.app .brand b { display: block; font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.app .brand span { font-size: 13px; color: rgba(255,255,255,.62); }
.app .nav-label { display: block; margin: 0 0 4px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.62); text-decoration: none; }
.app .nav-label:hover, .app .nav-label[aria-current] { color: #fff; }
.app .nav ul { list-style: none; margin: 0; padding: 0; }
.app .nav-client { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: rgba(255,255,255,.86);
  text-decoration: none; font-weight: 500; }
.app .nav-client:hover { background: rgba(255,255,255,.06); color: #fff; }
.app .nav-client[aria-current] { background: rgba(255,255,255,.09); color: #fff; }
.app .nav-client .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .nav .sub-nav { margin: 2px 0 8px 15px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); }
.app .sub-nav a { position: relative; display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 7px;
  color: rgba(255,255,255,.7); text-decoration: none; font-size: 14px; }
.app .sub-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.app .sub-nav a[aria-current] { color: #fff; background: rgba(94,209,190,.12); }
.app .sub-nav a[aria-current]::before { content: ''; position: absolute; left: -11px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--signal-bright); }
.app .sub-nav svg.i { width: 16px; height: 16px; opacity: .85; }
.app .nav-new { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 2px 0; padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: #fff; text-decoration: none; font-weight: 600; }
.app .nav-new:hover, .app .nav-new[aria-current] { border-color: var(--signal-bright); background: rgba(94,209,190,.1); }
.app .nav-foot { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.app .nav-foot .who { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.7); }
.app .nav-foot button { margin-top: 6px; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; }
.app .nav-foot button:hover { color: var(--signal-bright); }
.app .nav-sep { height: 14px; }

/* Ponto de status do cliente na lista. */
.app .hdot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--idle); }
.app .hdot.live { background: #22A35A; }
.app .hdot.failed { background: #E5484D; }

/* ---------- Cabeçalho do cliente + Sinal ---------- */
.app .page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.app .page-head .where { margin-top: 6px; color: var(--muted); }
.app .page-head .where span + span::before { content: ''; display: inline-block; width: 18px; }
.app .signal { margin-top: 22px; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.app .dots { display: flex; align-items: center; gap: 7px; list-style: none; margin: 0; padding: 0; }
.app .dots li { width: 12px; height: 12px; display: grid; place-items: center; }
.app .dots li::before { content: ''; display: block; border-radius: 50%; }
.app .d-sent::before { width: 10px; height: 10px; background: var(--sent); }
.app .d-pending::before { width: 10px; height: 10px; border: 2px solid var(--queued); }
.app .d-other::before { width: 8px; height: 8px; background: var(--idle); }
.app .d-empty::before { width: 6px; height: 6px; background: #D5DBE5; }
.app .d-failed::before { display: none !important; }
.app .d-failed svg { width: 12px; height: 12px; stroke: var(--failed); stroke-width: 3.2; fill: none; stroke-linecap: round; }
.app .d-new { animation: tk-in .7s ease-out both; }
@keyframes tk-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .app .d-new { animation: none; } }
.app .signal-text { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.app .signal-text.is-failed { color: var(--failed); }
.app .signal-text.is-idle { color: var(--muted); font-weight: 400; }

/* ---------- Superfície e seções ---------- */
.app .surface { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 28px; }
.app .section { padding: 24px 0; }
.app .section + .section { border-top: 1px solid var(--line); }
.app .section > h2 + * { margin-top: 6px; }
.app .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.app .lead { color: var(--muted); max-width: 60ch; }
.app .stack > * + * { margin-top: 14px; }

/* Fatos da visão geral */
.app .facts { list-style: none; margin: 14px 0 0; padding: 0; }
.app .facts li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 0; }
.app .facts li + li { border-top: 1px dashed var(--line); }
.app .facts b { display: block; font-weight: 600; color: var(--ink); }
.app .facts .why { color: var(--muted); font-size: 14px; }
.app .ok { color: var(--sent); }
.app .warn { color: var(--queued); }
.app .bad { color: var(--failed); }

/* Tabela de eventos */
.app table.events { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 14px; }
.app table.events th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 0 10px 8px 0; }
.app table.events td { padding: 9px 10px 9px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.app table.events td:first-child { color: var(--muted); white-space: nowrap; }
.app .st { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.app .st-sent { color: var(--sent); }
.app .st-pending { color: var(--queued); }
.app .st-failed { color: var(--failed); }
.app .st-other { color: var(--muted); }

/* Lista de clientes */
.app .client-list { list-style: none; margin: 0; padding: 0; }
.app .client-list li + li { border-top: 1px solid var(--line); }
.app .client-row { display: grid; grid-template-columns: 14px minmax(0,1fr) auto; align-items: center; gap: 4px 14px; padding: 16px 0; text-decoration: none !important; color: inherit !important; }
.app .client-row b { color: var(--ink); font-weight: 600; font-size: 17px; }
.app .client-row .host { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.app .client-row .state { font-size: 14px; color: var(--muted); text-align: right; }
.app .client-row .state.bad { color: var(--failed); }
.app .client-row:hover b { color: var(--signal-deep); }

/* ---------- Formulários ---------- */
.app label.field, .app .field { display: block; }
.app .field + .field { margin-top: 18px; }
.app .field > .lbl { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.app .field > .lbl .opt { font-weight: 400; color: var(--muted); }
.app .help { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.app .help.warn { color: var(--queued); }
.app .err { display: block; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--failed); }
.app .input { display: block; width: 100%; padding: 10px 12px; border: 1px solid #CBD3E0; border-radius: 9px; background: #fff; color: var(--ink);
  font: inherit; line-height: 1.4; }
.app .input.mono { font-size: 14px; }
.app .input::placeholder { color: #98A1B3; }
.app .input:hover { border-color: #AEB8C9; }
.app .input:focus { outline: 2px solid var(--signal); outline-offset: 0; border-color: var(--signal); }
.app .input[aria-invalid="true"] { border-color: var(--failed); }
.app .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.app .modes { display: grid; gap: 8px; margin-top: 4px; }
.app .mode { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.app .mode:hover { border-color: #AEB8C9; }
.app .mode:has(input:checked) { border-color: var(--signal); background: var(--signal-soft); }
.app .mode input { margin: 3px 0 0; accent-color: var(--signal-deep); }
.app .mode b { display: block; font-weight: 600; color: var(--ink); }
.app .mode span { font-size: 14px; color: var(--muted); }
.app fieldset { border: 0; margin: 18px 0 0; padding: 0; min-width: 0; }
.app legend { padding: 0; font-weight: 600; color: var(--ink); }

/* Botões */
.app .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent;
  border-radius: 9px; background: var(--signal-deep); color: #fff; font: inherit; font-weight: 600; line-height: 1.3; text-decoration: none;
  cursor: pointer; white-space: nowrap; }
.app .btn:hover { background: #09655A; color: #fff; }
.app .btn-lg { padding: 12px 22px; font-size: 15px; }
.app .btn[disabled] { background: #AEB8C9; cursor: not-allowed; }
.app .btn-quiet { background: #fff; border-color: #CBD3E0; color: var(--ink); }
.app .btn-quiet:hover { background: var(--canvas); color: var(--ink); }
.app .btn-danger { background: var(--failed); }
.app .btn-danger:hover { background: #991B1B; }
.app .btn-block { width: 100%; }
.app .linkish { padding: 0; border: 0; background: none; color: var(--signal-deep); font: inherit; font-weight: 500; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(11,117,104,.35); text-underline-offset: 3px; }

/* Avisos */
.app .banner { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 12px 14px; border-radius: 10px; font-weight: 500; }
.app .banner svg.i { margin-top: 2px; }
.app .banner.is-ok { background: #ECF7F0; color: #14532D; border: 1px solid #C4E6D0; }
.app .banner.is-warn { background: #FFF7E6; color: #7A3E00; border: 1px solid #F3D29B; }
.app .banner.is-error { background: #FDF0F0; color: #7F1D1D; border: 1px solid #F2C9C9; }
.app .surface .banner { margin: 0 0 18px; }

/* Código de instalação */
.app .code-line { display: flex; align-items: stretch; gap: 10px; margin-top: 16px; }
.app .code-line code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 12px 14px; border-radius: 9px;
  background: var(--ink); color: #E8EEF8; font-size: 13.5px; line-height: 1.5; }
.app details.more { margin-top: 18px; }
.app details > summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.app details > summary::marker { color: var(--muted); }
.app .lead code { font: inherit; font-weight: 600; color: var(--ink); }
.app .head-link { font-weight: 500; padding-top: 10px; }
.app .note { margin-top: 10px; color: var(--muted); }

/* Zona de perigo */
.app details.danger { margin-top: 28px; padding: 14px 18px; border: 1px solid #F2C9C9; border-radius: 12px; background: #fff; }
.app details.danger > summary { color: var(--failed); }
.app details.danger[open] > summary { margin-bottom: 10px; }

/* Passos (Teste) */
.app ol.steps { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: s; }
.app ol.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 0; }
.app ol.steps li::before { content: counter(s); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--signal-soft); color: var(--signal-deep); font-weight: 700; font-size: 13px; }

/* Primeiros passos */
.app ol.checklist { list-style: none; margin: 14px 0 0; padding: 0; }
.app ol.checklist li { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: start; gap: 12px; padding: 12px 0; }
.app ol.checklist li + li { border-top: 1px dashed var(--line); }
.app ol.checklist .mark { color: #AEB8C9; padding-top: 1px; }
.app ol.checklist .is-done .mark { color: var(--sent); }
.app ol.checklist b { display: block; font-weight: 600; color: var(--ink); }
.app ol.checklist .is-done b { color: var(--muted); }
.app ol.checklist .why { color: var(--muted); font-size: 14px; }
.app ol.checklist .go { font-size: 14px; font-weight: 500; white-space: nowrap; padding-top: 1px; }
.app .note.warn { color: var(--queued); font-size: 14px; }
.app .note.warn svg.i { display: inline-block; vertical-align: -3px; margin-right: 4px; }

/* Configurações: um bloco por plataforma, com cor própria */
.app .dest { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; scroll-margin-top: 20px; }
.app .dest-meta { --dc: #2F6FDB; --dc-soft: #EDF4FF; --dc-line: #CFE0FB; --dc-ink: #1C4A97; }
.app .dest-ga4 { --dc: #E8710A; --dc-soft: #FFF4E8; --dc-line: #F8D9B8; --dc-ink: #8A4205; }
.app .dest-ads { --dc: #1E8E3E; --dc-soft: #ECF7EF; --dc-line: #C6E6CF; --dc-ink: #155D2A; }
.app .dest-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 24px;
  background: var(--dc-soft); border-bottom: 1px solid var(--dc-line); box-shadow: inset 4px 0 0 var(--dc); }
.app .dest-head h2 { color: var(--dc-ink); }
.app .dest-head p { color: var(--muted); margin-top: 2px; }
.app .dest-body { padding: 20px 24px 24px; }
.app .dest .banner { margin: 0 0 18px; }
.app .pill { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: #fff; border: 1px solid var(--dc-line); color: var(--muted); }
.app .pill.on { color: var(--dc-ink); }
.app details.where { margin-top: 18px; padding: 10px 14px; border-radius: 10px; background: var(--dc-soft); border: 1px solid var(--dc-line); }
.app details.where > summary { color: var(--dc-ink); }
.app details.where ol.steps { margin-top: 6px; }
.app details.where ol.steps li { padding: 5px 0; font-size: 14px; }
.app details.where ol.steps li::before { background: #fff; color: var(--dc-ink); border: 1px solid var(--dc-line); }
.app .choice { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 8px; }
.app .choice label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.app .choice input { accent-color: var(--signal-deep); }
.app .table-wrap { overflow-x: auto; }
.app .section ol.steps + .actions { margin-top: 14px; }

/* Vazio */
.app .empty { padding: 36px 0; }
.app .empty p { margin-top: 8px; color: var(--muted); max-width: 52ch; }
.app .empty .btn { margin-top: 18px; }

/* ---------- Telas sem barra lateral ---------- */
.app.center { display: grid; place-items: center; padding: 24px 16px; }
.app .narrow { width: 100%; max-width: 380px; }
.app .narrow .brand-dark { display: block; text-align: center; color: var(--ink); text-decoration: none; margin-bottom: 18px; line-height: 1.25; }
.app .narrow .brand-dark b { display: block; font-size: 22px; font-weight: 700; }
.app .narrow .brand-dark span { color: var(--muted); font-size: 13px; }
.app .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.app .card h1 { font-size: 22px; }
.app .card .banner { margin: 16px 0 0; }
.app .card form { margin-top: 18px; }

/* ---------- Celular: a barra lateral vira barra no topo com menu ---------- */
@media (max-width: 899px) {
  .app .shell { display: block; }
  .app .side { display: none; }
  .app .main { padding: 22px 16px 56px; }
  .app .topbar { display: block; position: sticky; top: 0; z-index: 10; background: var(--ink); color: #fff; }
  .app .topbar-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
  .app .topbar .brand { padding: 0; }
  .app .topbar .brand b { display: inline; font-size: 16px; }
  .app .topbar .brand span { margin-left: 6px; }
  .app details.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid rgba(255,255,255,.22);
    border-radius: 9px; color: #fff; font-weight: 600; }
  .app details.menu > summary::-webkit-details-marker { display: none; }
  .app details.menu[open] > summary { background: rgba(255,255,255,.1); }
  .app .menu-panel { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 56px); overflow-y: auto; background: var(--ink);
    padding: 8px 12px 18px; border-top: 1px solid rgba(255,255,255,.1); box-shadow: 0 16px 30px rgba(20,33,61,.3); color: rgba(255,255,255,.78); }
  .app .surface { padding: 4px 18px; border-radius: 12px; }
  .app h1 { font-size: 22px; }
  .app .code-line { flex-direction: column; }
  .app .code-line code { white-space: normal; word-break: break-all; }
  .app .dots { gap: 4px; }
  .app .dots li { width: 11px; }
  .app .signal { gap: 10px; }
  .app .client-row { grid-template-columns: 14px minmax(0,1fr); }
  .app .client-row .state { grid-column: 2; text-align: left; }
  .app table.events td:first-child { white-space: normal; }
  .app .dest-head, .app .dest-body { padding-left: 16px; padding-right: 16px; }
  .app ol.checklist li { grid-template-columns: 24px minmax(0,1fr); }
  .app ol.checklist .go { grid-column: 2; }
}
