:root {
  --page: #f7f9fb;
  --surface: #fdfeff;
  --surface-2: #f1f4f8;
  --surface-3: #e7ecf2;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0b1120;
  --text-dim: #4b5668;
  --text-faint: #8592a6;
  --grid: #e3e8ef;
  --axis: #c1cad6;

  --accent: #155ef2;
  --accent-2: #06b6d4;
  --accent-hover: #0f46c2;
  --accent-soft: rgba(21, 94, 242, 0.09);
  --accent-contrast: #ffffff;
  --accent-gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);

  --danger: #d03b3b;
  --danger-soft: rgba(208, 59, 59, 0.08);
  --good: #0ca30c;
  --good-soft: rgba(12, 163, 12, 0.08);
  --warning: #b9790a;
  --warning-soft: rgba(237, 161, 0, 0.12);

  /* series de dados (categoricas, ordem fixa) */
  --series-1: #155ef2;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #6366f1;
  --series-6: #94a3b8;

  /* rampa ordinal (funil / rankings) */
  --funnel-1: #0c3fa8;
  --funnel-2: #155ef2;
  --funnel-3: #3b8cf0;
  --funnel-4: #06b6d4;

  --shopee: #ff7a1a;
  --ml: #ffd400;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-md: 0 8px 24px -12px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 24px 60px -24px rgba(15, 23, 42, 0.18);

  /* sombras "glow" — tingidas de azul/ciano, usadas em elementos interativos/destaque */
  --shadow-glow-sm: 0 6px 18px -6px rgba(21, 94, 242, 0.32), 0 2px 6px -2px rgba(6, 182, 212, 0.22);
  --shadow-glow-md: 0 14px 34px -10px rgba(21, 94, 242, 0.28), 0 4px 14px -4px rgba(6, 182, 212, 0.22);
  --shadow-glow-lg: 0 28px 70px -18px rgba(21, 94, 242, 0.26), 0 10px 26px -8px rgba(6, 182, 212, 0.2);

  --font: system-ui, -apple-system, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: var(--page);
  background-image:
    radial-gradient(720px 480px at 8% -8%, rgba(21, 94, 242, 0.07), transparent 60%),
    radial-gradient(640px 460px at 108% 12%, rgba(6, 182, 212, 0.07), transparent 60%),
    radial-gradient(900px 600px at 50% 115%, rgba(99, 102, 241, 0.05), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--accent-gradient);
  color: var(--accent-contrast);
  box-shadow: 0 4px 14px -6px rgba(21, 94, 242, 0.45);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow-sm);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text-faint);
  background: var(--surface-2);
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field select {
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea,
textarea {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  min-height: 72px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.form-error {
  display: none;
  font-size: 13px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(208, 59, 59, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.form-error.visible {
  display: block;
}

.form-success {
  display: none;
  font-size: 13px;
  color: #067606;
  background: var(--good-soft);
  border: 1px solid rgba(12, 163, 12, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.form-success.visible {
  display: block;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 380px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 26px 26px;
  position: relative;
  animation: modal-in 0.18s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.modal h2 {
  font-size: 19px;
  margin-bottom: 4px;
}

.modal .modal-subtitle {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
