:root {
  --bg: #06201c;
  --ink: #f4f7f2;
  --muted: #c3d0c8;
  --lime: #c9f06b;
  --line: rgba(244, 247, 242, 0.12);
  --danger: #ffb4a8;
  --card: #0b2923;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
  --font: "Outfit", "Segoe UI", sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(201, 240, 107, 0.14), transparent 55%),
    radial-gradient(680px 420px at -12% 110%, rgba(201, 240, 107, 0.08), transparent 50%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--lime);
  z-index: 20;
}

img { max-width: 100%; }

button,
input { font: inherit; color: inherit; }

::selection { background: var(--lime); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 30;
  background: var(--lime);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus { top: 12px; }

.mark {
  position: fixed;
  width: min(540px, 72vw);
  right: -130px;
  top: 28px;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

.site-header,
main,
.site-footer { position: relative; z-index: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(6, 32, 28, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { height: 40px; width: auto; }

.hero,
.steps,
.site-footer,
.admin-wrap {
  width: min(1120px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.9fr);
  gap: 48px;
  align-items: start;
  margin-top: 18px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0;
  color: var(--lime);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(201, 240, 107, 0.16);
  vertical-align: 1px;
}

h1 {
  margin: 12px 0 14px;
  font-size: clamp(2.35rem, 4.4vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.lede,
.sub {
  margin: 0;
  color: var(--muted);
}

.lede {
  max-width: 38rem;
  font-size: 1.125rem;
}

.points {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.points svg,
.btn svg,
.success-mark svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.points svg { color: var(--lime); }

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    var(--card);
  border: 1px solid rgba(201, 240, 107, 0.24);
  border-radius: 24px;
  padding: 26px 22px 22px;
  box-shadow: var(--shadow);
}

.card h2,
.steps h2,
.admin-head h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.card h2 { font-size: 1.45rem; }

.card .sub { margin: 6px 0 18px; font-size: 0.95rem; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.field label {
  font-size: 0.92rem;
  font-weight: 600;
}

.text-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(244, 247, 242, 0.16);
  background: #071e19;
  color: var(--ink);
}

.text-input::placeholder { color: rgba(244, 247, 242, 0.38); }

.text-input:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(201, 240, 107, 0.16);
}

.text-input[aria-invalid="true"] { border-color: var(--danger); }

.control { position: relative; }

.prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lime);
  font-weight: 700;
  pointer-events: none;
}

.control .text-input { padding-left: 46px; }

.field-error,
.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
}

.form-error { margin-bottom: 12px; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 2px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.consent input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex: none;
  border: 1.5px solid rgba(244, 247, 242, 0.45);
  border-radius: 6px;
  background: transparent;
}

.consent input:checked {
  border-color: var(--lime);
  background-color: var(--lime);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2 4.6 8.8 10 3.2' fill='none' stroke='%2306201C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.consent input[aria-invalid="true"] { border-color: var(--danger); }

.btn,
.btn-secondary,
.btn-lime,
.btn-danger,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn {
  width: 100%;
  height: 52px;
  border: 0;
  background: var(--lime);
  color: var(--bg);
  font-size: 1rem;
}

.btn:hover { background: #d7f68a; }

.btn:disabled { opacity: 0.6; cursor: wait; }

.btn-secondary,
.btn-lime,
.btn-danger {
  min-height: 44px;
  padding: 0 14px;
}

.btn-secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover { border-color: rgba(244, 247, 242, 0.4); }

.btn-lime {
  border: 0;
  background: var(--lime);
  color: var(--bg);
}

.btn-lime:hover { background: #d7f68a; }

.btn-danger {
  border: 1px solid rgba(255, 180, 168, 0.4);
  background: transparent;
  color: var(--danger);
}

.btn-ghost {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(201, 240, 107, 0.45);
  background: transparent;
  color: var(--lime);
}

.btn-ghost:hover { background: rgba(201, 240, 107, 0.1); }

.success { padding-top: 8px; }

.success-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--bg);
}

.success-mark svg { width: 28px; height: 28px; }

.success h2 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.success p { margin: 0 0 18px; color: var(--muted); }

.success strong { color: var(--ink); font-weight: 600; }

.steps { padding: 12px 0 64px; }

.steps h2 { font-size: 1.7rem; margin-bottom: 18px; }

.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.steps li {
  padding: 18px 18px 20px;
  border-top: 2px solid var(--lime);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 0 0 16px 16px;
}

.step-num {
  color: var(--lime);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.steps h3 {
  margin: 8px 0;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.steps p { margin: 0; color: var(--muted); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding: 18px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer p { margin: 0; max-width: 64ch; }

.site-footer a { color: var(--muted); }

.noscript {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 28px;
  color: var(--muted);
}

.result-page {
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.result-page .logo { margin-bottom: 28px; }

.result-page h1 { font-size: clamp(2rem, 5vw, 3rem); }

.error-list { margin: 0 0 20px; padding-left: 18px; color: var(--danger); }

.login-wrap {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 24px 16px 64px;
}

.login-card { width: min(440px, 100%); }

.login-card h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-top: 10px;
}

.admin-wrap { padding: 18px 0 72px; }

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}

.admin-head h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }

.stats { margin: 0; color: var(--muted); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
}

.search { flex: 1 1 260px; height: 46px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--bg);
}

.list-scroll { overflow-x: auto; }

.cols {
  display: grid;
  grid-template-columns:
    minmax(120px, 1.15fr)
    minmax(140px, 1.25fr)
    minmax(168px, 1.05fr)
    minmax(120px, 0.8fr)
    minmax(140px, 0.95fr)
    minmax(168px, 0.9fr)
    minmax(96px, 0.55fr);
  gap: 8px 12px;
  align-items: center;
  min-width: 1060px;
}

.list-head {
  padding: 0 12px 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ficha-row {
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.ficha-row:hover,
.ficha-row:focus-visible { background: rgba(201, 240, 107, 0.06); }

.cell { min-width: 0; }

.cell-v {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-nome .cell-v,
.cell-razao .cell-v,
.cell-data .cell-v {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.k { display: none; }

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.pill-new {
  color: var(--bg);
  background: var(--lime);
}

.pill-done {
  color: var(--muted);
  border: 1px solid var(--line);
}

.wa-link { color: var(--lime); font-weight: 600; }

.empty {
  margin: 28px 0;
  color: var(--muted);
}

dialog {
  width: min(560px, calc(100% - 24px));
  max-height: min(760px, calc(100% - 24px));
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(201, 240, 107, 0.28);
  border-radius: 22px;
  background: #0c2a23;
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog::backdrop { background: rgba(2, 12, 10, 0.74); }

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 8px;
}

#d-nome {
  margin: 6px 0 0;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

#d-razao { margin: 6px 0 0; color: var(--muted); }

.icon-x {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 8px 0 0;
  padding: 0 22px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt { color: var(--muted); }

.detail-list dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.hint {
  min-height: 1.2em;
  margin: 10px 22px 0;
  color: var(--lime);
  font-size: 0.86rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 22px 22px;
}

input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px #071e19 inset;
}

@media (max-width: 900px) {
  .hero,
  .steps ol { grid-template-columns: 1fr; }

  .hero { gap: 22px; }

  .mark { width: 280px; right: -110px; top: -20px; opacity: 0.12; }

  h1 { font-size: 2.25rem; }
}

@media (max-width: 800px) {
  .header-inner,
  .hero,
  .steps,
  .site-footer,
  .admin-wrap,
  .noscript { width: min(1120px, calc(100% - 28px)); }

  .logo { height: 32px; }

  .header-inner { height: 68px; }

  .list-scroll { overflow: visible; }

  .cols,
  .ficha-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
  }

  .list-head { display: none; }

  .ficha-row {
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .cell-nome,
  .cell-razao,
  .cell-cnpj { grid-column: 1 / -1; }

  .k {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .cell-v { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
