@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ══════════════════════════════════════════════════════════════
   TEMAS
   ══════════════════════════════════════════════════════════════ */

/* ── ANYHUB (padrão) — inspirado na AnyHub ─────────────────── */
:root, [data-theme="anyhub"] {
  --bg:       #eef1f8;
  --bg2:      #ffffff;
  --bg3:      #f5f7fc;
  --bg4:      #eaecf5;
  --border:   #e2e6f0;
  --border2:  #cdd3e8;
  --text:     #4a5578;
  --dim:      #9ba5be;
  --bright:   #1e2547;
  --accent:   #4f6af5;
  --accent2:  #7c8ff7;
  --green:    #22c55e;
  --cyan:     #06b6d4;
  --red:      #ef4444;
  --yellow:   #f59e0b;
  --orange:   #f97316;
  --sidebar-bg:    #1a1f2e;
  --sidebar-bg2:   #242a3d;
  --sidebar-text:  #8892b0;
  --sidebar-bright:#e2e8f0;
  --sidebar-accent:#4f6af5;
  --sidebar-border:#2a3150;
  --logs-bg:  #0f1117;
  --logs-fg:  #7ec8a0;
  --shadow:   rgba(79,106,245,.08);
  --shadow2:  rgba(0,0,0,.06);
  --font:     'Inter', sans-serif;
  --mono:     'JetBrains Mono', monospace;
}

/* ── DARK ───────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:       #080a0f;
  --bg2:      #0d1017;
  --bg3:      #131720;
  --bg4:      #1a2030;
  --border:   #1c2333;
  --border2:  #252e42;
  --text:     #b8c4d8;
  --dim:      #4a5568;
  --bright:   #e2e8f4;
  --accent:   #4f6af5;
  --accent2:  #7c8ff7;
  --green:    #4ade80;
  --cyan:     #22d3ee;
  --red:      #f87171;
  --yellow:   #fbbf24;
  --orange:   #fb923c;
  --sidebar-bg:    #080a0f;
  --sidebar-bg2:   #0d1017;
  --sidebar-text:  #4a5568;
  --sidebar-bright:#e2e8f4;
  --sidebar-accent:#4f6af5;
  --sidebar-border:#1c2333;
  --logs-bg:  #03050a;
  --logs-fg:  #7ec8a0;
  --shadow:   rgba(0,0,0,.5);
  --shadow2:  rgba(0,0,0,.3);
  --font:     'Inter', sans-serif;
  --mono:     'JetBrains Mono', monospace;
}

/* ── LIGHT ──────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:       #f8faff;
  --bg2:      #ffffff;
  --bg3:      #f2f4fb;
  --bg4:      #e8ecf7;
  --border:   #dde3f5;
  --border2:  #c8d0ea;
  --text:     #3a4560;
  --dim:      #8896b0;
  --bright:   #1a2440;
  --accent:   #4f6af5;
  --accent2:  #7c8ff7;
  --green:    #16a34a;
  --cyan:     #0891b2;
  --red:      #dc2626;
  --yellow:   #d97706;
  --orange:   #ea580c;
  --sidebar-bg:    #ffffff;
  --sidebar-bg2:   #f5f7fc;
  --sidebar-text:  #8896b0;
  --sidebar-bright:#1e2547;
  --sidebar-accent:#4f6af5;
  --sidebar-border:#e2e6f0;
  --logs-bg:  #1a1f2e;
  --logs-fg:  #7ec8a0;
  --shadow:   rgba(0,0,0,.08);
  --shadow2:  rgba(0,0,0,.04);
  --font:     'Inter', sans-serif;
  --mono:     'JetBrains Mono', monospace;
}

/* ── Shared vars (não mudam por tema) ───────────────────────── */
:root {
  --sidebar: 220px;
  --r: 8px;
  --r2: 12px;
  --anyhub-red:   #D42230;
  --anyhub-red2:  #B81C28;
  --font-brand:   'Bricolage Grotesque', 'DM Sans', sans-serif;
}

/* ══════════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 13.5px; line-height: 1.6;
  min-height: 100vh; transition: background .2s, color .2s;
}
a { color: inherit; text-decoration: none; }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR — usa variáveis próprias para manter dark em todos os temas
   ══════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column; z-index: 50;
  transition: width .25s ease, background .2s;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  position: relative;
}

/* Botão de colapsar/expandir */
.sidebar-toggle {
  position: absolute; right: -14px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sidebar-bg); border: 1px solid var(--sidebar-border);
  color: var(--sidebar-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: color .15s, background .15s, transform .2s;
  z-index: 2;
}
.sidebar-toggle:hover {
  color: var(--sidebar-bright); background: var(--sidebar-bg2);
  transform: translateY(-50%) scale(1.08);
}
html.sidebar-collapsed .sidebar-toggle .icon-collapse { display: none; }
html.sidebar-collapsed .sidebar-toggle .icon-expand   { display: block !important; }
.logo-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(212,34,48,.15); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  border: 1px solid rgba(212,34,48,.25);
}
.logo-icon img { display: block; }
.logo-text { font-size: 12px; color: var(--sidebar-text); line-height: 1.3; }
.logo-text strong {
  display: block; font-family: var(--font-brand);
  color: var(--sidebar-bright); font-size: 15px; font-weight: 700; letter-spacing: -.01em;
}
.logo-text strong em { color: var(--anyhub-red); font-style: normal; }

.sidebar-section-label {
  padding: 18px 18px 5px;
  font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sidebar-text); opacity: .6;
  font-weight: 600;
}

.nav-menu { list-style: none; padding: 4px 10px; }
.nav-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; font-size: 13px; color: var(--sidebar-text);
  border-radius: var(--r); transition: all .15s; font-weight: 500;
}
.nav-menu a:hover { color: var(--sidebar-bright); background: var(--sidebar-bg2); }
.nav-menu a.active {
  color: var(--sidebar-bright); background: var(--accent);
}
[data-theme="light"] .nav-menu a.active { color: #fff; }
.nav-icon { font-size: 15px; width: 18px; text-align: center; }
.sidebar-spacer { flex: 1; }

/* Separadores de seção dentro do menu */
.nav-menu .nav-section {
  padding: 14px 12px 5px;
  font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sidebar-text); opacity: .55;
  font-weight: 700;
  pointer-events: none; user-select: none;
}
.nav-menu .nav-section:first-child { padding-top: 6px; }
html.sidebar-collapsed .nav-menu .nav-section {
  padding: 10px 0 4px; text-align: center; opacity: .4;
}
html.sidebar-collapsed .nav-menu .nav-section span { display: none; }
html.sidebar-collapsed .nav-menu .nav-section::before {
  content: ""; display: block; height: 1px; margin: 0 10px;
  background: var(--sidebar-border, rgba(255,255,255,.08));
}

/* Toggle tema */
.theme-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; margin-bottom: 4px;
  font-size: 11px; color: var(--sidebar-text);
}
.theme-toggle-label { font-size: 11px; font-weight: 500; }
.theme-switch { position: relative; width: 52px; height: 26px; cursor: pointer; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-track {
  position: absolute; inset: 0;
  background: var(--sidebar-bg2); border: 1px solid var(--sidebar-border);
  border-radius: 26px; transition: all .2s;
  display: flex; align-items: center; padding: 0 4px;
}
.theme-track::before {
  content: ''; position: absolute; left: 3px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--sidebar-text); transition: all .2s;
}
.theme-switch input:checked + .theme-track { background: rgba(79,106,245,.2); border-color: var(--accent); }
.theme-switch input:checked + .theme-track::before { left: calc(100% - 21px); background: var(--accent); }
.theme-icons { display: flex; gap: 3px; font-size: 14px; }

/* Seletor de tema com 3 opções */
.theme-picker {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; margin-bottom: 6px;
}
.theme-picker-label { font-size: 10.5px; color: var(--sidebar-text); font-weight: 500; flex-shrink: 0; }
.theme-btns { display: flex; gap: 5px; }
.theme-btn {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}
.theme-btn:hover { transform: scale(1.15); }
.theme-btn.active { border-color: var(--sidebar-bright); }
.theme-btn-anyhub { background: linear-gradient(135deg, #1a1f2e 50%, #eef1f8 50%); }
.theme-btn-dark    { background: #080a0f; }
.theme-btn-light   { background: #f8faff; border-color: #ccc; }

.sidebar-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column; gap: 8px;
}
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 13px;
  color: #fff; flex-shrink: 0;
}
.user-name { color: var(--sidebar-bright); font-size: 12px; font-weight: 600; }
.user-role { color: var(--sidebar-text); font-size: 10px; }
.btn-logout {
  width: 100%; background: transparent; border: 1px solid var(--sidebar-border);
  color: var(--sidebar-text); padding: 7px 10px; border-radius: var(--r);
  cursor: pointer; font-family: var(--font); font-size: 11.5px;
  transition: all .15s; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-sizing: border-box;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* ══════════════════════════════════════════════════════════════
   MAIN
   ══════════════════════════════════════════════════════════════ */
main.with-sidebar {
  margin-left: var(--sidebar);
  padding: 28px 32px;
  transition: margin-left .25s ease;
}
main.full { padding: 0; }

/* ─── Modo Tabs ─── */
main.with-sidebar.tabbed {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.tab-strip {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 12px 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  min-height: 38px;
  scrollbar-width: thin;
}
.tab-strip:empty { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px 7px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  user-select: none;
  max-width: 200px;
  font-size: 13px;
  color: var(--dim);
  transition: background .12s, color .12s, border-color .12s;
  position: relative;
  top: 1px;
  white-space: nowrap;
}
.tab:hover { background: var(--bg4); color: var(--text); }
.tab.is-active {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border2);
  border-bottom: 1px solid var(--bg);
  font-weight: 500;
}
.tab-icon { font-size: 14px; flex-shrink: 0; }
.tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.tab-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  color: var(--dim);
  font-size: 16px;
  line-height: 1;
  border-radius: 4px;
  flex-shrink: 0;
}
.tab-close:hover { color: var(--red); background: rgba(239,68,68,.1); }

.tab-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  min-height: 0;
}
.tab-pane {
  display: none;
  height: 100%;
  width: 100%;
}
.tab-pane.is-active { display: block; }
.tab-pane-static {
  padding: 28px 32px;
  overflow: auto;
}
.tab-pane-iframe { padding: 0; position: relative; }
.tab-pane-iframe > iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg);
}
.tab-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  z-index: 5;
  font-size: 13px;
  color: var(--dim);
  transition: opacity .2s ease;
}
.tab-loader.is-hidden { opacity: 0; pointer-events: none; }
.tab-loader-spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid var(--bg4); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

/* Embed mode: padding compatível com o que main.with-sidebar dava */
body.embed-body { background: var(--bg); }
main.embed-main { padding: 28px 32px; }
@@media (max-width: 700px) {
  main.embed-main { padding: 16px; }
}

/* ─── Sidebar colapsado ─── */
html.sidebar-collapsed .sidebar { width: 60px; }
html.sidebar-collapsed main.with-sidebar { margin-left: 60px; }
html.sidebar-collapsed .logo-text,
html.sidebar-collapsed .sidebar-section-label,
html.sidebar-collapsed .nav-menu a span:not(.nav-icon),
html.sidebar-collapsed .theme-picker,
html.sidebar-collapsed .sidebar-footer .user-chip > div,
html.sidebar-collapsed .sidebar-footer .btn-logout,
html.sidebar-collapsed .sidebar-brand {
  display: none;
}
html.sidebar-collapsed .sidebar-logo { padding: 20px 13px 16px; justify-content: center; }
html.sidebar-collapsed .nav-menu { padding: 4px 6px; }
html.sidebar-collapsed .nav-menu a { justify-content: center; padding: 10px 8px; }
html.sidebar-collapsed .nav-icon { width: auto; }
html.sidebar-collapsed .sidebar-footer { padding: 10px 6px; }
html.sidebar-collapsed .sidebar-footer .user-chip { justify-content: center; }
/* Tooltip simples ao hover nos itens colapsados */
html.sidebar-collapsed .nav-menu a { position: relative; }
html.sidebar-collapsed .nav-menu a[title]:hover::after {
  content: attr(title);
  position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%);
  background: var(--sidebar-bg2); color: var(--sidebar-bright);
  padding: 6px 10px; border-radius: 6px; white-space: nowrap;
  font-size: 12px; border: 1px solid var(--sidebar-border);
  box-shadow: 0 4px 12px rgba(0,0,0,.2); z-index: 100;
  pointer-events: none;
}

.toast-banner {
  padding: 10px 16px; border-radius: var(--r);
  margin-bottom: 20px; font-size: 13px; font-weight: 500;
  animation: fadeIn .3s;
}
.toast-banner.success {
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3);
  color: var(--green);
}
.toast-banner.error {
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3);
  color: var(--red);
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } }

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
}
.page-header h2 {
  font-size: 20px; font-weight: 700; color: var(--bright);
  letter-spacing: -.01em;
}
.subtitle { color: var(--dim); font-size: 12px; margin-top: 3px; }
.server-host-inline { display: flex; align-items: center; gap: 6px; }
.back-link { color: var(--dim); font-size: 12px; display: block; margin-bottom: 4px; transition: color .15s; }
.back-link:hover { color: var(--accent); }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r); cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  border: 1px solid transparent; transition: all .15s;
  white-space: nowrap; text-decoration: none;
}
.btn-primary  { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 8px rgba(79,106,245,.3); }
.btn-primary:hover { background: #3d57e8; box-shadow: 0 4px 14px rgba(79,106,245,.4); }
.btn-ghost    { background: var(--bg2); color: var(--text); border-color: var(--border2); }
.btn-ghost:hover { color: var(--bright); background: var(--bg3); border-color: var(--border2); }
.btn-success  { background: rgba(34,197,94,.1); color: var(--green); border-color: rgba(34,197,94,.3); }
.btn-success:hover { background: rgba(34,197,94,.2); }
.btn-danger   { background: rgba(239,68,68,.1); color: var(--red); border-color: rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-warning  { background: rgba(245,158,11,.1); color: var(--yellow); border-color: rgba(245,158,11,.3); }
.btn-warning:hover { background: rgba(245,158,11,.2); }
.btn-danger-ghost { background: transparent; color: var(--dim); border-color: transparent; }
.btn-danger-ghost:hover { color: var(--red); border-color: rgba(239,68,68,.4); }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 5px 11px; font-size: 12px; }

.btn-icon {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--dim); padding: 5px 9px; border-radius: 6px;
  cursor: pointer; font-size: 13px; transition: all .15s;
}
.btn-icon:hover { color: var(--bright); border-color: var(--border2); background: var(--bg2); }
.btn-icon.green:hover { color: var(--green); border-color: rgba(34,197,94,.4); background: rgba(34,197,94,.06); }
.btn-icon.red:hover   { color: var(--red);   border-color: rgba(239,68,68,.4);  background: rgba(239,68,68,.06); }
.btn-icon.yellow:hover{ color: var(--yellow); border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.06); }
.btn-icon.spin { animation: spinBtn .6s linear infinite; opacity:.5; pointer-events:none; }
@keyframes spinBtn { to { transform: rotate(360deg); } }
.action-cell { white-space: nowrap; text-align: right; }

/* ══════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════ */
.form-input {
  background: var(--bg2); border: 1.5px solid var(--border);
  color: var(--bright); padding: 9px 12px; border-radius: var(--r);
  font-family: var(--font); font-size: 13px; outline: none;
  transition: border-color .15s, box-shadow .15s; width: 100%;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,106,245,.12); }
.form-textarea { resize: vertical; min-height: 110px; }
.select-input { cursor: pointer; }
.select-sm    { padding: 5px 8px; font-size: 12px; width: auto; }

.form-page { max-width: 760px; }
.form-section {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 22px 26px; margin-bottom: 16px;
  box-shadow: 0 1px 4px var(--shadow2);
}
.form-section-title {
  font-size: 13px; font-weight: 600; color: var(--bright);
  margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border); letter-spacing: .01em;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr auto; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { color: var(--dim); font-size: 12px; font-weight: 500; }
.form-group-small { width: 100px; }
.form-group-grow { flex: 1; }
.form-hint { color: var(--dim); font-size: 12px; margin-bottom: 12px; line-height: 1.6; }
.form-hint strong { color: var(--text); }
.form-row-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.form-actions { display: flex; gap: 10px; margin-top: 10px; }
.field-error { color: var(--red); font-size: 11.5px; }
.input-with-toggle { position: relative; }
.toggle-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--dim);
  font-size: 14px; padding: 2px;
}
.toggle-pass:hover { color: var(--bright); }

.test-result {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 13px; border-radius: var(--r); font-size: 12.5px;
}
.test-ok   { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25); color: var(--green); }
.test-fail { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.25); color: var(--red); }

/* ══════════════════════════════════════════════════════════════
   SERVER CARDS
   ══════════════════════════════════════════════════════════════ */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.server-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  transition: all .2s; box-shadow: 0 1px 4px var(--shadow2);
}
.server-card:hover { border-color: var(--accent2); box-shadow: 0 4px 16px var(--shadow); transform: translateY(-1px); }
.server-card-header { display: flex; align-items: center; gap: 12px; }
.server-icon { font-size: 22px; }
.server-title h3 { color: var(--bright); font-size: 14px; font-weight: 600; }
.server-host { color: var(--dim); font-size: 11.5px; font-family: var(--mono); }
.server-desc { color: var(--dim); font-size: 12px; }
.server-card-footer { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; }
.filter-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.chip-label { color: var(--dim); font-size: 10.5px; font-weight: 500; }
.chip {
  background: var(--bg4); border: 1px solid var(--border2);
  color: var(--text); padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 500;
}
.chip-more { color: var(--dim); }
.chip-all  { background: rgba(79,106,245,.08); border-color: rgba(79,106,245,.25); color: var(--accent); }

/* ══════════════════════════════════════════════════════════════
   STATUS DOTS
   ══════════════════════════════════════════════════════════════ */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; vertical-align: middle; }
.dot.running  { background: var(--green); }
.dot.dead     { background: var(--dim); }
.dot.failed   { background: var(--red); }
.dot.exited   { background: var(--yellow); }
.dot.waiting  { background: var(--cyan); }
.dot.unknown  { background: var(--dim); }
.pulse-running { box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: pulse-g 2s infinite; }
.pulse-failed  { box-shadow: 0 0 0 0 rgba(239,68,68,.5); animation: pulse-r 1.5s infinite; }
@keyframes pulse-g { 70%{ box-shadow: 0 0 0 5px rgba(34,197,94,0); } 100%{ box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes pulse-r { 70%{ box-shadow: 0 0 0 5px rgba(239,68,68,0); } 100%{ box-shadow: 0 0 0 0 rgba(239,68,68,0); } }

/* ══════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600;
}
.badge-running { background: rgba(34,197,94,.1);  color: var(--green);  border: 1px solid rgba(34,197,94,.25); }
.badge-dead    { background: rgba(148,163,184,.1); color: var(--dim);   border: 1px solid rgba(148,163,184,.2); }
.badge-failed  { background: rgba(239,68,68,.1);   color: var(--red);   border: 1px solid rgba(239,68,68,.25); }
.badge-exited  { background: rgba(245,158,11,.1);  color: var(--yellow);border: 1px solid rgba(245,158,11,.25); }
.badge-waiting { background: rgba(6,182,212,.1);   color: var(--cyan);  border: 1px solid rgba(6,182,212,.25); }
.badge-unknown { background: var(--bg3); color: var(--dim); border: 1px solid var(--border); }
.badge-lg { padding: 5px 14px; font-size: 13px; }

/* ══════════════════════════════════════════════════════════════
   FILTER / STATS BAR
   ══════════════════════════════════════════════════════════════ */
.filter-bar { margin-bottom: 14px; }
.filter-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; font-size: 15px; }
.search-input { padding-left: 34px !important; }
.stats-bar {
  display: flex; gap: 20px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--r);
  margin-bottom: 14px; font-size: 12.5px;
  box-shadow: 0 1px 3px var(--shadow2);
}
.stat { display: flex; align-items: center; gap: 7px; color: var(--dim); }
.stat strong { color: var(--bright); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════════════════ */
.table-wrapper {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r2); overflow: hidden;
  box-shadow: 0 1px 4px var(--shadow2);
}
.services-table { width: 100%; border-collapse: collapse; }
.services-table th {
  background: var(--bg3); color: var(--dim);
  padding: 11px 16px; text-align: left;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); font-weight: 600;
}
.services-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.service-row:last-child td { border-bottom: none; }
.service-row:hover td { background: var(--bg3); }
.svc-name-cell { font-weight: 600; color: var(--bright); }
.svc-link { color: var(--accent); font-weight: 600; }
.svc-link:hover { color: var(--accent2); text-decoration: underline; }
.svc-desc { color: var(--dim); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 60px 20px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r2); box-shadow: 0 1px 4px var(--shadow2);
}
.empty-icon { font-size: 48px; margin-bottom: 14px; display: block; }
.empty-state h3 { color: var(--bright); font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--dim); font-size: 13px; margin-bottom: 20px; }

/* ══════════════════════════════════════════════════════════════
   DETAIL
   ══════════════════════════════════════════════════════════════ */
.detail-grid { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.detail-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 20px;
  box-shadow: 0 1px 4px var(--shadow2);
}
.card-label {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); font-weight: 600;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.info-dl { display: grid; gap: 10px; margin-bottom: 20px; }
.info-dl dt { color: var(--dim); font-size: 11.5px; font-weight: 500; }
.info-dl dd { color: var(--bright); font-weight: 500; }
.info-dl small { color: var(--dim); font-size: 10px; }
.detail-actions { display: flex; flex-direction: column; gap: 8px; }
.card-header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.card-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auto-lbl { display: flex; align-items: center; gap: 5px; color: var(--dim); font-size: 12px; cursor: pointer; font-weight: 500; }
.logs-card { display: flex; flex-direction: column; }

/* ══════════════════════════════════════════════════════════════
   LOGS
   ══════════════════════════════════════════════════════════════ */
.logs-pre {
  background: var(--logs-bg); color: var(--logs-fg);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.75;
  padding: 16px 20px; overflow: auto;
  white-space: pre-wrap; word-break: break-all;
  border-radius: 0 0 var(--r2) var(--r2);
}
.logs-tall {
  height: calc(100vh - 260px);
  min-height: 300px; max-height: none;
}

/* ══════════════════════════════════════════════════════════════
   MODAL — tela quase inteira
   ══════════════════════════════════════════════════════════════ */
.modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 16px;
}
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.modal-box {
  position: relative; z-index: 1;
  width: 98vw; height: 96vh;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--r2); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
}
.modal-hdr {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; background: var(--bg3);
  border-bottom: 1px solid var(--border);
  gap: 10px; flex-shrink: 0;
}
.modal-label { color: var(--dim); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-right: 4px; }
.modal-title { color: var(--bright); font-size: 13.5px; font-weight: 600; }
.modal-acts  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-close {
  background: none; border: none; color: var(--dim);
  font-size: 18px; cursor: pointer; padding: 4px 8px;
  border-radius: 6px; line-height: 1; transition: all .15s;
}
.btn-close:hover { color: var(--red); background: rgba(239,68,68,.08); }
.modal-box .logs-pre { border-radius: 0; flex: 1; height: 0; max-height: none; min-height: 0; }

/* ══════════════════════════════════════════════════════════════
   LOGIN — split-screen profissional
   ══════════════════════════════════════════════════════════════ */
.login-split {
  min-height: 100vh;
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--bg);
}

/* ─── Painel esquerdo (hero) ─── */
.login-hero {
  position: relative; overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #0f0b18 0%, #1a1227 40%, #2a0f1c 100%);
  padding: 56px 64px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 65% 55% at 20% 15%, rgba(212,34,48,.18) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 90%, rgba(79,106,245,.15) 0%, transparent 65%);
}
.login-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 85%);
}
.login-hero-inner {
  position: relative; z-index: 1;
  max-width: 440px; margin: 0 auto; width: 100%;
  display: flex; flex-direction: column;
  flex: 1;
}
.login-hero-main { margin: auto 0; text-align: center; }

/* Brand pequeno (topo do card mobile) */
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(212,34,48,.18);
  border: 1px solid rgba(212,34,48,.35);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(212,34,48,.25);
}
.login-brand-name {
  font-family: var(--font-brand); font-size: 22px; font-weight: 800;
  letter-spacing: -.01em; color: #fff;
}
.login-brand-name strong { color: var(--anyhub-red); font-weight: 800; }

/* Brand grande (painel esquerdo) */
.login-brand-big {
  display: flex; align-items: center; gap: 14px;
  justify-content: center;
}
.login-brand-big img {
  filter: drop-shadow(0 6px 20px rgba(212,34,48,.35));
}
.login-brand-big-text { display: flex; flex-direction: column; line-height: 1; }
.login-brand-big-name {
  font-family: var(--font-brand); font-size: 30px; font-weight: 800;
  letter-spacing: -.025em; color: #fff;
}
.login-brand-big-name strong { color: var(--anyhub-red); font-weight: 800; }
.login-brand-big-tag {
  font-size: 11px; color: rgba(255,255,255,.5); margin-top: 5px;
  letter-spacing: .06em; text-transform: uppercase; font-weight: 500;
}

.login-hero-product { margin: 0 0 28px; }
.login-hero-kicker {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--anyhub-red);
  padding: 4px 12px;
  background: rgba(212,34,48,.12);
  border: 1px solid rgba(212,34,48,.25);
  border-radius: 999px;
  margin-bottom: 16px;
}
.login-hero-title {
  font-family: var(--font-brand); font-weight: 600; font-size: 26px;
  line-height: 1.2; letter-spacing: -.01em;
  margin: 0; color: #fff;
}

.login-hero-about {
  font-size: 14px; line-height: 1.7;
  color: rgba(255,255,255,.68);
  margin: 0 auto 12px; max-width: 380px;
  font-weight: 400;
}
.login-hero-about:last-child { margin-bottom: 0; }

.login-hero-foot {
  font-size: 11px; color: rgba(255,255,255,.32);
  letter-spacing: .02em; text-align: center;
}

/* ─── Painel direito (form) ─── */
.login-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 18px;
  padding: 40px 38px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.18), 0 6px 20px -8px rgba(0,0,0,.12);
}
[data-theme="anyhub"] .login-form-wrap { background: #f6f7fb; }
[data-theme="dark"] .login-form-wrap { background: var(--bg); }

.login-card-brand {
  display: none; align-items: center; gap: 10px; margin-bottom: 24px;
  justify-content: center;
}
.login-card-brand .login-brand-name { color: var(--bright); font-size: 18px; }

.login-card-head { margin-bottom: 28px; }
.login-card-head h1 {
  font-family: var(--font-brand); font-weight: 700; font-size: 24px;
  color: var(--bright); margin: 0 0 6px; letter-spacing: -.01em;
}
.login-card-head p { font-size: 13.5px; color: var(--dim); margin: 0; }

/* Campo */
.login-field { margin-bottom: 14px; }
.login-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--dim); margin-bottom: 6px; letter-spacing: .01em;
}
.login-input-wrap { position: relative; display: flex; align-items: center; }
.login-input-icon {
  position: absolute; left: 12px; color: var(--dim);
  pointer-events: none; transition: color .15s;
}
.login-input-wrap .form-input {
  width: 100%; padding-left: 38px; padding-right: 14px;
  height: 44px; font-size: 14px;
}
.login-input-wrap .form-input:focus { border-color: var(--anyhub-red); box-shadow: 0 0 0 3px rgba(212,34,48,.12); }
.login-input-wrap .form-input:focus + .login-input-icon,
.login-input-wrap:focus-within .login-input-icon { color: var(--anyhub-red); }
.login-input-wrap:has(#inpPass) .form-input { padding-right: 44px; }
.login-input-btn {
  position: absolute; right: 8px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--dim); border-radius: 6px; transition: background .15s, color .15s;
}
.login-input-btn:hover { color: var(--bright); background: var(--bg3); }

/* Remember me */
.login-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--dim); cursor: pointer;
  margin: 10px 0 18px;
  user-select: none;
}
.login-check input { width: 15px; height: 15px; accent-color: var(--anyhub-red); cursor: pointer; }
.login-check:hover { color: var(--text); }

/* Submit */
.login-submit {
  width: 100%; height: 46px; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 0 18px;
  background: var(--anyhub-red); color: #fff;
  border: 1px solid var(--anyhub-red); border-radius: 10px;
  font-family: var(--font-brand); font-weight: 700; font-size: 14px;
  letter-spacing: .01em; cursor: pointer;
  box-shadow: 0 8px 24px -8px rgba(212,34,48,.45);
  transition: background .2s, box-shadow .2s, transform .15s, opacity .2s;
}
.login-submit:hover:not(:disabled) {
  background: var(--anyhub-red2);
  box-shadow: 0 12px 28px -8px rgba(212,34,48,.55);
  transform: translateY(-1px);
}
.login-submit:active:not(:disabled) { transform: translateY(0); }
.login-submit:disabled { opacity: .75; cursor: wait; }
.login-submit-arrow { transition: transform .2s; }
.login-submit:hover:not(:disabled) .login-submit-arrow { transform: translateX(3px); }
.login-submit-spinner { display: none; animation: spin 1s linear infinite; }
.login-submit.is-loading .login-submit-label,
.login-submit.is-loading .login-submit-arrow { display: none; }
.login-submit.is-loading .login-submit-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Alert */
.login-alert {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; margin-bottom: 16px;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3);
  color: var(--red); border-radius: 10px; font-size: 13px;
  animation: shake .4s ease;
}
.login-alert svg { flex-shrink: 0; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Badges de segurança */
.login-badges {
  display: flex; justify-content: center; gap: 12px;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.login-badges span {
  font-size: 11px; color: var(--dim); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; background: var(--bg3);
}

/* Footer do card */
.login-card-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--dim); }
.login-card-foot a { color: var(--anyhub-red); text-decoration: none; font-weight: 600; }
.login-card-foot a:hover { text-decoration: underline; }

/* ─── Responsivo ─── */
@media (max-width: 900px) {
  .login-split { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-card-brand { display: flex; }
  .login-form-wrap { padding: 32px 20px; min-height: 100vh; }
  .login-card { padding: 32px 26px; border: none; box-shadow: none; background: transparent; }
}
@media (max-width: 1200px) and (min-width: 901px) {
  .login-hero { padding: 48px 40px; }
  .login-hero-title { font-size: 34px; }
}

/* ══════════════════════════════════════════════════════════════
   TOAST / ALERTS
   ══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 999;
  padding: 12px 18px; border-radius: var(--r); font-size: 13px;
  font-weight: 500; animation: slideUp .2s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
@keyframes slideUp { from { transform: translateY(8px); opacity:0; } }
.toast-ok  { background: var(--bg2); border: 1px solid rgba(34,197,94,.35); color: var(--green); }
.toast-err { background: var(--bg2); border: 1px solid rgba(239,68,68,.35); color: var(--red); }

/* ─── Nav loader (fullscreen overlay) ─── */
.nav-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.35); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center;
}
.nav-loader.is-active { display: flex; animation: fadeIn .15s ease; }
.nav-loader-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 28px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,.25);
}
.nav-loader-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--bg4); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
.nav-loader-text { font-size: 13px; color: var(--text); font-weight: 500; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.alert-error {
  background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.25);
  color: var(--red); padding: 11px 15px; border-radius: var(--r);
  font-size: 13px; margin-bottom: 16px;
}
.mb16 { margin-bottom: 16px; }
.input-error { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(239,68,68,.1) !important; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --sidebar: 200px; }
  .detail-grid { grid-template-columns: 1fr; }
  .logs-tall { height: 400px; }
}
@media (max-width: 700px) {
  .sidebar { position: relative; width: 100%; height: auto; }
  main.with-sidebar { margin-left: 0; padding: 16px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .server-grid { grid-template-columns: 1fr; }
  .modal { padding: 0; }
  .modal-box { width: 100vw; height: 100vh; border-radius: 0; }
}

/* ══════════════════════════════════════════════════════════════
   MODAL DE CONFIRMAÇÃO DE AÇÃO
   ══════════════════════════════════════════════════════════════ */
.confirm-modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.confirm-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
}
.confirm-box {
  position: relative; z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 32px 32px 28px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
  animation: confirmIn .18s ease;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 10px;
}
@keyframes confirmIn {
  from { opacity: 0; transform: scale(.95) translateY(6px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

/* Ícone central */
.confirm-icon-wrap {
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 4px; flex-shrink: 0;
}
.confirm-icon-green  { background: rgba(34,197,94,.12);  color: var(--green);  box-shadow: 0 0 0 8px rgba(34,197,94,.07); }
.confirm-icon-red    { background: rgba(239,68,68,.12);   color: var(--red);    box-shadow: 0 0 0 8px rgba(239,68,68,.07); }
.confirm-icon-yellow { background: rgba(245,158,11,.12);  color: var(--yellow); box-shadow: 0 0 0 8px rgba(245,158,11,.07); }
.confirm-icon-accent { background: rgba(79,106,245,.12);  color: var(--accent); box-shadow: 0 0 0 8px rgba(79,106,245,.07); }

.confirm-box h3 {
  font-size: 17px; font-weight: 700; color: var(--bright);
  margin: 0;
}
.confirm-box p {
  font-size: 13.5px; color: var(--dim);
  line-height: 1.6; margin: 0;
}

/* Tags serviço/servidor */
.confirm-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin: 6px 0 2px;
}
.confirm-tag {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  font-size: 12.5px;
}
.confirm-tag-label {
  color: var(--dim); font-size: 10.5px;
  font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em;
}
.confirm-tag strong { color: var(--bright); font-family: var(--mono); }

/* Botões */
.confirm-actions {
  display: flex; gap: 10px; width: 100%;
  margin-top: 8px;
}
.confirm-actions .btn { flex: 1; justify-content: center; padding: 10px 16px; font-size: 13.5px; }

/* ══════════════════════════════════════════════════════════════
   MODAL IMPORTAR VPS
   ══════════════════════════════════════════════════════════════ */
.vps-modal-box {
  position: relative; z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  width: min(740px, 95vw); max-height: 82vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
  animation: confirmIn .18s ease;
}
.vps-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.vps-modal-title { font-size: 14px; font-weight: 600; color: var(--bright); }
.vps-modal-close {
  background: none; border: none; color: var(--dim);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px;
  transition: color .15s;
}
.vps-modal-close:hover { color: var(--bright); }
.vps-tab-bar {
  display: flex; gap: 2px;
  padding: 10px 18px 0;
  border-bottom: 1px solid var(--border);
}
.vps-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--dim); padding: 6px 14px; cursor: pointer;
  font-size: 13px; font-family: var(--font);
  transition: color .15s, border-color .15s;
}
.vps-tab:hover { color: var(--bright); }
.vps-tab-active { color: var(--accent); border-bottom-color: var(--accent); }
.vps-modal-body { overflow-y: auto; flex: 1; padding: 4px 0; }
.vps-state-msg {
  text-align: center; padding: 36px 20px;
  color: var(--dim); font-size: 13px;
}
.vps-state-error { color: var(--red); }
.vps-row-disabled { opacity: .45; pointer-events: none; }
.vps-modal-footer {
  padding: 10px 22px;
  border-top: 1px solid var(--border);
  text-align: right;
}
.vps-modal-footer small { color: var(--dim); font-size: 11.5px; }

/* Status badges reutilizáveis */
.status-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.badge-online { background: rgba(34,197,94,.12); color: var(--green); }
.badge-warn   { background: rgba(245,158,11,.12); color: var(--yellow, #f59e0b); }
.badge-off    { background: rgba(100,116,139,.12); color: var(--dim); }

/* Mensagens de feedback inline (modais de senha) */
.senha-msg      { font-size: 13px; padding: 8px 12px; border-radius: 8px; }
.senha-msg-erro { background: rgba(239,68,68,.08); color: var(--red);   border: 1px solid rgba(239,68,68,.2); }
.senha-msg-ok   { background: rgba(34,197,94,.08); color: var(--green); border: 1px solid rgba(34,197,94,.2); }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR — logo e branding atualizados
   ══════════════════════════════════════════════════════════════ */
.logo-text { font-size: 11px; color: var(--sidebar-text); line-height: 1.2; }
.logo-text strong { display: block; color: var(--sidebar-bright); font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.logo-text span { font-size: 10.5px; color: var(--sidebar-text); opacity: .75; }

.sidebar-brand {
  font-size: 10px; color: var(--sidebar-text);
  opacity: .55; text-align: center; line-height: 1.5;
  padding-top: 4px;
}
.sidebar-brand a {
  color: var(--sidebar-text); text-decoration: underline;
  text-underline-offset: 2px; transition: color .15s; opacity: .85;
}
.sidebar-brand a:hover { color: var(--sidebar-bright); opacity: 1; }


/* ══════════════════════════════════════════════════════════════
   TERMINAL SSH
   ══════════════════════════════════════════════════════════════ */
.terminal-wrapper {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  height: calc(100vh - 140px);
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 10px 16px;
  flex-shrink: 0;
}

.terminal-dots { display: flex; gap: 7px; align-items: center; }
.tdot {
  width: 12px; height: 12px; border-radius: 50%; cursor: default;
}
.tdot-red    { background: #ff5f57; }
.tdot-yellow { background: #febc2e; }
.tdot-green  { background: #28c840; }

.terminal-title-bar {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #8b949e;
}

#terminal {
  flex: 1;
  padding: 8px;
  overflow: hidden;
}

/* Sobrescrever xterm para preencher espaço */
#terminal .xterm {
  height: 100%;
}
#terminal .xterm-viewport {
  overflow-y: auto !important;
}


/* ══════════════════════════════════════════════════════════════
   FATURAMENTO
   ══════════════════════════════════════════════════════════════ */
.stats-bar {
  display: flex; gap: 20px; flex-wrap: wrap;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 12px 18px;
}
.stat { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
.stat .dot { flex-shrink: 0; }
.stat strong { color: var(--bright); }

.form-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r2); padding: 20px 24px; }
.form-section-title { font-size: 13px; font-weight: 700; color: var(--bright); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.form-hint { font-size: 12.5px; color: var(--dim); line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.table-wrapper { overflow-x: auto; border-radius: var(--r2); border: 1px solid var(--border); }
.services-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.services-table th { background: var(--bg3); color: var(--dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.services-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.services-table tr:last-child td { border-bottom: none; }
.services-table tr:hover td { background: var(--bg3); }

.badge-waiting { background: rgba(245,158,11,.15); color: var(--yellow); border-color: rgba(245,158,11,.25); }
.btn-warning  { background: var(--yellow); color: #000; }
.btn-warning:hover { filter: brightness(1.1); }
.btn-success  { background: var(--green); color: #000; }
.btn-success:hover { filter: brightness(1.1); }
.mb16 { margin-bottom: 16px; }
.action-cell { white-space: nowrap; }

.btn-secondary { background: var(--purple, #c084fc); color: #000; }
.btn-secondary:hover { filter: brightness(1.1); }
.btn-secondary:disabled, .btn-warning:disabled, .btn-primary:disabled {
    opacity: .35; cursor: not-allowed; pointer-events: auto;
}

/* Server ping status dot */
.server-status-dot {
    margin-left: auto;
    font-size: 14px;
    line-height: 1;
    color: #6b7280;
    transition: color .4s;
    flex-shrink: 0;
}
.server-status-dot.online   { color: #22c55e; }
.server-status-dot.offline  { color: #ef4444; }
.server-status-dot.checking { color: #6b7280; animation: pulse-dot .7s infinite alternate; }
@keyframes pulse-dot { from { opacity: .25; } to { opacity: 1; } }
