:root {
  --purple: #4F5BD5;
  --purple-dark: #3d47ad;
  --green: #2fae2c;
  --green-dark: #259122;
  --bg: #f3f4f7;
  --card-bg: #ffffff;
  --text: #1c1d21;
  --text-muted: #6b6f76;
  --border: #e3e4ea;
  --danger: #e5484d;
  --warn: #e2a63a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  background: var(--purple);
  color: #fff;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar a.back {
  color: #fff;
  text-decoration: none;
  font-size: 1.3rem;
  line-height: 1;
}

.topbar h1 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
}

/* --- Cabeçalho da home (avatar + saudação) --- */

.topbar-home {
  padding: 22px 20px 26px;
  align-items: center;
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.avatar-link {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.avatar-edit-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--purple);
}

.topbar-greeting {
  display: flex;
  flex-direction: column;
}

.greeting-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.greeting-name {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

/* --- Tela de Perfil --- */

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 8px 0 26px;
}

.profile-avatar-wrap {
  margin-bottom: 4px;
}

.profile-avatar-link {
  display: block;
  cursor: pointer;
}

.profile-avatar-img {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(20, 20, 40, 0.15);
}

.profile-avatar-placeholder {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple);
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(20, 20, 40, 0.15);
}

.change-photo-btn {
  display: inline-block;
  color: var(--purple);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 4px 10px;
  margin-bottom: 6px;
}

.change-photo-btn:hover {
  text-decoration: underline;
}

.profile-name {
  margin: 6px 0 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.profile-email {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.plan-box {
  background: #ececf7;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 22px;
}

.plan-box-label {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--purple);
}

.plan-box-value {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 700;
}

.plan-box .btn-pill {
  margin-bottom: 0;
}

.course-select-box {
  position: relative;
  margin-bottom: 22px;
}

.course-select-box select {
  width: 100%;
  padding: 14px 40px 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
}

.course-select-box select:disabled {
  color: var(--text);
  opacity: 1;
  cursor: default;
}

.course-select-chevron {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 20px;
}

.account-row-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.account-row-label {
  flex: 1;
  font-size: 1rem;
}

/* --- Tela de Segurança (SMS / App Autenticador) --- */

.security-method-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.security-method-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 1.05rem;
}

.security-method-desc {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.security-details {
  margin-bottom: 16px;
}

.security-details summary {
  cursor: pointer;
  color: var(--purple);
  font-weight: 600;
  font-size: 0.85rem;
  list-style: none;
}

.security-details summary::-webkit-details-marker {
  display: none;
}

.security-details summary::after {
  content: " ›";
}

.security-details[open] summary::after {
  content: " ‹";
}

.security-details p {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.security-active-tag {
  color: var(--green);
  font-weight: 600;
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.deactivate-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  padding: 10px;
  cursor: pointer;
}

.deactivate-link:hover {
  text-decoration: underline;
}

/* --- Cadastro de novo deck (Meus Decks) --- */

.deck-form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.form-level {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.form-level-title {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 0.95rem;
}

.level-toggle {
  display: flex;
  background: #ececf4;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}

.level-toggle-btn {
  flex: 1;
  border: none;
  background: none;
  padding: 8px 0;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.level-toggle-btn.is-active {
  background: #fff;
  color: var(--purple);
  box-shadow: 0 1px 3px rgba(20, 20, 40, 0.12);
}

.level-toggle-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.level-existing select,
.level-new input {
  width: 100%;
}

.deck-form .auth-field {
  margin-bottom: 14px;
}

.deck-form .auth-field:last-child {
  margin-bottom: 0;
}

.deck-form-hint {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.deck-form-hint a {
  color: var(--purple);
  font-weight: 600;
}

/* --- Modal genérico (usado por "Adicionar Card" e outros) --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 20px;
}

.modal-box {
  background: #fff;
  border-radius: 18px;
  padding: 26px 24px;
  max-width: 420px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-title {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.modal-success {
  background: #e3f7e3;
  color: #1f7a1f;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.modal-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0 0 14px;
}

.modal-box .btn-pill {
  margin-bottom: 0;
}

.modal-box .auth-field {
  margin-bottom: 14px;
}

/* --- Linhas de card no painel de administração do deck --- */

.card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.card-row:last-child {
  border-bottom: none;
}

.card-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.card-edit-btn,
.card-delete-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: #f2f2f5;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
}

.card-delete-btn {
  color: var(--danger);
}

.card-edit-btn:hover,
.card-delete-btn:hover {
  background: #e6e6ec;
}

/* --- Tags de propriedade (Sistema / Seu) --- */

.owner-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}

.owner-tag-system {
  background: #ececf4;
  color: var(--text-muted);
}

.owner-tag-mine {
  background: #e6e3fb;
  color: var(--purple);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 96px;
}

.search-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  border: none;
  background: #e8e9ee;
  font-size: 1rem;
  margin-bottom: 18px;
}

.row-list {
  background: var(--card-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 20, 40, 0.06);
}

.row-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.row-item:last-child { border-bottom: none; }

.row-item:hover { background: #f8f8fb; }

.row-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.row-main { flex: 1; min-width: 0; }

.row-title { font-size: 1.02rem; font-weight: 500; margin: 0 0 2px; }

.row-sub { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

.row-chevron { color: #b3b5bf; font-size: 1.1rem; }

.section-label {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 22px 0 10px;
}

.btn-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border-radius: 999px;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 14px;
}

.btn-study { background: var(--purple); }
.btn-study:hover { background: var(--purple-dark); }

.btn-listen { background: var(--green); }
.btn-listen:hover { background: var(--green-dark); }

.btn-review { background: var(--danger); }
.btn-review:hover { background: #c53337; }

.btn-interact { background: #8a5cf6; }
.btn-interact:hover { background: #7343e0; }

.review-panel {
  background: #ececf7;
  border-radius: 18px;
  padding: 22px 20px;
  margin-bottom: 20px;
}

.review-panel-title {
  color: var(--purple);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.review-panel-text {
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.4;
}

.review-panel .btn-pill { margin-bottom: 0; }

.review-count-badge {
  background: var(--danger);
  font-size: 0.9rem;
}

.stat-bar {
  background: #e8e9ee;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}

.deck-meta {
  margin-top: 26px;
  font-size: 1.02rem;
}

.deck-meta strong { color: var(--purple); }

.deck-meta .ok { color: var(--green); font-weight: 700; }

/* --- Study screen --- */

.study-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 6px;
}

.progress-label {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.flashcard {
  width: 100%;
  min-height: 260px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(20, 20, 40, 0.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  font-size: 1.25rem;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.flashcard .face-label {
  position: absolute;
  top: 14px;
  left: 18px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

#card-text {
  white-space: pre-line;
}

.card-image {
  max-width: 100%;
  max-height: 160px;
  border-radius: 12px;
  object-fit: contain;
  margin-bottom: 14px;
}

.flashcard.is-back { background: #fbfaff; }

.hint {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.speak-btn {
  border: none;
  background: var(--green);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(47, 174, 44, 0.4);
}

.speak-btn.is-active { background: var(--green-dark); }

.grade-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.grade-btn {
  flex: 1;
  padding: 14px 6px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  cursor: pointer;
}

.grade-erro { background: var(--danger); }
.grade-duvida { background: var(--warn); }
.grade-acerto { background: var(--green); }

.grade-btn.is-suggested {
  box-shadow: 0 0 0 3px #fff inset, 0 0 0 3px currentColor;
  transform: scale(1.04);
}

.answer-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-box textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  background: #fff;
}

.answer-box textarea:focus {
  outline: none;
  border-color: var(--purple);
}

.answer-box textarea:disabled {
  background: #f2f2f5;
  color: var(--text-muted);
}

.feedback-box {
  width: 100%;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
}

.feedback-score {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.feedback-message {
  margin: 0;
  font-size: 0.92rem;
}

.fb-good { background: #e3f7e3; color: #1f7a1f; }
.fb-mid { background: #fdf3d9; color: #8a6100; }
.fb-bad { background: #fbe4e4; color: #a3262a; }

.nav-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 4px;
}

.nav-btn {
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
}

.nav-btn:disabled { opacity: 0.4; cursor: default; }

.done-box {
  text-align: center;
  padding: 40px 20px;
}

.done-box h2 { margin-bottom: 8px; }

.empty-box {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
}

/* --- Rodapé (bottom nav) --- */

.bottombar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  flex: 1;
  min-width: 0;
  padding: 2px 2px;
  text-align: center;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nav-item.is-active {
  color: var(--purple);
  font-weight: 600;
}

.nav-icon-wrap {
  position: relative;
  display: inline-flex;
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -9px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* --- Info box (Sobre) --- */

.info-box {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 1px 2px rgba(20, 20, 40, 0.06);
}

.info-box h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.info-box p {
  margin: 0 0 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.info-box p:last-child {
  margin-bottom: 0;
}

/* --- Premium: banner na home --- */

.premium-banner {
  background: #ececf7;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.premium-banner-title {
  margin: 0 0 2px;
  font-weight: 600;
  color: var(--text);
}

.premium-banner-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.premium-banner-btn {
  background: var(--purple);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.premium-banner-btn:hover {
  background: var(--purple-dark);
}

/* --- Premium: tela de planos --- */

.premium-intro {
  color: var(--text-muted);
  margin: 0 0 18px;
}

.premium-benefits-title {
  font-weight: 700;
  margin: 0 0 14px;
}

.premium-benefits-row {
  display: flex;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.premium-benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  flex: 1 1 30%;
  min-width: 140px;
}

.premium-benefit-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ece9fd;
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.premium-benefit-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.plan-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  cursor: pointer;
}

.plan-card.is-selected {
  border-color: var(--purple);
  background: #f4f3fd;
}

.plan-card input[type="radio"] {
  order: 3;
  width: 22px;
  height: 22px;
  accent-color: var(--purple);
  flex-shrink: 0;
}

.plan-card-main {
  flex: 1;
  min-width: 0;
}

.plan-card-name {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
}

.plan-card-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.plan-savings {
  display: inline-block;
  margin-top: 8px;
  background: #e3f7e3;
  color: #1f7a1f;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.plan-card-price {
  text-align: right;
  white-space: nowrap;
}

.plan-price-value {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.plan-price-period {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.premium-checkout {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.premium-checkout-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.premium-checkout-row .align-right {
  text-align: right;
}

.premium-checkout-label {
  margin: 0 0 2px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.premium-checkout-value {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.premium-disclaimer {
  margin: 16px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* --- Autenticação (login/cadastro) --- */

.auth-wrap {
  max-width: 420px;
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 4px;
}

.auth-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.auth-brand-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}

.auth-brand-tagline {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin: 0;
}

.auth-tabs {
  display: flex;
  background: #ececf4;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.auth-tab.is-active {
  background: #fff;
  color: var(--purple);
  box-shadow: 0 1px 3px rgba(20, 20, 40, 0.12);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

.auth-input:focus {
  outline: none;
  border-color: var(--purple);
}

.auth-field-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin: 4px 0 0;
}

.auth-error {
  background: #fbe4e4;
  color: #a3262a;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.auth-switch {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.auth-switch a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}

/* --- Auth: layout de duas colunas com painel explicativo --- */

.auth-wrap {
  max-width: 420px;
  margin: 0 auto;
}
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 8px;
}

.google-btn:hover {
  background: #f8f8fb;
}

.google-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.google-placeholder-msg {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 8px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 18px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Banner fixo de instalação (PWA) --- */

.install-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 80px;
  max-width: 460px;
  margin: 0 auto;
  background: #24253a;
  color: #fff;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 30;
}

.install-banner.install-banner-no-nav {
  bottom: 16px;
}

.install-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.install-banner-text {
  flex: 1;
  min-width: 0;
}

.install-banner-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
}

.install-banner-sub {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.install-banner-btn {
  background: var(--purple);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.install-banner-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

/* --- Banner de consentimento de cookies (LGPD) --- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(20, 20, 40, 0.08);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 220px;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.cookie-banner-text a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}

.cookie-banner-text a:hover {
  text-decoration: underline;
}

.cookie-banner-btn {
  background: var(--purple);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.cookie-banner-btn:hover {
  background: var(--purple-dark);
}

/* --- Passos de instalação (usados na tela Sobre) --- */

.install-steps {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.install-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.4;
}

.install-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}


/* --- Pergunta "revisar de novo ou já aprendi" (etapa de 7 dias) --- */

.decision-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  margin-top: 14px;
}

.decision-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 1.05rem;
}

.decision-text {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.decision-actions {
  display: flex;
  gap: 10px;
}

.decision-actions .btn-pill {
  flex: 1;
  margin-bottom: 0;
  padding: 14px 8px;
  font-size: 0.95rem;
}

.btn-pill-outline {
  background: #fff;
  border: 2px solid var(--purple);
  color: var(--purple);
}

.btn-pill-outline:hover {
  background: #f0f1fc;
}
