/* =========================================================
   Lizzi Facilities — Painel de Leads
   Paleta: navy #081426→#0d3b66 · accent #0047AB→#00C2FF · Poppins
   ========================================================= */
:root {
  --navy-0: #06101f;
  --navy-1: #081426;
  --navy-2: #0d3b66;
  --accent-1: #0047AB;
  --accent-2: #00C2FF;
  --txt: #eef4ff;
  --muted: #93a9c9;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --brd: rgba(120, 160, 210, 0.16);
  --brd-accent: rgba(0, 194, 255, 0.28);
  --green: #2fe3a6;
  --amber: #ffc24b;
  --red: #ff6b7d;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--txt);
  font-size: 14px;
  line-height: 1.5;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(0, 194, 255, 0.14), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(0, 71, 171, 0.20), transparent 55%),
    linear-gradient(160deg, var(--navy-1) 0%, var(--navy-0) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #7fe0ff; }

h1 { font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }

.muted { color: var(--muted); font-weight: 300; }

/* ---------- Logo / marca ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 4px 12px rgba(0,194,255,.35)); }
.brand .brand-txt b { display: block; font-size: 15px; font-weight: 700; line-height: 1.05; }
.brand .brand-txt span { font-size: 10.5px; color: var(--muted); font-weight: 300; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 32px;
  background: rgba(6, 16, 31, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--brd);
}
.nav-links { display: flex; gap: 6px; margin-left: 10px; }
.nav-links a {
  color: var(--muted); font-weight: 500; font-size: 13.5px;
  padding: 8px 14px; border-radius: 10px; transition: .15s;
}
.nav-links a:hover { color: var(--txt); background: var(--surface); }
.nav-links a.active {
  color: #04121f;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 6px 18px rgba(0, 194, 255, .28);
}
.nav .sair { margin-left: auto; }

/* ---------- Container / page ---------- */
.container { max-width: 1220px; margin: 0 auto; padding: 26px 32px 60px; }
.page-head { margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  color: #04121f; border: 0; padding: 10px 18px; border-radius: 11px;
  font-family: var(--font); font-weight: 600; font-size: 13.5px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 194, 255, .22); transition: .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0, 194, 255, .34); color: #04121f; }
.btn:active { transform: translateY(0); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--brd); padding: 9px 16px; border-radius: 11px;
  color: var(--txt); background: var(--surface); font-size: 13px; transition: .15s; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--brd-accent); color: var(--txt); background: var(--surface-2); }

/* ---------- Inputs ---------- */
input, select {
  width: 100%;
  background: rgba(6, 16, 31, 0.6);
  border: 1px solid var(--brd); color: var(--txt);
  padding: 11px 13px; border-radius: 11px; font-family: var(--font); font-size: 13.5px;
  transition: .15s;
}
input::placeholder, select::placeholder { color: #5f748f; }
input:focus, select:focus { outline: none; border-color: var(--brd-accent); box-shadow: 0 0 0 3px rgba(0, 194, 255, .12); }
select { cursor: pointer; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.secret { position: relative; }
.secret input { padding-right: 44px; }
.secret .reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer;
  font-size: 15px; opacity: .7; border-radius: 8px;
}
.secret .reveal:hover { opacity: 1; background: var(--surface-2); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--brd); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.card > .muted { margin: 0 0 18px; }
.card form .btn { margin-top: 6px; }

/* ---------- Métricas (dashboard) ---------- */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric {
  background: var(--surface); border: 1px solid var(--brd); border-radius: var(--radius);
  padding: 18px 20px; position: relative; overflow: hidden;
}
.metric::after {
  content: ''; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px;
  background: radial-gradient(circle, rgba(0,194,255,.16), transparent 70%);
}
.metric b {
  display: block; font-size: 30px; font-weight: 700; line-height: 1.1;
  background: linear-gradient(90deg, var(--accent-2), #7fe0ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.metric span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }

/* ---------- Filtros ---------- */
.filtros {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--brd); border-radius: 13px; padding: 12px 14px;
}
.filtros select { width: auto; min-width: 170px; }

/* ---------- Tabela ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--brd); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
thead th {
  text-align: left; padding: 14px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 600; background: rgba(13, 59, 102, 0.45);
  border-bottom: 1px solid var(--brd); position: sticky; top: 0; backdrop-filter: blur(6px);
}
tbody td { padding: 13px 16px; border-bottom: 1px solid rgba(120,160,210,.09); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(0, 194, 255, 0.06); }
tbody tr:last-child td { border-bottom: 0; }
.c-empresa { font-weight: 600; }
.c-data { color: var(--muted); white-space: nowrap; font-size: 12.5px; }
.vazio { text-align: center; color: var(--muted); padding: 40px; }

/* ---------- Badges / pills ---------- */
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.badge.pend { background: rgba(255,194,75,.14); color: var(--amber); border: 1px solid rgba(255,194,75,.35); }
.badge.env  { background: rgba(47,227,166,.14); color: var(--green); border: 1px solid rgba(47,227,166,.4); }

.pill {
  border: 1px solid var(--brd); background: rgba(6,16,31,.5); color: var(--txt);
  padding: 6px 13px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 500;
  white-space: nowrap; transition: .13s; font-family: var(--font);
}
.pill:hover { border-color: var(--brd-accent); }
.pill:disabled { opacity: .5; cursor: wait; }
.act-enviado.on { background: rgba(47,227,166,.16); border-color: var(--green); color: var(--green); }
.resp-group { display: inline-flex; gap: 6px; }
.resp-group .act-resposta { opacity: .5; }
.resp-group[data-state="sim"] .act-resposta.sim { opacity: 1; background: rgba(47,227,166,.16); border-color: var(--green); color: var(--green); }
.resp-group[data-state="nao"] .act-resposta.nao { opacity: 1; background: rgba(255,107,125,.16); border-color: var(--red); color: var(--red); }

/* ---------- Captação: form / resumo ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { color: var(--muted); font-size: 12.5px; margin-left: 10px; }

.log-box {
  background: #030b16; border: 1px solid var(--brd); border-radius: 12px; padding: 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: #a9c7e6;
  max-height: 340px; overflow: auto; white-space: pre-wrap; line-height: 1.55;
}

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 13.5px; }
.alert-erro { background: rgba(255,107,125,.12); border: 1px solid var(--red); color: #ffc9d0; }
.alert-ok { background: rgba(47,227,166,.12); border: 1px solid var(--green); color: #bff5e3; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: linear-gradient(90deg, #0d3b66, #0a2f52); border: 1px solid var(--brd-accent);
  padding: 13px 20px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .22s;
  box-shadow: var(--shadow); font-weight: 500;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.erro { border-color: var(--red); color: #ffc9d0; }

/* ---------- Login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card {
  background: var(--surface); border: 1px solid var(--brd-accent); padding: 38px 34px;
  border-radius: 22px; width: 360px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.login-card .brand { justify-content: center; margin-bottom: 8px; }
.login-card .brand .logo { width: 46px; height: 46px; }
.login-card input { padding: 13px; font-size: 15px; }
.login-card .btn { padding: 13px; font-size: 15px; justify-content: center; }

/* ---------- Responsivo ---------- */
@media (max-width: 720px) {
  .nav { gap: 14px; padding: 12px 16px; flex-wrap: wrap; }
  .nav-links { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .container { padding: 20px 16px 50px; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
}
