/* ════════════════════════════════════════════════════════════
   STYLE.CSS — Sistema de Leads · Paleta Luxo Empreendimento
   Compartilhado entre index.html e admin.html
   ════════════════════════════════════════════════════════════ */

/* ══ 1. TOKENS DE DESIGN ════════════════════════════════════════
   Paleta extraída da imagem do empreendimento:
   – Charcoal escuro  → arquitetura / header
   – Dourado âmbar    → iluminação / destaque
   – Madeira quente   → painéis da guarita
   – Creme off-white  → superfícies do card
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* ── Marca (dourado âmbar do empreendimento) ── */
  --brand:          #c8963a;
  --brand-dark:     #a67828;
  --brand-light:    #fdf3e3;
  --brand-glow:     rgba(200, 150, 58, 0.30);

  /* ── Superfícies escuras (arquitetura charcoal) ── */
  --dark:           #1a1714;
  --dark-mid:       #2a2520;
  --dark-overlay:   rgba(18, 15, 12, 0.62);  /* overlay sobre a foto */

  /* ── Madeira / quente ── */
  --wood:           #8b6340;
  --wood-light:     #c4956a;

  /* ── Semânticas ── */
  --success:        #4a9b6a;
  --success-light:  #eaf5ee;
  --success-border: #b8dfc7;
  --error:          #c94040;
  --error-light:    #fdf0f0;
  --error-border:   #f0c0c0;

  /* ── Neutros creme (card) ── */
  --bg:             #f4f0eb;
  --surface:        #ffffff;
  --surface-2:      #faf7f3;
  --text:           #1a1410;
  --muted:          #7a6a58;
  --border:         #e8ddd0;
  --placeholder:    #c4b8a8;

  /* ── Forma ── */
  --radius:         16px;
  --radius-sm:      10px;
  --radius-xs:      8px;

  /* ── Sombras ── */
  --shadow:         0 8px 40px rgba(0,0,0,0.18);
  --shadow-lg:      0 16px 60px rgba(0,0,0,0.28);
  --shadow-btn:     0 3px 14px rgba(200,150,58,0.38);
  --shadow-btn-hov: 0 6px 22px rgba(200,150,58,0.50);

  /* ── Tipografia ── */
  --font:           'Segoe UI', system-ui, -apple-system, sans-serif;

  /* ── Transições ── */
  --t: .22s ease;
}

/* ══ 2. RESET & BASE ════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100dvh;
}

/* ── Página de formulário com foto de fundo (index.html) ────────
   ✏️ Renomeie sua imagem para "bg.jpg" e coloque na mesma pasta
   que o index.html antes de publicar no GitHub Pages.
─────────────────────────────────────────────────────────────── */
body.page-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  min-height: 100dvh;

  /* Imagem de fundo */
  background-image: url('bg.jpg');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
}

/* Overlay escuro sobre a foto para garantir legibilidade do card */
body.page-center::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--dark-overlay);
  z-index: 0;
  pointer-events: none;
}

/* Garante que o card fique acima do overlay */
body.page-center > * {
  position: relative;
  z-index: 1;
}

/* ── Página de admin (admin.html) ──────────────────────────── */
body.page-top {
  display: block;
  background: var(--bg);
}

/* ══ 3. ANIMAÇÕES ════════════════════════════════════════════════ */
@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ══ 4. TOPBAR (admin.html) ══════════════════════════════════════ */
.topbar {
  background: var(--dark);
  border-bottom: 1px solid rgba(200,150,58,.2);
  padding: 0 28px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: .3px;
}

.topbar__brand span { font-size: 20px; }

/* ══ 5. LAYOUT DE CONTEÚDO ══════════════════════════════════════ */
.main-content {
  max-width: 660px;
  margin: 0 auto;
  padding: 36px 16px 60px;
}

.section-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--muted);
  margin-bottom: 12px;
  padding-left: 2px;
}

/* ══ 6. CARD ═════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise .45s cubic-bezier(.22,1,.36,1) both;
  margin-bottom: 20px;
}

/* Versão formulário (index.html) — com bordinha dourada no topo */
.card--form {
  width: 100%;
  max-width: 460px;
  margin-bottom: 0;
  box-shadow: var(--shadow-lg);
  border-top: 3px solid var(--brand);
}

/* ── Cabeçalho escuro tipo "arquitetura" (index.html) ────────── */
.card-header {
  background:
    linear-gradient(160deg,
      #1a1714 0%,
      #2e2318 55%,
      #3b2d1a 100%);
  padding: 32px 36px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Reflexo dourado sutil no canto superior */
.card-header::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,150,58,.18) 0%, transparent 70%);
  pointer-events: none;
}

/* Linha dourada decorativa na base do header */
.card-header::after {
  content: "";
  position: absolute;
  bottom: 0; left: 36px; right: 36px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(200,150,58,.5), transparent);
  pointer-events: none;
}

.card-header__icon {
  display: block;
  font-size: 30px;
  margin-bottom: 12px;
  position: relative;
}

.card-header__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
  letter-spacing: .2px;
}

.card-header__sub {
  font-size: 13.5px;
  opacity: .75;
  line-height: 1.55;
  position: relative;
  font-weight: 400;
}

/* ── Cabeçalho de card simples (admin.html) ──────────────────── */
.card-head {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-head__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.card-head__icon--blue   { background: var(--brand-light); }
.card-head__icon--yellow { background: #fef9e0; }
.card-head__icon--green  { background: var(--success-light); }

.card-head__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.card-head__sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* ── Corpo e rodapé ──────────────────────────────────────────── */
.card-body {
  padding: 28px 36px;
}

.card-body--prose {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.card-body--prose p { margin-bottom: 8px; }
.card-body--prose strong { color: var(--text); }

.card-footer {
  padding: 14px 36px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: #b0a898;
}

/* ══ 7. BADGE DE INDICAÇÃO ══════════════════════════════════════ */
.badge {
  display: none;
  margin-top: 14px;
  background: rgba(200,150,58,.18);
  border: 1px solid rgba(200,150,58,.45);
  color: #f5d898;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  width: fit-content;
  position: relative;
  letter-spacing: .2px;
}

/* ══ 8. FORMULÁRIO ══════════════════════════════════════════════ */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
  margin-bottom: 7px;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
  opacity: .5;
}

input[type="text"],
input[type="tel"],
input[type="email"] {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface-2);
  outline: none;
  transition: border var(--t), box-shadow var(--t), background var(--t);
  -webkit-appearance: none;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px var(--brand-glow);
  background: #fff;
}

input.field--error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(201,64,64,.12) !important;
}

input::placeholder { color: var(--placeholder); }

/* ══ 9. BOTÕES ══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: .3px;
  transition: background var(--t), box-shadow var(--t), transform .1s;
  white-space: nowrap;
}

.btn:active { transform: scale(.97); }

/* Tamanhos */
.btn--full { width: 100%; padding: 14px; font-size: 15px; }
.btn--sm   { padding: 7px 14px; font-size: 12.5px; }

/* ── Botão primário: dourado âmbar ── */
.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover    { background: var(--brand-dark); box-shadow: var(--shadow-btn-hov); }
.btn--primary:disabled { background: #c4b8a8; box-shadow: none; cursor: not-allowed; }

/* ── Botão de sucesso ── */
.btn--success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 2px 12px rgba(74,155,106,.25);
}
.btn--success:hover    { background: #3a7d55; }
.btn--success:disabled { background: #c4b8a8; box-shadow: none; cursor: not-allowed; }

/* ── Botão outline escuro (topbar admin) ── */
.btn--outline {
  background: transparent;
  color: rgba(255,255,255,.75);
  border: 1.5px solid rgba(255,255,255,.2);
}
.btn--outline:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ── Botão copiar ── */
.btn-copy {
  background: none;
  border: none;
  font-size: 15px;
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 6px;
  transition: background var(--t);
  flex-shrink: 0;
  line-height: 1;
}
.btn-copy:hover { background: var(--border); }

/* ══ 10. SPINNER ════════════════════════════════════════════════ */
.spinner {
  width: 17px;
  height: 17px;
  border: 2.5px solid rgba(255,255,255,.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: none;
  flex-shrink: 0;
}

/* ══ 11. ALERTS ══════════════════════════════════════════════════ */
.alert {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

.alert--success {
  background: var(--success-light);
  color: #2d7a4a;
  border: 1px solid var(--success-border);
}

.alert--error {
  background: var(--error-light);
  color: #a03030;
  border: 1px solid var(--error-border);
}

/* ══ 12. BARRA DE ETAPAS (admin.html) ═══════════════════════════ */
.steps-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.steps-bar__step {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--border);
  transition: background var(--t);
}

.steps-bar__step--active   { background: var(--brand); }
.steps-bar__step--complete { background: var(--success); }

/* ══ 13. PAINEL DE RESULTADO (admin.html) ═══════════════════════ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
  border: none;
}

.result-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 10px;
}

.data-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 9px;
}

.data-row__tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  min-width: 56px;
  flex-shrink: 0;
}

.data-row__val {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

/* ══ 14. QR CODE BLOCK (admin.html) ════════════════════════════ */
.qr-block {
  text-align: center;
  padding: 16px 0 12px;
}

.qr-block img {
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  padding: 8px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}

.qr-block__hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* ══ 15. BLOCO DE CÓDIGO ════════════════════════════════════════ */
.code-block {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
  font-family: 'Courier New', monospace;
}

/* ══ 16. RESPONSIVO ════════════════════════════════════════════ */
@media (max-width: 520px) {
  .card-header,
  .card-body,
  .card-footer { padding-left: 22px; padding-right: 22px; }

  .card--form { border-radius: 14px; }
  .card-head  { padding: 16px 18px; }
  .card-body  { padding: 20px; }

  .topbar { padding: 0 16px; }
  .topbar__brand { font-size: 14px; }
}

@media (max-width: 360px) {
  .card-header,
  .card-body,
  .card-footer { padding-left: 18px; padding-right: 18px; }
}