/* main.css — Portal do Cliente 706 Studio */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import 'tokens.css';

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

body {
  font-family: var(--font);
  background: var(--bg-subtle);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.header {
  padding: var(--s4) var(--s8);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-decoration: none;
}

.header-tagline {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Progress bar ───────────────────────────────────────────────────────── */
.progress-wrap {
  background: var(--bg);
  padding: var(--s4) var(--s8);
  border-bottom: 1px solid var(--border);
}

.progress-steps {
  display: flex;
  align-items: center;
  gap: var(--s2);
  max-width: 640px;
  margin: 0 auto;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}

.progress-step.active { color: var(--text-primary); font-weight: 600; }
.progress-step.done { color: var(--success); }

.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  flex-shrink: 0;
  transition: all 0.2s;
}

.progress-step.active .step-num {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-inverse);
}

.progress-step.done .step-num {
  background: var(--success);
  border-color: var(--success);
  color: var(--text-inverse);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.step-line.done { background: var(--success); }

/* ── Main container ─────────────────────────────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--s8) var(--s4);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s8);
  width: 100%;
  max-width: 640px;
}

/* ── Step ───────────────────────────────────────────────────────────────── */
.step { display: none; }
.step.active { display: block; }

.step-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: var(--s2);
}

.step-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--s8);
  line-height: 1.6;
}

/* ── Form elements ──────────────────────────────────────────────────────── */
.field { margin-bottom: var(--s6); }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s2);
}

label .required { color: var(--error); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: var(--s3) var(--s4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg);
  transition: border-color 0.15s;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus);
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* ── Pillar detection ───────────────────────────────────────────────────── */
.pillar-hint {
  display: none;
  margin-top: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
  font-size: 13px;
  align-items: center;
  gap: var(--s2);
  animation: fadeIn 0.3s ease;
}

.pillar-hint.visible { display: flex; }
.pillar-hint.web { background: #eef2ff; color: var(--web); border: 1px solid #c7d2fe; }
.pillar-hint.landing { background: #f0f9ff; color: var(--landing); border: 1px solid #bae6fd; }
.pillar-hint.social { background: #fdf2f8; color: var(--social); border: 1px solid #fbcfe8; }

.pillar-hint-change {
  margin-left: auto;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.7;
}

/* ── Pillar selector ────────────────────────────────────────────────────── */
.pillar-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
  margin-bottom: var(--s6);
}

.pillar-option {
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s4) var(--s3);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.pillar-option:hover { border-color: var(--brand); }
.pillar-option.selected.web { border-color: var(--web); background: #eef2ff; }
.pillar-option.selected.landing { border-color: var(--landing); background: #f0f9ff; }
.pillar-option.selected.social { border-color: var(--social); background: #fdf2f8; }

.pillar-icon { font-size: 28px; margin-bottom: var(--s2); }
.pillar-name { font-size: 13px; font-weight: 600; }
.pillar-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Dynamic fields ─────────────────────────────────────────────────────── */
.field-group { display: none; }
.field-group.visible { display: block; }

/* ── Budget options ─────────────────────────────────────────────────────── */
.budget-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}

.budget-option {
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s4);
  cursor: pointer;
  transition: all 0.2s;
}

.budget-option:hover { border-color: var(--brand); }
.budget-option.selected { border-color: var(--brand); background: #f8f8fb; }
.budget-range { font-size: 15px; font-weight: 700; }
.budget-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Score bar ──────────────────────────────────────────────────────────── */
.score-wrap {
  margin-top: var(--s6);
  padding: var(--s4);
  background: var(--bg-subtle);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.score-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: var(--s2);
}

.score-bar-bg {
  height: 8px;
  background: var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: var(--brand);
  transition: width 0.6s ease, background 0.3s;
}

.score-bar-fill.good { background: var(--success); }
.score-bar-fill.mid  { background: var(--warning); }
.score-bar-fill.low  { background: var(--error); }

.score-msg { font-size: 12px; color: var(--text-secondary); margin-top: var(--s2); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-row {
  display: flex;
  gap: var(--s3);
  margin-top: var(--s8);
  justify-content: flex-end;
}

.btn {
  padding: var(--s3) var(--s6);
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--brand);
  color: var(--text-inverse);
}
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--text-primary); }

/* ── Confirmation ───────────────────────────────────────────────────────── */
.confirm-icon { font-size: 48px; margin-bottom: var(--s4); }
.confirm-title { font-size: 24px; font-weight: 700; margin-bottom: var(--s3); }
.confirm-msg { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }

.confirm-badge {
  display: inline-block;
  padding: var(--s2) var(--s4);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  margin-top: var(--s4);
}

.confirm-badge.qualified { background: #dcfce7; color: #166534; }
.confirm-badge.manual    { background: #fef9c3; color: #713f12; }
.confirm-badge.archived  { background: #f3f4f6; color: #374151; }

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step.active { animation: fadeIn 0.25s ease; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .card { padding: var(--s6); }
  .header { padding: var(--s4); }
  .main { padding: var(--s4) var(--s3); }
  .pillar-options { grid-template-columns: 1fr; }
  .budget-options { grid-template-columns: 1fr; }
  .progress-step span:not(.step-num) { display: none; }
}
