/* Nexora — sistema visual corporativo. Sem fontes ou recursos externos (CSP estrita). */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f5f6fa;
  --surface-3: #eceef5;
  --border: #e8ebf2;
  --border-strong: #d4d9e4;
  --text: #121826;
  --text-2: #4b5567;
  --text-3: #8791a5;
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: #eef0ff;
  --brand-ink: #3730a3;
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #a855f7 100%);
  --ok: #0a8f5b;      --ok-soft: #e6f7ef;
  --warn: #b26a00;    --warn-soft: #fff5e0;
  --bad: #d92d20;     --bad-soft: #feeceb;
  --info: #2563eb;    --info-soft: #eaf1ff;
  --muted-soft: #eef0f5;
  /* barra lateral clara: mesma superfície do conteúdo, com o item ativo em destaque suave */
  --side-bg: #ffffff;
  --side-bg-2: #f3f4f9;
  --side-text: #4b5567;
  --side-text-2: #8791a5;
  --side-ink: #121826;
  --side-active: #4f46e5;
  --side-active-bg: #eef0ff;
  --side-border: #eef0f5;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 24px 56px rgba(16, 24, 40, .22);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 248px;
  --topbar: 64px;
  --font: Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e16; --surface: #131722; --surface-2: #181d2b; --surface-3: #212738; --border: #222839; --border-strong: #333b52;
    --text: #edf0f7; --text-2: #aab3c5; --text-3: #7b869c;
    --brand: #8b8dff; --brand-hover: #a5a7ff; --brand-soft: #1e2046; --brand-ink: #c3c5ff;
    --grad: linear-gradient(135deg, #5b55f0 0%, #8b5cf6 60%, #b86bf7 100%);
    --ok: #3ecf8e; --ok-soft: #0e2a1f; --warn: #f5b84b; --warn-soft: #33260b;
    --bad: #ff7a6e; --bad-soft: #3a1513; --info: #6ea8ff; --info-soft: #10264a; --muted-soft: #1b2133;
    --side-bg: #0f121b; --side-bg-2: #171c2a; --side-text: #aab3c5; --side-text-2: #7b869c; --side-ink: #edf0f7;
    --side-active: #a5a7ff; --side-active-bg: #1e2046; --side-border: #1b2030;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 24px rgba(0,0,0,.45); --shadow-lg: 0 24px 56px rgba(0,0,0,.65);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0e16; --surface: #131722; --surface-2: #181d2b; --surface-3: #212738; --border: #222839; --border-strong: #333b52;
  --text: #edf0f7; --text-2: #aab3c5; --text-3: #7b869c;
  --brand: #8b8dff; --brand-hover: #a5a7ff; --brand-soft: #1e2046; --brand-ink: #c3c5ff;
  --grad: linear-gradient(135deg, #5b55f0 0%, #8b5cf6 60%, #b86bf7 100%);
  --ok: #3ecf8e; --ok-soft: #0e2a1f; --warn: #f5b84b; --warn-soft: #33260b;
  --bad: #ff7a6e; --bad-soft: #3a1513; --info: #6ea8ff; --info-soft: #10264a; --muted-soft: #1b2133;
  --side-bg: #0f121b; --side-bg-2: #171c2a; --side-text: #aab3c5; --side-text-2: #7b869c; --side-ink: #edf0f7;
  --side-active: #a5a7ff; --side-active-bg: #1e2046; --side-border: #1b2030;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 24px rgba(0,0,0,.45); --shadow-lg: 0 24px 56px rgba(0,0,0,.65);
}
/* administração do sistema: mesma linguagem, destaque âmbar para nunca confundir com o portal dos clientes */
.admin-site { --side-active: #b45309; --side-active-bg: color-mix(in srgb, #b45309 14%, transparent);
  --grad: linear-gradient(135deg, #f59e0b, #b45309 60%, #78350f); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 27px; font-weight: 720; letter-spacing: -.025em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 620; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--text-2); }
::selection { background: var(--brand-soft); }

/* ---------------------------------------------------------------- layout */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--side-border); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 18px; height: var(--topbar); font-weight: 700; font-size: 16px;
  letter-spacing: -.01em; color: var(--side-ink); }
.login .brand, .card .brand { color: var(--text); border: 0; height: auto; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
  background: var(--grad); box-shadow: 0 6px 14px -6px var(--brand); flex: none; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--side-text-2); letter-spacing: .02em; margin-top: 1px; }
.login .brand small, .card .brand small { color: var(--text-3); }
.nav { padding: 6px 12px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; scrollbar-width: thin; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--side-text-2); padding: 16px 12px 6px; font-weight: 650; }
.nav a, .nav-more { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--side-text);
  font-weight: 550; font-size: 14px; transition: background .12s, color .12s; }
.nav a:hover, .nav-more:hover { background: var(--side-bg-2); color: var(--side-ink); text-decoration: none; }
.nav a.active { background: var(--side-active-bg); color: var(--side-active); font-weight: 650; }
.nav a.active svg { color: var(--side-active); }
.nav svg { width: 18px; height: 18px; flex: none; color: var(--side-text-2); }
.nav a:hover svg { color: var(--side-ink); }
.nav a.active:hover svg { color: var(--side-active); }
.sidebar-foot { padding: 12px 18px; border-top: 1px solid var(--side-border); font-size: 12px; color: var(--side-text-2); }
.sidebar-foot div { color: var(--side-text); font-weight: 500; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { height: var(--topbar); display: flex; align-items: center; gap: 12px; padding: 0 36px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(10px); position: sticky; top: 0; z-index: 5; }
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--text-3); font-size: 13px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--text-2); }
.crumbs .sep { color: var(--border-strong); }
.crumbs .cur { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.search-trigger { display: inline-flex; align-items: center; gap: 8px; height: 36px; width: 300px; max-width: 34vw; padding: 0 10px 0 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-3); font: inherit; cursor: pointer; }
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-trigger svg { width: 16px; height: 16px; }
.search-trigger > span:not(.kbd) { flex: 1; text-align: left; }
.kbd { font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--text-3); border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 5px; padding: 0 5px; background: var(--surface); line-height: 18px; }
.org-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: default; max-width: 240px; }
.org-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.org-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.org-chip { cursor: pointer; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; padding: 3px 4px 3px 3px; border: 0; background: none; cursor: pointer; font: inherit; color: var(--text); border-radius: 999px; }
.user-chip:hover { background: var(--surface-2); }
.user-chip .who { text-align: left; line-height: 1.2; }
.user-chip .who b { display: block; font-size: 13px; font-weight: 600; }
.user-chip .who small { font-size: 11.5px; color: var(--text-3); }
.content { padding: 18px 36px 56px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--text-2); max-width: 760px; }
.page-head .tag { vertical-align: middle; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn.menu-toggle { display: none; }

/* ---------------------------------------------------------------- componentes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); min-height: 54px; }
.card-head h2 { font-size: 14.5px; }
.card-body { padding: 18px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .search-trigger { width: 200px; } }

.kpi { padding: 18px; position: relative; }
.kpi .label { color: var(--text-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi .value { font-size: 30px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .sub { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
a.card.kpi:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer;
  white-space: nowrap; box-shadow: var(--shadow); transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); background: var(--surface); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 20%, transparent); }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 20%, transparent); }
.pill.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 20%, transparent); }
.pill.muted { background: var(--muted-soft); color: var(--text-2); }
.pill.pulse::before { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 5px; font-size: 11.5px; background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--border); font-weight: 600; letter-spacing: .01em; }
.tag.env-production { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.tag.env-staging { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.env-development { background: var(--info-soft); color: var(--info); border-color: transparent; }

table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 650; color: var(--text-3); padding: 10px 18px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.card > .table-wrap:last-child .table, .card > .table:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.cell-title { font-weight: 600; color: var(--text); }
.cell-sub { color: var(--text-3); font-size: 12px; }

.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 15px; }
.empty p { margin: 0 auto; max-width: 460px; }
.empty .btn { margin-top: 16px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--text-2); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: var(--surface); color: var(--text-2); padding: 6px 12px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border-strong); }
.seg button.on { background: var(--brand-soft); color: var(--brand); }

/* ---------------------------------------------------------------- formulários */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .label-text { font-size: 13px; font-weight: 600; color: var(--text); }
.field .hint, .hint { font-size: 12px; color: var(--text-3); }
.field .err { font-size: 12px; color: var(--bad); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; min-height: 90px; padding: 9px 12px; resize: vertical; font-family: var(--mono); font-size: 12.5px; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--text-3); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); margin-top: 2px; flex: none; }
.kv { display: grid; grid-template-columns: 1fr 1.4fr auto auto; gap: 8px; align-items: center; }
.kv-head { font-size: 12px; color: var(--text-3); font-weight: 600; }
.section-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 650; margin: 6px 0 -4px; }

/* ---------------------------------------------------------------- modal / toast */
.overlay { position: fixed; inset: 0; background: rgba(8, 13, 26, .55); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 20px;
  z-index: 50; animation: fade .12s ease-out; }
.modal { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 40px);
  display: flex; flex-direction: column; border: 1px solid var(--border); animation: pop .14s ease-out; }
.modal.wide { width: min(840px, 100%); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h2 { font-size: 16px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2);
  border-radius: 0 0 12px 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.99); } }
#toasts { position: fixed; bottom: 22px; right: 22px; display: grid; gap: 8px; z-index: 60; }
.toast { background: #0f172a; color: #f8fafc; padding: 11px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-width: 440px;
  animation: pop .15s; border-left: 4px solid var(--ok); font-weight: 500; }
.toast.error { border-left-color: #f97066; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--text); }
.alert.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 22%, transparent); color: var(--text); }
.alert.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--text); }
.alert.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--text); }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.warn svg { color: var(--warn); } .alert.info svg { color: var(--info); } .alert.ok svg { color: var(--ok); } .alert.bad svg { color: var(--bad); }

.secret-box { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.secret-box code { overflow-wrap: anywhere; }
.copyline { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.copyline code { flex: 1; overflow-wrap: anywhere; }

.logs { background: #0b1020; color: #d0d7e2; font-family: var(--mono); font-size: 12px; line-height: 1.6; padding: 14px 16px;
  border-radius: var(--radius-sm); max-height: 540px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #1c2840; }
.logs .inst { color: #7aa2ff; font-weight: 600; display: block; margin-top: 8px; }

.bar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.bar.warn > span { background: var(--warn); }
.bar.bad > span { background: var(--bad); }
/* publicação gradual: barra de etapas */
.steps-bar { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; flex-wrap: wrap; }
.steps-bar li { flex: 1 1 110px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.steps-bar .dot { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; }
.steps-bar .dot svg { width: 10px; height: 10px; }
.steps-bar li.done { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.steps-bar li.done .dot { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.steps-bar li.current { color: var(--info); background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.steps-bar li.current .dot { animation: pulse 1.2s infinite; }
.meter-row { display: grid; gap: 7px; }
.meter-row + .meter-row { margin-top: 16px; }
.meter-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; }
.meter-head span:last-child { color: var(--text-2); font-variant-numeric: tabular-nums; }

.catalog-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.catalog-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.catalog-card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.catalog-card .icon svg { width: 20px; height: 20px; }
.catalog-card p { margin: 0; color: var(--text-2); font-size: 13px; flex: 1; }

.dl { display: grid; grid-template-columns: 180px 1fr; gap: 10px 18px; margin: 0; }
.dl dt { color: var(--text-3); font-size: 13px; font-weight: 500; }
.dl dd { margin: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- acesso (login, convite) */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login.split { grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); place-items: stretch; padding: 0; }
.login-aside { position: relative; overflow: hidden; color: #e6ecf7; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 500px at 0% 0%, #1e3a8a 0%, transparent 60%), radial-gradient(700px 500px at 100% 100%, #0e7490 0%, transparent 55%), #0b1324; }
.admin-site .login-aside { background: radial-gradient(900px 500px at 0% 0%, #78350f 0%, transparent 60%), radial-gradient(700px 500px at 100% 100%, #1e3a8a 0%, transparent 55%), #0b1324; }
.login-aside .brand { color: #fff; padding: 0; }
.login-aside .brand small { color: #9fb0cc; }
.login-aside h2 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: #fff; max-width: 520px; }
.login-aside p { color: #b4c2d8; font-size: 15px; max-width: 500px; }
.login-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; max-width: 520px; }
.login-points li { display: flex; gap: 12px; align-items: flex-start; color: #d4ddeb; }
.login-points svg { width: 20px; height: 20px; flex: none; color: #7aa2ff; margin-top: 2px; }
.login-foot { font-size: 12px; color: #8a9ab5; }
.login-main { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.login .card { width: min(420px, 100%); padding: 32px; box-shadow: var(--shadow-md); }
.login h1 { margin-top: 16px; font-size: 22px; }
.login-main > .card > p { margin-top: 6px; }
.login-only { display: none; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); min-width: 240px; padding: 6px; z-index: 20; animation: pop .12s; }
.menu button, .menu a { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; color: var(--text);
  font: inherit; border-radius: 6px; cursor: pointer; }
.menu button:hover, .menu a:hover { background: var(--surface-2); text-decoration: none; }
.menu button.danger { color: var(--bad); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 12px; flex: none; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
pre.json { background: var(--surface-2); border: 1px solid var(--border); padding: 12px; border-radius: var(--radius-sm); overflow: auto; max-height: 460px; font-size: 12px; margin: 0; }
.steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.steps span { padding: 4px 12px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); font-size: 12px; font-weight: 600; }
.steps span.on { background: var(--brand-soft); color: var(--brand); }
.skeleton { height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.grid > .card + .card, .grid > * + * { margin-top: 0; }
.form > .seg { justify-self: start; }
.nav-badge { margin-left: auto; background: #f59e0b; color: #1f1300; border-radius: 999px; font-size: 11px; font-weight: 800; padding: 0 7px; line-height: 18px; }
.finding { border-left: 4px solid var(--border-strong); padding: 14px 16px; }
.finding.critical { border-left-color: var(--bad); }
.finding.warning { border-left-color: var(--warn); }
.finding.info { border-left-color: var(--ok); }
.finding .evidence { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px;
  font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; }
h1.mono { font-size: 22px; font-family: var(--mono); }
/* botão do Google conforme as diretrizes de marca (fundo claro, borda, logotipo colorido) */
.btn.google { background: #fff; color: #1f1f1f; border-color: #747775; gap: 10px; font-weight: 500; }
.btn.google:hover { background: #f8f9fa; }
:root[data-theme="dark"] .btn.google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.google { background: #131314; color: #e3e3e3; border-color: #8e918f; } }
p > svg, .small > svg, .cell-sub > svg, .card-body div > svg:first-child { vertical-align: -0.15em; }
.admin-tag { display: inline-flex; align-items: center; gap: 6px; background: #fff4dc; color: #92400e; border-color: #f5d48a; }
:root[data-theme="dark"] .admin-tag { background: #33260b; color: #f2b84b; border-color: #5c4511; }
.bad-text { color: var(--bad); }

/* ---------------------------------------------------------------- início: atalhos */
.welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.welcome h1 { font-size: 26px; }
.welcome p { margin: 6px 0 0; color: var(--text-2); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.quick a { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s, transform .12s; }
.quick a:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.quick .qi { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.quick .qi svg { width: 20px; height: 20px; }
.quick b { display: block; font-size: 14px; }
.quick small { color: var(--text-3); font-size: 12.5px; }
@media (max-width: 1100px) { .quick { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------------- busca global (Ctrl+K) */
.palette-overlay { position: fixed; inset: 0; background: rgba(8, 13, 26, .55); backdrop-filter: blur(2px); z-index: 70; display: flex; justify-content: center; align-items: flex-start;
  padding-top: 12vh; animation: fade .1s; }
.palette { width: min(640px, calc(100% - 32px)); max-height: 66vh; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: pop .12s; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.palette-input svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.palette-input input { border: 0 !important; box-shadow: none !important; height: 54px; font-size: 15px; padding: 0; background: transparent; }
.palette-list { overflow-y: auto; padding: 6px; }
.palette-group { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 650; padding: 10px 10px 4px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 7px; cursor: pointer; color: var(--text); }
.palette-item svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.palette-item .pi-sub { margin-left: auto; color: var(--text-3); font-size: 12px; }
.palette-item.on { background: var(--brand-soft); color: var(--brand-ink); }
.palette-item.on svg { color: var(--brand); }
.palette-empty { padding: 28px; text-align: center; color: var(--text-3); }
.palette-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); background: var(--surface-2); }

/* ---------------------------------------------------------------- telas pequenas */
@media (max-width: 900px) {
  .grid-4, .grid-3, .grid-2, .quick { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 40; transform: translateX(-100%); transition: transform .18s; }
  .shell.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .btn.menu-toggle { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .search-trigger > span, .org-chip, .user-chip .who, .topbar .admin-tag { display: none; }
  .search-trigger { width: auto; }
  .content { padding: 18px 14px 40px; }
  .login.split { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
}

/* ---- referências longas, faixas de aviso, filtros e seleção em lote ---- */
.ref { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: middle; }
.ref code { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; padding: 0; }
.icon-btn { border: 0; background: transparent; color: var(--text-3); padding: 4px; border-radius: 6px; cursor: pointer; display: inline-grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.icon-btn svg { width: 14px; height: 14px; }
.grow { flex: 1; min-width: 0; }
.alert.banner { align-items: center; margin-bottom: 16px; }
.alert.banner > .row { flex: none; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar input[type="search"] { width: 240px; height: 34px; }
.toolbar select { width: auto; height: 34px; }
.card-head .toolbar { justify-content: flex-end; }
.table th.sel, .table td.sel { width: 44px; padding-right: 0; }
.table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
.table tr.selected td { background: var(--brand-soft); }
.bulkbar { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--brand-soft); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bulkbar strong { color: var(--brand); }
.mt-sm { margin-top: 8px; }
.kpi-btn { font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer; }
.kpi-btn:disabled { cursor: default; }
.kpi-btn:not(:disabled):hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.kpi-btn.warn .value { color: var(--warn); }
.kpi-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.list-plain { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.results li.err { color: var(--bad); }
@media (max-width: 900px) {
  /* números em grade compacta de duas colunas em vez de um cartão alto por linha */
  .grid:has(> .kpi) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .label { font-size: 11px; }
  .kpi .value { font-size: 22px; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .quick a { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .quick small { display: none; }
  .hide-sm { display: none; }
  .card-head:has(> .toolbar) { flex-wrap: wrap; }
  .toolbar { width: 100%; justify-content: flex-start; }
  .toolbar input[type="search"] { width: 100%; }
  .toolbar select { flex: 1; }
  .toolbar .seg { max-width: 100%; overflow-x: auto; }
  .alert.banner { flex-wrap: wrap; }
}
.todo { list-style: none; margin: 0; padding: 0; }
.todo li + li { border-top: 1px solid var(--border); }
.todo a { display: flex; align-items: center; gap: 10px; padding: 11px 18px; color: var(--text); }
.todo a:hover { background: var(--surface-2); text-decoration: none; }
.todo a > span { flex: 1; }
.todo a svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin-top: 8px; max-height: 180px; overflow: auto; }
.notices { display: grid; gap: 10px; margin-bottom: 16px; }
.notices .alert.banner { margin-bottom: 0; }
.field > .seg { justify-self: start; width: max-content; max-width: 100%; }

/* ---- console de dados ---- */
.data-console { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; padding: 16px 18px; }
.data-console aside { border-right: 1px solid var(--border); padding-right: 14px; max-height: 520px; overflow: auto; }
.data-console textarea { min-height: 120px; font-size: 13px; }
.label-sm { font-size: 11px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.schema-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.schema-list ul { list-style: none; margin: 4px 0 6px 14px; padding: 0; display: grid; gap: 2px; }
.schema-list summary { cursor: pointer; }
.linklike { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; font-family: var(--mono); font-size: 12.5px; cursor: pointer; text-align: left; }
.linklike:hover { text-decoration: underline; }
.data-meta { margin-bottom: 6px; }
.data-table { max-height: 460px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.data-table th { position: sticky; top: 0; }
.data-table td { white-space: pre-wrap; word-break: break-word; max-width: 420px; }
.data-redis { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; max-height: 460px; overflow: auto; margin: 0; }
.null { color: var(--text-3); font-style: italic; }
.bad-text { color: var(--bad); }
@media (max-width: 900px) {
  .data-console { grid-template-columns: 1fr; }
  .data-console aside { border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 12px; max-height: 220px; }
}

/* ---------- tela inicial do cliente (linguagem simples) e assistente de conexão ---------- */
.block-title { font-size: 17px; font-weight: 680; letter-spacing: -.01em; margin: 30px 0 14px; }
.quick.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick button { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .12s, box-shadow .12s, transform .12s; }
.quick button:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.quick button:focus-visible, .choice:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
a.tile { color: inherit; text-decoration: none; }
.tile.ok .value { color: var(--ok); } .tile.bad .value { color: var(--bad); } .tile.warn .value { color: var(--warn); }
.todo { display: grid; gap: 4px; }
.todo-item { display: flex; gap: 14px; align-items: center; padding: 12px 0; }
.todo-item + .todo-item { border-top: 1px solid var(--border); }
.todo-mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.todo-item.done .todo-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.todo-item.done b { color: var(--text-3); text-decoration: line-through; }
.todo-mark svg { width: 14px; height: 14px; }
.attn-item { display: flex; gap: 12px; align-items: center; padding: 14px 18px; color: var(--text); }
.attn-item + .attn-item { border-top: 1px solid var(--border); }
.attn-item:hover { text-decoration: none; background: var(--surface-2); }
.attn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--info); flex: none; }
.attn-item.bad .attn-dot { background: var(--bad); } .attn-item.warn .attn-dot { background: var(--warn); }
.attn-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 14px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.choice:hover { border-color: var(--brand); }
.choice.on { border-color: var(--brand); background: var(--brand-soft); }
.choice b { display: block; font-size: 14px; } .choice small { color: var(--text-2); font-size: 12.5px; }
.choice > span:nth-last-child(2) { flex: 1; }
.choice .qi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); flex: none; }
.choice .qi svg, .choice-mark svg { width: 18px; height: 18px; }
.choice-mark { width: 18px; color: var(--brand); flex: none; }
.guide { display: grid; gap: 18px; margin-top: 16px; }
.guide-step { display: flex; gap: 12px; align-items: flex-start; }
.guide-step > .stack { flex: 1; min-width: 0; }
.guide-n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.copyblock { display: grid; gap: 8px; justify-items: start; }
.copyblock pre { width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; }
.connect-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 18px; }
.connect-hero .qi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.connect-hero .qi svg { width: 22px; height: 22px; }
@media (max-width: 1100px) { .quick.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .quick.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quick button { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .attn-item .btn { display: none; } }

.home .meter-row + .hint { margin-top: 14px; }
.card-body.todo { padding: 6px 18px; }

/* ---------- SRE Bot ---------- */
.tl { display: grid; gap: 12px; }
.tl-item { display: flex; gap: 12px; align-items: flex-start; }
.tl-item .pill { flex: none; min-width: 86px; text-align: center; }
.attn-item.ok .attn-dot { background: var(--ok); }
a.sre-strip { color: var(--text); align-items: center; }
a.sre-strip:hover { text-decoration: none; border-color: var(--info); }

/* ================================================================ refresco visual (menos linhas, mais respiro)
   Regras aqui refinam os componentes acima; a estrutura das telas não muda. */
.sidebar { border-right: 1px solid var(--side-border); }
.sidebar .brand { height: 72px; padding: 0 22px; }
.sidebar .brand small { color: var(--side-text-2); }
.sidebar-foot { margin: 12px; padding: 12px 14px; border: 0; border-radius: var(--radius-sm); background: var(--side-bg-2); }
.nav-section { padding: 18px 12px 6px; font-size: 11px; letter-spacing: .08em; }
.nav-more { width: 100%; border: 0; background: none; font-family: inherit; cursor: pointer; text-align: left; margin-top: 10px; color: var(--side-text-2); }
.nav-more svg:last-child { margin-left: auto; width: 16px; height: 16px; transition: transform .15s; }
.nav-more.open svg:last-child { transform: rotate(90deg); }
.nav-more .dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; margin-left: auto; }
.nav-more .dot:not([hidden]) + svg { margin-left: 8px; }
.nav-group[hidden] { display: none; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-badge { background: var(--brand); color: #fff; font-weight: 700; }

.card { border-color: var(--border); box-shadow: var(--shadow); }
.card-head { border-bottom: 0; padding: 18px 22px 4px; min-height: 0; }
.card-head h2 { font-size: 16px; }
.card-body { padding: 16px 22px 22px; }
.card-head + .table-wrap, .card-head + .attn, .card-head + table { margin-top: 10px; }
.kpi { padding: 20px 22px; }
.kpi .label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 550; color: var(--text-2); }
.kpi .value { font-size: 30px; font-weight: 720; }

.btn { height: 38px; padding: 0 16px; border-color: var(--border); box-shadow: none; font-weight: 620; }
.btn:hover { border-color: var(--border-strong); }
.btn.primary { background: var(--grad); border-color: transparent; box-shadow: 0 8px 18px -10px var(--brand); }
.btn.primary:hover { background: var(--grad); border-color: transparent; filter: brightness(1.07); }
.btn.sm { height: 32px; padding: 0 12px; }
.pill { border: 0; padding: 3px 11px; font-weight: 620; }
.tag { border: 0; border-radius: 999px; padding: 2px 10px; }

.table th { background: none; text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; padding: 10px 22px; border-bottom-color: var(--border); }
.table td { padding: 14px 22px; border-bottom-color: color-mix(in srgb, var(--border) 70%, transparent); }
.tabs { gap: 6px; border-bottom: 0; background: var(--surface-3); padding: 4px; border-radius: 12px; width: max-content; max-width: 100%; }
.tabs a { border: 0; margin: 0; padding: 7px 14px; border-radius: 9px; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg { border-radius: 999px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea { height: 40px; border-color: var(--border-strong); }
.modal { border-radius: 18px; border: 0; }
.modal-head { border-bottom: 0; padding: 22px 26px 6px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 14px 26px 22px; }
.modal-foot { border-top: 0; background: none; padding: 6px 26px 22px; border-radius: 0 0 18px 18px; }
.alert { border-color: transparent; border-radius: var(--radius-sm); padding: 14px 16px; }
.empty { padding: 52px 20px; }
.welcome h1 { font-size: 30px; }
.page-head { margin: 6px 0 26px; }
.quick a, .quick button { box-shadow: none; padding: 18px; }
.quick .qi { width: 44px; height: 44px; border-radius: 12px; }
.quick b { font-size: 14.5px; }

/* ---------- Início: destaque com anel de saúde e medidores ---------- */
.hero { position: relative; overflow: hidden; display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 30px 34px; border-radius: 22px; color: #fff; background: var(--grad); box-shadow: 0 24px 48px -28px var(--brand); margin-bottom: 20px; }
.hero::after { content: ""; position: absolute; right: -90px; top: -120px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.22), transparent); pointer-events: none; }
.hero h1 { font-size: 30px; color: #fff; }
.hero p { margin: 8px 0 0; font-size: 16px; color: rgba(255,255,255,.88); max-width: 520px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero .btn { border: 0; height: 42px; padding: 0 18px; }
.hero .btn.light { background: #fff; color: #3730a3; }
.hero .btn.glass { background: rgba(255,255,255,.16); color: #fff; }
.hero .btn.glass:hover { background: rgba(255,255,255,.26); }
.hero-health { position: relative; z-index: 1; display: flex; gap: 22px; align-items: center; }
.hero-legend { display: grid; gap: 8px; font-size: 14px; }
.hero-legend span { display: flex; gap: 9px; align-items: center; color: rgba(255,255,255,.92); }
.hero-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ring-wrap { position: relative; display: grid; place-items: center; }
.ring-center { position: absolute; text-align: center; line-height: 1.1; }
.ring-center b { display: block; font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.ring-center small { font-size: 12px; opacity: .85; }
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.chip { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); transition: border-color .12s, transform .12s, box-shadow .12s; }
a.chip:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.chip .qi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.chip .qi.ok { background: var(--ok-soft); color: var(--ok); } .chip .qi.warn { background: var(--warn-soft); color: var(--warn); }
.chip .qi.bad { background: var(--bad-soft); color: var(--bad); }
.chip .qi svg { width: 20px; height: 20px; }
.chip b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.chip small { color: var(--text-2); font-size: 13px; }
.gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.gauge .ring-center b { font-size: 19px; }
.gauge strong { font-size: 14px; }
.gauge small { color: var(--text-3); font-size: 12.5px; }
.attn-item { padding: 16px 22px; }
@media (max-width: 900px) { .chips { grid-template-columns: 1fr; } .hero { padding: 24px; } .hero-health { width: 100%; } }
@media (max-width: 720px) { .content { padding: 14px 16px 40px; } .topbar { padding: 0 16px; } .gauges { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- projetos em cartões ---------- */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pcard { display: flex; gap: 16px; align-items: center; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); transition: border-color .12s, transform .12s, box-shadow .12s; }
a.pcard:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pcard.attention { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.pcard.off { opacity: .65; }
.pcard-title { font-size: 16px; font-weight: 680; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard > svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.pcard .ring-center b { font-size: 17px; }
details.fold > summary { list-style: none; cursor: pointer; padding: 16px 22px; font-weight: 650; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "›"; font-size: 18px; line-height: 1; transition: transform .15s; color: var(--text-3); }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > .card-body { padding-top: 0; }
.nav { scrollbar-color: var(--border-strong) transparent; }

/* ---------- consentimento de assistentes web (OAuth do MCP) ---------- */
.consent { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.consent-card { width: min(560px, 100%); padding: 34px; box-shadow: var(--shadow-md); }
.consent-card .brand { padding: 0; height: auto; margin-bottom: 22px; }
.consent-card h1 { font-size: 24px; margin-bottom: 6px; }
.consent-card .alert { margin-top: 16px; }

/* ---------------------------------------------------------------- notificações (sino do topo e central) */
.bell { position: relative; flex: none; }
.bell [hidden] { display: none; }
.bell-btn { position: relative; width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--text-2); cursor: pointer; }
.bell-btn:hover { border-color: var(--border-strong); color: var(--text); }
.bell-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.bell-btn svg { width: 18px; height: 18px; }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.bell-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 380px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 20; overflow: hidden; animation: pop .12s; }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); min-height: 48px; }
.bell-list { max-height: min(60vh, 440px); overflow-y: auto; }
.bell-list .attn-item { padding: 12px 14px; align-items: flex-start; }
.bell-list .attn-dot { margin-top: 5px; }
.bell-foot { display: block; padding: 10px 14px; text-align: center; font-weight: 600; font-size: 13px; border-top: 1px solid var(--border); background: var(--surface-2); }
.note-item { align-items: flex-start; }
.note-item .attn-dot { margin-top: 6px; }
.note-title { overflow-wrap: anywhere; }
.note-item.unread .note-title { font-weight: 650; }
.note-item:not(.unread) .note-title { color: var(--text-2); }
.note-new { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 7px; }
.hook-item { flex-wrap: wrap; }
.hook-item:hover { background: none; }
.check-grid { display: grid; gap: 10px 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 720px) { .bell-pop { position: fixed; right: 12px; left: 12px; top: calc(var(--topbar) + 4px); width: auto; max-width: none; } }

/* gráficos (SVG por DOM): linhas, faixa de disponibilidade e leitura do ponto sob o cursor */
.chart { display: grid; gap: 6px; min-width: 0; }
.chart-svg { display: block; width: 100%; touch-action: pan-y; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart-tip { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); min-height: 20px; font-variant-numeric: tabular-nums; }
.chart-tip b { color: var(--text); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); }
.chart-key { display: inline-flex; align-items: center; gap: 6px; }
.chart-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-empty { padding: 28px 0; text-align: center; }
.chart-card .value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.chart-card .label { color: var(--text-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.uptime-hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.uptime-hero .value { font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.logs-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.logs-filters select, .logs-filters input[type="search"] { width: auto; height: 34px; }
.logs-filters input[type="search"] { min-width: 200px; flex: 1; }
.plain-link { text-decoration: none; }
details.card > summary { cursor: pointer; list-style: none; }

/* página de status pública e relatório de disponibilidade */
.status-site { background: var(--bg); }
.status-page { max-width: 860px; margin: 0 auto; padding: 24px 16px 56px; display: grid; gap: 22px; }
.status-page h2 { font-size: 15px; margin: 0 0 10px; }
.status-page h3 { font-size: 15px; margin: 0; }
.status-head .brand { padding: 0; height: auto; border: 0; color: var(--text); }
.status-head .brand small { color: var(--text-3); }
.status-hero { display: flex; gap: 14px; align-items: center; padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.status-hero h1 { font-size: 20px; margin: 0 0 2px; }
.status-hero svg { width: 30px; height: 30px; flex: none; }
.status-hero.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); } .status-hero.ok svg { color: var(--ok); }
.status-hero.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); } .status-hero.warn svg { color: var(--warn); }
.status-hero.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); } .status-hero.bad svg { color: var(--bad); }
.status-hero.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); } .status-hero.info svg { color: var(--info); }
.status-hero.muted { background: var(--muted-soft); } .status-hero.muted svg { color: var(--text-2); }
.status-comp { padding: 16px 18px; display: grid; gap: 10px; }
.status-comp + .status-comp { border-top: 1px solid var(--border); }
.status-comp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.status-comp-foot { display: flex; justify-content: space-between; gap: 12px; }
.status-comp-foot span:nth-child(2) { text-align: center; }
.status-text { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.status-updates { list-style: none; margin: 14px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--border-strong); display: grid; gap: 10px; }
.status-foot p { margin: 0 0 4px; }
.spof-list { display: grid; }
.spof-item { display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; padding: 14px 18px; align-items: start; }
.spof-item + .spof-item { border-top: 1px solid var(--border); }
.report-head { display: none; }
@media (max-width: 720px) { .spof-item { grid-template-columns: 1fr; } .status-comp-foot span:first-child, .status-comp-foot span:last-child { display: none; } }
/* cobrança e uso: totais do demonstrativo e o aviso "não é documento fiscal" (aparece também no impresso) */
.totals-table td { padding-top: 9px; padding-bottom: 9px; }
.totals-table .total-row td { font-weight: 700; font-size: 15px; border-top: 2px solid var(--border-strong); }
.fiscal-banner { padding: 10px 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-2); }
.fiscal-banner strong { color: var(--text); letter-spacing: .04em; }
@media print {
  .sidebar, .topbar, .notices, .no-print, #toasts { display: none !important; }
  .shell, .main, .content { display: block !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; height: auto !important; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
  .report-head { display: block; margin-bottom: 12px; }
  .invoice .page-head { margin-bottom: 8px; }
  .fiscal-banner { border: 1px solid #000; color: #000; }
  .table-wrap { overflow: visible; }
}

/* verificação em duas etapas: QR code do cadastro (sempre preto no branco) e códigos de recuperação */
.qr-box { display: inline-block; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 12px; margin-top: 12px; line-height: 0; }
.codes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin-top: 12px; padding: 14px 16px; background: var(--surface-3);
  border-radius: 10px; font-size: 14px; }

/* trava de ambiente: interruptor por ambiente e o cadeado ao lado do ambiente travado */
.switch { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--border-strong);
  position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface);
  box-shadow: var(--shadow); transition: transform .15s; }
.switch:checked { background: var(--warn); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch:disabled { opacity: .55; cursor: not-allowed; }
.switch-line { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.tag.locked { background: var(--warn-soft); color: var(--warn); border-color: transparent; margin-left: 6px; font-weight: 600; }
