/* ============================================================
   EB Academy — Design System
   Paleta oficial + Montserrat (títulos) / Inter (corpo)
   Estética: dark refinado, acentos em gold, alta legibilidade
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Superfícies */
  --bg: #0D0D0D;
  --surface-1: #1C1C1C;
  --surface-2: #242424;
  --border: #2A2A2A;

  /* Gold */
  --gold: #C8A96E;
  --gold-dim: #9A7A4A;
  --gold-bg: rgba(200, 169, 110, 0.08);
  --gold-glow: rgba(200, 169, 110, 0.18);

  /* Frente EB Marketing (acento cobre — validar com Elias no mockup) */
  --copper: #C87B4E;
  --copper-dim: #9A5E3C;
  --copper-bg: rgba(200, 123, 78, .08);
  --copper-glow: rgba(200, 123, 78, .18);

  /* Texto */
  --text: #F5F5F3;
  --text-2: #888880;
  --text-3: #555550;

  /* Feedback */
  --danger: #E06A5A;
  --danger-bg: rgba(224, 106, 90, 0.10);
  --success: #6FA86F;
  --success-bg: rgba(111, 168, 111, 0.10);

  /* Forma */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
  --shadow-soft: 0 8px 30px -12px rgba(0, 0, 0, 0.6);

  /* Tipografia */
  --font-title: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --maxw: 1180px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Atmosfera: brilho gold sutil no topo + grão */
  background-image:
    radial-gradient(1100px 600px at 50% -15%, var(--gold-glow), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(200,169,110,0.05), transparent 55%);
  background-attachment: fixed;
}

/* Grão sutil sobre o fundo (não captura cliques) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 600; letter-spacing: -0.01em; color: var(--text); line-height: 1.18; }
.eyebrow {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand__mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  background: var(--gold-bg);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  box-shadow: inset 0 0 18px rgba(200,169,110,0.10);
}
.brand__name { font-family: var(--font-title); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.02em; }
.brand__name span { color: var(--gold); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 0.8rem 1.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn--primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #1a1407;
  box-shadow: 0 10px 26px -12px var(--gold-glow);
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 14px 32px -10px var(--gold-glow); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover:not(:disabled) { border-color: var(--gold-dim); color: var(--gold); background: var(--gold-bg); }

.btn--block { width: 100%; }
.btn--sm { padding: 0.55rem 0.9rem; font-size: 0.82rem; }

.btn__spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(26,20,7,0.35);
  border-top-color: #1a1407;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: 0.7; }

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

/* ---------- Campos ---------- */
.field { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.05rem; text-align: left; }
.field label {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--text-2);
}
.input, .textarea, .select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.8rem 0.95rem;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px var(--gold-bg);
  background: #262626;
}
.textarea { resize: vertical; min-height: 110px; }
.select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888880' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.4rem;
}

.field-link { font-size: 0.82rem; color: var(--gold); transition: color .15s ease; }
.field-link:hover { color: var(--text); }

/* ---------- Mensagens / alerts ---------- */
.alert {
  display: none;
  align-items: flex-start; gap: 0.6rem;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-size: 0.86rem;
  margin-bottom: 1rem;
  line-height: 1.45;
  text-align: left;
}
.alert.is-visible { display: flex; animation: fade-in .25s ease; }
.alert--error { background: var(--danger-bg); color: #f0a99e; border: 1px solid rgba(224,106,90,0.25); }
.alert--success { background: var(--success-bg); color: #a6d0a6; border: 1px solid rgba(111,168,111,0.25); }

/* ---------- Card / superfícies ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* ---------- Badges (status / categoria) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--surface-2);
}
.badge--gold { color: var(--gold); border-color: var(--gold-dim); background: var(--gold-bg); }

/* ============================================================
   AUTENTICAÇÃO (login / recuperação)
   ============================================================ */
.auth {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 1.5rem;
}
.auth__card {
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, var(--surface-1), #161616);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 2.6rem 2.2rem 2.2rem;
  text-align: center;
  animation: rise .5s cubic-bezier(.2,.7,.2,1) both;
}
.auth__brand { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; margin-bottom: 1.8rem; }
.auth__title { font-size: 1.35rem; margin-bottom: 0.3rem; }
.auth__subtitle { color: var(--text-2); font-size: 0.9rem; margin-bottom: 1.8rem; }
.auth__footer { margin-top: 1.6rem; font-size: 0.8rem; color: var(--text-3); }
.auth__hr { height: 1px; background: var(--border); border: 0; margin: 1.5rem 0; }

/* alterna entre formulários (login / esqueci senha) */
[data-view] { display: none; }
[data-view].is-active { display: block; animation: fade-in .3s ease; }

/* ============================================================
   APP SHELL (dashboard e seções internas)
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.2rem);
  background: rgba(13,13,13,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar__nav { display: flex; align-items: center; gap: 0.3rem; }
.navlink {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.86rem;
  color: var(--text-2);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: color .15s ease, background .15s ease;
}
.navlink:hover { color: var(--text); background: var(--surface-2); }
.navlink.is-active { color: var(--gold); background: var(--gold-bg); }

.topbar__user { display: flex; align-items: center; gap: 0.7rem; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-bg); border: 1px solid var(--gold-dim);
  color: var(--gold); font-family: var(--font-title); font-weight: 600; font-size: 0.85rem;
}
.user-email { font-size: 0.82rem; color: var(--text-2); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shell { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: clamp(1.6rem, 5vw, 3rem) clamp(1rem, 4vw, 2.2rem) 4rem; }

.page-head { margin-bottom: 2.2rem; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0.5rem 0 0.4rem; }
.page-head p { color: var(--text-2); max-width: 60ch; }

/* Grid de seções no dashboard */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.tile {
  position: relative;
  display: flex; flex-direction: column; gap: 0.7rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  animation: rise .5s cubic-bezier(.2,.7,.2,1) both;
}
.tile::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 160px at 100% 0%, var(--gold-bg), transparent 70%);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.tile:hover { transform: translateY(-4px); border-color: var(--gold-dim); box-shadow: var(--shadow); }
.tile:hover::after { opacity: 1; }
.tile__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--gold-bg); border: 1px solid var(--border); color: var(--gold);
}
.tile__icon svg { width: 22px; height: 22px; }
.tile h3 { font-size: 1.1rem; }
.tile p { color: var(--text-2); font-size: 0.88rem; }
.tile__cta { margin-top: auto; color: var(--gold); font-family: var(--font-title); font-weight: 600; font-size: 0.84rem; display: inline-flex; align-items: center; gap: 0.4rem; transition: gap .18s ease; }
.tile:hover .tile__cta { gap: 0.7rem; }

.tile--admin { border-color: var(--gold-dim); background: linear-gradient(160deg, var(--gold-bg), var(--surface-1)); }

/* stagger das entradas */
.tile:nth-child(1){animation-delay:.04s}
.tile:nth-child(2){animation-delay:.10s}
.tile:nth-child(3){animation-delay:.16s}
.tile:nth-child(4){animation-delay:.22s}
.tile:nth-child(5){animation-delay:.28s}

/* ---------- Tela de carregando (guarda de rota) ---------- */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .3s ease;
}
.boot.is-hidden { opacity: 0; pointer-events: none; }
.boot__spinner {
  width: 30px; height: 30px;
  border: 2.5px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ---------- Animações ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Utilidades ---------- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; }
.row { display: flex; align-items: center; gap: 0.6rem; }
.spread { justify-content: space-between; }

/* ============================================================
   TOOLBAR / FILTROS / BUSCA (roadmap, glossário, biblioteca)
   ============================================================ */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem;
  margin-bottom: 1.6rem;
}
.toolbar .select { width: auto; min-width: 150px; }
.toolbar__spacer { flex: 1 1 auto; }
.results-count { font-size: 0.82rem; color: var(--text-3); margin-bottom: 1rem; }

.searchbox { position: relative; flex: 1 1 280px; min-width: 220px; }
.searchbox .input { padding-left: 2.5rem; }
.searchbox svg {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--text-3); pointer-events: none;
}

/* ============================================================
   ROADMAP — lista de sugestões
   ============================================================ */
.list { display: flex; flex-direction: column; gap: 0.9rem; }

.sug {
  display: flex; gap: 1.1rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  transition: border-color .18s ease, transform .18s ease;
  animation: rise .4s ease both;
}
.sug:hover { border-color: #353535; }

.votebtn {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  min-width: 58px;
  padding: 0.6rem 0.4rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-family: var(--font-title);
  transition: all .16s ease;
  align-self: flex-start;
}
.votebtn:hover:not(:disabled) { border-color: var(--gold-dim); color: var(--gold); }
.votebtn svg { width: 18px; height: 18px; }
.votebtn .count { font-size: 1.05rem; font-weight: 700; line-height: 1; }
.votebtn .label { font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; }
.votebtn.is-voted { background: var(--gold-bg); border-color: var(--gold); color: var(--gold); }
.votebtn:disabled { opacity: 0.6; cursor: progress; }

.sug__body { flex: 1 1 auto; min-width: 0; }
.sug__top { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.sug__title { font-size: 1.05rem; margin-bottom: 0.3rem; word-wrap: break-word; }
.sug__desc { color: var(--text-2); font-size: 0.9rem; white-space: pre-wrap; word-wrap: break-word; }
.sug__meta { margin-top: 0.7rem; font-size: 0.76rem; color: var(--text-3); }
.sug__notes {
  margin-top: 0.85rem; padding: 0.7rem 0.9rem;
  background: var(--gold-bg); border-left: 2px solid var(--gold-dim);
  border-radius: 8px; font-size: 0.85rem; color: var(--text);
}
.sug__notes strong { color: var(--gold); font-family: var(--font-title); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; display: block; margin-bottom: 0.25rem; }

/* Cores de status nos badges */
.badge[data-status="aberta"]       { color: var(--text-2); }
.badge[data-status="em_analise"]   { color: #7FA8CC; border-color: #34465a; background: rgba(127,168,204,0.08); }
.badge[data-status="planejada"]    { color: #9F8FD0; border-color: #463f5e; background: rgba(159,143,208,0.08); }
.badge[data-status="em_progresso"] { color: var(--gold); border-color: var(--gold-dim); background: var(--gold-bg); }
.badge[data-status="concluida"]    { color: #84C384; border-color: #34522f; background: var(--success-bg); }
.badge[data-status="recusada"]     { color: #D0938A; border-color: #5a3a34; background: var(--danger-bg); }

/* ============================================================
   ESTADO VAZIO
   ============================================================ */
.empty {
  text-align: center; padding: 3.5rem 1rem; color: var(--text-3);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty svg { width: 38px; height: 38px; margin-bottom: 0.8rem; color: var(--text-3); opacity: 0.6; }
.empty h3 { color: var(--text-2); font-weight: 500; margin-bottom: 0.3rem; }

.loading-row { text-align: center; padding: 2.5rem; color: var(--text-3); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: none; place-items: center; padding: 1.4rem;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
}
.modal-overlay.is-open { display: grid; animation: fade-in .2s ease; }
.modal {
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.8rem;
  animation: rise .3s cubic-bezier(.2,.7,.2,1) both;
}
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.modal__head h2 { font-size: 1.25rem; }
.modal__head p { color: var(--text-2); font-size: 0.86rem; margin-top: 0.25rem; }
.modal__close {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
  display: grid; place-items: center; transition: all .15s ease;
}
.modal__close:hover { color: var(--text); border-color: var(--gold-dim); }
.modal__foot { display: flex; gap: 0.7rem; justify-content: flex-end; margin-top: 1.5rem; }

/* Detalhe do termo (glossário) */
.term-cat { margin-bottom: 1rem; }
.term-def { color: var(--text); line-height: 1.7; white-space: pre-wrap; }

/* ============================================================
   GLOSSÁRIO / BIBLIOTECA — grades de cards
   ============================================================ */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.9rem; }

.term-card {
  text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
  display: flex; flex-direction: column; gap: 0.5rem;
  animation: fade-in .3s ease both;
}
.term-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); background: var(--surface-2); }
.term-card h3 { font-size: 1.02rem; }
.term-card p { color: var(--text-2); font-size: 0.84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Cartão de artigo (biblioteca) */
.article-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.3rem;
  display: flex; flex-direction: column; gap: 0.55rem;
  animation: fade-in .3s ease both;
}
.article-card__title { font-size: 1.02rem; line-height: 1.35; }
.article-card__summary {
  font-size: 0.9rem; color: var(--text-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card__meta { font-size: 0.84rem; color: var(--text-2); }
.article-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: auto; padding-top: 0.35rem; }
.article-card__more { font-size: 0.82rem; color: var(--gold); white-space: nowrap; }
.article-card--clickable { cursor: pointer; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.article-card--clickable:hover { border-color: var(--gold-dim); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.35); }
.article-card--clickable:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.modal__summary { color: var(--text); line-height: 1.65; font-size: 0.95rem; white-space: pre-wrap; }
.article-card__badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.article-card__link {
  margin-top: 0.4rem; align-self: flex-start;
  color: var(--gold); font-family: var(--font-title); font-weight: 600; font-size: 0.82rem;
  display: inline-flex; align-items: center; gap: 0.4rem; transition: gap .15s ease;
}
.article-card__link:hover { gap: 0.65rem; }
.article-card__link svg { width: 14px; height: 14px; }

/* ============================================================
   ADMIN — abas, formulários e linhas de gestão
   ============================================================ */
.btn--danger { background: var(--danger-bg); color: #f0a99e; border-color: rgba(224,106,90,0.3); }
.btn--danger:hover:not(:disabled) { background: rgba(224,106,90,0.18); color: #f5c2b9; }

.tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--border); margin-bottom: 1.8rem; overflow-x: auto; }
.tab {
  background: none; border: none;
  padding: 0.8rem 1.1rem;
  font-family: var(--font-title); font-weight: 600; font-size: 0.9rem;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--gold); border-bottom-color: var(--gold); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade-in .25s ease; }

.section-title { font-size: 1.05rem; margin: 1.6rem 0 0.9rem; }
.section-title:first-child { margin-top: 0; }

/* Formulário de cadastro (add) */
.add-form {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1.8rem;
}
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }
.form-grid .field.col-span { grid-column: 1 / -1; }

/* Linha de item gerenciável */
.admin-row {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 0.7rem;
}
.admin-row__main { flex: 1 1 auto; min-width: 0; }
.admin-row__title { font-family: var(--font-title); font-weight: 600; font-size: 0.98rem; word-wrap: break-word; }
.admin-row__sub { color: var(--text-2); font-size: 0.84rem; margin-top: 0.2rem; word-wrap: break-word; }
.admin-row__actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }

/* Bloco de gestão de sugestão */
.admin-sug { display: block; }
.admin-sug__controls { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: flex-end; margin-top: 0.9rem; }
.admin-sug__controls .field { margin-bottom: 0; }
.admin-sug__controls .select { min-width: 180px; }
.admin-sug__notes { flex: 1 1 260px; }
.admin-sug__notes .textarea { min-height: 60px; }

.admin-list { max-height: 70vh; overflow-y: auto; padding-right: 0.3rem; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .admin-sug__controls .select { min-width: 0; width: 100%; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 640px) {
  .topbar__nav .navlink span { display: none; }
  .user-email { display: none; }
  .auth__card { padding: 2rem 1.4rem; }
  .toolbar .select { flex: 1 1 100%; min-width: 0; }
  .sug { padding: 1rem; gap: 0.8rem; }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   QUIZ — editor (admin) e prova (aluno)
   ============================================================ */
.shell--narrow { max-width: 760px; }

/* Editor no admin */
.quiz-edit {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; margin-bottom: 1rem;
}
.quiz-edit__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.quiz-edit__num { font-family: var(--font-title); font-weight: 600; font-size: 0.9rem; color: var(--gold); }
.quiz-edit .js-q { width: 100%; min-height: 56px; margin-bottom: 0.8rem; }
.quiz-edit__opts { display: flex; flex-direction: column; gap: 0.55rem; }
.quiz-edit__opt { display: flex; align-items: center; gap: 0.7rem; }
.quiz-edit__opt input[type="radio"] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--gold); cursor: pointer; }
.quiz-edit__opt .js-opt { flex: 1; }

/* Prova do aluno */
.quiz-q {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.2rem 1.3rem; margin-bottom: 1rem;
}
.quiz-q__title { font-weight: 600; line-height: 1.4; margin-bottom: 0.9rem; }
.quiz-q__opts { display: flex; flex-direction: column; gap: 0.55rem; }
.quiz-opt {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.quiz-opt:hover { border-color: var(--gold-dim); }
.quiz-opt input[type="radio"] { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--gold); cursor: pointer; }
.quiz-opt__txt { line-height: 1.4; }
.quiz-opt.is-correct { border-color: #3a7d44; background: rgba(58,125,68,0.12); }
.quiz-opt.is-wrong { border-color: #9e3b3b; background: rgba(158,59,59,0.12); }

.quiz-result { text-align: center; margin-top: 1.4rem; padding: 1.4rem; background: var(--surface-1); border: 1px solid var(--gold-dim); border-radius: var(--radius-sm); }
.quiz-result__score { font-family: var(--font-title); font-size: 2.2rem; font-weight: 600; color: var(--gold); }
.quiz-result__pct { color: var(--text-2); margin-top: 0.2rem; }

.quiz-progress { font-family: var(--font-title); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--gold); text-transform: uppercase; margin-bottom: 0.8rem; }
.quiz-explain {
  margin-top: 0.9rem; padding: 0.85rem 1rem;
  background: var(--gold-bg); border: 1px solid var(--gold-dim); border-radius: var(--radius-sm);
  font-size: 0.9rem; line-height: 1.55; color: var(--text);
}
.quiz-explain strong { color: var(--gold); }

/* ===== Vitrine Viva (2026-07) ===== */

/* Hero FPC */
.hero-fpc { background: linear-gradient(135deg, var(--surface-1), var(--surface-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; margin-bottom: 2rem; position: relative; overflow: hidden; }
.hero-fpc::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 200px at 20% 0%, var(--gold-glow), transparent 70%); pointer-events: none; }
.hero-fpc .eyebrow { color: var(--gold); }
.hero-fpc h2 { font-family: var(--font-title); font-size: 1.5rem; margin: .3rem 0 .4rem; }
.hero-fpc > p { color: var(--text-2); max-width: 560px; margin-bottom: 1.2rem; }
.hero-fpc__tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; position: relative; }
.hero-tool { display: flex; flex-direction: column; gap: .35rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .85rem .9rem; color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.hero-tool:hover { border-color: var(--gold-dim); transform: translateY(-2px); box-shadow: 0 6px 18px var(--gold-glow); }
.hero-tool strong { font-family: var(--font-title); font-size: .92rem; font-weight: 600; }
.hero-tool span { font-size: .78rem; color: var(--text-2); }

/* Portais das frentes */
.frentes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2.2rem; }
@media (max-width: 760px) { .frentes { grid-template-columns: 1fr; } }
.portal { display: block; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.portal:hover { border-color: var(--gold-dim); transform: translateY(-2px); box-shadow: 0 8px 22px var(--gold-glow); }
.portal .eyebrow { display: block; margin-bottom: .25rem; }
.portal h3 { font-family: var(--font-title); font-size: 1.15rem; margin-bottom: .3rem; }
.portal p { font-size: .88rem; color: var(--text-2); }
.portal--marketing .eyebrow { color: var(--copper); }
.portal--marketing:hover { border-color: var(--copper-dim); box-shadow: 0 8px 22px var(--copper-glow); }

/* Faixa "Chegou esta semana" */
.fresh-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; margin-bottom: 2.2rem; }
.fresh-card { display: block; background: var(--surface-1); border: 1px solid var(--border); border-left: 3px solid var(--gold-dim); border-radius: var(--radius-sm); padding: .9rem 1rem; color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.fresh-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.fresh-card .fresh-card__tag { display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); margin-bottom: .35rem; font-weight: 600; }
.fresh-card h4 { font-family: var(--font-body); font-weight: 600; font-size: .9rem; line-height: 1.35; }

/* Contadores */
.stats-row { display: flex; flex-wrap: wrap; gap: 2rem; padding: 1rem 1.2rem; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 2.2rem; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-family: var(--font-title); font-size: 1.35rem; color: var(--gold); }
.stat span { font-size: .78rem; color: var(--text-2); }

/* Tiles compactos */
.tiles--compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.tiles--compact .tile { display: flex; align-items: center; gap: .7rem; padding: .8rem .95rem; }
.tiles--compact .tile .tile__icon { width: 34px; height: 34px; margin: 0; flex-shrink: 0; }
.tiles--compact .tile h3 { font-size: .9rem; margin: 0; }
.tiles--compact .tile p, .tiles--compact .tile .tile__cta { display: none; }

/* Skeleton loading */
.skeleton { border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-2) 50%, var(--surface-1) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.4s infinite; min-height: 84px; border: 1px solid var(--border); }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Selo de citações (esteira: fila do admin + card do aluno) */
.badge-citacoes {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 600;
  color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  border-radius: 999px; padding: .12rem .5rem;
}
