/* Kit de Presença Digital
   Paleta: tinta #16201c, papel #f2f6f4, verde-selo #0e7a5a, amarelo-carimbo #ffcf3f */

:root {
  --ink: #16201c;
  --muted: #56665f;
  --paper: #f2f6f4;
  --surface: #ffffff;
  --line: #d5e0da;
  --accent: #0e7a5a;
  --accent-dark: #0a5c44;
  --accent-soft: #dcf0e8;
  --sun: #ffcf3f;
  --danger: #b42318;
  --danger-soft: #fdecea;

  --brand: var(--accent);
  --brand-ink: #ffffff;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 26px;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 1px 0 rgba(22, 32, 28, .05), 0 14px 34px -20px rgba(22, 32, 28, .4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
[hidden] { display: none !important; }

.ic { width: 1.15em; height: 1.15em; flex: none; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.small { font-size: .88rem; color: var(--muted); }
.center { text-align: center; }
.opt { font-weight: 400; color: var(--muted); font-size: .82rem; }

/* ---------- Topo ---------- */
.topbar { padding: 1rem 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--ink); text-decoration: none; min-width: 0;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--ink); color: var(--sun);
  display: grid; place-items: center; flex: none;
}
.nav { display: flex; gap: .5rem; align-items: center; }
.nav form { margin: 0; }
@media (max-width: 480px) { .brand span:last-child { display: none; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.15rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .95rem/1.1 var(--font-body);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, filter .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 38px; padding: .45rem .85rem; font-size: .88rem; }
.btn-lg { min-height: 52px; padding: .8rem 1.4rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- Formulários ---------- */
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label, .label { font-weight: 600; font-size: .92rem; display: block; }
.hint { font-size: .82rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: inherit;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: .65rem .8rem; min-height: 48px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
input[type=color] {
  width: 72px; height: 48px; padding: 4px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff;
}
.grid-2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.form-sep {
  margin: .5rem 0 1rem; padding-top: 1rem; border-top: 1px dashed var(--line);
  font-size: .9rem; color: var(--muted);
}
.alert { padding: .8rem 1rem; border-radius: var(--r-sm); margin: 0 0 1rem; font-size: .94rem; }
.alert-erro { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--accent-soft); color: var(--accent-dark); }
.alert ul { margin: 0; padding-left: 1.1rem; }

.form-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow);
}
.form-card h1 { font-size: 1.8rem; }
.form-card h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.form-card .btn-block { margin-top: .5rem; }
.form-card .small { margin: 1rem 0 0; }
.auth { max-width: 440px; margin-block: 1.5rem 4rem; }

/* ---------- Início ---------- */
.hero { display: grid; gap: 2.5rem; padding: 1rem 0 3rem; align-items: start; }
@media (min-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 4rem; padding-top: 2.5rem; }
}
.hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.4rem); font-weight: 800; max-width: 13ch; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 54ch; margin-bottom: 1.75rem; }

.preview { position: relative; padding-top: 1rem; }
@media (min-width: 980px) { .preview { position: sticky; top: 1.5rem; } }
.phone {
  width: min(340px, 100%); margin-inline: auto;
  background: var(--ink); border-radius: 46px; padding: 11px;
  box-shadow: 0 40px 60px -40px rgba(22, 32, 28, .7);
}
.phone-screen {
  background: var(--paper); border-radius: 36px; overflow: hidden;
  min-height: 580px; display: flex; flex-direction: column;
}
.phone-url {
  font-size: .72rem; color: var(--muted); text-align: center;
  padding: .75rem 1.25rem .35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stamp {
  position: absolute; z-index: 2; top: 0; right: max(0px, calc(50% - 200px));
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--sun); color: var(--ink);
  display: grid; place-items: center;
  font: 800 1.15rem/1 var(--font-display);
  transform: rotate(-14deg);
  box-shadow: 0 0 0 5px var(--paper);
}

.section { padding: 3rem 0 4rem; }
.section h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.kit-list {
  list-style: none; padding: 0; margin: 1.75rem 0 0;
  display: grid; gap: 2rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.kit-list li { border-top: 3px solid var(--ink); padding-top: 1rem; }
.kit-list h3 { font-size: 1.2rem; display: flex; gap: .55rem; align-items: center; }
.kit-list h3 .ic { color: var(--accent); }
.kit-list p { margin: 0; color: var(--muted); max-width: 40ch; }

.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--muted); font-size: .9rem; }

/* ---------- Cartão (prévia e página pública) ---------- */
.vcard { background: var(--surface); flex: 1; display: flex; flex-direction: column; text-align: center; }
.vcard-cover { background: var(--brand); height: 112px; flex: none; }
.vcard-logo {
  width: 108px; height: 108px; margin: -58px auto 0;
  border-radius: 30px; background: var(--surface); border: 4px solid var(--surface);
  display: grid; place-items: center; overflow: hidden; box-shadow: var(--shadow);
}
.vcard-logo img { width: 100%; height: 100%; object-fit: contain; }
.vcard-initials { font: 800 2.3rem/1 var(--font-display); color: var(--brand); }
.vcard-body { padding: .9rem 1.35rem 1.6rem; }
.vcard-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.75rem;
  line-height: 1.1; letter-spacing: -.02em; margin: .5rem 0 .25rem; overflow-wrap: anywhere;
}
.vcard-seg { color: var(--muted); font-size: .93rem; margin: 0; }
.vcard-desc { margin: .9rem auto 0; max-width: 36ch; font-size: .98rem; }
.vcard-main { margin-top: 1.3rem; width: 100%; min-height: 52px; background: var(--brand); color: var(--brand-ink); font-size: 1rem; }
.vcard-main:hover { filter: brightness(.93); }
.vcard-links { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; text-align: left; }
.vlink {
  display: flex; align-items: center; gap: .85rem;
  padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: var(--r-md);
  text-decoration: none; color: var(--ink); background: #fff; font-size: .95rem;
}
a.vlink:hover { border-color: var(--brand); }
.vlink .ic { color: var(--brand); width: 1.3em; height: 1.3em; }
.vlink > span { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.vlink small { display: block; color: var(--muted); font-size: .76rem; }
.vlink b { font-weight: 600; }
.vlink.muted { color: var(--muted); border-style: dashed; }
.vcard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.vcard-actions .btn { padding-inline: .5rem; font-size: .9rem; }
.vcard-more { display: inline-block; margin-top: 1.1rem; font-size: .9rem; color: var(--ink); }

.public { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding-bottom: 2rem; }
.public .vcard { width: min(460px, 100%); flex: none; box-shadow: var(--shadow); }
@media (min-width: 500px) {
  .public { padding-top: 2.5rem; }
  .public .vcard { border-radius: var(--r-lg); overflow: hidden; }
}
.made { margin: 1.5rem 1rem 0; font-size: .86rem; text-align: center; }
.made a { color: var(--muted); }

/* ---------- Painel ---------- */
.dash-head { padding: 1rem 0 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; }
.dash-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); margin: 0; overflow-wrap: anywhere; }
.dash-head p { margin: .35rem 0 0; color: var(--muted); }
.dash { display: grid; gap: 1.25rem; padding-bottom: 3rem; }
@media (min-width: 900px) {
  .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: 1 / -1; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.3rem; min-width: 0; }
.panel h2 { font-size: 1.3rem; display: flex; align-items: center; gap: .55rem; }
.panel h2 .ic { color: var(--accent); }
.panel > .hint { font-size: .93rem; margin: -.25rem 0 1rem; }
.panel .label { margin: .75rem 0 .35rem; }
.panel-todo { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel-todo h2 .ic { color: var(--sun); }
.panel-todo > .hint { color: #c5d1cb; }

.copyrow { display: flex; gap: .5rem; }
.copyrow input { flex: 1; min-width: 0; background: var(--paper); font-size: .9rem; }
.btnrow { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.stat-line { margin: 1rem 0 0; color: var(--muted); display: flex; align-items: baseline; gap: .4rem; }
.stat { font: 800 1.8rem/1 var(--font-display); color: var(--ink); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.checklist li { display: flex; gap: .5rem; align-items: center; }
.checklist .done { color: #9fb2a9; text-decoration: line-through; }
.checklist .done .ic { color: var(--sun); }
.panel-todo .btn-ghost { background: transparent; color: #fff; border-color: #56665f; }
.panel-todo .btn-ghost:hover { border-color: #fff; }

.qr-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.qr-item {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .9rem;
  display: flex; flex-direction: column; gap: .65rem; align-items: stretch; text-align: center;
}
.qr-item strong { font-size: .95rem; }
.qr-box { background: #fff; aspect-ratio: 1; }
.qr-box canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.qr-empty {
  aspect-ratio: 1; display: grid; place-items: center; padding: .75rem;
  background: var(--paper); border: 1.5px dashed var(--line); border-radius: var(--r-sm);
  color: var(--muted); font-size: .86rem; text-decoration: none;
}
.qr-empty:hover { border-color: var(--accent); color: var(--accent-dark); }

.counter { font-size: .82rem; color: var(--muted); margin: .35rem 0 0; }
.counter.over { color: var(--danger); font-weight: 600; }
.sig-preview { border: 1.5px dashed var(--line); border-radius: var(--r-sm); padding: 1rem; overflow-x: auto; background: #fff; }

/* ---------- Edição ---------- */
.form-page { max-width: 780px; }
fieldset {
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  padding: 1.25rem 1.25rem .35rem; margin: 0 0 1.25rem; min-width: 0;
}
legend { font: 700 1.1rem var(--font-display); padding: 0 .45rem; }
fieldset > .hint { margin: -.25rem 0 1rem; }
.logo-row { display: flex; gap: 1rem; align-items: center; }
.logo-row > div:last-child { display: grid; gap: .4rem; min-width: 0; }
.logo-thumb {
  width: 76px; height: 76px; flex: none; border-radius: 20px; border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; background: #fff;
  font: 800 1.4rem var(--font-display); color: var(--accent);
}
.logo-thumb img { width: 100%; height: 100%; object-fit: contain; }
.check { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
fieldset > .check { margin-bottom: 1rem; font-size: .95rem; font-weight: 600; }
.acesso-campos { padding-top: .25rem; }
.alert strong { display: block; margin-bottom: .35rem; }
.sticky-save {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; gap: .5rem; justify-content: flex-end;
  padding: 1.25rem 0 1rem; margin-bottom: 2rem;
  background: linear-gradient(to bottom, rgba(242, 246, 244, 0), var(--paper) 35%);
}

/* ---------- Página Meu negócio ---------- */
.biz { background: var(--surface); }
.biz-top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.biz-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.biz-brand { display: flex; gap: .6rem; align-items: center; min-width: 0; color: var(--ink); text-decoration: none; font: 700 1.05rem var(--font-display); }
.biz-brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-brand .mini {
  width: 40px; height: 40px; flex: none; border-radius: 11px; overflow: hidden;
  display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: .9rem;
}
.biz-brand .mini img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.btn-brand { background: var(--brand); color: var(--brand-ink); }
.btn-brand:hover { filter: brightness(.93); }
.btn-invert { background: var(--brand-ink); color: var(--brand); }
.btn-invert:hover { filter: brightness(.95); }
.btn-outline-invert { background: transparent; border-color: currentColor; color: var(--brand-ink); }

.biz-hero { background: var(--brand); color: var(--brand-ink); padding: clamp(3rem, 8vw, 5.5rem) 0; }
.biz-hero .wrap { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 860px) { .biz-hero .wrap { grid-template-columns: minmax(0, 1.5fr) minmax(0, .5fr); gap: 2.5rem; } }
.biz-seg { margin: 0; font-weight: 600; opacity: .85; }
.biz-hero h1 { font-size: clamp(2.6rem, 8vw, 5rem); font-weight: 800; margin: .2rem 0 1rem; overflow-wrap: anywhere; }
.biz-lead { font-size: 1.15rem; max-width: 52ch; margin: 0; opacity: .95; }
.biz-hero .btnrow { margin-top: 1.9rem; }
.biz-logo {
  justify-self: start; order: -1; width: 96px; aspect-ratio: 1;
  border-radius: 24px; background: #fff; padding: .6rem; overflow: hidden;
}
@media (min-width: 860px) {
  .biz-logo { order: 0; justify-self: center; width: min(240px, 100%); border-radius: 40px; padding: 1.25rem; }
}
.biz-logo img { width: 100%; height: 100%; object-fit: contain; }

.biz-sec { padding: clamp(2.75rem, 6vw, 4rem) 0; border-bottom: 1px solid var(--line); }
.biz-sec h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.serv-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.serv-list li {
  display: flex; gap: .65rem; align-items: flex-start;
  padding: 1rem 1.1rem; background: var(--paper);
  border-left: 4px solid var(--brand); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-weight: 500;
}
.serv-list .ic { color: var(--brand); margin-top: .15em; }
.info-grid { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info-grid .vcard-links { max-width: 460px; }
.horario { display: flex; gap: .7rem; font-size: 1.08rem; }
.horario .ic { color: var(--brand); margin-top: .2em; }
.biz-address { color: var(--muted); }
.map { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 280px; border: 0; border-radius: var(--r-md); background: var(--paper); }

.biz-cta { background: var(--ink); color: #fff; padding: clamp(3rem, 7vw, 4.5rem) 0; }
.biz-cta h2 { font-size: clamp(2rem, 5vw, 3rem); }
.biz-cta p { color: #c5d1cb; font-size: 1.1rem; }
.btn-outline-light { background: transparent; border-color: #56665f; color: #fff; }
.btn-outline-light:hover { border-color: #fff; }
.biz-foot { padding: 2rem 0 6rem; color: var(--muted); font-size: .9rem; text-align: center; }
.biz-foot p { margin: .25rem 0; }
.biz-foot a { color: var(--muted); }
.fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 20;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .45);
}
.fab .ic { width: 28px; height: 28px; }

/* ---------- Aviso de cópia ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 50;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: .7rem 1.15rem; border-radius: 999px;
  font-weight: 600; font-size: .92rem; text-align: center; max-width: calc(100% - 2rem);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
