:root {
  --bg: #0c0c0e;
  --surface: #161618;
  --surface-2: #1e1e21;
  --surface-3: #252529;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --accent: #ffffff;
  --accent-2: #e0e0e0;
  --accent-glow: rgba(255,255,255,0.12);
  --danger: #ff453a;
  --success: #30d158;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --max-w: 480px;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ========== LOGIN ========== */
/* Nota: estilos de login movidos para app-theme.css para evitar conflitos */

/* ========== INICIO / MAIN ========== */
#inicio {
  min-height: 100vh;
  padding-bottom: 40px;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  background: rgba(12,12,14,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.brand-mark img {
  height: 32px;
  filter: brightness(1.2);
}

.menu__saldo {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  line-height: 1;
}

.menu__saldo-currency {
  font-size: 15px;
  font-weight: 700;
  color: #0c0c0e;
}

.menu__saldo-value {
  font-size: 17px;
  font-weight: 800;
  color: #0c0c0e;
}

/* ========== WELCOME ========== */
.welcome-panel {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 20px;
  text-align: center;
}

.welcome-panel__illustration {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px var(--accent-glow);
}

.welcome-panel__illustration span {
  font-size: 40px;
  color: #000;
}

.welcome-panel__kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.welcome-panel__title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 12px;
}

.welcome-panel__text {
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.welcome-panel__bullets {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.welcome-panel__bullets li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
}

.welcome-panel__bullets li span {
  color: var(--success);
  font-size: 20px;
}

.welcome-panel__cta {
  width: 100%;
  max-width: var(--max-w);
  padding: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.welcome-panel__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

/* ========== GLOBAL PROGRESS ========== */
.global-progress {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px;
}

.global-progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.global-progress__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
}

.global-progress__count {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.global-progress__track {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}

.global-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ========== SURVEYS ========== */
.outer-box {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 20px;
}

.survey {
  background: var(--surface);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.survey__hero {
  width: 100%;
  height: 240px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  padding: 20px;
  box-sizing: border-box;
}

.survey__hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, var(--surface));
  pointer-events: none;
}

.survey__hero img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.survey__body {
  padding: 24px 20px;
}

.survey__progress {
  margin-bottom: 20px;
}

.survey__progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.survey__progress-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
}

.survey__progress-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.survey__progress-track {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}

.survey__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.survey__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.survey__title span {
  color: var(--accent);
}

.pergunta-whats {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.pergunta-whats strong {
  color: var(--accent);
}

/* Rating stars */
.rating-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.rating-container--stars {
  gap: 6px;
}

.rating-container.is-invalid {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.rating-button {
  flex: 1;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.rating-button:hover {
  background: var(--surface-3);
  border-color: var(--text-3);
}

.rating-button.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #000;
  border-color: var(--accent);
  font-weight: 700;
}

.rating-container.is-invalid .rating-button--star {
  animation: star-shake 0.35s ease;
}

.rating-container.is-invalid .rating-button--star .star {
  color: #e08a84;
}

@keyframes star-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.rating-button--star {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 12px;
}

.rating-button--star .star {
  font-size: 42px;
  line-height: 1;
  color: #d5ddd9;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: color 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .rating-button--star:hover .star,
  .rating-button--star.is-hover .star {
    color: #333;
    transform: scale(1.08);
  }
}

.rating-button--star.active {
  background: transparent;
  border: none;
  box-shadow: none;
  color: inherit;
}

.rating-button--star.active .star {
  color: #000;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  transform: scale(1.06);
}

.rating-container--stars.is-rated .rating-button--star.active .star {
  color: #000;
}

.survey__stars-hint {
  font-size: 13px;
  color: var(--text-3);
  margin-top: -12px;
  margin-bottom: 20px;
}

.enviarCodigo {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  letter-spacing: 0.3px;
}

.enviarCodigo:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.enviarCodigo:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ========== DONE PANEL ========== */
.done-panel {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 20px;
  text-align: center;
}

.done-panel__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--success) 0%, #248a3d 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(48,209,88,0.2);
}

.done-panel__icon span {
  font-size: 36px;
  color: #fff;
}

.done-panel__kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--success);
  margin-bottom: 12px;
}

.done-panel__title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.done-panel__text {
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.done-panel__cta {
  width: 100%;
  max-width: var(--max-w);
  padding: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.done-panel__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

.done-panel__choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.done-panel__cta--secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--surface-3);
}

.done-panel__cta--secondary:hover {
  box-shadow: none;
  background: var(--surface-2);
}

/* ========== NOTICE POPUP ========== */
.notice-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.notice-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.notice-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 90%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  z-index: 201;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-lg);
}

.notice-popup.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.notice-popup__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--surface-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-popup__icon span {
  font-size: 28px;
  color: var(--accent);
}

.notice-popup__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.notice-popup__text {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.notice-popup__cta {
  width: 100%;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.notice-popup__cta:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}

/* ========== LOGIN BOOT ========== */
.login-boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.login-boot__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--surface-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-boot p {
  color: var(--text-3);
  font-size: 14px;
}

/* ========== UTILITIES ========== */
.site-logo--header {
  width: min(220px, 55vw);
  height: auto;
  max-width: 100%;
  filter: brightness(0) invert(1);
}
