/* =============================================================
   BreveIA — plans.css
   Estilos das páginas /planos e /perfil + modal de upgrade.
   ============================================================= */

/* ---------- HERO/HEADER DAS PÁGINAS ---------- */
.page-hero {
  padding: var(--sp-12) 0 var(--sp-8);
  text-align: center;
}
.page-hero__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--dourado);
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.page-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--azul);
  margin-bottom: var(--sp-3);
}
.page-hero__lead {
  color: var(--texto-secundario);
  font-size: 1.0625rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ============================================================
 * PÁGINA /planos
 * ============================================================ */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5);
  max-width: 880px;
  margin: 0 auto var(--sp-12);
  padding: 0 var(--sp-6);
}

.plan-card {
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan-card--featured {
  border: 2px solid var(--dourado);
  background: linear-gradient(180deg, #FFFCF0 0%, #FFFFFF 40%);
  box-shadow: 0 16px 40px rgba(212,166,60,0.18);
  transform: translateY(-8px);
}

.plan-card__ribbon {
  position: absolute;
  top: -12px;
  right: var(--sp-6);
  background: var(--dourado);
  color: var(--azul-escuro);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
}

.plan-card__name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--texto-secundario);
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.plan-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: var(--sp-2);
}
.plan-card__price-value {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--azul);
  line-height: 1;
}
.plan-card__price-period {
  color: var(--texto-secundario);
  font-size: 1rem;
  font-weight: 500;
}

.plan-card--featured .plan-card__price-value { color: var(--azul); }

.plan-card__description {
  color: var(--texto-secundario);
  font-size: 14px;
  margin-bottom: var(--sp-6);
  line-height: 1.5;
  min-height: 42px;
}

.plan-card__cta {
  margin-bottom: var(--sp-6);
}
.plan-card__cta .btn { width: 100%; }

.plan-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.plan-card__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: 14px;
  color: var(--texto);
  line-height: 1.4;
}
.plan-card__feature-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.plan-card__feature--included .plan-card__feature-icon {
  background: var(--verde-claro);
  color: var(--verde-escuro);
}
.plan-card__feature--excluded {
  color: var(--texto-secundario);
}
.plan-card__feature--excluded .plan-card__feature-icon {
  background: var(--borda-leve);
  color: var(--texto-secundario);
}

/* ---------- FAQ ---------- */
.plans-faq {
  max-width: 720px;
  margin: 0 auto var(--sp-16);
  padding: 0 var(--sp-6);
}
.plans-faq__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--azul);
  text-align: center;
  margin-bottom: var(--sp-6);
}
.faq-item {
  background: var(--superficie);
  border: 1px solid var(--borda-leve);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item[open] { border-color: var(--borda); }
.faq-item summary {
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  font-weight: 600;
  color: var(--texto);
  font-size: 14px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--dourado);
  transition: transform var(--transition);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item__content {
  padding: 0 var(--sp-5) var(--sp-4);
  color: var(--texto-secundario);
  font-size: 14px;
  line-height: 1.55;
}

/* ============================================================
 * PÁGINA /perfil
 * ============================================================ */

.profile-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6) var(--sp-16);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-6);
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-medio) 100%);
  color: #fff;
  border-radius: var(--r-xl);
  margin-bottom: var(--sp-6);
  position: relative;
  overflow: hidden;
}
.profile-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 0%, rgba(212,166,60,0.15), transparent 50%);
  pointer-events: none;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dourado), var(--dourado-claro));
  color: var(--azul-escuro);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  flex-shrink: 0;
  border: 3px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
}
.profile-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-meta {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.profile-meta__name {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}
.profile-meta__email {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--sp-2);
}
.profile-meta__badges {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.profile-meta__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.profile-meta__badge--pro {
  background: var(--dourado);
  color: var(--azul-escuro);
  border-color: var(--dourado);
}

/* ---------- TABS ---------- */
.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--borda);
  margin-bottom: var(--sp-6);
  overflow-x: auto;
  scrollbar-width: thin;
}
.profile-tab {
  padding: var(--sp-3) var(--sp-5);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--texto-secundario);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.profile-tab:hover { color: var(--azul); }
.profile-tab.active {
  color: var(--azul);
  border-bottom-color: var(--dourado);
  font-weight: 600;
}

.profile-tab-panel {
  display: none;
  animation: tab-fade 200ms ease-out;
}
.profile-tab-panel.active { display: block; }
@keyframes tab-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile-section {
  background: var(--superficie);
  border: 1px solid var(--borda-leve);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
}
.profile-section__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--sp-2);
  color: var(--azul);
}
.profile-section__hint {
  font-size: 13px;
  color: var(--texto-secundario);
  margin-bottom: var(--sp-5);
}

/* ---------- FOTO DE PERFIL (UPLOAD) ---------- */
.foto-upload {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border: 1px dashed var(--borda);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
  transition: border-color var(--transition);
}
.foto-upload:hover { border-color: var(--azul-claro); }
.foto-upload__preview {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--borda-leve);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--texto-secundario);
  flex-shrink: 0;
  overflow: hidden;
}
.foto-upload__preview img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.foto-upload__info { flex: 1; }
.foto-upload__info b {
  display: block;
  font-size: 14px;
  color: var(--texto);
  margin-bottom: 2px;
}
.foto-upload__info span {
  font-size: 12px;
  color: var(--texto-secundario);
}
.foto-upload input[type="file"] { display: none; }

/* ---------- PLANO ATUAL (BOX RESUMO) ---------- */
.plan-summary {
  background: linear-gradient(135deg, var(--azul-fundo) 0%, #fff 100%);
  border: 1px solid var(--borda);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.plan-summary--pro {
  background: linear-gradient(135deg, #FFF8E7 0%, #fff 60%);
  border-color: var(--dourado);
}
.plan-summary__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.plan-summary__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--azul);
}
.plan-summary__title .badge { margin-left: var(--sp-2); }
.plan-summary__progress {
  margin-top: var(--sp-3);
}
.progress-track {
  height: 8px;
  background: var(--borda-leve);
  border-radius: var(--r-pill);
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--verde), var(--dourado));
  border-radius: var(--r-pill);
  transition: width 400ms ease-out;
}
.progress-fill--alto    { background: linear-gradient(90deg, var(--verde), var(--verde)); }
.progress-fill--medio   { background: linear-gradient(90deg, var(--dourado), var(--laranja)); }
.progress-fill--baixo   { background: linear-gradient(90deg, var(--laranja), var(--vermelho)); }
.progress-fill--zerado  { background: var(--vermelho); }

.plan-summary__caption {
  display: flex;
  justify-content: space-between;
  margin-top: var(--sp-2);
  font-size: 12px;
  color: var(--texto-secundario);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
 * MODAL DE UPGRADE (genérico, reutilizado em qualquer página)
 * ============================================================ */

.upgrade-modal {
  background: var(--superficie);
  border-radius: var(--r-xl);
  max-width: 520px;
  width: 100%;
  padding: var(--sp-8);
  text-align: center;
}
.upgrade-modal__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dourado-claro), var(--dourado));
  color: var(--azul-escuro);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  font-size: 32px;
}
.upgrade-modal__title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--azul);
  margin-bottom: var(--sp-2);
}
.upgrade-modal__lead {
  color: var(--texto-secundario);
  font-size: 14px;
  margin-bottom: var(--sp-5);
  line-height: 1.55;
}
.upgrade-modal__bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-6);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.upgrade-modal__bullets li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: 14px;
  color: var(--texto);
}
.upgrade-modal__bullets li::before {
  content: '';
  width: 18px; height: 18px;
  flex-shrink: 0;
  background: var(--verde-claro);
  border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23000' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center / 12px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23000' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center / 12px no-repeat;
  margin-top: 1px;
}
.upgrade-modal__actions {
  display: flex;
  gap: var(--sp-3);
}
.upgrade-modal__actions .btn { flex: 1; }

.upgrade-modal__footnote {
  margin-top: var(--sp-4);
  font-size: 11px;
  color: var(--texto-secundario);
  letter-spacing: 0.05em;
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 768px) {
  .plans-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--sp-4);
  }
  .plan-card--featured {
    transform: none;
  }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-meta__badges { justify-content: center; }
}
