/* Painel VPS — tema dark profissional (dourado + verde-lima) */
:root {
  --fundo: #070a12;
  --card: rgba(255, 255, 255, 0.032);
  --card-borda: rgba(255, 255, 255, 0.085);
  --texto: #e8edf7;
  --texto-2: #93a0b8;
  --texto-3: #5d6a82;
  --ouro: #f5bd1f;
  --ouro-suave: rgba(245, 189, 31, 0.14);
  --verde: #a3e635;
  --verde-suave: rgba(163, 230, 53, 0.12);
  --vermelho: #f87171;
  --vermelho-suave: rgba(248, 113, 113, 0.12);
  --ambar: #fbbf24;
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  background: var(--fundo);
  color: var(--texto);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Inter, sans-serif;
  min-height: 100vh;
  padding: 22px clamp(14px, 3vw, 36px) 60px;
  position: relative;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 56px 56px;
}
.bg-glow, .login-glow {
  position: fixed; pointer-events: none; z-index: 0;
  top: -280px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 560px;
  background: radial-gradient(closest-side, rgba(245,189,31,.09), transparent 70%);
}

/* ---------- topo ---------- */
.topo {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.topo-titulo { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 22px; background: var(--ouro-suave);
  border: 1px solid rgba(245,189,31,.3);
  box-shadow: 0 0 26px rgba(245,189,31,.15);
}
h1 { font-size: 22px; font-weight: 700; letter-spacing: .2px; }
.gold { color: var(--ouro); }
.topo-sub { color: var(--texto-2); font-size: 12.5px; margin-top: 2px; }
.topo-acoes { display: flex; align-items: center; gap: 12px; }
.conexao { font-size: 12.5px; color: var(--texto-2); display: flex; align-items: center; gap: 7px; }

/* ---------- tiles do host ---------- */
.host-tiles {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.tile {
  background: var(--card); border: 1px solid var(--card-borda); border-radius: var(--radius);
  padding: 15px 17px 13px;
}
.tile-topo { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.tile-topo span { color: var(--texto-2); font-size: 12.5px; }
.tile-topo b { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.barra { height: 7px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.barra-fill {
  height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--ouro), #ffd75e);
  transition: width .6s ease, background .3s;
}
.barra-fill.alto { background: linear-gradient(90deg, #f87171, #fca5a5); }
.barra-verde { background: linear-gradient(90deg, var(--verde), #c6f76d); }
.tile-sub { color: var(--texto-3); font-size: 11.5px; margin-top: 8px; }

/* ---------- grid de apps ---------- */
.apps-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
@media (max-width: 430px) { .apps-grid { grid-template-columns: 1fr; } }
.carregando { color: var(--texto-2); padding: 30px; }

.app-card {
  background: var(--card); border: 1px solid var(--card-borda); border-radius: var(--radius);
  padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s;
}
.app-card:hover { border-color: rgba(255,255,255,.16); }
.app-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.app-nome { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.app-dominio { font-size: 12px; margin-top: 3px; }
.app-dominio a { color: var(--texto-2); text-decoration: none; }
.app-dominio a:hover { color: var(--ouro); }
.app-resumo { text-align: right; font-size: 11.5px; color: var(--texto-3); line-height: 1.6; white-space: nowrap; }
.app-resumo b { color: var(--texto-2); font-variant-numeric: tabular-nums; }

.spark { width: 100%; height: 34px; display: block; opacity: .9; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot-on { background: var(--verde); box-shadow: 0 0 0 0 rgba(163,230,53,.5); animation: ping 2.2s infinite; }
.dot-off { background: var(--vermelho); }
.dot-meio { background: var(--ambar); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(163,230,53,.45); } 70% { box-shadow: 0 0 0 7px rgba(163,230,53,0); } 100% { box-shadow: 0 0 0 0 rgba(163,230,53,0); } }

.badge {
  font-size: 10px; letter-spacing: .4px; padding: 3px 8px; border-radius: 99px;
  background: var(--ouro-suave); color: var(--ouro); border: 1px solid rgba(245,189,31,.25);
  text-transform: uppercase; font-weight: 600;
}

.conts { display: flex; flex-direction: column; gap: 7px; }
.cont {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05);
  border-radius: 11px; padding: 8px 11px;
}
.cont-nome { flex: 1; min-width: 0; font-size: 12.8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cont-nome small { display: block; color: var(--texto-3); font-size: 10.5px; margin-top: 1px; }
.cont-stats { font-size: 11.5px; color: var(--texto-2); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; line-height: 1.5; }
.chip-limite {
  font-size: 10px; color: var(--ambar); background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.25); padding: 2px 7px; border-radius: 99px; white-space: nowrap;
}
.cont-acoes { display: flex; gap: 4px; }
.btn-icone {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.04); color: var(--texto-2); cursor: pointer; font-size: 13px;
  display: grid; place-items: center; transition: all .15s;
}
.btn-icone:hover { background: var(--ouro-suave); color: var(--ouro); border-color: rgba(245,189,31,.35); }
.btn-icone.perigo:hover { background: var(--vermelho-suave); color: var(--vermelho); border-color: rgba(248,113,113,.35); }
.btn-icone:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- botoes ---------- */
.btn-primario {
  background: linear-gradient(180deg, #ffd75e, var(--ouro)); color: #1a1502;
  border: 0; border-radius: 11px; padding: 10px 18px; font-weight: 700; font-size: 13.5px;
  cursor: pointer; transition: filter .15s;
}
.btn-primario:hover { filter: brightness(1.06); }
.btn-ghost {
  background: rgba(255,255,255,.045); color: var(--texto-2);
  border: 1px solid rgba(255,255,255,.1); border-radius: 11px; padding: 9px 15px;
  font-size: 13px; cursor: pointer; transition: all .15s;
}
.btn-ghost:hover { color: var(--texto); border-color: rgba(255,255,255,.2); }
.btn-mini { padding: 6px 11px; font-size: 12px; border-radius: 9px; }

/* ---------- modais ---------- */
.modal-fundo {
  position: fixed; inset: 0; z-index: 50; background: rgba(3,5,10,.7);
  backdrop-filter: blur(3px); display: grid; place-items: center; padding: 18px;
}
.modal {
  width: 100%; background: #0b101c; border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; padding: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.modal-logs { max-width: 900px; }
.modal-limites { max-width: 430px; }
.modal-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.modal-cab h3 { font-size: 15px; font-weight: 700; }
.modal-sub { color: var(--texto-2); font-size: 12.5px; margin-bottom: 14px; line-height: 1.5; }
.logs-area {
  background: #05070d; border: 1px solid rgba(255,255,255,.06); border-radius: 12px;
  padding: 13px; height: min(58vh, 520px); overflow: auto;
  font-family: var(--mono); font-size: 11.6px; line-height: 1.55; color: #b9c4d8;
  white-space: pre-wrap; word-break: break-word;
}
.logs-area::-webkit-scrollbar { width: 9px; }
.logs-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; }
.modal-limites label { display: block; color: var(--texto-2); font-size: 12.5px; margin-bottom: 13px; }
.modal-limites input {
  width: 100%; margin-top: 6px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px 12px;
  color: var(--texto); font-size: 14px; outline: none;
}
.modal-limites input:focus { border-color: rgba(245,189,31,.5); }
.modal-botoes { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: 26px; background: #0d1424; border: 1px solid rgba(255,255,255,.14);
  color: var(--texto); padding: 11px 18px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); max-width: 90vw;
}
.toast.ok { border-color: rgba(163,230,53,.4); }
.toast.erro { border-color: rgba(248,113,113,.45); }

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; padding: 20px; }
.login-card {
  position: relative; z-index: 1; width: 100%; max-width: 360px; text-align: center;
  background: var(--card); border: 1px solid var(--card-borda); border-radius: 22px;
  padding: 38px 30px 32px;
}
.login-logo {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 18px;
  display: grid; place-items: center; font-size: 30px;
  background: var(--ouro-suave); border: 1px solid rgba(245,189,31,.3);
  box-shadow: 0 0 40px rgba(245,189,31,.18);
}
.login-card h1 { font-size: 24px; margin-bottom: 4px; }
.login-sub { color: var(--texto-2); font-size: 13px; margin-bottom: 24px; }
.login-card input {
  width: 100%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 13px 15px; color: var(--texto); font-size: 15px;
  outline: none; margin-bottom: 13px; text-align: center;
}
.login-card input:focus { border-color: rgba(245,189,31,.55); }
.login-card button {
  width: 100%; background: linear-gradient(180deg, #ffd75e, var(--ouro)); color: #1a1502;
  border: 0; border-radius: 12px; padding: 13px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.login-card button:disabled { opacity: .6; }
.login-erro { color: var(--vermelho); font-size: 12.5px; margin-top: 12px; min-height: 16px; }
