/* ═══════════════════════════════════════════════════════════════
   VIMEL HOME — Portal do profissional (site estático independente)
   Espelha os tokens do app (frontend/src/index.css, tema escuro).
   Hex é permitido AQUI (artefato fora do app), mas os valores devem
   permanecer consistentes com a paleta Vimel.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Marca (idêntica ao app) */
  --brand: #12d273;
  --brand-deep: #156055;
  --brand-light: #6fe7ac;
  --ink: #05343b;

  /* Tema escuro do app */
  --bg-app: #04262c;
  --card-solid: #093a42;
  --bg-card: rgba(9, 58, 66, 0.72);
  --bg-input: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.08);

  --text-main: #eef6f4;
  --text-muted: rgba(238, 246, 244, 0.6);
  --danger: #ff7a7d;
  --warning: #f5a340;

  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.5);

  --r-btn: 14px;
  --r-input: 14px;
  --r-card: 20px;
  --r-pill: 999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  background-image:
    radial-gradient(1200px 500px at 85% -10%, rgba(18, 210, 115, 0.10), transparent 60%),
    radial-gradient(900px 420px at -10% 30%, rgba(21, 96, 85, 0.28), transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.hidden { display: none !important; }

/* ── Cabeçalho ── */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  color: var(--ink); /* regra do app: texto/ícone sobre verde = ink */
  box-shadow: 0 4px 14px rgba(18, 210, 115, 0.35);
}
.logo-mark svg { width: 20px; height: 20px; }

.logo-text {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.logo-text strong { font-weight: 800; color: var(--brand); }

.logo-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}

.secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.secure-pill svg { width: 16px; height: 16px; color: var(--brand); flex: none; }
.secure-pill strong { color: var(--text-main); }

/* ── Herói ── */
.hero { padding: 4px 0 24px; }
.hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.hero p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 56ch;
}

/* ── Painéis (glass cards) ── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 20px;
  margin-bottom: 20px;
}

.panel-soft { background: rgba(9, 58, 66, 0.45); }

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  flex: none;
}

/* ── Alertas ── */
.alert {
  border-radius: var(--r-input);
  border: 1px solid rgba(255, 122, 125, 0.4);
  background: rgba(255, 122, 125, 0.1);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.alert.alert-info {
  border-color: rgba(245, 163, 64, 0.4);
  background: rgba(245, 163, 64, 0.1);
  color: var(--warning);
}
.alert.alert-success {
  border-color: rgba(18, 210, 115, 0.4);
  background: rgba(18, 210, 115, 0.1);
  color: var(--brand);
}

/* ── Formulário de login ── */
.login-form { display: grid; gap: 14px; }

.field { display: grid; gap: 6px; }

.field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.field input {
  font-family: inherit;
  font-size: 15px;
  color: var(--text-main);
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-input);
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
.field input::placeholder { color: rgba(238, 246, 244, 0.35); }
.field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(18, 210, 115, 0.18);
}
.field input.invalid { border-color: var(--danger); }

/* ── Botões ── */
.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--r-btn);
  padding: 13px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s ease, filter 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-brand {
  background: var(--brand);
  color: var(--ink); /* texto sobre verde = ink */
  box-shadow: 0 6px 18px rgba(18, 210, 115, 0.3);
}
.btn-brand:hover:not(:disabled) { filter: brightness(1.06); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--line);
  font-size: 13px;
  padding: 9px 16px;
}
.btn-ghost:hover { color: var(--text-main); border-color: var(--text-muted); }

/* Vagas extras de corretor (portal — dono da imobiliária) */
.seats-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--bg-glass-input, rgba(255, 255, 255, 0.03));
}
.seats-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seats-title { font-size: 15px; font-weight: 700; color: var(--text-main); }
.seats-count {
  min-width: 32px; height: 32px; padding: 0 10px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--brand); color: var(--ink, #05343b);
}
.seats-desc { margin: 10px 0 14px; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.seats-actions { display: flex; gap: 10px; }
.seats-actions .btn { flex: 1; }

.btn-block { width: 100%; }

.auth-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
}
.auth-hint a { color: var(--brand); font-weight: 700; text-decoration: none; }
.auth-hint a:hover { text-decoration: underline; }

/* ── Usuário logado ── */
.user-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex: none;
}

.user-info {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.user-name {
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  background: rgba(18, 210, 115, 0.12);
  border: 1px solid rgba(18, 210, 115, 0.3);
  border-radius: var(--r-pill);
  padding: 2px 10px;
}

.user-agency { font-size: 12px; color: var(--text-muted); }
.user-agency strong { color: var(--text-main); }

/* ── Seletor de categoria (segmentado) ── */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  padding: 4px;
  margin-bottom: 18px;
}

.segmented-item {
  flex: 1 1 auto;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--r-pill);
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.segmented-item:hover { color: var(--text-main); }
.segmented-item.active {
  color: var(--ink);
  background: var(--brand);
}

/* A nota de vagas de imobiliária só aparece na vitrine de imobiliária. */
.agency-only { display: none; }
body.agency-active .agency-only { display: inline; }
body.boost-mode .agency-only { display: none; }

/* ── Planos ── */
.plans-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 0;
}

.plans-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 20px 0 12px;
}
.plans-group-title:first-child { margin-top: 0; }

.plans-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.plan-card {
  background: var(--card-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.plan-card.featured { border-color: rgba(18, 210, 115, 0.45); }

.plan-flag {
  position: absolute;
  top: -10px;
  right: 16px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--brand);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 3px 10px;
}

.plan-name { font-size: 16px; font-weight: 700; }

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.plan-price .amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand);
}
.plan-price .period { font-size: 13px; color: var(--text-muted); }

.plan-perks {
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.plan-perks li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.plan-perks svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
  flex: none;
  margin-top: 2px;
}

.plan-note {
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.plans-footnote {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 18px;
}
.plans-footnote strong { color: var(--text-main); }

/* ── Como funciona ── */
.how-list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.how-list strong { color: var(--text-main); }

/* ── Rodapé ── */
.site-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

/* ── Overlay / spinner ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 38, 44, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.overlay-card {
  background: var(--card-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-float);
  padding: 32px 28px;
  text-align: center;
  max-width: 340px;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.overlay-card h3 { font-size: 18px; font-weight: 700; }
.overlay-card p { font-size: 13px; color: var(--text-muted); }

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(18, 210, 115, 0.2);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Páginas de retorno (success / failure) ── */
.result-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 40px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.result-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.result-icon svg { width: 34px; height: 34px; }
.result-icon.ok { background: rgba(18, 210, 115, 0.15); color: var(--brand); }
.result-icon.fail { background: rgba(255, 122, 125, 0.12); color: var(--danger); }

.result-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.result-card p { font-size: 14px; color: var(--text-muted); }
.result-card .btn { margin-top: 8px; }

.result-hint {
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  width: 100%;
}
.result-hint a { color: var(--brand); font-weight: 700; text-decoration: none; }

/* ── Responsivo ── */
@media (min-width: 640px) {
  .page { padding: 32px 24px 64px; }
  .hero h1 { font-size: 34px; }
  .panel { padding: 26px; }
  .plans-grid { grid-template-columns: 1fr 1fr; }
  .login-form {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.6s; }
  .btn, .field input { transition: none; }
}
