/* Nexora — sistema visual corporativo. Sem fontes ou recursos externos (CSP estrita). */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eef1f6;
  --border: #e3e8ef;
  --border-strong: #cdd5df;
  --text: #0f172a;
  --text-2: #475467;
  --text-3: #7a8699;
  --brand: #1d4ed8;
  --brand-hover: #1e40af;
  --brand-soft: #e8efff;
  --brand-ink: #1e3a8a;
  --ok: #067647;      --ok-soft: #e7f6ee;
  --warn: #9a5b00;    --warn-soft: #fff4dc;
  --bad: #b42318;     --bad-soft: #fdecea;
  --info: #175cd3;    --info-soft: #e8f1ff;
  --muted-soft: #eef1f5;
  /* barra lateral escura: identidade de console corporativo */
  --side-bg: #0b1324;
  --side-bg-2: #111b31;
  --side-text: #c6cfdd;
  --side-text-2: #8391a7;
  --side-active: #1d4ed8;
  --side-border: #1c2840;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, .20);
  --radius: 10px;
  --radius-sm: 7px;
  --sidebar: 252px;
  --topbar: 60px;
  --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: #0b1020; --surface: #111827; --surface-2: #151e2f; --surface-3: #1b2538; --border: #233046; --border-strong: #31415c;
    --text: #e8edf5; --text-2: #a9b5c7; --text-3: #7d8aa0;
    --brand: #5b8cff; --brand-hover: #7aa2ff; --brand-soft: #172446; --brand-ink: #a9c1ff;
    --ok: #47cd89; --ok-soft: #0f2a1e; --warn: #f2b84b; --warn-soft: #33260b;
    --bad: #f97066; --bad-soft: #3a1513; --info: #69a6ff; --info-soft: #10264a; --muted-soft: #1b2538;
    --side-bg: #070c18; --side-bg-2: #0d1426; --side-border: #18223a;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 6px 16px rgba(0,0,0,.4); --shadow-lg: 0 18px 40px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020; --surface: #111827; --surface-2: #151e2f; --surface-3: #1b2538; --border: #233046; --border-strong: #31415c;
  --text: #e8edf5; --text-2: #a9b5c7; --text-3: #7d8aa0;
  --brand: #5b8cff; --brand-hover: #7aa2ff; --brand-soft: #172446; --brand-ink: #a9c1ff;
  --ok: #47cd89; --ok-soft: #0f2a1e; --warn: #f2b84b; --warn-soft: #33260b;
  --bad: #f97066; --bad-soft: #3a1513; --info: #69a6ff; --info-soft: #10264a; --muted-soft: #1b2538;
  --side-bg: #070c18; --side-bg-2: #0d1426; --side-border: #18223a;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 6px 16px rgba(0,0,0,.4); --shadow-lg: 0 18px 40px rgba(0,0,0,.6);
}
/* administração do sistema: mesma linguagem, destaque âmbar para nunca confundir com o portal dos clientes */
.admin-site { --side-active: #b45309; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 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: 24px; font-weight: 680; }
h2 { font-size: 15px; font-weight: 640; }
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: #fff; border-bottom: 1px solid var(--side-border); }
.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: linear-gradient(135deg, #3b82f6, #1d4ed8 55%, #1e3a8a); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); flex: none; }
.admin-site .brand-mark { background: linear-gradient(135deg, #f59e0b, #b45309 60%, #78350f); }
.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: 10px 10px 16px; display: flex; flex-direction: column; gap: 1px; 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 { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--side-text);
  font-weight: 500; font-size: 13.5px; }
.nav a:hover { background: var(--side-bg-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--side-bg-2); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--side-active); }
.nav a.active svg { color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; color: var(--side-text-2); }
.nav a:hover svg { color: #fff; }
.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 28px; background: var(--surface);
  border-bottom: 1px solid var(--border); 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: var(--radius-sm); background: var(--surface-2); 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 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  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: 28px 28px 48px; max-width: 1320px; width: 100%; }
.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); }
.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: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #1e3a8a); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 12px; flex: none; }
.admin-site .avatar { background: linear-gradient(135deg, #f59e0b, #92400e); }
.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; }
}
