:root {
  --bg: #f5f6fb; --surface: #fff; --text: #1f2333; --muted: #6b7180; --border: #e3e5ee;
  --accent: #7c3aed; --accent-2: #6d28d9; --ok: #15803d; --ok-bg: #dcfce7;
  --warn-bg: #fff7e0; --warn: #8a5a00; --err-bg: #fde8e8; --err: #b42318; --info-bg: #eef2ff; --info: #3730a3;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
h1 { font-size: 1.5rem; margin: 0 0 18px; } h1 small { font-size: .9rem; font-weight: 400; }
h2 { font-size: 1.15rem; margin: 0 0 4px; }
.muted { color: var(--muted); }
code { background: #f0f1f6; padding: 1px 5px; border-radius: 5px; font-size: .9em; }
[hidden] { display: none !important; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 24px; background: #17132b; color: #fff; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #06b6d4); color: #fff; }
.link { background: none; border: 0; color: inherit; opacity: .85; padding: 6px 10px; border-radius: 8px;
  cursor: pointer; font: inherit; text-decoration: none; }
.link:hover { opacity: 1; background: rgba(255,255,255,.08); }

.wrap { max-width: 920px; margin: 0 auto; padding: 28px 16px 60px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 4px 18px rgba(20, 20, 50, .05); }

.stepper { display: flex; list-style: none; padding: 0; margin: 0 0 18px; gap: 6px; counter-reset: s; flex-wrap: wrap; }
.stepper li { flex: 1; min-width: 110px; counter-increment: s; padding: 8px 10px; border-radius: 10px;
  background: #eceef5; color: var(--muted); font-size: .85rem; font-weight: 600; }
.stepper li::before { content: counter(s); display: inline-grid; place-items: center; width: 20px; height: 20px;
  margin-right: 6px; border-radius: 50%; background: #d7dae6; color: #fff; font-size: .75rem; }
.stepper li.active { background: var(--accent); color: #fff; }
.stepper li.active::before { background: rgba(255,255,255,.3); }
.stepper li.done { background: #ede7fe; color: var(--accent-2); cursor: pointer; }
.stepper li.done::before { content: "✓"; background: var(--accent); }

.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.grow { flex: 1; min-width: 220px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.field { display: block; margin: 12px 0 0; }
.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; }
input, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; color: inherit; background: #fff; }
input:focus, textarea:focus { outline: 2px solid #c4b5fd; border-color: var(--accent); }
textarea { resize: vertical; }
input[type=file] { padding: 8px; }

.btn { padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: #f3f4f8; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.block { width: 100%; margin-top: 18px; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; align-items: center; flex-wrap: wrap; }
.actions.left { justify-content: flex-start; margin-top: 14px; }

.empresa { margin: 18px 0; padding: 16px; border-radius: 12px; background: #f6f3ff; border: 1px solid #e4dbff; }
.empresa-nome { font-weight: 700; font-size: 1.05rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 99px; background: #eceef5; color: var(--muted);
  font-size: .8rem; font-weight: 600; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }

.alert { padding: 10px 14px; border-radius: 10px; margin-top: 12px; font-size: .9rem; white-space: pre-line; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.error { background: var(--err-bg); color: var(--err); }
.alert.info { background: var(--info-bg); color: var(--info); }
.avisos:empty { display: none; }

.preview-bar { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0 8px; font-size: .9rem; flex-wrap: wrap; }
.preview { width: 100%; height: 620px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }

.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.card > .tbl { margin: -8px 0; }
.tbl.dns { margin: 10px 0; } .tbl.dns td.ip { font-family: Consolas, monospace; font-weight: 600; }

.resumo { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 16px 0; }
.resumo dt { color: var(--muted); } .resumo dd { margin: 0; font-weight: 600; word-break: break-all; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #17132b; color: #fff; padding: 10px 18px; border-radius: 10px; max-width: calc(100% - 32px);
  transition: .25s; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(135deg, #17132b, #3b1d72); }
.login-card { width: 100%; max-width: 380px; }
.login-card .brand { color: var(--text); margin-bottom: 8px; }

@media (max-width: 600px) {
  .card { padding: 18px; }
  .preview { height: 480px; }
  .tbl.dns th:nth-child(4), .tbl.dns td:nth-child(4) { display: none; }
}

.btn.danger { color: var(--err); border-color: #f3c4c0; }
.btn.danger:hover { background: var(--err-bg); }
.larga .wrap { max-width: 1200px; }
#vSites .card { overflow-x: auto; }   /* no celular a tabela rola dentro do card */
.acoes { display: flex; gap: 6px; justify-content: flex-end; }
.chip, #tblSites td:nth-child(2) { white-space: nowrap; }
@media (max-width: 900px) { .acoes { flex-wrap: wrap; } .tbl td:last-child { width: auto; } }
.tbl td:last-child { width: 1%; }   /* coluna dos botões encolhe ao conteúdo; o resto da tabela divide o espaço */

.chip.warn { background: var(--warn-bg); color: var(--warn); }
.btn.warn { color: var(--warn); border-color: #f1d9a0; background: var(--warn-bg); }
