/* ==========================================================================
   Neural Webmin — tema "Cloud Console" (inspirado no painel DigitalOcean)
   ========================================================================== */

:root {
  --brand-ink: #091827;          /* cor da marca Brittec */
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --surface-3: #eef1f5;
  --border: #e3e7ed;
  --border-strong: #c9d0db;
  --text: #031b4e;
  --text-2: #3c4b69;
  --muted: #6b7a99;
  --primary: #0069ff;
  --primary-hover: #0053cc;
  --primary-soft: #eaf2ff;
  --on-primary: #ffffff;           /* texto sobre fundo --primary */
  --success: #0b8a4c;
  --success-dot: #15cd72;
  --success-soft: #e6f7ee;
  --warning: #b86e00;
  --warning-dot: #f5a623;
  --warning-soft: #fff5e1;
  --danger: #d0103a;
  --danger-soft: #fdebef;
  --info-soft: #f4f1f8;
  --info-icon: #8b5e9b;
  --shadow: 0 1px 2px rgba(3, 27, 78, .06), 0 1px 4px rgba(3, 27, 78, .06);
  --shadow-lg: 0 12px 40px rgba(3, 27, 78, .18);
  --chart-grid: #eef1f5;
  --c1: #0069ff;
  --c2: #15b371;
  --c3: #c9a227;
  --c4: #9b5de5;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Epilogue", var(--font);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sidebar-w: 244px;
  --topbar-h: 56px;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-ink: #ffffff;
    /* Grafite monocromático Brittec: mesmo tom do login e da identidade, ações em branco */
    --bg: #0e0f11; --surface: #16171a; --surface-2: #1c1d21; --surface-3: #222328;
    --border: #26282d; --border-strong: #34373e; --text: #ececee; --text-2: #b9bcc4;
    --muted: #80848e; --primary: #e6e7ea; --primary-hover: #ffffff; --primary-soft: #26282d; --on-primary: #0e0f11; --scrim: rgba(0, 0, 0, .6);
    --success: #3ecf8e; --success-soft: #11281e; --warning: #f0b44c; --warning-soft: #2d2412;
    --danger: #ff6b81; --danger-soft: #33161c; --info-soft: #1d1c24; --info-icon: #b793c6;
    --shadow: 0 1px 2px rgba(0,0,0,.5); --shadow-lg: 0 16px 48px rgba(0,0,0,.6);
    --chart-grid: #222328; --c1: #e6e7ea; --c2: #3ecf8e; --c3: #e4c045; --c4: #b98cf0;
  }
}
:root[data-theme="dark"] {
  --brand-ink: #ffffff;
  /* Grafite monocromático Brittec: mesmo tom do login e da identidade, ações em branco */
  --bg: #0e0f11; --surface: #16171a; --surface-2: #1c1d21; --surface-3: #222328;
  --border: #26282d; --border-strong: #34373e; --text: #ececee; --text-2: #b9bcc4;
  --muted: #80848e; --primary: #e6e7ea; --primary-hover: #ffffff; --primary-soft: #26282d; --on-primary: #0e0f11; --scrim: rgba(0, 0, 0, .6);
  --success: #3ecf8e; --success-soft: #11281e; --warning: #f0b44c; --warning-soft: #2d2412;
  --danger: #ff6b81; --danger-soft: #33161c; --info-soft: #1d1c24; --info-icon: #b793c6;
  --shadow: 0 1px 2px rgba(0,0,0,.5); --shadow-lg: 0 16px 48px rgba(0,0,0,.6);
  --chart-grid: #222328; --c1: #e6e7ea; --c2: #3ecf8e; --c3: #e4c045; --c4: #b98cf0;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; color: var(--text); letter-spacing: -.01em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Estrutura ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 50;
  transition: transform .25s ease;
}
.sidebar .brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: 10px;
  padding: 0 20px; border-bottom: 1px solid var(--border);
  font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--text);
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #0069ff, #36c5f0);
  display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700;
}
.nav-section { padding: 18px 12px 4px; }
.nav-label {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 0 10px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 6px;
  color: var(--text-2); font-weight: 500; cursor: pointer; border: 0; background: none;
  width: 100%; text-align: left; font: inherit; font-weight: 500;
}
.nav-item i { width: 18px; text-align: center; color: var(--muted); }
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); }
.nav-item.active i { color: var(--primary); }
.nav-item .count {
  margin-left: auto; font-size: 11px; background: var(--surface-3); color: var(--muted);
  padding: 1px 7px; border-radius: 10px; font-weight: 600;
}
.sidebar-footer { margin-top: auto; padding: 14px 16px; border-top: 1px solid var(--border); }
.load-mini { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.load-mini b { color: var(--text); font-family: var(--mono); font-weight: 500; }

.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
  position: sticky; top: 0; z-index: 40;
}
.search {
  position: relative; flex: 0 1 420px;
}
.search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.search input {
  width: 100%; height: 36px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); padding: 0 12px 0 34px; color: var(--text); font: inherit; font-size: 13px;
}
.search input:focus, .input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 0; background: transparent; color: var(--text-2); cursor: pointer; font-size: 16px; position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .badge-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.divider-v { width: 1px; height: 24px; background: var(--border); }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: #dff27a; color: #2b3a00;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.menu-toggle { display: none; }

.page { padding: 28px 40px 60px; max-width: 1320px; width: 100%; margin: 0 auto; }

/* ---------- Cabeçalho do recurso ---------- */
.resource-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.resource-title { display: flex; align-items: center; gap: 12px; }
.resource-title h1 { font-size: 28px; font-weight: 600; }
.resource-title .ico { font-size: 24px; color: var(--primary); }
.meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; color: var(--text-2); }
.meta-row .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: .6; }
.meta-row .meta { display: inline-flex; align-items: center; gap: 7px; }
.meta-row .meta i { color: var(--primary); }
.head-actions { display: flex; gap: 12px; align-items: center; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 12px; border-radius: 20px;
  background: var(--success-soft); color: var(--success); font-weight: 500; font-size: 13px;
}
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success-dot); }
.status-pill.offline { background: var(--danger-soft); color: var(--danger); }
.status-pill.offline::before { background: var(--danger); }
.status-pill.warn { background: var(--warning-soft); color: var(--warning); }
.status-pill.warn::before { background: var(--warning-dot); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 4px; font: inherit; font-weight: 500; font-size: 14px;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-outline { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60;
  display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu button, .dropdown-menu a {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none;
  color: var(--text); font: inherit; font-size: 14px; text-align: left; border-radius: 4px; cursor: pointer;
}
.dropdown-menu button:hover, .dropdown-menu a:hover { background: var(--surface-2); text-decoration: none; }
.dropdown-menu i { width: 16px; color: var(--muted); }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-menu .danger, .dropdown-menu .danger i { color: var(--danger); }

/* ---------- Abas (estilo pasta) ---------- */
.tabs {
  display: flex; gap: 0; margin: 40px 0 28px; border-bottom: 1px solid var(--border-strong);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 22px; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px;
  background: none; font: inherit; font-size: 15px; color: var(--text-2); cursor: pointer;
  border-radius: 4px 4px 0 0; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--bg); color: var(--text); font-weight: 600;
  border-color: var(--border-strong); border-bottom: 1px solid var(--bg);
}
.tab .tab-count { font-size: 11px; background: var(--surface-3); color: var(--muted); padding: 1px 7px; border-radius: 10px; margin-left: 6px; font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Cards ---------- */
.grid-2 > *, .grid-3 > *, .metric-pair > * { min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.card-body { padding: 24px 28px; }
.card-foot { border-top: 1px solid var(--border); padding: 16px 28px; }
.card-title {
  font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text);
  margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.card-title .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.card-h { font-family: var(--font-head); font-size: 18px; font-weight: 600; }
.card-sub { color: var(--text-2); margin-top: 4px; }
.section-title { font-family: var(--font-head); font-size: 18px; font-weight: 600; margin: 36px 0 14px; display: flex; justify-content: space-between; align-items: center; }

.metric-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.metric-label { color: var(--muted); font-size: 15px; }
.metric-value { font-size: 40px; font-weight: 500; font-family: var(--font-head); margin: 10px 0 6px; line-height: 1.1; color: var(--text-2); font-variant-numeric: tabular-nums; }
.metric-sub { color: var(--muted); font-size: 12.5px; }
.spark { height: 44px; margin-top: 10px; }

.price-big { font-size: 26px; font-weight: 500; }
.price-big small { font-size: 22px; font-weight: 400; color: var(--text-2); }

/* Campo copiável */
.field-label { font-weight: 600; font-size: 13.5px; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.field-label:first-of-type { margin-top: 0; }
.copy-field { display: flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.copy-field span { flex: 1; padding: 11px 16px; font-family: var(--mono); font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-field button { width: 52px; border: 0; border-left: 1px solid var(--border); background: var(--surface-3); color: var(--text-2); cursor: pointer; }
.copy-field button:hover { color: var(--primary); }
.copy-inline { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.copy-inline:hover { color: var(--primary); }
.help-q { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--muted); border-radius: 3px; font-size: 10px; color: var(--muted); cursor: help; }

.callout {
  display: flex; gap: 14px; padding: 16px 20px; background: var(--info-soft); border-radius: 4px; margin-top: 20px; color: var(--text-2);
}
.callout i { color: var(--info-icon); font-size: 18px; margin-top: 2px; }
.callout.warn { background: var(--warning-soft); }
.callout.warn i { color: var(--warning-dot); }

.expander { display: flex; align-items: center; gap: 14px; padding: 16px 28px; border-top: 1px solid var(--border); cursor: pointer; color: var(--text); background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; font: inherit; text-align: left; }
.expander:hover { background: var(--surface-2); }
.expander i.chev { color: var(--muted); transition: transform .2s; }
.expander.open i.chev { transform: rotate(90deg); }
.expander-body { display: none; padding: 4px 28px 20px; }
.expander-body.open { display: block; }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); font-family: var(--mono); font-size: 13px; word-break: break-all; }

/* Linhas de atividade */
.activity-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.activity-row:last-child { border-bottom: 0; }
.activity-row .ico { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-size: 13px; flex-shrink: 0; }
.activity-row .ico.warning { background: var(--warning-soft); color: var(--warning); }
.activity-row .ico.success { background: var(--success-soft); color: var(--success); }
.activity-row .name { flex: 1; min-width: 0; }
.activity-row .name small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-ago { border-bottom: 1px dotted var(--text-2); color: var(--text-2); white-space: nowrap; cursor: default; }

/* Recursos (links) */
.resource-links { display: flex; flex-direction: column; gap: 18px; }
.resource-links a { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; }
.resource-links a i { font-size: 18px; color: var(--text-2); margin-top: 3px; width: 20px; text-align: center; }
.resource-links a b { color: var(--primary); font-weight: 500; text-decoration: underline; }
.resource-links a span { display: block; color: var(--text-2); font-size: 13px; }
.card.soft { background: var(--surface-2); }

/* Tabelas */
.table-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: auto; box-shadow: var(--shadow); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-weight: 600; color: var(--text); padding: 12px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 13.5px;
}
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sorted { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table th.num { text-align: right; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13px; }
.table .cmd { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-title { color: var(--primary); font-weight: 500; }
.row-sub { color: var(--muted); font-size: 12px; }
.row-icon { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: var(--primary); position: relative; flex-shrink: 0; }
.row-icon .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--success-dot); border: 2px solid var(--surface); }
.row-icon .dot.off { background: var(--border-strong); }
.cell-flex { display: flex; align-items: center; gap: 12px; }
.bar-cell { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.mini-bar { flex: 1; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.mini-bar > div { height: 100%; background: var(--primary); border-radius: 3px; transition: width .6s ease; }
.mini-bar.warn > div { background: var(--warning-dot); }
.mini-bar.danger > div { background: var(--danger); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 4px;
  background: var(--surface-2); color: var(--text); font-size: 13px; white-space: nowrap;
}
.tag i { color: var(--muted); font-size: 11px; }
.tag.blue { background: var(--primary-soft); color: var(--primary); }
.tag.green { background: var(--success-soft); color: var(--success); }
.tag.yellow { background: var(--warning-soft); color: var(--warning); }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.mono { font-family: var(--mono); font-size: 12px; }

.kebab { border: 0; background: none; color: var(--text-2); cursor: pointer; padding: 4px 8px; border-radius: 4px; }
.kebab:hover { background: var(--surface-3); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; white-space: nowrap; }

/* Toolbar */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.input, .select {
  height: 40px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text);
  padding: 0 14px; font: inherit; font-size: 14px;
}
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.input-icon .input { padding-left: 38px; width: 330px; max-width: 100%; }
.check-ok { color: var(--success); font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.check-ok i { color: var(--success-dot); }

/* Gráficos */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 14px 14px 8px; margin-bottom: 14px; }
.chart-card h3 { font-family: var(--font); font-size: 15px; font-weight: 700; margin: 0 0 6px 2px; display: flex; justify-content: space-between; align-items: baseline; }
.chart-card h3 .now { font-weight: 500; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.chart-box { position: relative; height: 230px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin: 0 0 6px 2px; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--c); }

/* Núcleos */
.cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.core { background: var(--surface-2); border-radius: 4px; padding: 8px; text-align: center; font-size: 11px; color: var(--muted); }
.core b { display: block; font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 500; }
.core .mini-bar { margin-top: 6px; height: 4px; }

/* Disco */
.disk-card { display: flex; gap: 18px; align-items: center; }
.disk-card img { width: 52px; height: 52px; object-fit: contain; }
.disk-card .info { flex: 1; min-width: 0; }
.disk-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.disk-card .name { font-weight: 600; font-size: 15px; }
.disk-card .pct { font-family: var(--mono); font-size: 13px; }
.disk-card .mini-bar { height: 8px; margin: 10px 0 8px; }
.disk-card .foot { display: flex; flex-wrap: wrap; justify-content: space-between; color: var(--muted); font-size: 12.5px; gap: 8px; }
.disk-card .foot span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Estados vazios */
.empty {
  text-align: center; padding: 56px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
}
.empty svg { width: 150px; height: 120px; margin-bottom: 18px; }
.empty h3 { font-size: 24px; font-weight: 500; margin-bottom: 10px; }
.empty p { color: var(--text-2); max-width: 560px; margin: 0 auto 24px; font-size: 15px; }

/* Promo (estilo backups) */
.promo { display: flex; align-items: stretch; min-height: 200px; }
.promo .card-body { flex: 1; max-width: 720px; }
.promo p { color: var(--text); margin: 10px 0 22px; font-size: 15px; }
.promo .art { width: 320px; flex-shrink: 0; position: relative; overflow: hidden; }
.promo .art svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Configurações (linhas) */
.settings-row { display: grid; grid-template-columns: 300px 1fr auto; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--border); align-items: start; }
.settings-row h4 { font-family: var(--font); font-size: 17px; font-weight: 500; }
.settings-row .val { color: var(--text-2); font-size: 15px; max-width: 680px; }
.settings-row .act { min-width: 110px; text-align: right; }

/* Switch */
.switch { position: relative; width: 40px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 22px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(18px); }

/* Drawer lateral */
.overlay { position: fixed; inset: 0; background: var(--scrim, rgba(3, 27, 78, .35)); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90; }
.overlay.active { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 100%; background: var(--surface);
  box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s ease; z-index: 100;
  display: flex; flex-direction: column; visibility: hidden;
}
.drawer.active { transform: none; visibility: visible; }
.drawer-head { padding: 22px 28px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; }
.drawer-head h3 { font-size: 20px; font-weight: 600; }
.drawer-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.drawer-body { padding: 24px 28px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 16px 28px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 7px; }
.form-group .input, .form-group .select { width: 100%; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-box { border: 1px solid var(--border); border-radius: 4px; padding: 16px; background: var(--surface-2); }
.form-toggle { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 14px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-cards label { border: 1px solid var(--border-strong); border-radius: 4px; padding: 12px 14px; cursor: pointer; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.radio-cards label small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.radio-cards input { margin-top: 3px; accent-color: var(--primary); }
.radio-cards label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

/* Modal */
.modal { position: fixed; inset: 0; display: none; place-items: center; z-index: 110; background: var(--scrim, rgba(3, 27, 78, .4)); padding: 16px; }
.modal.active { display: grid; }
.modal-box { background: var(--surface); border-radius: 6px; box-shadow: var(--shadow-lg); width: 460px; max-width: 100%; padding: 28px; }
.modal-box h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.modal-box p { color: var(--text-2); margin: 0 0 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; }

/* Toasts */
#toasts { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 300px; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: 4px; box-shadow: var(--shadow-lg); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start;
  animation: toast-in .25s ease;
}
.toast.success { border-left-color: var(--success-dot); }
.toast.warning { border-left-color: var(--warning-dot); }
.toast.error { border-left-color: var(--danger); }
.toast .t-body { flex: 1; font-size: 14px; }
.toast .t-time { font-size: 11px; color: var(--muted); }
.toast button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Terminal flutuante */
.term-window {
  position: fixed; right: 24px; bottom: 24px; width: 720px; height: 420px; max-width: calc(100vw - 32px);
  background: #0f1012; border-radius: 8px; box-shadow: var(--shadow-lg); z-index: 120;
  display: none; flex-direction: column; overflow: hidden; border: 1px solid #2a2c31;
}
.term-window.open { display: flex; }
.term-window.max { inset: 72px 24px 24px calc(var(--sidebar-w) + 24px); width: auto; height: auto; }
.term-window.min { height: 44px; }
.term-bar { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; background: #18191c; color: #b9bcc4; font-size: 13px; cursor: move; user-select: none; flex-shrink: 0; }
.term-bar .title { display: flex; gap: 10px; align-items: center; }
.term-bar .title i { color: #3d8bff; }
.term-bar button { width: 30px; height: 30px; border: 0; background: none; color: #8b9abb; border-radius: 4px; cursor: pointer; }
.term-bar button:hover { background: #1b2744; color: #fff; }
.term-body { flex: 1; padding: 8px 10px; min-height: 0; }
.term-body > div { width: 100%; height: 100%; }

/* Rodapé */
.footer-links { display: flex; justify-content: center; gap: 22px; padding: 24px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 13px; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); text-decoration: underline; }

/* Responsivo */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .promo .art { width: 220px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page { padding: 20px 16px 48px; }
  .settings-row { grid-template-columns: 1fr; gap: 8px; }
  .settings-row .act { text-align: left; }
  .promo .art { display: none; }
  .term-window.max { inset: 64px 8px 8px 8px; }
  .user-chip span, .topbar .divider-v { display: none; }
  .metric-value { font-size: 32px; }
}
@media (max-width: 560px) {
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .search { display: none; }
  .kv { grid-template-columns: 1fr; }
}

/* Marca Brittec */
.brand-text { display: flex; flex-direction: column; line-height: 1.1; font-size: 15px; }
.brand-text small { font-family: var(--font); font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.brand-mark { background: linear-gradient(135deg, #0069ff, #00b4d8); }
.dropdown-menu a.danger { color: var(--danger); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-side { background: linear-gradient(160deg, #031b4e 0%, #0b3a8c 55%, #0069ff 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-side h2 { color: #fff; font-size: 34px; line-height: 1.15; max-width: 440px; }
.login-side p { color: rgba(255,255,255,.75); max-width: 420px; font-size: 15px; }
.login-side .brand { border: 0; padding: 0; height: auto; color: #fff; display: flex; gap: 10px; align-items: center; font-family: var(--font-head); font-weight: 700; }
.login-side .brand-text small { color: rgba(255,255,255,.7); }
.login-side .blob { position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(54,197,240,.45), transparent 65%); }
.login-form { display: grid; place-items: center; padding: 32px 16px; background: var(--bg); }
.login-card { width: 380px; max-width: 100%; }
.login-card h1 { font-size: 26px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); margin-bottom: 28px; }
.login-card .btn { width: 100%; height: 44px; margin-top: 8px; }
.login-error { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-side { display: none; } }

/* Aplicações */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.app-card .head { display: flex; gap: 14px; align-items: flex-start; }
.app-card .app-ico { width: 42px; height: 42px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.app-card h3 { font-family: var(--font); font-size: 16px; font-weight: 600; }
.app-card .desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.app-card .checks { margin-top: 16px; border-top: 1px solid var(--border); }
.app-card .check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.app-card .check:last-child { border-bottom: 0; }
.app-card .check .t { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; min-width: 58px; padding-top: 2px; }
.app-card .check .m { flex: 1; min-width: 0; }
.app-card .check .m small { display: block; color: var(--muted); font-family: var(--mono); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-s { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: var(--border-strong); }
.dot-s.up { background: var(--success-dot); }
.dot-s.down { background: var(--danger); }
.dot-s.degraded { background: var(--warning-dot); }
.status-pill.degraded { background: var(--warning-soft); color: var(--warning); }
.status-pill.degraded::before { background: var(--warning-dot); }
.status-pill.unknown { background: var(--surface-3); color: var(--muted); }
.status-pill.unknown::before { background: var(--border-strong); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.stat .l { color: var(--muted); font-size: 13px; }
.stat .v { font-family: var(--font-head); font-size: 28px; font-weight: 600; margin-top: 4px; }
.stat .v.up { color: var(--success); } .stat .v.down { color: var(--danger); } .stat .v.degraded { color: var(--warning); }
.code-block { background: #0f1012; color: #d7deea; font-family: var(--mono); font-size: 12.5px; padding: 16px 18px; border-radius: 6px; overflow-x: auto; white-space: pre; line-height: 1.6; }
.code-block .c { color: #6b7a99; }
.code-block .s { color: #3ddc91; }
.endpoint-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; align-items: baseline; }
.endpoint-list code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 2px 8px; border-radius: 4px; color: var(--text); white-space: nowrap; }
.endpoint-list span { color: var(--text-2); }
@media (max-width: 900px) { .stat-row { grid-template-columns: 1fr 1fr; } .app-grid { grid-template-columns: 1fr; } .endpoint-list { grid-template-columns: 1fr; } }
.resource-head > div:first-child { flex: 1; min-width: 0; }
.resource-title { flex-wrap: wrap; }
.status-pill.down { background: var(--danger-soft); color: var(--danger); }
.status-pill.down::before { background: var(--danger); }
.app-card .app-ico.down { background: var(--danger-soft); color: var(--danger); }
.app-card .app-ico.degraded { background: var(--warning-soft); color: var(--warning); }
.app-card .app-ico.up { background: var(--success-soft); color: var(--success); }

/* =====================  Ícones Phosphor + acabamento premium  ===================== */
.ph, .ph-duotone, .ph-fill { line-height: 1; vertical-align: -0.14em; }
.btn .ph, .btn .ph-duotone { font-size: 1.15em; }
.icon-btn .ph, .icon-btn .ph-duotone { font-size: 20px; vertical-align: 0; }
.ph-duotone { position: relative; display: inline-block; }

/* Marca */
.brand { gap: 11px; }
.brand-logo { width: 30px; height: 30px; flex-shrink: 0; color: var(--brand-ink); }
.brand-text { font-family: var(--font); font-weight: 800; font-size: 17px; letter-spacing: -.03em; color: var(--brand-ink); }
.brand-text small { font-size: 10.5px; letter-spacing: .09em; margin-top: 2px; }

/* Navegação */
.nav-item { gap: 11px; padding: 8px 10px; font-size: 14px; }
.nav-item i { width: 20px; font-size: 19px; color: var(--muted); text-align: center; flex-shrink: 0; }
.nav-item:hover i { color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item.active i { color: var(--primary); }

/* Item do servidor na sidebar */
.server-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.server-item:hover { border-color: var(--border-strong); text-decoration: none; color: var(--text); }
.server-item.active { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); box-shadow: 0 0 0 3px var(--primary-soft); }
.srv-ico {
  position: relative; width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 19px; color: var(--primary);
  background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--primary-soft) 40%, var(--surface)));
}
.srv-dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--success-dot); border: 2px solid var(--surface); }
.srv-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.srv-txt b { font-weight: 600; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.srv-txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* Ícone do título (estilo "droplet" dos prints) */
.title-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 24px; color: var(--primary); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
}
.resource-title { gap: 14px; }

/* Ícones em cards */
.app-card .app-ico { font-size: 22px; border-radius: 10px; }
.activity-row .ico { font-size: 16px; border-radius: 8px; }
.row-icon { font-size: 16px; }
.meta-row .meta i { font-size: 16px; }
.card-title .ph-duotone { font-size: 16px; }
.resource-links a i { font-size: 20px; }
.app-card .check .t i { font-size: 13px; }

/* =====================  Cadastro de aplicações  ===================== */
.drawer-wide { width: 580px; }
.drawer .hidden { display: none !important; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tpl {
  display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tpl:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); transform: translateY(-1px); }
.tpl b { display: block; font-weight: 600; font-size: 14px; }
.tpl small { color: var(--muted); font-size: 12.5px; }
.tpl-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 21px;
  color: var(--primary); background: var(--primary-soft); flex-shrink: 0; }

.ae-section { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 22px 0 12px; }
.ae-section:first-of-type { margin-top: 4px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { min-width: 0; }
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.icon-picker button { height: 38px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 19px; cursor: pointer; display: grid; place-items: center; }
.icon-picker button:hover { border-color: var(--border-strong); color: var(--text); }
.icon-picker button.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }

.check-edit { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; background: var(--surface-2); overflow: hidden; }
.ce-head { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.ce-type { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.ce-type i { color: var(--primary); font-size: 17px; }
.ce-result { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-2); display: flex; gap: 7px; align-items: center;
  justify-content: flex-end; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-result .dot-s { margin-top: 0; }
.ce-body { padding: 12px 14px 4px; }
.check-edit > .form-hint { padding: 0 14px 12px; margin-top: -2px; }
.cf { display: block; margin-bottom: 10px; }
.cf > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.cf .input { width: 100%; height: 36px; font-size: 13.5px; }
.cf-row { display: flex; gap: 12px; }
.cf-row .cf { flex: 1; min-width: 0; }
.ae-empty { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); font-size: 13.5px; }
.ae-error { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.ae-test { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; margin: 6px 0 14px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; color: var(--text-2); }
.ae-test.up { background: var(--success-soft); border-color: transparent; }
.ae-test.down { background: var(--danger-soft); border-color: transparent; }
.ae-test.degraded { background: var(--warning-soft); border-color: transparent; }
.ae-json-toggle { padding: 12px 0; border-top: 1px solid var(--border); margin-top: 8px; font-size: 13.5px; color: var(--text-2); }
.ae-json-toggle:hover { background: none; color: var(--text); }
#ae-json { font-size: 12px; max-height: 280px; overflow: auto; margin: 0; }
.drawer-foot .hidden { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin .8s linear infinite; }

.app-card { display: flex; flex-direction: column; }
.app-card .card-body { flex: 1; }
.app-actions { display: flex; border-top: 1px solid var(--border); }
.app-actions button { flex: 1; display: inline-flex; gap: 6px; align-items: center; justify-content: center; padding: 11px 8px;
  border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.app-actions button + button { border-left: 1px solid var(--border); }
.app-actions button:hover { background: var(--surface-2); color: var(--primary); }
.app-actions button.danger:hover { color: var(--danger); background: var(--danger-soft); }
@media (max-width: 600px) { .tpl-grid { grid-template-columns: 1fr; } .form-row, .cf-row { flex-direction: column; gap: 0; } }

/* =====================  Ícone do sistema operacional  ===================== */
.os-logo {
  display: inline-block; width: 1em; height: 1em; vertical-align: -0.14em; flex-shrink: 0;
  background: var(--brand, var(--text));
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
}
.os-glyph.os-macos, .os-glyph.os-linux { color: var(--text); }
.os-glyph.os-windows { color: #0078d4; }
/* No tema escuro, marcas de cor escura ganham um tom mais claro da própria cor */
:root[data-theme="dark"] .os-logo.dark-brand { background: color-mix(in srgb, var(--brand) 45%, #ffffff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .os-logo.dark-brand { background: color-mix(in srgb, var(--brand) 45%, #ffffff); } }
.title-ico { font-size: 26px; }
.meta-row .meta .os-logo, .meta-row .meta .os-glyph { font-size: 16px; }

/* Ícone do título: só o símbolo, sem moldura */
.title-ico { width: auto; height: auto; border: 0; background: none; box-shadow: none; border-radius: 0; font-size: 34px; }
.resource-title { gap: 12px; }

/* =====================  Segurança  ===================== */
.count.alert { background: var(--danger-soft); color: var(--danger); }
.tab-count.alert { background: var(--danger-soft); color: var(--danger); }
.sec-helper { align-items: flex-start; margin: 0 0 24px; }
.sec-helper .copy-field { background: var(--surface); }
.sec-alerts { margin-bottom: 20px; }
.activity-row .ico.critical { background: var(--danger-soft); color: var(--danger); }
.section-sub { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.warn-text { color: var(--warning); }
.ok-text { color: var(--success); }
.cert-row { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cert-row:last-child { border-bottom: 0; padding-bottom: 4px; }
.cert-row:first-of-type { padding-top: 4px; }
.cert-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px;
  background: var(--success-soft); color: var(--success); flex-shrink: 0; }
.cert-ico.warn { background: var(--warning-soft); color: var(--warning); }
.cert-ico.danger { background: var(--danger-soft); color: var(--danger); }
.cert-main { flex: 1; min-width: 0; }
.cert-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cert-top b { font-size: 15px; }
.cert-foot { font-size: 13px; display: flex; gap: 6px; align-items: center; }
.cert-exp { text-align: right; min-width: 110px; }
.cert-exp b { display: block; font-family: var(--font-head); font-size: 18px; }
.cert-exp small { color: var(--muted); font-size: 12.5px; }
.cert-head-right { display: inline-flex; gap: 14px; align-items: center; text-transform: none; letter-spacing: 0; font-weight: 400; }
.cert-rm { display: inline-flex; gap: 4px; align-items: center; margin-top: 6px; font-size: 12.5px; }
.cert-exp .tag { margin-top: 6px; }
.ae-test .status-pill { white-space: nowrap; flex-shrink: 0; }

/* =====================  Tarefas  ===================== */
.tk-table .cmd { max-width: 340px; }
.tk-paused td { opacity: .62; }
.tk-paused td:last-child { opacity: 1; }
.tk-warn { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: var(--warning-soft); color: var(--warning); font-size: 13px; }
.tk-when { margin: -6px 0 18px; }
.tk-when-ok { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 8px; background: var(--primary-soft); color: var(--text); font-size: 13.5px; }
.tk-when-ok i { color: var(--primary); font-size: 20px; }
.tk-when-err { padding: 10px 14px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 13.5px; }
.empty svg { display: inline-block; }

/* Barra de rolagem do terminal (antes aparecia branca) */
.xterm .xterm-viewport { background-color: transparent !important; scrollbar-width: thin; scrollbar-color: #33456b transparent; }
.xterm .xterm-viewport::-webkit-scrollbar { width: 8px; background: transparent; }
.xterm .xterm-viewport::-webkit-scrollbar-thumb { background: #33456b; border-radius: 4px; }
.xterm .xterm-viewport::-webkit-scrollbar-track { background: transparent; }

/* ---------- Área Configurações (Atividade, API, Parâmetros) ---------- */
.page-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 22px; }
.page-head .grow { flex: 1; min-width: 0; }
.page-head h2 { font-family: var(--font-head); font-size: 20px; font-weight: 600; margin: 0; }
.page-head p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.page-head .ph-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-size: 22px; flex: none; }
#tabs.none-active .tab { opacity: .85; }
@media (max-width: 640px) { .page-head { flex-wrap: wrap; } .page-head .ph-ico { display: none; } }
@media (max-width: 1600px) { .tab { padding: 12px 16px; } }

/* =====================  Scripts e backups  ===================== */
.sc-tpl-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .sc-tpl-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .sc-tpl-3 { grid-template-columns: 1fr; } }
.tpl small.warn-text { display: block; color: var(--warning); margin-top: 2px; }
.sc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 20px; white-space: nowrap; }
.sc-pill i { font-size: 15px; }
.sc-pill.up { background: var(--success-soft); color: var(--success); }
.sc-pill.down { background: var(--danger-soft); color: var(--danger); }
.sc-pill.running { background: var(--primary-soft); color: var(--primary); }
.sc-table .row-title a { color: var(--primary); }
.sc-table td { vertical-align: middle; }
.sc-code { min-height: 260px; font-size: 13px; line-height: 1.55; resize: vertical; white-space: pre; tab-size: 4; padding: 12px 14px; height: auto; }
.sc-check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 2px 0 16px; cursor: pointer; }
.sc-check input { width: 16px; height: 16px; accent-color: var(--primary); }
#sc-script { font-size: 12px; max-height: 360px; overflow: auto; margin: 0 0 8px; }
#sc-warn div + div { margin-top: 4px; }
.run-meta { margin-bottom: 12px; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.run-meta > div { flex-basis: 100%; }
.run-log { height: 340px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.run-list { display: flex; flex-direction: column; gap: 6px; }
.run-item { display: grid; grid-template-columns: 1.4fr 1fr .7fr .7fr; gap: 10px; align-items: center; text-align: left; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.run-item:hover { border-color: var(--border-strong); }
.run-item.on { border-color: var(--primary); background: var(--primary-soft); }
@media (max-width: 600px) { .run-item { grid-template-columns: 1fr 1fr; } }

/* =====================  Serviços systemd  ===================== */
.svc-box { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.svc-box.muted-box { background: none; border-style: dashed; }
.svc-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.svc-line .mono { font-size: 12px; margin-left: auto; }
.svc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.svc-dot.up { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.svc-dot.down { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.svc-dot.degraded { background: var(--warning); }
.svc-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.svc-actions button { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.svc-actions button:hover { border-color: var(--primary); color: var(--primary); }
.svc-actions button.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 13.5px; color: var(--primary); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.link-btn:hover { text-decoration: underline; }
.input-addon { display: flex; align-items: stretch; }
.input-addon span { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--border-strong); border-right: 0; border-radius: 4px 0 0 4px;
  background: var(--surface-2); color: var(--muted); font-family: var(--mono); font-size: 13px; }
.input-addon .input { border-radius: 0 4px 4px 0; min-width: 0; }
.svc-tplfields { flex-wrap: wrap; }
.svc-tplfields .form-group { min-width: 140px; }
.svc-tplfields.dim { opacity: .45; pointer-events: none; }
.svc-exec { height: auto; min-height: 58px; resize: vertical; font-size: 13px; line-height: 1.5; padding: 10px 12px; }
.svc-exec[readonly] { background: var(--surface-2); color: var(--text-2); }
.svc-deps { display: flex; gap: 18px; flex-wrap: wrap; }
.svc-env-row { display: grid; grid-template-columns: 1fr 1.6fr 32px; gap: 8px; margin-bottom: 8px; }
.svc-env-row .input { height: 36px; font-size: 13px; }
#svc-unit { font-size: 12px; max-height: 360px; overflow: auto; margin: 0 0 8px; }
.svc-mini-log { font-size: 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; margin: 0 0 16px; }
.svc-log { height: calc(100vh - 230px); min-height: 300px; font-size: 12px; }
.svc-tx { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 600px) { .svc-env-row { grid-template-columns: 1fr 1fr 32px; } }

/* =====================  Firewall (edição)  ===================== */
.fw-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.fw-actions { display: flex; gap: 8px; }
.fw-port { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fw-comment { color: var(--text-2); font-size: 13.5px; }
.muted-link { color: var(--muted); font-size: 12.5px; }
.fw-table td { vertical-align: middle; }
.fw-confirm { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border-radius: 12px;
  background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); font-size: 13.5px; }
.fw-confirm > i { font-size: 26px; color: var(--warning); }
.fw-confirm #fw-count { font-family: var(--mono); font-size: 15px; }
.fw-summary { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--primary-soft); font-size: 13.5px; margin-bottom: 12px; }
.fw-summary i { font-size: 22px; color: var(--primary); }
.radio-cards.three { grid-template-columns: repeat(3, 1fr); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 16px; border: 1px solid var(--border-strong);
  background: var(--surface); font: inherit; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.chip i { font-size: 15px; }

/* Etiqueta de serviço por porta */
.svc-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 11px; font-size: 12px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.svc-chip i { font-size: 14px; }
.svc-chip.k-web { background: #e8f0ff; color: #1f5fd6; }
.svc-chip.k-db { background: #f2ebff; color: #7a3fd6; }
.svc-chip.k-remote { background: #fff1e5; color: #c25a00; }
.svc-chip.k-mail { background: #e7f7f3; color: #0f8a6a; }
.svc-chip.k-vpn { background: #e6f6fb; color: #0a7ea3; }
.svc-chip.k-app { background: #eaf4ff; color: #0b6bcb; }
.svc-chip.k-infra, .svc-chip.k-files { background: var(--surface-3); color: var(--text-2); }
:root[data-theme="dark"] .svc-chip { filter: saturate(.9) brightness(.95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .svc-chip:not(.k-infra):not(.k-files) { background: color-mix(in srgb, currentColor 16%, transparent); } }
:root[data-theme="dark"] .svc-chip:not(.k-infra):not(.k-files) { background: color-mix(in srgb, currentColor 16%, transparent); }
@media (max-width: 600px) { .radio-cards.three { grid-template-columns: 1fr; } }

/* =====================  Visão geral (layout 2)  ===================== */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px 14px; box-shadow: var(--shadow-sm, none);
  display: flex; flex-direction: column; min-width: 0; }
.kpi-top { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.kpi-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 18px; }
.kpi-val { font-family: var(--font-head); font-size: 32px; font-weight: 600; margin: 12px 0 2px; letter-spacing: -.01em; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }
.kpi .spark { margin-top: auto; padding-top: 10px; height: 46px; }
.kpi-bar { margin-top: auto; height: 8px; border-radius: 4px; }
.kpi-bar { margin-top: 18px; }
.kpi-link { margin-top: auto; padding-top: 14px; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.ov-row { margin-top: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.grid-3 > .card, .ov-row.grid-2 > .card { display: flex; flex-direction: column; }
.grid-3 > .card .card-body, .ov-row.grid-2 > .card .card-body { flex: 1; }
.ov-row.grid-2 { align-items: stretch; }
@media (max-width: 1280px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .kpi-row, .grid-3 { grid-template-columns: 1fr; } }

/* Área útil mais larga */
.page { max-width: 1760px; padding: 28px 36px 60px; }
@media (max-width: 900px) { .page { padding: 20px 16px 48px; } }

/* =====================  Painel inferior (logs)  ===================== */
.drawer.sheet { top: auto; left: var(--sidebar-w); right: 0; bottom: 0; width: auto; height: 62vh; transform: translateY(100%);
  border-radius: 16px 16px 0 0; transition: transform .25s ease, height .2s ease; }
.drawer.sheet.active { transform: none; }
.drawer.sheet.max { height: calc(100vh - 64px); }
.sheet-head { position: relative; align-items: center; gap: 16px; padding: 18px 24px 14px; }
.sheet-grip { position: absolute; top: 6px; left: 50%; width: 44px; height: 4px; margin-left: -22px; border-radius: 2px; background: var(--border-strong); }
.sheet-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.sheet-body { padding: 0; display: flex; }
.sheet-body .svc-log { flex: 1; margin: 0; border-radius: 0; height: auto; min-height: 0; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font-size: 12.5px; line-height: 1.65; padding: 14px 24px; }
.svc-log .ll { display: block; }
.svc-log .lt { color: #7f8db0; margin-right: 12px; }
.svc-log .ls { color: #6fb3ff; margin-right: 10px; }
.svc-log .ll.err { color: #ff8b8b; background: rgba(255, 80, 80, .08); }
.svc-log .ll.warn { color: #ffd27a; }
@media (max-width: 900px) { .drawer.sheet { left: 0; height: 75vh; } .sheet-tools .input { width: 120px !important; } }

/* =====================  Uso por núcleo  ===================== */
.cores-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cores-stats { display: flex; gap: 22px; }
.cores-stats .cs { display: flex; flex-direction: column; align-items: flex-end; }
.cores-stats small { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cores-stats b { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.cores-heat { display: flex; gap: 3px; height: 10px; margin-bottom: 16px; }
.cores-heat span { flex: 1; border-radius: 3px; background: linear-gradient(to right, var(--c) var(--p, 6%), var(--surface-3) var(--p, 6%)); --c: #3b82f6; transition: background .4s; }
.cores-heat span.mid { --c: #6366f1; } .cores-heat span.warn { --c: #f59e0b; } .cores-heat span.danger { --c: #ef4444; }
.cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.core-tile { --c: #3b82f6; position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px 12px; background: var(--surface);
  overflow: hidden; transition: border-color .3s; }
.core-tile.mid { --c: #6366f1; } .core-tile.warn { --c: #f59e0b; border-color: color-mix(in srgb, #f59e0b 45%, var(--border)); }
.core-tile.danger { --c: #ef4444; border-color: color-mix(in srgb, #ef4444 50%, var(--border)); }
.core-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); font-weight: 500; }
.core-val { font-family: var(--mono); font-size: 18px; color: var(--text); font-weight: 600; }
.core-tile.warn .core-val, .core-tile.danger .core-val { color: var(--c); }
.core-spark { display: block; width: 100%; height: 38px; margin: 8px 0 8px; }
.core-spark .l { fill: none; stroke: var(--c); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.core-spark .a { fill: color-mix(in srgb, var(--c) 16%, transparent); stroke: none; }
.core-bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.core-bar div { height: 100%; background: var(--c); border-radius: 2px; transition: width .5s ease; }

/* =====================  Portas em escuta  ===================== */
.port-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pf { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); font: inherit; font-size: 13px;
  color: var(--text-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.pf span { font-size: 11.5px; background: var(--surface-3); border-radius: 9px; padding: 1px 7px; font-weight: 600; }
.pf.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.port-list { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.port-row { display: grid; grid-template-columns: 44px 1fr minmax(160px, 260px) 170px; gap: 16px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); }
.port-row:first-child { border-top: 0; }
.port-row:hover { background: var(--surface-2); }
.port-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 21px; background: var(--surface-3); color: var(--text-2); }
.port-ico.k-web, .port-ico.k-app { background: #e8f0ff; color: #1f5fd6; }
.port-ico.k-db { background: #f2ebff; color: #7a3fd6; }
.port-ico.k-remote { background: #fff1e5; color: #c25a00; }
.port-ico.k-mail { background: #e7f7f3; color: #0f8a6a; }
.port-ico.k-vpn { background: #e6f6fb; color: #0a7ea3; }
:root[data-theme="dark"] .port-ico:not(.k-none):not(.k-infra) { background: color-mix(in srgb, currentColor 16%, transparent); }
.port-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.port-line b { font-size: 17px; }
.port-name { font-weight: 600; font-size: 14px; }
.port-main .row-sub { margin-top: 3px; }
.port-proc { font-size: 13.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.port-proc small { color: var(--muted); font-size: 11.5px; }
.scope-pill { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 14px; white-space: nowrap; }
.scope-pill.down { background: var(--danger-soft); color: var(--danger); }
.scope-pill.degraded { background: var(--warning-soft); color: var(--warning); }
.scope-pill.up { background: var(--success-soft); color: var(--success); }
@media (max-width: 900px) { .port-row { grid-template-columns: 40px 1fr; } .port-proc, .scope-pill { grid-column: 2; justify-self: start; } }

/* =====================  Rotinas do sistema (systemd timers)  ===================== */
.timers-card { margin-top: 20px; }
.timer-list { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.timer-row { display: grid; grid-template-columns: 38px 1fr 120px 120px 110px; gap: 14px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--border); }
.timer-row:first-child { border-top: 0; }
.timer-row.hidden { display: none; }
.timer-row.paused .timer-ico, .timer-row.paused .timer-when { opacity: .55; }
.timer-tag { margin-left: 6px; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.timer-tag i { font-size: 11px; }
.timer-act { display: flex; justify-content: flex-end; }
.timer-main a.row-sub { display: inline-flex; gap: 4px; align-items: center; margin-top: 2px; }
.timer-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 19px; }
.timer-main b { font-weight: 600; font-size: 14px; }
.timer-main .row-sub { font-size: 11.5px; }
.timer-when { display: flex; flex-direction: column; font-size: 13.5px; }
.timer-when small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.timers-more { justify-content: center; padding: 12px; margin-top: 10px; border: 1px dashed var(--border-strong); border-radius: 10px; color: var(--text-2); font-size: 13.5px; }
.timers-more.open i.chev { transform: rotate(180deg); }
@media (max-width: 760px) { .timer-row { grid-template-columns: 36px 1fr; } .timer-when, .timer-act { grid-column: 2; flex-direction: row; gap: 8px; justify-content: flex-start; } }

.disk-ico { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 26px;
  background: var(--primary-soft); color: var(--primary); }
.disk-ico.warn { background: var(--warning-soft); color: var(--warning); }
.disk-ico.danger { background: var(--danger-soft); color: var(--danger); }
.fw-head .card-title { justify-content: flex-start; gap: 10px; }

/* =====================  Sites (Nginx)  ===================== */
.site-list { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.site-row { display: grid; grid-template-columns: 44px 1fr 220px auto; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--border); }
.site-row:first-child { border-top: 0; }
.site-row.off .site-main, .site-row.off .site-ico { opacity: .55; }
.site-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; background: var(--primary-soft); color: var(--primary); }
.site-dom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-dom a { font-weight: 600; font-size: 15px; color: var(--text); display: inline-flex; align-items: center; gap: 5px; }
.site-dom a i { font-size: 13px; color: var(--muted); }
.site-target { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.site-target b { font-weight: 600; color: var(--text-2); }
.site-https .row-sub { margin-top: 4px; }
.pf-row { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; font-size: 13.5px; }
.pf-row i { font-size: 20px; flex: none; }
.pf-row.ok { background: var(--success-soft); } .pf-row.ok i { color: var(--success); }
.pf-row.warn { background: var(--warning-soft); } .pf-row.warn i { color: var(--warning); }
.pf-row.bad { background: var(--danger-soft); } .pf-row.bad i { color: var(--danger); }
.switch { position: relative; width: 38px; height: 22px; display: inline-block; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 11px; background: var(--border-strong); cursor: pointer; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:disabled + span { opacity: .5; cursor: wait; }
.site-row .row-actions { align-items: center; gap: 6px; }
@media (max-width: 900px) { .site-row { grid-template-columns: 40px 1fr; } .site-https, .site-row .row-actions { grid-column: 2; justify-self: start; } }

/* Configurações feitas fora do painel */
.manual-card { margin-top: 20px; overflow: hidden; }
.manual-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; }
.manual-head:hover { background: var(--surface-2); }
.manual-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 21px; background: var(--surface-3); color: var(--text-2); }
.manual-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.manual-chev { color: var(--muted); font-size: 18px; transition: transform .2s; }
.manual-card.open .manual-chev { transform: rotate(180deg); }
.manual-body { display: none; border-top: 1px solid var(--border); }
.manual-card.open .manual-body { display: block; }
.site-list.flat { border: 0; border-radius: 0; }
.manual-card .site-row { grid-template-columns: 44px 1fr 170px 120px; }
.site-ico.muted-ico { background: var(--surface-3); color: var(--text-2); }
.dest-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.dest-chip b { font-weight: 600; color: var(--text); }
.file-name { margin-top: 6px; font-size: 11.5px; display: flex; align-items: center; gap: 5px; }
.sc-pill.off { background: var(--surface-3); color: var(--muted); }
.state-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.state-pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.state-pill.on { color: var(--success); }
.state-pill.on span { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
@media (max-width: 900px) { .manual-card .site-row { grid-template-columns: 40px 1fr; } .manual-state { grid-column: 2; } }
.default-site { font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.default-site i { color: var(--muted); }

/* Botão de copiar nos blocos de código */
.code-wrap { position: relative; }
.code-wrap:has(> pre.hidden) { display: none; }
.code-wrap.fill { flex: 1; display: flex; min-height: 0; }
.code-wrap.fill > pre { flex: 1; }
.copy-code { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06); color: #c9d3e6; display: grid; place-items: center; cursor: pointer; font-size: 16px;
  opacity: .55; transition: opacity .15s, background .15s; z-index: 2; backdrop-filter: blur(4px); }
.code-wrap:hover .copy-code, .copy-code:focus-visible { opacity: 1; }
.copy-code:hover { background: rgba(255,255,255,.14); color: #fff; }
.copy-code.done { color: #3ddc91; border-color: rgba(61,220,145,.4); opacity: 1; }
.code-wrap.fill .copy-code { top: 12px; right: 22px; }

/* Campo de etiquetas */
.tag-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 6px 8px; border: 1px solid var(--border-strong);
  border-radius: 6px; background: var(--surface); cursor: text; transition: border-color .15s, box-shadow .15s; }
.tag-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tag-input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.tag-input.shake { animation: ti-shake .3s; }
@keyframes ti-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ti-list { display: contents; }
.ti-tag { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 14px;
  background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 500; }
.ti-tag button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; font-size: 12px; }
.ti-tag button:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.ti-field { flex: 1; min-width: 150px; border: 0; outline: 0; background: transparent; font: inherit; font-family: var(--mono); font-size: 13.5px; color: var(--text); padding: 4px; }
.tag-input.has-items .ti-field { min-width: 60px; }

/* Etiquetas dentro dos campos do editor de aplicações e cores por classe de código HTTP */
.cf .tag-input { min-height: 36px; padding: 3px 6px; }
.cf .tag-input .ti-tag { height: 26px; }
.cf .tag-input .ti-field { min-width: 90px; }
.ti-tag.http-2xx { background: var(--success-soft, #e7f7ee); color: var(--success, #1f9d55); }
.ti-tag.http-3xx { background: var(--primary-soft); color: var(--primary); }
.ti-tag.http-4xx { background: var(--warning-soft, #fff4e0); color: var(--warning, #b7791f); }
.ti-tag.http-5xx { background: var(--danger-soft); color: var(--danger); }
.ti-tag.http-1xx { background: var(--surface-2, #eef0f4); color: var(--text-2); }
.cf-row .cf:has(.ae-expect) { flex: 2.4; }

/* ===================== Parâmetros ===================== */
.st-restart { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 20px; border-radius: var(--radius);
  background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); }
.st-restart > i { font-size: 24px; color: var(--warning); }
.st-restart b { display: block; }
.st-restart span { color: var(--text-2); font-size: 13.5px; }
.st-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; padding-bottom: 90px; }
.st-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.st-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
@media (max-width: 1180px) { .st-layout { grid-template-columns: 1fr; } .st-side { position: static; } }

.st-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--primary-soft); color: var(--primary); font-size: 18px; }
.st-group-head { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.st-group-head h3 { font-family: var(--font-head); font-size: 16.5px; font-weight: 600; }

.st-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 1.15fr); gap: 28px; padding: 18px 24px;
  border-bottom: 1px solid var(--border); position: relative; transition: background .15s; }
.st-row:last-child { border-bottom: 0; }
.st-row.dirty { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.st-row.dirty::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.st-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-hint { color: var(--text-2); font-size: 13px; margin-top: 3px; line-height: 1.45; }
.st-src { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.st-src .mono { font-size: 11px; }
.st-src .link-btn { font-size: 12px; }
.src { padding: 1px 7px; border-radius: 10px; font-weight: 600; font-size: 10.5px; letter-spacing: .02em; text-transform: uppercase; }
.src-panel { background: var(--primary-soft); color: var(--primary); }
.src-env { background: var(--surface-3, #e8ebf1); color: var(--text-2); }
.src-default { background: transparent; color: var(--muted); border: 1px dashed var(--border-strong); }
.st-flag { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.st-flag.warn { background: var(--warning-soft); color: var(--warning); }
.st-ctrl { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; justify-content: center; min-width: 0; }
.st-ctrl > .input { width: 100%; max-width: 420px; height: 38px; }
.st-ctrl > .tag-input { width: 100%; }
.st-num { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); overflow: hidden; }
.st-num:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.st-num .input { border: 0; width: 96px; height: 38px; text-align: right; box-shadow: none !important; }
.st-num .input.invalid { color: var(--danger); }
.st-num:has(.invalid) { border-color: var(--danger); }
.st-num span { padding: 0 12px 0 4px; color: var(--muted); font-size: 13px; }
.st-range { font-size: 11.5px; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 6px; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }
.st-extra { font-size: 12.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.st-warn { color: var(--warning); flex-direction: row; align-items: center; gap: 6px; }
.st-callers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 2px 10px; font: inherit; font-family: var(--mono); font-size: 12px; cursor: pointer; color: var(--text); }
.chip-btn small { color: var(--muted); font-family: var(--font); }
.chip-btn:hover { border-color: var(--primary); color: var(--primary); }
.st-token-box { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.st-token-box i { color: var(--primary); font-size: 18px; }
.st-token-box small { color: var(--muted); }

.st-card { padding: 18px 20px; }
.st-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.st-card-head h4 { font-size: 14.5px; font-weight: 600; }
.st-card-head small { color: var(--muted); font-size: 12px; }
.st-kv > div { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.st-kv > div > span { color: var(--muted); }
.st-kv > div > b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-kv-mono > div > b { font-family: var(--mono); font-size: 12px; }
.st-kv b.ok { color: var(--success); } .st-kv b.bad { color: var(--warning); }
.st-kv .link-btn { font-size: 12.5px; }
.st-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }
.st-danger .st-ico { background: var(--danger-soft); color: var(--danger); }
.stc-list .callout { margin-bottom: 10px; font-size: 13.5px; }

.st-savebar { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 90; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transition: transform .25s cubic-bezier(.2,.9,.3,1.2), visibility .25s; visibility: hidden; }
.st-savebar.show { transform: translate(-50%, 0); visibility: visible; }
.st-savebar > i { color: var(--primary); font-size: 18px; }
.st-savebar span { font-size: 13.5px; margin-right: 8px; }
@media (max-width: 700px) { .st-row { grid-template-columns: 1fr; gap: 12px; } .st-savebar { left: 16px; right: 16px; transform: translateY(140%); } .st-savebar.show { transform: none; } }

/* ===================== Login — identidade Brittec (grafite + branco) ===================== */
.login-page { --primary: #091827; --primary-hover: #1b2b3d; --primary-soft: rgba(9, 24, 39, .10); background: #fff; }
.login-page .login-wrap { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.login-page .login-side {
  background:
    radial-gradient(120% 80% at 8% 0%, rgba(255,255,255,.10), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(255,255,255,.05), transparent 60%),
    linear-gradient(160deg, #1b1c1f 0%, #121315 55%, #0b0c0d 100%);
  padding: 48px 56px; gap: 40px; color: #fff; }
.login-page .login-side::before { content: ""; position: absolute; inset: 0; opacity: .22; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.login-page .login-side > * { position: relative; z-index: 1; }
.lg-brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.lg-brand .brand-logo { width: 42px; height: 42px; color: #fff; }
.lg-word { font-weight: 800; font-size: 19px; letter-spacing: -.02em; line-height: 1.1; display: flex; flex-direction: column; }
.lg-word small { font-family: var(--mono); font-weight: 400; font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: 5px; }
.lg-hero { margin-top: auto; max-width: 480px; }
.lg-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.8); padding: 6px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 20px; background: rgba(255,255,255,.04); }
.login-page .login-side h2 { font-family: var(--font); font-weight: 800; font-size: 40px; letter-spacing: -.035em; line-height: 1.08; margin: 22px 0 16px; max-width: 480px; }
.login-page .login-side p { color: rgba(255,255,255,.62); font-size: 15.5px; line-height: 1.55; }
.lg-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255,255,255,.45); margin-top: auto; }
.lg-machine { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); color: #fff; font-size: 13px;
  padding: 7px 12px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.lg-machine .dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc91; box-shadow: 0 0 0 4px rgba(61,220,145,.15); }
.lg-watermark { position: absolute !important; right: -90px; top: 50%; transform: translateY(-50%) rotate(-14deg); z-index: 0 !important; pointer-events: none; }
.lg-watermark .brand-logo { width: 460px; height: 460px; color: #fff; opacity: .045; }

.login-page .login-form { background: #fff; }
.login-page .login-card { width: min(380px, 100%); }
.login-page .login-form { min-width: 0; }
.login-page .login-card h1 { font-family: var(--font); font-weight: 800; letter-spacing: -.03em; font-size: 30px; color: #091827; }
.login-page .login-card .sub { color: #5b6573; }
.login-page .form-group label { color: #091827; font-weight: 600; }
.lg-field { position: relative; }
.lg-field > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8a93a0; font-size: 17px; pointer-events: none; }
.lg-field .input { width: 100%; height: 46px; padding-left: 42px; border-radius: 10px; border-color: #d7dce2; background: #fbfcfd; color: #091827; }
.lg-field .input:focus { border-color: #091827; box-shadow: 0 0 0 4px rgba(9, 24, 39, .08); background: #fff; outline: none; }
.lg-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #8a93a0; cursor: pointer; font-size: 17px; }
.lg-eye:hover { background: #f0f2f5; color: #091827; }
.login-page .login-card .btn { height: 48px; border-radius: 10px; background: #091827; color: #fff; font-weight: 600; font-size: 15px; gap: 8px; margin-top: 14px; }
.login-page .login-card .btn:hover { background: #1b2b3d; }
.login-page .login-card .btn i { transition: transform .2s; }
.login-page .login-card .btn:hover i { transform: translateX(3px); }
.lg-legal { text-align: center; color: #9aa2ad; font-size: 12px; margin-top: 28px; }
.lg-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 28px; color: #091827; font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.lg-mobile-brand .brand-logo { width: 36px; height: 36px; color: #091827; }
.login-page .login-error { border-radius: 10px; display: flex; gap: 8px; align-items: flex-start; }
@media (max-width: 860px) { .lg-mobile-brand { display: flex; } .login-page .login-wrap { grid-template-columns: 1fr; } }

/* Login no tema escuro: mantém o lado da marca e inverte o formulário */
:root[data-theme="dark"] .login-page, :root[data-theme="dark"] .login-page .login-form { background: #0d0e10; }
:root[data-theme="dark"] .login-page .login-card h1, :root[data-theme="dark"] .login-page .form-group label, :root[data-theme="dark"] .lg-mobile-brand { color: #fff; }
:root[data-theme="dark"] .lg-mobile-brand .brand-logo { color: #fff; }
:root[data-theme="dark"] .lg-field .input { background: #16181b; border-color: #2a2d32; color: #fff; }
:root[data-theme="dark"] .lg-field .input:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
:root[data-theme="dark"] .lg-eye:hover { background: #22252a; color: #fff; }
:root[data-theme="dark"] .login-page .login-card .btn { background: #fff; color: #091827; }
:root[data-theme="dark"] .login-page .login-card .btn:hover { background: #e6e8eb; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .login-page, :root:not([data-theme="light"]) .login-page .login-form { background: #0d0e10; }
  :root:not([data-theme="light"]) .login-page .login-card h1, :root:not([data-theme="light"]) .login-page .form-group label, :root:not([data-theme="light"]) .lg-mobile-brand { color: #fff; }
  :root:not([data-theme="light"]) .lg-mobile-brand .brand-logo { color: #fff; }
  :root:not([data-theme="light"]) .lg-field .input { background: #16181b; border-color: #2a2d32; color: #fff; }
  :root:not([data-theme="light"]) .lg-field .input:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
  :root:not([data-theme="light"]) .lg-eye:hover { background: #22252a; color: #fff; }
  :root:not([data-theme="light"]) .login-page .login-card .btn { background: #fff; color: #091827; }
  :root:not([data-theme="light"]) .login-page .login-card .btn:hover { background: #e6e8eb; }
}

/* ===================== Faixa de ambiente (homologação / dev / personalizado) ===================== */
:root { --env-h: 0px; }
:root.has-env:not(.env-collapsed) { --env-h: 40px; }
.env-banner { position: fixed; top: 0; left: 0; right: 0; height: 40px; z-index: 95; display: none;
  --eb-bg: #f5a524; --eb-ink: #3a2400; --eb-soft: rgba(58, 36, 0, .12);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.10) 14px 28px),
    var(--eb-bg);
  color: var(--eb-ink); font-size: 13px; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 6px 18px -10px rgba(0,0,0,.35); }
:root.has-env:not(.env-collapsed) .env-banner { display: block; }
.env-banner.env-dev { --eb-bg: #7c5cff; --eb-ink: #ffffff; --eb-soft: rgba(255,255,255,.18); }
.env-banner.env-custom { --eb-bg: #0fb5a8; --eb-ink: #04302c; --eb-soft: rgba(4,48,44,.12); }
.eb-in { height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 16px; max-width: 100%; }
.eb-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; flex: none;
  background: var(--eb-ink); color: var(--eb-bg); font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.eb-msg { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-sep { width: 1px; height: 18px; background: currentColor; opacity: .25; flex: none; }
.eb-ver { white-space: nowrap; font-variant-numeric: tabular-nums; }
.eb-ver b { font-family: var(--mono); font-weight: 600; }
.eb-grow { flex: 1; }
.eb-btn { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--eb-soft);
  background: var(--eb-soft); color: inherit; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.eb-btn:hover { text-decoration: none; filter: brightness(.96); color: inherit; }
.eb-btn.eb-primary { background: var(--eb-ink); color: var(--eb-bg); border-color: transparent; }
.eb-btn.eb-primary:hover { color: var(--eb-bg); filter: brightness(1.15); }
.eb-count { min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--eb-ink); color: var(--eb-bg); font-size: 11px; display: inline-grid; place-items: center; margin-left: 2px; }
.eb-x { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; font-size: 15px; flex: none; }
.eb-x:hover { background: var(--eb-soft); }
.eb-news { position: relative; }
.eb-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 360px; max-width: calc(100vw - 24px); display: none; z-index: 5;
  background: var(--surface, #fff); color: var(--text, #091827); border: 1px solid var(--border, #e3e7ed); border-radius: 12px; box-shadow: var(--shadow-lg, 0 20px 40px rgba(0,0,0,.2)); padding: 16px 18px; }
.eb-pop.open { display: block; }
.eb-pop-head { display: flex; flex-direction: column; margin-bottom: 10px; }
.eb-pop-head b { font-size: 14px; }
.eb-pop-head small { color: var(--muted, #6b7380); font-size: 12px; }
.eb-pop ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.eb-pop li { display: flex; gap: 8px; font-size: 13px; line-height: 1.4; }
.eb-pop li i { color: var(--success, #1f9d55); font-size: 16px; flex: none; margin-top: 1px; }
.eb-pop p { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border, #e3e7ed); color: var(--muted, #6b7380); font-size: 12px; }
.env-pill { position: fixed; left: 16px; bottom: 16px; z-index: 95; display: none; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; border: 0;
  background: #f5a524; color: #3a2400; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px -6px rgba(0,0,0,.4); }
.env-pill.env-dev { background: #7c5cff; color: #fff; }
.env-pill.env-custom { background: #0fb5a8; color: #04302c; }
:root.has-env.env-collapsed .env-pill { display: inline-flex; }
/* empurra o layout para baixo da faixa */
.sidebar { top: var(--env-h); }
.main { padding-top: var(--env-h); }
.topbar { top: var(--env-h); }
.login-page .login-wrap { min-height: calc(100vh - var(--env-h)); margin-top: var(--env-h); }
@media (max-width: 520px) { .eb-msg { display: none; } }
@media (max-width: 760px) { .eb-hide-sm, .eb-sep { display: none; } .eb-in { gap: 8px; padding: 0 6px 0 10px; } .eb-msg { font-size: 12px; } }
.st-version { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; padding: 10px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid #f5a524; font-size: 13.5px; color: var(--text-2); }
.st-version .lbl { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.st-version b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.st-version code { font-family: var(--mono); font-size: 12px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }

/* Ícone do servidor no título (mesmo do menu lateral, maior) */
.srv-ico.srv-ico-lg { width: 48px; height: 48px; border-radius: 12px; font-size: 26px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border)); }
.srv-ico.srv-ico-lg .srv-dot { width: 13px; height: 13px; right: -3px; bottom: -3px; border-width: 2.5px; }
/* Tema escuro monocromático: bolinha do switch ligado escura sobre o fundo claro */
:root[data-theme="dark"] .switch input:checked + span::before { background: var(--on-primary); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .switch input:checked + span::before { background: var(--on-primary); } }

/* Sites: cor por tipo (independe do tema, inclusive no escuro monocromático) */
.site-ico { position: relative; transition: transform .18s ease, box-shadow .18s ease; }
.site-ico.t-proxy    { --k: #2f7cf6; }
.site-ico.t-static   { --k: #0ea5a0; }
.site-ico.t-php      { --k: #7c5cff; }
.site-ico.t-redirect { --k: #e08a00; }
.site-ico.t-none     { --k: #8a93a0; }
.site-ico[class*="t-"] { color: var(--k); background: color-mix(in srgb, var(--k) 13%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 22%, transparent); }
.site-row { transition: background .15s ease; }
.site-row:hover { background: var(--surface-2); }
.site-row:hover .site-ico { transform: translateY(-1px) scale(1.04); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k, var(--primary)) 30%, transparent),
  0 6px 14px -6px color-mix(in srgb, var(--k, var(--primary)) 55%, transparent); }
.manual-ico { background: color-mix(in srgb, #8a93a0 14%, var(--surface)); color: var(--text-2); }
:root[data-theme="dark"] .site-ico[class*="t-"] { background: color-mix(in srgb, var(--k) 18%, var(--surface)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-ico[class*="t-"] { background: color-mix(in srgb, var(--k) 18%, var(--surface)); } }

/* ===================== Analisador de disco (Armazenamento) ===================== */
.dz-tools { display: flex; gap: 10px; align-items: center; font-family: var(--font); }
.dz-tools .select { height: 32px; min-width: 120px; font-size: 13px; }
.dz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 1180px) { .dz-layout { grid-template-columns: 1fr; } }
.dz-card { min-width: 0; }
.dz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 8px; flex-wrap: wrap; }
.dz-crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; font-size: 14px; }
.dz-crumb { border: 0; background: none; font: inherit; color: var(--primary); cursor: pointer; padding: 4px 6px; border-radius: 6px; font-weight: 500; font-family: var(--mono); font-size: 13px; }
.dz-crumb:hover { background: var(--surface-2); }
.dz-crumb.cur { color: var(--text); font-weight: 600; cursor: default; }
.dz-sep { color: var(--muted); font-size: 11px; }
.dz-meta { padding: 0 26px 12px; font-size: 12.5px; color: var(--muted); min-height: 18px; }
.dz-meta b { color: var(--text); }
.warn-txt { color: var(--warning); }
.dz-list { border-top: 1px solid var(--border); }
.dz-row { display: grid; grid-template-columns: 34px minmax(140px, 1.1fr) minmax(80px, 1.4fr) 86px 58px 28px; gap: 14px; align-items: center;
  padding: 9px 20px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.dz-row:last-child { border-bottom: 0; }
.dz-row.clickable { cursor: pointer; transition: background .12s; }
.dz-row.clickable:hover { background: var(--surface-2); }
.dz-row.clickable:hover .dz-go { color: var(--primary); transform: translateX(2px); }
.dz-row.loose { color: var(--muted); }
.dz-row.file { grid-template-columns: 34px minmax(0, 1fr) 110px 86px 36px; }
.dz-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-size: 17px; }
.dz-row.clickable .dz-ico { background: color-mix(in srgb, #e0a100 14%, var(--surface)); color: #c98a00; }
.dz-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.dz-name small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.dz-name b { font-weight: 600; }
.dz-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.dz-bar span { display: block; height: 100%; border-radius: 4px; transition: width .5s ease; }
.dz-bar span { background: #8fb2ff; } .dz-bar span.top { background: #3f7ef5; }
.dz-row.clickable:hover .dz-bar span { background: #3f7ef5; }
.dz-size { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.dz-pct { text-align: right; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dz-go { color: var(--muted); transition: transform .12s, color .12s; display: grid; place-items: center; }
.dz-date { font-size: 12.5px; color: var(--text-2); }
.dz-date small { display: block; color: var(--muted); font-size: 11.5px; }
.dz-more { padding: 10px 20px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border); }
.dz-empty { text-align: center; padding: 44px 24px 48px; border-top: 1px solid var(--border); }
.dz-empty-ico { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 32px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.dz-empty b { font-size: 16px; display: block; }
.dz-empty p { color: var(--text-2); max-width: 460px; margin: 6px auto 18px; font-size: 13.5px; }
.dz-loading { padding: 40px 20px; text-align: center; color: var(--text-2); border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dz-loading i { font-size: 22px; } .dz-loading small { color: var(--muted); font-size: 12px; }
.dz-loading.sm, .dz-none.sm { padding: 14px 18px; border: 0; font-size: 13px; }
.dz-none { padding: 26px 20px; color: var(--muted); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; justify-content: center; }
.dz-none i { font-size: 20px; color: var(--success); }
.dz-side { display: flex; flex-direction: column; gap: 16px; }
.dz-panel { padding-bottom: 6px; }
.dz-panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 10px; }
.dz-panel-head h4 { font-size: 14.5px; font-weight: 600; }
.dz-panel-head small { color: var(--muted); font-size: 12.5px; } .dz-panel-head small b { color: var(--success); }
.dz-clean-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--border); }
.dz-clean-row b { font-size: 13.5px; font-weight: 600; display: block; }
.dz-clean-row small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.dz-clean-act { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.dz-free { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.dz-free.muted { font-weight: 500; color: var(--muted); }
.dz-used { padding: 0 18px; font-size: 13px; color: var(--text-2); } .dz-used b { color: var(--text); font-size: 15px; }
.dz-rate { margin-left: 6px; font-size: 12px; padding: 1px 7px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.dz-spark { width: calc(100% - 36px); height: 70px; margin: 8px 18px 4px; display: block; }
.dz-spark .line { fill: none; stroke: var(--c1); stroke-width: 2; vector-effect: non-scaling-stroke; }
.dz-spark .area { fill: color-mix(in srgb, var(--c1) 12%, transparent); }
.dz-spark .dot { fill: var(--c1); }
.dz-forecast { display: flex; gap: 10px; align-items: flex-start; margin: 8px 18px 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: var(--surface-2); }
.dz-forecast i { font-size: 19px; flex: none; }
.dz-forecast small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.dz-forecast.ok i { color: var(--success); } .dz-forecast.warn { background: var(--warning-soft); } .dz-forecast.warn i { color: var(--warning); }
.dz-forecast.bad { background: var(--danger-soft); } .dz-forecast.bad i { color: var(--danger); } .dz-forecast.muted i { color: var(--muted); }
.dz-grow-title { padding: 8px 18px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--border); }
.dz-grow-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 18px; font-size: 12.5px; cursor: pointer; }
.dz-grow-row:hover { background: var(--surface-2); }
.dz-grow-row .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-delta { color: var(--warning); font-weight: 700; flex: none; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .dz-row { grid-template-columns: 30px 1fr 70px 24px; } .dz-row .dz-bar, .dz-row .dz-pct, .dz-row .dz-date { display: none; } }

.dz-pager { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.dz-pager small { flex-basis: 100%; text-align: center; font-size: 12px; }
.dz-pager .dz-more-btn { width: auto; justify-content: center; padding: 8px 16px; border: 1px dashed var(--border-strong); border-radius: 10px; color: var(--text-2); font-size: 13px; }
.dz-pager .dz-more-btn.open i.chev { transform: rotate(180deg); }

/* ===================== Docker ===================== */
#tab-docker .toolbar { margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
#dk-status b { color: var(--text); }
.dk-group { margin-bottom: 18px; overflow: visible; }
.dk-group-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.dk-group-head b { font-size: 15px; display: block; }
.dk-group-head small { color: var(--muted); font-size: 12.5px; }
.dk-gico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 20px;
  background: color-mix(in srgb, #2496ed 14%, var(--surface)); color: #2496ed; flex: none; }
.dk-gactions { display: flex; gap: 8px; flex-wrap: wrap; }
.dk-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px 150px auto; gap: 16px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--border); transition: background .12s; }
.dk-row:last-child { border-bottom: 0; }
.dk-row:hover { background: var(--surface-2); }
.dk-row.off .dk-main, .dk-row.off .dk-ico { opacity: .6; }
.dk-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; background: var(--surface-2); color: var(--muted); }
.dk-ico.on { background: color-mix(in srgb, #2496ed 13%, var(--surface)); color: #2496ed; }
.dk-ico.bad { background: var(--danger-soft); color: var(--danger); }
.dk-main { min-width: 0; }
.dk-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dk-name .mono { font-weight: 400; font-size: 12px; }
.dk-name .tag.green { background: var(--success-soft); color: var(--success); }
.dk-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-sub .mono { color: var(--text-2); font-size: 12px; }
.dk-ports { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dk-port { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 12px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.dk-port.pub { border-color: color-mix(in srgb, var(--warning) 40%, var(--border)); }
.dk-port.pub i { color: var(--warning); }
.dk-port small { color: var(--muted); }
.dk-res { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dk-res i { color: var(--muted); margin-right: 3px; }
.dk-actions { display: flex; gap: 2px; align-items: center; }
.dk-actions .icon-btn[disabled] { opacity: .35; cursor: default; }
.dk-actions .dropdown-menu { right: 0; left: auto; min-width: 250px; z-index: 30; }
@media (max-width: 1000px) { .dk-row { grid-template-columns: 36px 1fr auto; } .dk-res { display: none; } .dk-state { grid-column: 2; } }

/* ---------- Docker · Redes ---------- */
.nt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.nt-kpi { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.nt-kpi-ico { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 19px;
  background: color-mix(in srgb, #2496ed 12%, var(--surface)); color: #2496ed; }
.nt-kpi b { display: block; font-family: var(--font-head); font-size: 24px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.nt-kpi span { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-top: 2px; }
.nt-kpi small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.nt-section { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.nt-section h3 { margin: 0; font-size: 15px; font-weight: 600; }
.nt-section span { font-size: 12.5px; color: var(--muted); }
.nt-section code, .nt-none code, .nt-empty code, .nt-sys p code { white-space: nowrap; font-size: 11.5px; padding: 1px 5px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 16px; margin-bottom: 28px; }
.nt-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.nt-card:hover { border-color: color-mix(in srgb, #2496ed 35%, var(--border)); box-shadow: 0 8px 24px -14px rgba(16, 24, 40, .25); }
.nt-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 14px; }
.nt-ico { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; font-size: 21px; }
.nt-ico.sm { width: 30px; height: 30px; border-radius: 8px; font-size: 16px; }
.nd-bridge { --nd: #2496ed; } .nd-host { --nd: #e8883a; } .nd-overlay { --nd: #8b5cf6; } .nd-macvlan { --nd: #14a3a3; } .nd-none { --nd: #8a8f98; }
.nt-ico[class*="nd-"] { background: color-mix(in srgb, var(--nd) 13%, var(--surface)); color: var(--nd); }
.nt-title { min-width: 0; flex: 1; }
.nt-title b { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-title small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.nt-title small b { display: inline; font-size: inherit; color: var(--text-2); font-weight: 600; }
.nt-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nt-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.nt-badge[class*="nd-"] { background: color-mix(in srgb, var(--nd) 10%, var(--surface)); color: var(--nd); border-color: color-mix(in srgb, var(--nd) 28%, transparent); }
.nt-badge.lock { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.nt-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.nt-fact { position: relative; padding: 10px 18px; min-width: 0; }
.nt-fact + .nt-fact { border-left: 1px solid var(--border); }
.nt-fact small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.nt-fact .mono { display: block; font-size: 12.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-copy { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s; padding: 2px; }
.nt-fact:hover .nt-copy { opacity: 1; }
.nt-copy:hover { color: var(--text); }
.nt-topo { padding: 14px 18px 16px; flex: 1; }
.nt-gw { display: flex; align-items: center; gap: 10px; }
.nt-gw-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; flex: none;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); position: relative; z-index: 1; }
.nt-gw b { display: block; font-size: 12.5px; }
.nt-gw small { display: block; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.nt-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.nt-nodes { position: relative; margin: 2px 0 0 13px; padding-left: 18px; border-left: 2px solid var(--border); }
.nt-node { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; margin-top: 8px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; transition: border-color .12s, background .12s; }
.nt-node::before { content: ""; position: absolute; left: -19px; top: 50%; width: 18px; border-top: 2px solid var(--border); }
.nt-node:hover { border-color: color-mix(in srgb, #2496ed 45%, var(--border)); background: color-mix(in srgb, #2496ed 4%, var(--surface)); }
.nt-node-main { min-width: 0; flex: 1; }
.nt-node-main b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-node-main small { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-ip { font-size: 12.5px; color: var(--text-2); padding: 2px 8px; border-radius: 6px; background: var(--surface-2); }
.nt-go { color: var(--muted); font-size: 13px; opacity: 0; transition: opacity .12s; }
.nt-node:hover .nt-go { opacity: 1; }
.nt-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.nt-dot.on { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, transparent); }
.nt-dot.warn { background: var(--warning); }
.nt-dot.off { background: var(--muted); opacity: .6; }
.nt-empty { margin-top: 10px; font-size: 12.5px; color: var(--muted); padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; }
.nt-none { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 30px 20px; margin-bottom: 28px; }
.nt-none i { font-size: 30px; color: var(--muted); }
.nt-none span { font-size: 13px; color: var(--muted); max-width: 520px; }
.nt-sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.nt-sys { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.nt-sys-head { display: flex; align-items: center; gap: 10px; }
.nt-sys-head b { font-size: 13.5px; }
.nt-sys-n { margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); }
.nt-sys p { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.nt-sys-meta { margin-top: 8px; font-size: 11.5px; color: var(--text-2); }
.nt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 14px; font: inherit; font-size: 12px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.nt-chip:hover { border-color: color-mix(in srgb, #2496ed 45%, var(--border)); }
.nt-chip small { color: var(--muted); font-size: 11px; }
@media (max-width: 1100px) { .nt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .nt-grid { grid-template-columns: 1fr; } .nt-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .nt-kpi { flex-direction: column; gap: 8px; padding: 12px 14px; } .nt-kpi small { display: none; }
  .nt-facts { grid-template-columns: 1fr; } .nt-fact + .nt-fact { border-left: 0; border-top: 1px solid var(--border); }
  .nt-fact { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 16px; }
  .nt-fact .mono { margin-top: 0; } .nt-copy { display: none; }
  .nt-head { flex-wrap: wrap; } .nt-badges { justify-content: flex-start; width: 100%; padding-left: 52px; }
}

/* ---------- Docker · Imagens, ponto de volta ---------- */
.dk-name .tag.dk-rb { background: color-mix(in srgb, #8b5cf6 11%, var(--surface)); color: #8b5cf6; }
.nt-badge.im-rb { background: color-mix(in srgb, #8b5cf6 10%, var(--surface)); color: #8b5cf6; border-color: color-mix(in srgb, #8b5cf6 28%, transparent); }
.im-head { align-items: center; }
.im-head .btn { margin-left: auto; }
.im-list { padding: 0; overflow: hidden; }
.im-row { display: grid; grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr) 100px 44px; gap: 16px; align-items: center;
  padding: 13px 20px; border-bottom: 1px solid var(--border); transition: background .12s; }
.im-row:last-child { border-bottom: 0; }
.im-row:hover { background: var(--surface-2); }
.im-row.idle .im-main, .im-row.idle .im-ico { opacity: .75; }
.im-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; background: var(--surface-2); color: var(--muted); }
.im-ico.on { background: color-mix(in srgb, #2496ed 13%, var(--surface)); color: #2496ed; }
.im-ico.rb { background: color-mix(in srgb, #8b5cf6 12%, var(--surface)); color: #8b5cf6; }
.im-main { min-width: 0; }
.im-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14.5px; }
.im-name b { font-weight: 600; }
.im-tag { color: var(--muted); margin-right: 4px; }
.im-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.im-sub .mono { font-size: 12px; color: var(--text-2); }
.im-users { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; min-width: 0; }
.im-size { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 600; }
.im-act { display: flex; justify-content: flex-end; }
.im-act .icon-btn[disabled] { opacity: .3; cursor: not-allowed; }
.icon-btn.danger-hover:hover { color: var(--danger); background: var(--danger-soft); }
@media (max-width: 900px) {
  .im-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .im-users { grid-column: 2 / -1; grid-row: 2; }
  .im-size { grid-row: 1; grid-column: 3; }
  .im-act { grid-row: 2; grid-column: 3; }
  .im-head .btn { margin-left: 0; }
}
.sc-check-hint { margin: -4px 0 14px 28px; }

/* ---------- Docker · Terminal do container ---------- */
.dkt-sheet { display: flex; flex-direction: column; }
.dkt-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dkt-title h3 { margin: 0; font-size: 16px; }
.dkt-title p { margin: 2px 0 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.dkt-ico { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 19px; background: #0f1012; color: #e6e7ea; }
.dkt-body { flex: 1; min-height: 0; background: #0f1012; padding: 10px 14px; }
.dkt-body #dkterm { flex: 1; min-width: 0; height: 100%; }
.dkt-foot { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 18px; font-size: 12px;
  color: #80848e; background: #141518; border-top: 1px solid #23252a; }
.dkt-foot i { color: #3ddc91; }
.dkt-foot kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 4px; border: 1px solid #2c2f35; background: #1b1c20; color: #c9ced8; }
@media (max-width: 900px) { .dkt-title p { max-width: 60vw; } .dkt-foot span:last-child { display: none; } }
.dk-name .tag.dk-sens { background: var(--warning-soft); color: var(--warning); }

/* ---------- Atividade ---------- */
.nt-kpi.ac-kpi-warn .nt-kpi-ico { background: var(--warning-soft); color: var(--warning); }
.ac-filters { padding: 14px 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.ac-frow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ac-frow .select { width: auto; min-width: 180px; height: 38px; }
.ac-custom { display: flex; gap: 8px; align-items: center; }
.ac-custom[hidden] { display: none; }
.ac-custom .input { width: 150px; height: 38px; }
.ac-search { position: relative; flex: 1; min-width: 220px; }
.ac-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ac-search .input { padding-left: 34px; height: 38px; width: 100%; }
.seg.sm button { padding: 6px 12px; font-size: 12.5px; }
.ac-clear { margin-left: auto; }
.ac-list { padding: 0; overflow: hidden; }
.ac-day { display: flex; align-items: baseline; gap: 10px; padding: 12px 20px 8px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1; }
.ac-day span { font-weight: 600; font-size: 13px; text-transform: capitalize; }
.ac-day small { color: var(--muted); font-size: 12px; }
.ac-row { display: grid; grid-template-columns: 52px 32px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 20px;
  border-bottom: 1px solid var(--border); transition: background .12s; }
.ac-row:last-child { border-bottom: 0; }
.ac-row:hover { background: var(--surface-2); }
.ac-row.exe .ac-main b { font-weight: 500; color: var(--text-2); }
.ac-time { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.ac-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; background: var(--surface-2); color: var(--text-2); }
.ac-ico.success { background: var(--success-soft); color: var(--success); }
.ac-ico.warning { background: var(--warning-soft); color: var(--warning); }
.ac-ico.critical { background: var(--danger-soft); color: var(--danger); }
.ac-main { min-width: 0; }
.ac-main b { display: block; font-size: 13.5px; font-weight: 600; }
.ac-main small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-meta { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.ac-user { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 14px; padding: 2px 9px; font: inherit; font-size: 12px; cursor: pointer; }
.ac-user:hover { border-color: var(--border-strong); color: var(--text); }
.ac-src { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 14px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--muted); }
.ac-src.executor { background: color-mix(in srgb, #8b5cf6 11%, var(--surface)); color: #8b5cf6; }
.ac-more { display: flex; justify-content: center; margin: 14px 0 6px; font-size: 12.5px; }
.ac-store { font-size: 12px; text-align: center; margin-top: 6px; }
.ac-store .mono { font-size: 11.5px; }
@media (max-width: 760px) {
  .ac-row { grid-template-columns: 44px 28px minmax(0, 1fr); }
  .ac-meta { grid-column: 3; justify-content: flex-start; }
  .ac-frow .select { flex: 1; min-width: 140px; }
}
.ac-clear[hidden] { display: none; }

/* ---------- Docker · Volumes, backups e restauração ---------- */
.vl-row, .bk-row { display: grid; gap: 16px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--border); transition: background .12s; }
.vl-row { grid-template-columns: 40px minmax(0, 1.5fr) 150px 90px auto; }
.bk-row { grid-template-columns: 40px minmax(0, 1fr) 90px auto; }
.vl-row:last-child, .bk-row:last-child { border-bottom: 0; }
.vl-row:hover, .bk-row:hover { background: var(--surface-2); }
.vl-row.idle .im-main, .vl-row.idle .im-ico { opacity: .75; }
.vl-row .im-sub { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vl-bk { display: flex; gap: 8px; align-items: center; font-size: 12.5px; }
.vl-bk i { font-size: 18px; }
.vl-bk b { display: block; font-weight: 600; }
.vl-bk small { display: block; color: var(--muted); font-size: 11.5px; }
.vl-bk.ok i { color: var(--success); }
.vl-bk.warn i, .vl-bk.none i { color: var(--warning); }
.vl-bk.none b { color: var(--warning); }
.bk-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.im-act { gap: 2px; }
.dkr-box { width: 600px; max-width: calc(100vw - 32px); }
.dkr-body { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; margin: 12px 0; }
.dkr-opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 13px; }
.dkr-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.dkr-opt input { margin-top: 3px; accent-color: var(--primary); }
.dkr-items { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.dkr-items:empty { display: none; }
.dkr-items-h { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.dkr-items .sc-check { margin: 0 0 8px; font-weight: 400; font-size: 13px; flex-wrap: wrap; }
.dkr-warn { margin: 4px 0 12px; font-size: 13px; }
.dkr-ack { font-size: 13px; font-weight: 500; }
@media (max-width: 900px) {
  .vl-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .vl-row .vl-bk { grid-column: 2; grid-row: 2; }
  .vl-row .bk-act, .bk-row .bk-act { grid-column: 2 / -1; justify-content: flex-start; }
  .bk-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
}
.bk-safety { margin-top: 14px; padding: 0; overflow: hidden; }
.bk-safety summary { display: flex; gap: 12px; align-items: center; padding: 14px 20px; cursor: pointer; list-style: none; }
.bk-safety summary::-webkit-details-marker { display: none; }
.bk-safety summary > i:first-child { font-size: 20px; color: #8b5cf6; }
.bk-safety summary b { display: block; font-size: 13.5px; }
.bk-safety summary small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.bk-safety .bk-caret { margin-left: auto; color: var(--muted); transition: transform .15s; }
.bk-safety[open] .bk-caret { transform: rotate(180deg); }
.bk-safety .im-list { border-top: 1px solid var(--border); }

/* ---------- Backups na nuvem (aba Backups) ---------- */
.bu-ico { --bu: #0f9d8a; }
.nt-kpi-ico.bu-ico, .im-ico.on.bu-ico { background: color-mix(in srgb, var(--bu) 13%, var(--surface)); color: var(--bu); }
.callout.ok { background: var(--success-soft); } .callout.ok i { color: var(--success); }
.bu-err { color: var(--danger); }
.bu-retsum { margin: 4px 0 6px; font-size: 13px; color: var(--text); }
.bu-retsum b { color: var(--primary); }
.bu-none { padding: 6px 2px; font-size: 13px; }
.bu-live { margin-bottom: 16px; align-items: center; } .bu-live small { color: var(--text-2); }
.bu-setup { padding: 18px 20px; margin-bottom: 22px; border-color: color-mix(in srgb, var(--bu, #0f9d8a) 35%, var(--border)); }
.bu-setup-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.bu-setup-head > i { font-size: 26px; color: #0f9d8a; }
.bu-setup-head b { display: block; font-size: 15px; } .bu-setup-head small { color: var(--muted); font-size: 12.5px; }
.bu-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bu-steps li { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 8px; }
.bu-steps li.next { background: var(--surface-2); }
.bu-steps li > div { flex: 1; min-width: 0; }
.bu-steps b { display: block; font-size: 13.5px; font-weight: 600; } .bu-steps small { display: block; font-size: 12.5px; color: var(--muted); }
.bu-steps li.ok b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.bu-steps li.wait { opacity: .6; }
.bu-step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--border-strong); color: var(--text-2); }
.bu-steps li.ok .bu-step-n { background: var(--success); border-color: var(--success); color: #fff; }
.bu-steps li.next .bu-step-n { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.bu-repo { display: grid; grid-template-columns: 40px minmax(0, 1.3fr) repeat(4, minmax(90px, .55fr)) auto; gap: 16px; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--border); }
.bu-repo:last-child { border-bottom: 0; }
.bu-fact small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.bu-fact b { display: block; font-size: 13.5px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.bu-runs { padding: 0; overflow: hidden; }
.bu-run { border-bottom: 1px solid var(--border); } .bu-run:last-child { border-bottom: 0; }
.bu-run summary { display: flex; gap: 14px; align-items: center; padding: 12px 20px; cursor: pointer; list-style: none; }
.bu-run summary::-webkit-details-marker { display: none; }
.bu-run summary:hover { background: var(--surface-2); }
.bu-run-when { min-width: 190px; } .bu-run-when b { display: block; font-size: 13.5px; } .bu-run-when small { color: var(--muted); font-size: 12px; }
.bu-run-dur { margin-left: auto; font-size: 12.5px; }
.bu-run .bk-caret { color: var(--muted); transition: transform .15s; } .bu-run[open] .bk-caret { transform: rotate(180deg); }
.bu-run-body { padding: 4px 20px 16px 20px; display: grid; gap: 10px; font-size: 13px; }
.bu-items { list-style: none; margin: 6px 0 0; padding: 0 0 0 4px; display: grid; gap: 4px; }
.bu-items li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.bu-items .status-pill { transform: scale(.9); }
.bu-dest { padding: 0; overflow: hidden; margin-bottom: 14px; }
.bu-dest-head { display: flex; gap: 14px; align-items: center; padding: 16px 20px; }
.bu-dest-head .im-main { flex: 1; }
.bu-dest-body { padding: 16px 20px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.bu-dest-body .input { background: var(--surface); }
.bu-how { font-size: 13px; color: var(--text-2); margin: 0 0 14px; line-height: 1.55; }
.bu-how code, .bu-plan code { font-size: 11.5px; padding: 1px 5px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); }
.bu-cmd { font-size: 13px !important; }
.bu-token { resize: vertical; min-height: 64px; font-size: 12px; }
.bu-more { padding: 0; overflow: hidden; margin-top: 8px; }
.bu-more > summary { display: flex; gap: 12px; align-items: center; padding: 14px 20px; cursor: pointer; list-style: none; }
.bu-more > summary::-webkit-details-marker { display: none; }
.bu-more > summary > i:first-child { font-size: 20px; color: var(--muted); }
.bu-more > summary b { display: block; font-size: 13.5px; } .bu-more > summary small { display: block; font-size: 12.5px; color: var(--muted); }
.bu-more .bk-caret { margin-left: auto; color: var(--muted); transition: transform .15s; } .bu-more[open] .bk-caret { transform: rotate(180deg); }
.bu-more .bu-dest { border: 0; border-top: 1px solid var(--border); border-radius: 0; margin: 0; box-shadow: none; }
.bu-more-inline summary { cursor: pointer; color: var(--text-2); font-size: 13px; margin-bottom: 6px; }
.bu-plan { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bu-col { display: grid; gap: 16px; min-width: 0; }
.bu-block { padding: 16px 20px; }
.bu-block h4 { display: flex; gap: 8px; align-items: center; margin: 0 0 4px; font-size: 14.5px; }
.bu-block h4 i { color: #0f9d8a; font-size: 18px; }
.bu-block > p { font-size: 12.5px; margin: 0 0 10px; }
.bu-group { padding: 8px 0 4px; border-top: 1px dashed var(--border); }
.bu-group:first-of-type { border-top: 0; }
.bu-group-h { display: flex; gap: 6px; align-items: center; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 4px 0 6px; }
.bu-group-h b, .bu-group-h .muted { text-transform: none; letter-spacing: 0; }
.bu-opt { display: flex; gap: 10px; align-items: flex-start; padding: 5px 4px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.bu-opt:hover { background: var(--surface-2); }
.bu-opt input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.bu-opt b { font-weight: 500; } .bu-opt small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.bu-add { display: flex; gap: 8px; margin: 6px 0 4px; } .bu-add .input { flex: 1; height: 34px; font-size: 13px; }
.bu-dberr { font-size: 12.5px; margin: 2px 0 6px; } .bu-dberr a { color: inherit; font-weight: 600; }
.bu-save { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.bu-save .callout { flex-basis: 100%; margin: 0; font-size: 13px; }
.bu-snap-bar { margin-bottom: 14px; }
.bu-day { padding: 9px 20px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.bu-snap { grid-template-columns: 40px minmax(0, 1fr) 90px auto; }
.bu-snap .im-name .mono { font-size: 11.5px; }
.bu-crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.bu-browser { padding: 6px 0; margin-bottom: 14px; max-height: 60vh; overflow: auto; }
.bu-entry { display: grid; grid-template-columns: 20px 22px minmax(0, 1fr) 90px 140px; gap: 10px; align-items: center; padding: 6px 20px; font-size: 13.5px; }
.bu-entry:hover { background: var(--surface-2); }
.bu-entry input { accent-color: var(--primary); }
.bu-entry > i { font-size: 18px; color: var(--muted); } .bu-entry > i.ph-folder { color: #e2a33b; }
.bu-entry a { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bu-entry > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; text-align: right; }
.bu-entry > span:nth-of-type(1) { text-align: left; font-size: 13.5px; }
.bu-pw span { font-size: 16px !important; letter-spacing: .02em; white-space: normal !important; word-break: break-all; }
@media (max-width: 1100px) { .bu-plan { grid-template-columns: 1fr; } .bu-repo { grid-template-columns: 40px minmax(0, 1fr) auto; } .bu-repo .bu-fact { display: none; } }
@media (max-width: 700px) { .bu-entry { grid-template-columns: 20px 22px minmax(0, 1fr); } .bu-entry > span:not(:first-of-type) { display: none; } }
.bu-excl { width: 100%; resize: vertical; font-size: 12.5px; }
.bu-dest-err { margin: 0 20px 14px; font-size: 13px; }
.bu-login { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.bu-login a.btn { text-decoration: none; }
.bu-manual { margin: 4px 0 12px; } .bu-manual .bu-how { margin: 8px 0 10px; }
/* Backups · pastas no estilo do analisador de disco */
.bu-pastas { padding: 0; overflow: hidden; }
.bu-phead { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; padding: 16px 20px 12px; }
.bu-phead h4 { display: flex; gap: 8px; align-items: center; margin: 0 0 4px; font-size: 14.5px; } .bu-phead h4 i { color: #0f9d8a; font-size: 18px; }
.bu-phead p { font-size: 12.5px; margin: 0; }
.bu-ptotal { text-align: right; flex: none; }
.bu-ptotal b { display: block; font-family: var(--font-head); font-size: 22px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bu-ptotal span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-top: 2px; }
.bu-ptotal small { display: block; font-size: 11.5px; color: var(--muted); }
.bu-pgroup-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 20px; background: var(--surface-2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bu-pgroup-h span { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.bu-pgroup-h small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bu-prow { display: grid; grid-template-columns: 18px 30px minmax(120px, 1.3fr) minmax(60px, 1fr) 76px 48px 28px; gap: 12px; align-items: center;
  padding: 9px 20px; border-bottom: 1px solid var(--border); transition: background .12s; }
.bu-prow:last-child { border-bottom: 0; }
.bu-prow:hover { background: var(--surface-2); }
.bu-prow input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.bu-prow .dz-ico.bu-fold { background: var(--surface-2); color: var(--muted); }
.bu-prow.on .dz-ico.bu-fold { background: color-mix(in srgb, #e0a100 14%, var(--surface)); color: #c98a00; }
.bu-prow:not(.on) .dz-name, .bu-prow:not(.on) .dz-size { color: var(--muted); }
.bu-prow .dz-name .mono { font-size: 13.5px; }
.bu-prow:not(.on) .dz-bar span { background: var(--border-strong); }
.bu-go { border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; font-size: 15px; }
.bu-go:hover { background: var(--surface-3); color: var(--primary); }
.bu-pgroup .bu-add { padding: 10px 20px 14px; margin: 0; }
.bu-drill-box { width: 760px; max-width: calc(100vw - 32px); }
.bu-drill-list { padding: 0; overflow: auto; max-height: 55vh; margin-bottom: 16px; }
.bu-drill-list .dz-list { border-top: 0; }
.bu-drill-loose { padding: 10px 20px; font-size: 12.5px; border-top: 1px solid var(--border); }
@media (max-width: 800px) { .bu-prow { grid-template-columns: 18px 30px minmax(0, 1fr) 70px 28px; } .bu-prow .dz-bar, .bu-prow .dz-pct { display: none; } .bu-phead { flex-direction: column; } .bu-ptotal { text-align: left; } }
.bu-pastas { margin-bottom: 16px; }
.bu-prow { grid-template-columns: 18px 30px minmax(160px, 1.2fr) minmax(80px, 1.3fr) 86px 58px 28px; }
.bu-prow.child { padding-left: 52px; background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.bu-prow.child .dz-ico.bu-fold { background: none; color: var(--muted); width: 22px; }
.bu-prow.part .dz-ico.bu-fold { background: color-mix(in srgb, #e0a100 8%, var(--surface)); color: #c98a00; }
.bu-prow.part .dz-name small { color: var(--text-2); }
/* Backups · em andamento */
.status-pill.run { background: color-mix(in srgb, #3f7ef5 12%, var(--surface)); color: #2f6be0; }
.status-pill.run::before { background: #3f7ef5; animation: bu-pulse 1.4s ease-in-out infinite; }
@keyframes bu-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(63, 126, 245, .55); } 50% { opacity: .55; box-shadow: 0 0 0 5px rgba(63, 126, 245, 0); } }
.bu-live2 { padding: 16px 20px; margin-bottom: 18px; border-color: color-mix(in srgb, #3f7ef5 35%, var(--border)); }
.bu-live-top { display: flex; align-items: center; gap: 12px; }
.bu-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #3f7ef5; flex: none; animation: bu-pulse 1.4s ease-in-out infinite; }
.bu-live-t { flex: 1; min-width: 0; } .bu-live-t b { display: block; font-size: 14.5px; } .bu-live-t small { color: var(--muted); font-size: 12.5px; }
.bu-live-pct { font-family: var(--font-head); font-size: 24px; font-weight: 600; color: #2f6be0; font-variant-numeric: tabular-nums; }
.bu-live-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: 12px 0 10px; position: relative; }
.bu-live-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #3f7ef5, #6aa0ff); transition: width .8s ease;
  background-size: 200% 100%; animation: bu-shine 2s linear infinite; }
.bu-live-bar.indet span { position: absolute; animation: bu-indet 1.4s ease-in-out infinite; }
@keyframes bu-shine { from { background-position: 200% 0; } to { background-position: 0 0; } }
@keyframes bu-indet { 0% { left: -30%; } 100% { left: 100%; } }
.bu-live-now { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bu-live-now i { color: #3f7ef5; }
.bu-mini { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; vertical-align: middle; }
.bu-mini span { display: block; height: 100%; background: #3f7ef5; }
/* Backups · O que entra organizado em etapas */
.bu-sec { display: flex; gap: 12px; align-items: center; margin: 26px 0 12px; }
.bu-sec:first-of-type { margin-top: 4px; }
.bu-sec-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px;
  background: color-mix(in srgb, #0f9d8a 14%, var(--surface)); color: #0f9d8a; }
.bu-sec h3 { margin: 0; font-size: 15.5px; } .bu-sec span { font-size: 12.5px; color: var(--muted); }
.bu-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.bu-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.bu-grid2 .bu-pastas { margin-bottom: 0; }
.bu-grid2 .bu-prow { grid-template-columns: 18px 30px minmax(110px, 1.4fr) minmax(50px, .8fr) 76px 48px 4px; }
.bu-pgroup-h em { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.bu-pad { padding: 12px 20px; }
.bu-dopt { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; cursor: pointer; transition: border-color .12s, background .12s; }
.bu-dopt:hover { background: var(--surface-2); }
.bu-dopt.on { border-color: color-mix(in srgb, #0f9d8a 45%, var(--border)); background: color-mix(in srgb, #0f9d8a 5%, var(--surface)); }
.bu-dopt input { width: 16px; height: 16px; accent-color: var(--primary); }
.bu-dopt b { display: block; font-size: 13.5px; } .bu-dopt small { display: block; font-size: 12px; color: var(--muted); }
.bu-dopt .im-ico { width: 32px; height: 32px; font-size: 17px; }
.bu-savebar { position: sticky; bottom: 12px; z-index: 5; display: flex; gap: 10px; align-items: center; margin-top: 22px; padding: 12px 14px 12px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px -14px rgba(16, 24, 40, .35); }
.bu-savesum { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--text-2); }
.bu-savesum i { font-size: 20px; color: #0f9d8a; } .bu-savesum b { color: var(--text); font-size: 14px; }
@media (max-width: 1100px) { .bu-grid2, .bu-grid3 { grid-template-columns: 1fr; } .bu-savebar { flex-wrap: wrap; } }
.bu-excl { min-height: 118px; }
/* Menu lateral: com muitos itens (ex.: Backups) em telas baixas, os blocos não encolhem; o menu rola e o rodapé fica visível */
.sidebar { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
.sidebar > * { flex-shrink: 0; }
.sidebar-footer { position: sticky; bottom: 0; background: var(--surface); z-index: 1; }
@media (max-height: 900px) {
  .nav-section { padding: 12px 12px 2px; }
  .nav-label { padding-bottom: 5px; }
  .nav-item { padding: 6px 10px; }
  .sidebar-footer { padding: 10px 16px; }
}
@media (max-height: 760px) {
  .nav-section { padding: 8px 12px 0; }
  .nav-item { padding: 5px 10px; font-size: 13.5px; }
}

/* Backups: snapshots protegidos, itens fora do plano, log completo e cartão da Visão geral (1.11) */
.bu-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.bu-filter .nt-chip b { font-weight: 700; margin-left: 2px; }
.bu-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
  background: var(--surface-3); color: var(--muted); margin-left: 8px; white-space: nowrap; }
.bu-tag.prot { background: color-mix(in srgb, #3f7ef5 12%, var(--surface)); color: #2f6be0; }
.bu-tag.out { background: var(--warning-soft); color: var(--warning); }
.bu-prot { box-shadow: inset 3px 0 0 #3f7ef5; }
.bu-reason { color: var(--text); margin-top: 3px; }
.bu-reason i { color: #2f6be0; }
.bu-lock.on { color: #2f6be0; }
.bu-danger { color: var(--danger); }
.bu-orphans { margin-bottom: 22px; }
.bu-loglink { margin-left: 8px; font-size: 12px; white-space: nowrap; }
.bu-log { max-height: 60vh; overflow: auto; background: var(--surface-2, var(--surface-3)); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; margin: 12px 0 4px; }
.ov-cloud { text-decoration: none; color: inherit; margin-bottom: 6px; }
.ov-cloud .status-pill { margin-left: 6px; font-size: 11px; }
.ov-cloud small.bu-err { color: var(--danger); }
.bu-filter .nt-chip.on { background: var(--primary-soft); border-color: color-mix(in srgb, #2496ed 45%, var(--border)); font-weight: 600; }
.bu-snap .bk-act { display: flex; gap: 8px; flex-wrap: nowrap; align-items: center; }
.bu-oldexec { margin-bottom: 16px; }
.bu-pager .dz-more-btn b { font-weight: 700; }
.bu-runs .bu-pager, .im-list .bu-pager { background: var(--surface); }

/* ===================== VPN (aba VPN, strongSwan) ===================== */
.vpn-list { display: grid; gap: 12px; }
.vpn-card { padding: 16px 18px; }
.vpn-card.down { box-shadow: inset 3px 0 0 var(--danger); }
.vpn-card.connecting { box-shadow: inset 3px 0 0 #3f7ef5; }
.vpn-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.vpn-name { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.vpn-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.vpn-body { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; }
.vpn-body small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.vpn-body .nt-chip { margin: 0 4px 4px 0; cursor: default; }
@media (max-width: 900px) { .vpn-body { grid-template-columns: 1fr 1fr; } }
/* formulário do túnel */
.vpn-form h3 { margin-bottom: 4px; }
.vf-sec { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid var(--border); }
.vpn-form > p.muted + .vf-sec { border-top: 0; padding-top: 10px; }
.vf-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13px; }
.vf-title { font-weight: 700; font-size: 14.5px; margin: 3px 0 12px; display: flex; align-items: center; gap: 10px; }
.vf-body .form-group:last-child { margin-bottom: 0; }
.vf-body .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vf-count { font-weight: 500; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--success-soft); color: var(--success); }
.vf-count.zero { background: var(--surface-2); color: var(--muted); }
.vf-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.vf-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.vf-tile i { font-size: 24px; color: var(--muted); transition: color .15s; }
.vf-tile:hover { border-color: var(--primary); }
.vf-tile.on { border-color: var(--primary); background: var(--primary-soft); color: var(--text); font-weight: 600; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.vf-tile.on i { color: var(--primary); }
.vf-tile:focus-visible, .vf-prof:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.vf-ipwrap { position: relative; max-width: 320px; }
.vf-ipwrap > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; }
.vf-ipwrap .input { width: 100%; padding-left: 40px; padding-right: 38px; }
.vf-ipwrap > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 18px; display: flex; }
.vf-ipwrap > span.ok { color: var(--success); }
.vf-ipwrap > span.bad { color: var(--danger); }
.vf-svcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 260px; overflow: auto; }
.vf-svc { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  background: var(--surface); transition: border-color .15s, background .15s; }
.vf-svc:hover { border-color: var(--border-strong); }
.vf-svc.on { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: var(--primary-soft); }
.vf-svc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vf-svc-txt b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-svc-txt small { color: var(--muted); font-size: 12px; }
.vf-svc .switch { flex: none; }
.vf-profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vf-prof { position: relative; display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px 36px 14px 14px; border: 1px solid var(--border-strong);
  border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.vf-prof > i:first-child { font-size: 24px; color: var(--muted); margin-top: 1px; }
.vf-prof span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vf-prof b { font-size: 14px; }
.vf-prof small { color: var(--muted); font-size: 11.5px; }
.vf-prof em { font-style: normal; color: var(--text-2); font-size: 12.5px; margin-top: 4px; }
.vf-prof .vf-mark { position: absolute; top: 12px; right: 12px; font-size: 19px; color: var(--primary); opacity: 0; transform: scale(.6); transition: .15s; }
.vf-prof:hover { border-color: var(--primary); }
.vf-prof.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.vf-prof.on > i:first-child { color: var(--primary); }
.vf-prof.on .vf-mark { opacity: 1; transform: none; }
@media (max-width: 700px) { .vf-body .form-row { grid-template-columns: 1fr; } .vf-tiles { grid-template-columns: repeat(3, 1fr); } .vf-svcs, .vf-profiles { grid-template-columns: 1fr; } .vf-sec { grid-template-columns: 1fr; gap: 6px; } .vf-num { display: none; } }
.vpn-info { width: 100%; border-collapse: collapse; font-size: 13px; }
.vpn-info th { text-align: left; font-weight: 500; color: var(--muted); padding: 6px 12px 6px 0; width: 38%; vertical-align: top; }
.vpn-info td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.vpn-setup-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 10px; }
@media (max-width: 800px) { .vpn-setup-form { grid-template-columns: 1fr; } }
#modal-vpn-tunnel .modal-box, #modal-vpn-info .modal-box, #modal-vpn-log .modal-box { max-height: calc(100vh - 32px); overflow-y: auto; }
.vpn-state { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; font-size: 13px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); white-space: nowrap; max-width: 100%; }
.vpn-state i { font-size: 17px; color: var(--muted); }
.vpn-state b { font-weight: 600; }
.vpn-state small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.vpn-state small::before { content: "·"; margin-right: 8px; color: var(--border-strong); }
.vpn-state.ok { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.vpn-state.ok i { color: var(--success); }
.vpn-state.setup { background: var(--primary-soft); border-color: color-mix(in srgb, #3f7ef5 30%, transparent); }
.vpn-state.setup i { color: #2f6be0; }
.vpn-state.warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.vpn-state.warn i { color: var(--warning); }
.vpn-state.bad { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.vpn-state.bad i { color: var(--danger); }
@media (max-width: 700px) { .vpn-state small { display: none; } }

/* Atualizações do sistema (aba Atualizações) */
#tab-updates .card { margin-bottom: 14px; }
.up-run { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.up-run-head { display: flex; gap: 12px; align-items: center; }
.up-run-head > i { font-size: 22px; color: var(--primary); }
.up-run-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.up-pct { font-size: 22px; font-family: var(--font-head); }
.up-tail { max-height: 230px; margin: 12px 0 8px; font-size: 12px; }
.up-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.up-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.up-impact { margin-top: 10px; font-size: 13px; padding: 10px 14px; border-radius: 8px; background: var(--warning-soft); }
.up-impact span { font-weight: 600; }
.up-impact ul { margin: 6px 0 0; padding-left: 18px; }
.up-impact li { margin: 2px 0; }
.up-reboot { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); }
.up-reboot .card-title i { color: var(--warning); }
.up-title { justify-content: flex-start; margin-bottom: 4px; }
.up-title span { display: inline-flex; align-items: center; gap: 6px; }
.up-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.up-head .card-title { margin: 0; }
.up-head .chips { display: flex; gap: 6px; }
.up-head .chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.up-table td { padding: 9px 16px; font-size: 13px; }
.up-table .tag i { font-size: 12px; }
.up-major { background: var(--danger-soft); }
.up-major i { color: var(--danger); }
.up-auto-row { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); align-items: start; }
.up-auto-row.off { opacity: .55; }
.up-auto-row small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.up-auto-row b { font-weight: 600; font-size: 14px; }
.up-auto-row .mono { display: block; font-size: 11.5px; margin-top: 2px; }
.up-auto-row .up-time { width: 100%; height: 36px; font-size: 13px; }
.up-tz { display: block; font-size: 11.5px; margin-top: 4px; }
.up-auto-link a { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 500; }
.up-auto-link small { text-transform: none; letter-spacing: 0; margin-top: 4px; }
@media (max-width: 900px) { .up-auto-row { grid-template-columns: 1fr 1fr; } }
.up-more { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
@media (max-width: 700px) { .up-btns { justify-content: flex-start; } .up-table th:nth-child(2), .up-table td:nth-child(2) { display: none; } }

/* Contas do painel (Acessos ao painel) e papéis */
.role-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12.5px; font-weight: 600;
  background: var(--warning-soft); color: var(--warning); margin-right: 6px; }
.role-pill.leitura { background: var(--surface-3); color: var(--text-2); }
.dropdown-menu .menu-head { padding: 8px 14px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown-menu .menu-head b { display: block; font-size: 13.5px; }
.dropdown-menu .menu-head small { color: var(--muted); font-size: 12px; }
#tab-access .card { margin-bottom: 14px; }
.ac-table td { vertical-align: middle; }
.ac-table td small { font-size: 11.5px; }
.ac-who { display: flex; gap: 12px; align-items: center; }
.ac-who small { display: block; color: var(--muted); }
.ac-off td { opacity: .55; }
.ac-act { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.ac-role { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; padding: 3px 10px; border-radius: 12px; background: var(--surface-3); color: var(--text-2); }
.ac-role.admin { background: var(--primary-soft); color: var(--primary); }
.ac-role.operador { background: var(--warning-soft); color: var(--warning); }
.ac-roles-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ac-role-card p { margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.ac-roles { display: grid; gap: 8px; }
.ac-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 12px 14px; border: 1px solid var(--border-strong);
  border-radius: 10px; background: var(--surface); font: inherit; cursor: pointer; }
.ac-pick small { color: var(--text-2); font-size: 12.5px; }
.ac-pick.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.ac-pick:disabled { cursor: not-allowed; opacity: .6; }
@media (max-width: 900px) { .ac-roles-info { grid-template-columns: 1fr; } }
/* Leitura: botões de ação da tela ficam apagados (o servidor também recusa) */
body.role-leitura .tab-panel .btn-primary, body.role-leitura .tab-panel .btn-danger { opacity: .4; pointer-events: none; }
/* Leitura: some com editar e apagar (o servidor recusa de qualquer jeito) */
body.role-leitura .tab-panel button:has(> .ph-trash), body.role-leitura .tab-panel button:has(> .ph-pencil-simple),
body.role-leitura .tab-panel .dropdown-menu .danger { display: none; }

/* ---------- Usuários (contas do Linux, 1.16.1) ---------- */
.callout.danger { background: var(--danger-soft); } .callout.danger i { color: var(--danger); }
#osu-notice .callout { margin: 0 0 14px; }
.osu-table td { vertical-align: middle; }
.osu-table .ac-who .tag { margin-left: 4px; font-size: 11px; }
.ac-role.osu-user { background: var(--success-soft); color: var(--success); }
.osu-login { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.osu-keys-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.osu-form .vf-profiles.osu-profiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.osu-form .vf-prof em { margin-top: 2px; }
.osu-form .vf-tiles.osu-shells { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-width: 440px; }
.osu-form .vf-svcs.osu-extras:empty { display: none; }
.osu-key { width: 100%; resize: vertical; min-height: 72px; font-size: 12.5px; line-height: 1.5; padding: 10px 12px; word-break: break-all; }
.input.bad, .osu-key.bad { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent); }
.form-hint.bad { color: var(--danger); }
.osu-req { color: var(--warning); font-weight: 600; }
.osu-keylist { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow: auto; }
.osu-keyrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.osu-keyrow > i { font-size: 20px; color: var(--primary); }
.osu-keyrow > div { flex: 1; min-width: 0; }
.osu-keyrow small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osu-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; margin-top: 12px; cursor: pointer; }
.osu-check small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
@media (max-width: 720px) { .osu-form .vf-profiles.osu-profiles { grid-template-columns: 1fr; } }

/* ---------- Diagnóstico de rede (1.17) ---------- */
.tl-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.tl-list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 76px; }
.tl-item { position: relative; display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 11px 12px; border: 1px solid transparent; border-radius: 12px;
  background: transparent; cursor: pointer; font: inherit; color: var(--text); transition: background .15s, border-color .15s; }
.tl-item:hover { background: var(--surface-2); }
.tl-item.on { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.tl-item-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-size: 18px; }
.tl-item.on .tl-item-ico { background: var(--primary-soft); color: var(--primary); }
.tl-item-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-right: 14px; }
.tl-item-txt b { font-size: 13.5px; font-weight: 600; }
.tl-item-txt small { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.tl-item.locked { opacity: .6; }
.tl-lock { position: absolute; top: 12px; right: 10px; color: var(--muted); font-size: 13px; }
.tl-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tl-card { padding: 20px 22px; }
.tl-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.tl-head h3 { margin: 0; font-size: 17px; }
.tl-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.tl-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 22px; flex: none; }
.tl-form .form-group { margin-bottom: 14px; }
.tl-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.tl-row .grow { flex: 1; min-width: 240px; }
.tl-inp { position: relative; }
.tl-inp > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 16px; }
.tl-inp > i + .input { padding-left: 38px; }
.tl-inp .input { width: 100%; }
.tl-seg { max-width: 100%; }
.tl-toggles { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.tl-toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; }
.tl-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 14px; }
.tl-quick .chip { cursor: pointer; font: inherit; font-size: 12.5px; }
.tl-quick .chip .mono { color: var(--muted); margin-left: 4px; }
.tl-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.tl-res { padding: 18px 20px; }
.tl-res-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.tl-res-head .mono { font-size: 13px; overflow: hidden; text-overflow: ellipsis; max-width: 460px; white-space: nowrap; }
.tl-res-head .grow { flex: 1; }
.tl-out { background: #0f1012; color: #d7deea; border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 12px; line-height: 1.55;
  max-height: 340px; overflow: auto; margin: 0; white-space: pre-wrap; word-break: break-all; }
.tl-raw { margin-top: 14px; }
.tl-raw summary { cursor: pointer; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.tl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tl-stat { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.tl-stat span { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.tl-stat b { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.tl-stat.ok b { color: var(--success); } .tl-stat.warn b { color: var(--warning); } .tl-stat.bad b { color: var(--danger); }
.tl-stat .status-pill { font-size: 12.5px; }
.tl-rows, .tl-hops { display: flex; flex-direction: column; gap: 4px; }
.tl-rowline, .tl-hop { display: grid; grid-template-columns: 44px 1fr 80px 60px; gap: 12px; align-items: center; font-size: 13px; padding: 3px 0; }
.tl-hop { grid-template-columns: 34px minmax(140px, 220px) 1fr 80px; border-bottom: 1px dashed var(--border); padding: 7px 0; }
.tl-hop.none { color: var(--muted); }
.tl-hopn { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; font-weight: 700; }
.tl-bar { display: block; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.tl-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #6aa6ff); }
.tl-table td { vertical-align: top; }
.tl-data { word-break: break-all; font-size: 12.5px; }
.tl-verdict { margin-bottom: 14px; }
.tl-dns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tl-dns { position: relative; padding: 12px 14px 30px; border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.tl-dns.auth { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.tl-dns.diff { border-color: color-mix(in srgb, var(--warning) 55%, transparent); background: var(--warning-soft); }
.tl-dns.none { opacity: .65; }
.tl-dns-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tl-dns-h b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-dns-h .tag { font-size: 10.5px; }
.tl-dns-a { margin-top: 8px; font-size: 12.5px; word-break: break-all; }
.tl-dns-mark { position: absolute; left: 14px; bottom: 9px; font-size: 12px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.tl-dns.ok .tl-dns-mark { color: var(--success); } .tl-dns.diff .tl-dns-mark { color: var(--warning); }
.tl-water { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.tl-wrow { display: grid; grid-template-columns: 80px 1fr 70px; gap: 12px; align-items: center; font-size: 13px; }
.tl-wtrack { position: relative; height: 10px; border-radius: 99px; background: var(--surface-3); }
.tl-wtrack i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #6aa6ff); }
.tl-chain { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; font-size: 12.5px; }
.tl-chain .mono { word-break: break-all; }
.tl-cert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--success-soft); margin-bottom: 4px; }
.tl-cert > i { font-size: 24px; color: var(--success); }
.tl-cert.bad { background: var(--danger-soft); } .tl-cert.bad > i { color: var(--danger); }
.tl-cert small { display: block; color: var(--text-2); font-size: 12px; margin-top: 2px; word-break: break-all; }
.tl-port { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 14px; }
.tl-port > i { font-size: 38px; }
.tl-port b { display: block; font-size: 19px; }
.tl-port span { display: block; font-size: 13.5px; margin-top: 2px; }
.tl-port small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 4px; }
.tl-port.ok { background: var(--success-soft); } .tl-port.ok > i, .tl-port.ok b { color: var(--success); }
.tl-port.warn { background: var(--warning-soft); } .tl-port.warn > i, .tl-port.warn b { color: var(--warning); }
.tl-port.bad { background: var(--danger-soft); } .tl-port.bad > i, .tl-port.bad b { color: var(--danger); }
.tl-nmap + .tl-nmap { margin-top: 16px; }
.tl-nmap-h { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.tl-nmap-h > i { font-size: 20px; color: var(--primary); }
.tl-portgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tl-pp { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 1px; }
.tl-pp b { font-size: 17px; }
.tl-pp span { font-size: 12.5px; color: var(--text-2); }
.tl-pp small { font-size: 11px; font-weight: 600; }
.tl-pp.open { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 30%, transparent); } .tl-pp.open small { color: var(--success); }
.tl-pp.filt small { color: var(--warning); }
.tl-pk { max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.tl-pkl { display: grid; grid-template-columns: 74px 18px 54px 1fr; gap: 8px; align-items: center; padding: 5px 10px; font-size: 12px; border-bottom: 1px solid var(--border); }
.tl-pkl:last-child { border-bottom: 0; }
.tl-pkl .mono:last-child { word-break: break-all; }
.tl-dir { color: var(--muted); }
.tl-proto { font-size: 10.5px; text-align: center; }
.tl-proto.TCP { background: var(--primary-soft); color: var(--primary); } .tl-proto.UDP { background: var(--warning-soft); color: var(--warning); }
.tl-proto.ICMP { background: var(--success-soft); color: var(--success); }
.tl-history { display: flex; flex-direction: column; }
.tl-h { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; text-align: left; }
.tl-h:last-child { border-bottom: 0; }
.tl-h:hover { background: var(--surface-2); }
.tl-h > i { color: var(--primary); font-size: 17px; }
.tl-h .mono { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.tl-h .grow { flex: 1; }
.tl-h .bad { color: var(--danger); }
@media (max-width: 980px) {
  .tl-layout { grid-template-columns: 1fr; }
  .tl-list { position: static; flex-direction: row; overflow-x: auto; }
  .tl-item { min-width: 190px; }
  .tl-hop { grid-template-columns: 30px 1fr 70px; } .tl-hop .tl-bar { display: none; }
}
.tl-dns.region .tl-dns-mark { color: var(--primary); }
.tl-stat b span.mono { text-transform: none; letter-spacing: 0; display: inline; margin: 0; color: inherit; font-size: inherit; }
.tl-quick .chip { transition: background .15s, border-color .15s, color .15s; }
.tl-quick .chip:hover { border-color: var(--primary); }
.tl-quick .chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.tl-quick .chip.on .mono { color: var(--primary); }
/* DNS pelo mundo */
.tl-geo { position: relative; }
.tl-geo-map { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.tl-geo-map svg { display: block; width: 100%; height: auto; }
.tl-geo-map .wm-land { fill: color-mix(in srgb, var(--text) 11%, var(--surface-2)); stroke: none; }
.tl-geo-map .wm-borders { fill: none; stroke: var(--border-strong); stroke-width: .4; opacity: .7; }
.tl-geo-pt { cursor: pointer; }
.tl-geo-pt .dot { fill: var(--c); stroke: var(--surface); stroke-width: 2.2; }
.tl-geo-pt .halo { fill: var(--c); opacity: .18; transform-box: fill-box; transform-origin: center; animation: tl-geo-pulse 2.6s ease-out infinite; }
.tl-geo-pt.none .dot { fill: var(--surface); stroke: var(--muted); stroke-dasharray: 2 2; }
.tl-geo-pt.none .halo { display: none; }
.tl-geo-pt:hover .dot { r: 9; }
@keyframes tl-geo-pulse { 0% { transform: scale(.6); opacity: .35; } 100% { transform: scale(1.5); opacity: 0; } }
.tl-geo-tip { position: absolute; z-index: 5; width: 220px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.18)); font-size: 12.5px; pointer-events: none; }
.tl-geo-tip .mono { margin-top: 4px; font-size: 12px; word-break: break-all; }
.tl-geo-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.tl-geo-leg { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.tl-geo-leg > div { flex: 1; min-width: 0; }
.tl-geo-leg b { font-size: 12.5px; word-break: break-all; }
.tl-geo-leg small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.tl-geo-leg .sw, .tl-geo-sw { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; display: inline-block; }
.tl-geo-sw { margin: 0 8px -1px 0; width: 10px; height: 10px; }
.tl-geo-leg .sw.none { background: transparent; border: 1.5px dashed var(--muted); }
@media (prefers-reduced-motion: reduce) { .tl-geo-pt .halo { animation: none; } }

/* ---------- Versão do painel (1.18) ---------- */
.rl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.rl-main, .rl-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rl-hero { display: grid; grid-template-columns: 200px minmax(0, 1fr); overflow: hidden; }
.rl-cur { padding: 22px; border-right: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.rl-cur span { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rl-cur b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-family: var(--mono); }
.rl-cur small { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rl-new { padding: 20px 22px; }
.rl-new.empty { display: flex; gap: 14px; align-items: flex-start; }
.rl-new.empty > i { font-size: 30px; color: var(--primary); }
.rl-new.empty p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
.rl-new-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rl-new-h b { font-size: 18px; }
.rl-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.rl-notes { margin: 12px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--text-2); }
.rl-exec { font-size: 12.5px; margin: 10px 0 0; display: flex; gap: 6px; align-items: center; }
.rl-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.rl-schedform { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.rl-schedform label { font-size: 13px; font-weight: 600; }
.rl-schedform .input { height: 34px; width: auto; }
.rl-sched { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--primary-soft); font-size: 13.5px; }
.rl-sched > i { font-size: 20px; color: var(--primary); }
.rl-sched span { flex: 1; }
.rl-run { padding: 20px 22px; }
.rl-run-h { display: flex; gap: 14px; align-items: center; }
.rl-run-h b { font-size: 16px; display: block; }
.rl-spin { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 20px; flex: none; }
.rl-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.rl-steps li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--muted); }
.rl-steps li > span { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 12px; flex: none; }
.rl-steps li.done { color: var(--text); } .rl-steps li.done > span { background: var(--success); border-color: var(--success); color: #fff; }
.rl-steps li.now { color: var(--text); font-weight: 600; } .rl-steps li.now > span { border-color: var(--primary); color: var(--primary); }
.rl-auto { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rl-auto .input { width: 130px; height: 34px; }
.rl-more { margin-top: 8px; font-size: 13px; }
.rl-more summary { cursor: pointer; color: var(--muted); }
.rl-mini { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; font-weight: 400; }
.rl-bk { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.rl-bk > div { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.rl-bk > div > i { color: var(--muted); }
.rl-bk small { margin-left: auto; }
.rl-rb { width: 100%; justify-content: center; }
.rl-howto { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
@media (max-width: 1100px) { .rl-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .rl-hero { grid-template-columns: 1fr; } .rl-cur { border-right: 0; border-bottom: 1px solid var(--border); } }
.rl-hist td:nth-child(2), .rl-hist td:nth-child(5) { white-space: nowrap; }
.rl-hist td:nth-child(3) .status-pill { white-space: nowrap; }
.rl-steps li.done > span i { font-weight: 700; }
/* Versão do painel 1.20.1: novidades da instalada, versões guardadas e histórico com "Ver mais" */
.rl-pill.ok { background: var(--success-soft); color: var(--success); }
.rl-foot { font-size: 12.5px; margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--border); }
.rl-none { font-size: 13px; margin: 10px 0 0; }
.rl-kept-sub { font-size: 13px; margin: -2px 0 12px; }
.rl-kept { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rl-kv { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.rl-kv-h { display: flex; flex-direction: column; gap: 2px; }
.rl-kv-h b { font-family: var(--mono); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.rl-kv-h small { font-size: 12px; }
.rl-kv .btn { margin-top: auto; justify-content: center; }
.rl-notes.sm { margin: 0; font-size: 12.5px; gap: 3px; }
.rl-notes.sm li { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rl-histmore { margin-top: 10px; }
.rl-notes.sm { list-style: none; padding-left: 0; }
.rl-notes.sm li::before { content: "• "; color: var(--muted); }
