/* =======================================================
   STYLE.CSS - FORMULÁRIO OFICIAL DE INDICAÇÃO ADDSTOK
   Refinado para desktop, tablet e celular
   ======================================================= */

* {
  box-sizing: border-box;
}

:root {
  --bg-main: #0f172a;
  --bg-card: #f8fafc;
  --bg-hero-1: #14213d;
  --bg-hero-2: #2454d6;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border: #cbd5e1;
  --border-focus: #2563eb;
  --primary: #2454d6;
  --primary-hover: #1d4ed8;
  --secondary: #e2e8f0;
  --secondary-hover: #cbd5e1;
  --danger: #b91c1c;
  --success: #15803d;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
  --radius-lg: 24px;
  --radius-md: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.20), transparent 30%),
    linear-gradient(180deg, #0b1220 0%, var(--bg-main) 100%);
  color: var(--text-main);
  line-height: 1.45;
}

.page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.hero {
  width: 100%;
  margin: 0 auto 22px;
  padding: 34px 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--bg-hero-1), var(--bg-hero-2));
  color: #ffffff;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.60);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
}

.hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
}

.card {
  width: 100%;
  margin: 0 auto;
  padding: 30px 34px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

h2 {
  margin: 26px 0 18px;
  padding-top: 4px;
  color: var(--text-main);
  font-size: 22px;
  line-height: 1.2;
}

h2:first-of-type {
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  margin-bottom: 20px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #183153;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 16px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
}

small {
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
}

.inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.btn {
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.16s ease, opacity 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.btn.primary {
  background: var(--primary);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.secondary {
  background: var(--secondary);
  color: #0f172a;
}

.btn.secondary:hover {
  background: var(--secondary-hover);
}

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #ffffff;
  font-weight: 600;
  color: var(--text-main);
}

.check input {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin-top: 2px;
  padding: 0;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #dbe3ee;
}

.preview {
  display: none;
  width: 100%;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #0b1220;
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-x: auto;
}

.campo-erro {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12) !important;
}

#statusCNPJ {
  min-height: 18px;
  font-size: 13px;
}

#statusCNPJ:not(:empty) {
  margin-top: 6px;
}

/* =======================================================
   TABLET
   ======================================================= */

@media (max-width: 900px) {
  .page {
    max-width: 100%;
    padding: 18px 12px 36px;
  }

  .hero {
    padding: 28px 24px;
  }

  .card {
    padding: 26px 22px;
  }

  .grid {
    gap: 16px 14px;
  }
}

/* =======================================================
   CELULAR
   ======================================================= */

@media (max-width: 680px) {
  body {
    background: #0b1220;
  }

  .page {
    padding: 10px 8px 26px;
  }

  .hero {
    margin-bottom: 14px;
    padding: 22px 18px;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 27px;
  }

  .hero p {
    font-size: 14px;
  }

  .badge {
    font-size: 11px;
    padding: 5px 10px;
  }

  .card {
    padding: 20px 16px;
    border-radius: 18px;
  }

  h2 {
    margin: 24px 0 14px;
    font-size: 19px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 16px;
  }

  label {
    font-size: 13px;
  }

  input,
  select,
  textarea {
    min-height: 48px;
    padding: 12px 13px;
    border-radius: 12px;
    font-size: 16px; /* evita zoom automático no iPhone */
  }

  .inline {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .inline .btn {
    width: 100%;
  }

  .actions {
    flex-direction: column;
    gap: 10px;
  }

  .actions .btn {
    width: 100%;
  }

  .check {
    grid-template-columns: 20px 1fr;
    padding: 13px 12px;
    font-size: 13px;
  }

  .preview {
    font-size: 13px;
    padding: 14px;
  }
}

/* =======================================================
   CELULAR MUITO PEQUENO
   ======================================================= */

@media (max-width: 390px) {
  .page {
    padding-left: 6px;
    padding-right: 6px;
  }

  .hero,
  .card {
    border-radius: 15px;
  }

  .hero {
    padding: 20px 14px;
  }

  .card {
    padding: 18px 12px;
  }

  .hero h1 {
    font-size: 24px;
  }
}

.hero-banner {
  display: block !important;
  width: calc(100% + 72px) !important;
  max-width: none !important;
  height: auto !important;
  margin: 18px -36px 26px -36px !important;
  border-radius: 16px !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28) !important;
}

@media (max-width: 680px) {
  .hero-banner {
    width: calc(100% + 36px) !important;
    max-width: none !important;
    margin: 14px -18px 20px -18px !important;
    border-radius: 12px !important;
  }
}