/* ============================================================
   OrdemIA · app.css — componentes da área logada
   (login, painel, trilha, leitor, modal, questões, admin)
   ============================================================ */

.view { min-height: calc(100vh - 70px); padding: 52px 0 64px; }

/* ===== Login ===== */

.login-wrap {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 30px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}

.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 30px;
}

.login-error {
  display: none;
  border: 1px solid rgba(199, 93, 93, 0.4);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  background: var(--soft-red);
  color: #8e3b3b;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 800;
}

.login-error.show { display: block; }

.login-ok {
  display: none;
  border: 1px solid rgba(0, 185, 120, 0.35);
  border-left: 5px solid var(--green-strong);
  border-radius: 8px;
  background: var(--soft-green);
  color: var(--green-strong);
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 800;
}

.login-ok.show { display: block; }

.login-link {
  justify-self: start;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
}

.login-link:hover { color: var(--green-strong); }

/* Página de senha: painel único centralizado (sem o aside do login) */
.login-wrap.solo { grid-template-columns: minmax(0, 480px); justify-content: center; }

.demo-hint {
  margin-top: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--soft-blue);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.demo-hint strong { color: var(--navy); }
.demo-hint code {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 12px;
  color: var(--petrol-dark);
  font-weight: 700;
}

.login-aside { display: grid; gap: 12px; }

.aside-line {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.aside-line strong { display: block; color: var(--petrol-dark); font-family: var(--display); font-size: 15px; }
.aside-line span { color: var(--muted); font-size: 13px; }

.row-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--green-strong);
}

.row-icon svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

body.login-page .topbar-inner {
  min-height: 70px;
  grid-template-columns: auto 1fr auto;
  padding: 0;
}

body.login-page .topbar-inner > span:empty {
  display: none;
}

.proto-note {
  margin-top: 26px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.login-view { padding-bottom: 40px; }

.login-social {
  max-width: 980px;
  display: flex;
  justify-content: flex-start;
  margin: 16px auto 0;
}

.login-social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: color .15s ease, transform .15s ease;
}

.login-social-link:hover,
.login-social-link:focus-visible {
  color: var(--green-strong);
  transform: translateY(-1px);
  outline: none;
}

.login-social-link svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Painel ===== */

.hello-band {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--petrol-dark);
  color: #ffffff;
  padding: 26px;
  overflow: hidden;
  position: relative;
}

.hello-band::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 20px;
  width: 170px;
  height: 42px;
  border-top: 7px solid var(--green);
  border-bottom: 2px dashed rgba(255, 255, 255, 0.42);
  transform: rotate(-6deg);
  opacity: 0.7;
}

.hello-band h2 { color: #ffffff; max-width: 640px; }
.hello-band p { max-width: 620px; margin: 10px 0 0; color: #bfd0d1; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 18px;
  align-items: start;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.section-head p { max-width: 640px; margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

.plans-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.plan-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  padding: 22px;
  text-align: left;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.plan-card:hover { transform: translateY(-3px); border-color: var(--green); }
.plan-card h3 { margin-top: 12px; }
.plan-card p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.plan-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.mini-stat {
  border-left: 4px solid var(--green);
  background: #f8fbfa;
  border-radius: 8px;
  padding: 10px;
}

.mini-stat strong { display: block; color: var(--petrol-dark); font-family: var(--display); font-size: 18px; font-weight: 900; }
.mini-stat span { color: var(--muted); font-size: 11px; font-weight: 800; }

.side-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  padding: 22px;
}

.side-panel > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.legend-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 11px 12px;
}

.legend-row strong { display: block; color: var(--petrol-dark); font-size: 13px; }
.legend-row span { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }

.legend-pill {
  margin-top: 2px;
  width: 32px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft-green);
  color: var(--green-strong);
}

.legend-pill svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.legend-pill.q { background: var(--soft-blue); color: var(--navy); }
.legend-pill.r { background: var(--soft-violet); color: var(--violet); }

/* ===== Avisos ===== */

.avisos-wrap { margin-bottom: 26px; }
.avisos-list { display: grid; gap: 10px; }

.aviso-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
}

.aviso-card.material { border-left-color: var(--navy); }
.aviso-card.aviso { border-left-color: var(--gold); }

.aviso-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aviso-date { color: var(--muted); font-size: 11px; font-weight: 800; }

.aviso-chip {
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--soft-green);
  color: var(--green-strong);
}

.aviso-card.material .aviso-chip { background: var(--soft-blue); color: var(--navy); }
.aviso-card.aviso .aviso-chip { background: var(--soft-gold); color: #9a7320; }

.aviso-new {
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--green);
  color: #ffffff;
}

.aviso-title { display: block; margin-top: 7px; color: var(--petrol-dark); font-family: var(--display); font-size: 15px; font-weight: 900; }
.aviso-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.aviso-action { display: block; margin-top: 10px; }

/* ===== Plano / Trilha ===== */

.plan-hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.exam-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  padding: 24px;
}

.exam-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }

.exam-item {
  min-height: 80px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 13px;
}

.exam-item small { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.exam-item strong { display: block; color: var(--petrol-dark); font-size: 14px; line-height: 1.28; }

.exam-countdown {
  display: inline-flex;
  margin-top: 6px;
  border-radius: 8px;
  background: var(--soft-green);
  color: var(--green-strong);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 900;
}

.exam-countdown.urgente { background: var(--soft-red); color: #8e3b3b; }

.progress-panel {
  border-radius: 8px;
  background: var(--petrol-dark);
  color: #ffffff;
  padding: 24px;
}

.progress-panel h3 { color: #ffffff; font-size: 15px; }

.big-number {
  margin: 20px 0 14px;
  color: #ffffff;
  font-family: var(--display);
  font-size: 56px;
  font-weight: 900;
  line-height: 0.9;
}

.bar { height: 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.13); overflow: hidden; }
.bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--green), var(--lime));
  transition: width 0.25s ease;
}

.progress-caption { margin: 12px 0 0; color: #bfd0d1; font-size: 13px; }

.progress-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 22px; }
.progress-row div { border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 8px; background: rgba(255, 255, 255, 0.06); padding: 11px; }
.progress-row small { display: block; color: #9fb7b9; font-size: 11px; }
.progress-row strong { display: block; margin-top: 3px; color: #ffffff; font-size: 15px; }

.roadmap-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 18px;
  align-items: start;
}

.modules { display: grid; gap: 12px; }

.module {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.module-head {
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px 18px;
  text-align: left;
}

.module-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--green-strong);
}

.module-icon svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.module-title strong { display: block; color: var(--petrol-dark); font-family: var(--display); font-size: 16px; font-weight: 900; }
.module-title span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

.module-status { display: grid; grid-template-columns: auto 86px auto; gap: 10px; align-items: center; }

.mini-bar { height: 8px; border-radius: 8px; background: #e9efed; overflow: hidden; }
.mini-bar span { display: block; height: 100%; width: 0; background: var(--green); }

.chevron { color: var(--muted); font-size: 18px; transition: transform 0.16s ease; }
.module.open .chevron { transform: rotate(90deg); }

.module-body { display: none; border-top: 1px solid var(--line); padding: 14px 18px 18px; }
.module.open .module-body { display: block; }

.module-tools { display: flex; justify-content: flex-end; margin-bottom: 10px; }

.apostila-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-blue);
  color: var(--navy);
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.apostila-link:hover { border-color: var(--navy); }
.apostila-link svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.goal-list { display: grid; gap: 8px; }

.goal-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 12px 14px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.goal-row.done { border-left-color: var(--green); background: rgba(229, 248, 240, 0.45); }
.goal-row.flash { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0, 185, 120, 0.16); }
.goal-row.locked { background: #f4f6f5; opacity: 0.72; }
.goal-row.locked .goal-info strong { color: var(--muted); }

.goal-info strong { display: block; color: var(--petrol-dark); font-size: 14px; }
.goal-info span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.goal-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.goal-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--petrol-dark);
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 900;
  white-space: nowrap;
  text-decoration: none;
}

.goal-btn svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.goal-btn:hover { border-color: var(--green); color: var(--green-strong); }

.goal-toggle { border-color: rgba(197, 151, 56, 0.4); background: var(--soft-gold); color: #9a7320; }
.goal-toggle:hover { border-color: var(--green); background: var(--soft-green); color: var(--green-strong); }
.goal-toggle.done { border-color: rgba(0, 185, 120, 0.4); background: var(--green); color: #ffffff; }
.goal-toggle.done:hover { background: var(--green-strong); color: #ffffff; }

.next-action {
  border-radius: 8px;
  background: var(--petrol-dark);
  color: #ffffff;
  padding: 16px;
}

.next-action small { display: block; margin-bottom: 7px; color: #9fb7b9; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.next-action strong { display: block; color: #ffffff; font-family: var(--display); font-size: 17px; font-weight: 900; }
.next-action span { display: block; margin-top: 6px; color: #bfd0d1; font-size: 13px; line-height: 1.55; }

/* ===== Leitor de apostila ===== */

.apostila-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.apostila-bar small { display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.apostila-bar strong { display: block; color: var(--petrol-dark); font-family: var(--display); font-size: 16px; }

/* Leitor: a PÁGINA rola e o iframe recebe a altura do conteúdo via postMessage
   (ver leitor.js). Evita a rolagem interna do iframe — que o Edge no Android
   não faz por toque — então a apostila rola em qualquer navegador (D-018). */
.apostila-frame {
  display: block;
  width: 100%;
  min-height: 480px; /* enquanto carrega; o JS ajusta à altura real do conteúdo */
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.view.leitor { padding: 24px 0 40px; min-height: 0; }

/* ===== Modal ===== */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background: rgba(7, 42, 48, 0.55);
  backdrop-filter: blur(3px);
  padding: 20px;
}

.overlay.show { display: grid; }

.modal {
  width: min(720px, 100%);
  max-height: min(86vh, 880px);
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 30px 80px rgba(4, 24, 28, 0.45);
  overflow: hidden;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  background: var(--petrol-dark);
  color: #ffffff;
  padding: 20px 24px;
}

.modal-head small {
  display: block;
  margin-bottom: 5px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-head h3 { color: #ffffff; font-size: 20px; }

.quiz-score {
  display: none;
  margin-top: 8px;
  color: #bfd0d1;
  font-size: 12px;
  font-weight: 800;
}

.quiz-score.show { display: block; }

.modal-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.12); }

.modal-body { padding: 20px 24px 26px; overflow-y: auto; display: grid; gap: 14px; }

.modal-section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.link-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 12px 14px;
  text-decoration: none;
  transition: border-color 0.16s ease;
}

.link-row:hover { border-color: var(--green); }
.link-row strong { display: block; color: var(--petrol-dark); font-size: 14px; }
.link-row span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.link-row .go { color: var(--green-strong); font-weight: 900; font-size: 13px; white-space: nowrap; }

/* ===== Questões ===== */

.q-block {
  border: 1px solid var(--line);
  border-left: 5px solid var(--navy);
  border-radius: 8px;
  background: var(--paper);
  padding: 16px 18px;
}

.q-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  background: var(--soft-blue);
  color: var(--navy);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.q-enun { margin: 10px 0 12px; color: var(--ink); font-size: 14.5px; line-height: 1.65; }

.q-alts { display: grid; gap: 7px; }

.q-alt {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  padding: 9px 11px;
  font-size: 13.5px;
  text-align: left;
  line-height: 1.5;
}

.q-alt b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft-blue);
  color: var(--navy);
  font-size: 12px;
}

.q-alt:hover:not(:disabled) { border-color: var(--green); }
.q-alt:disabled { cursor: default; }

.q-alt.correct { border-color: var(--green); background: var(--soft-green); }
.q-alt.correct b { background: var(--green); color: #ffffff; }
.q-alt.wrong { border-color: var(--red); background: var(--soft-red); }
.q-alt.wrong b { background: var(--red); color: #ffffff; }

.q-feedback {
  display: none;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: var(--soft-green);
  padding: 11px 13px;
}

.q-feedback.show { display: block; }
.q-feedback.erro { border-left-color: var(--red); background: var(--soft-red); }
.q-feedback strong { display: block; color: var(--petrol-dark); font-size: 13px; }
.q-feedback p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ===== Recursos ===== */

.res-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 15px 16px;
}

.res-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.res-icon svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.res-icon.aula { background: var(--soft-blue); color: var(--navy); }
.res-icon.audio { background: var(--soft-green); color: var(--green-strong); }
.res-icon.simulado { background: var(--soft-violet); color: var(--violet); }
.res-icon.mapa { background: var(--soft-gold); color: var(--gold); }
.res-icon.resumo { background: var(--soft-lime); color: var(--green-strong); }

.res-kicker {
  display: inline-flex;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f0f4f3;
  color: var(--muted);
}

.res-card strong.res-title { display: block; margin-top: 6px; color: var(--petrol-dark); font-family: var(--display); font-size: 15px; }
.res-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.res-card audio { width: 100%; margin-top: 10px; }
.res-card .res-action { margin-top: 11px; }

/* ===== Barra de formatação (admin: questões e simulado) ===== */

.fmt-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.fmt-bar .lbl { font-size: 11px; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 2px; }
.fmt-bar button {
  border: 1px solid var(--line); background: var(--paper); color: var(--petrol-dark);
  border-radius: 7px; min-width: 34px; height: 32px; font-size: 14px; cursor: pointer;
  font-family: inherit; display: grid; place-items: center; padding: 0 8px;
}
.fmt-bar button:hover { border-color: var(--green); color: var(--green-strong); }
.fmt-bar button.b { font-weight: 900; }
.fmt-bar button.i { font-style: italic; }
.fmt-bar button.u { text-decoration: underline; }
.fmt-bar button.cor { font-size: 12px; font-weight: 800; }
.fmt-bar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 3px; }
.fmt-bar input[type="color"] { width: 34px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); padding: 2px; cursor: pointer; }

/* ===== Prévia das questões no admin ===== */

.quiz-preview { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 8px; }
.adm-quiz-score {
  display: none; margin-left: 8px; border-radius: 8px; background: var(--soft-green);
  color: var(--green-strong); padding: 2px 9px; font-size: 11px; font-weight: 900;
  text-transform: none; letter-spacing: 0;
}
.adm-quiz-score.show { display: inline-flex; }

.empty-note {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  padding: 14px;
  font-size: 13px;
  text-align: center;
}

/* ===== Admin ===== */

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: start;
}

.admin-col { display: grid; gap: 14px; align-content: start; }

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.admin-card h3 { font-size: 16px; }
.admin-help { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.admin-meta-info { margin: 12px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-list { display: grid; gap: 8px; margin-top: 12px; }

.admin-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 9px 11px;
}

.admin-item strong { display: block; color: var(--petrol-dark); font-size: 13px; }
.admin-item .sub { display: block; color: var(--muted); font-size: 12px; }

.rm-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.rm-btn:hover { border-color: var(--red); color: var(--red); background: var(--soft-red); }

.adm-check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--petrol-dark);
  font-size: 13px;
  font-weight: 800;
}

.adm-check input { width: 17px; height: 17px; accent-color: var(--green); }

.estrutura-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.est-item { cursor: pointer; grid-template-columns: auto 1fr auto; }
.est-item.sel { border-color: var(--green); background: var(--soft-green); }

.ord-btns { display: grid; gap: 4px; }

.ord-btn {
  width: 26px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  padding: 0;
}

.ord-btn:hover:not(:disabled) { border-color: var(--green); color: var(--green-strong); }
.ord-btn:disabled { opacity: 0.35; cursor: default; }

.est-row-actions { display: flex; gap: 6px; }

/* Alunos (admin) */

.aluno-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 12px 14px;
}

.aluno-row.bloqueado { background: #f4f6f5; opacity: 0.78; }
.aluno-row strong { display: block; color: var(--petrol-dark); font-size: 14px; }
.aluno-row .sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.aluno-planos { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }

.plano-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
}

.plano-chip:hover { border-color: var(--green); color: var(--green-strong); }

.plano-chip.on {
  border: 1px solid rgba(0, 185, 120, 0.4);
  background: var(--soft-green);
  color: var(--green-strong);
}

.plano-chip .pct {
  border-radius: 6px;
  background: var(--green);
  color: #ffffff;
  padding: 1px 6px;
  font-size: 10.5px;
}

.alunos-toolbar { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }

.paginacao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ===== Toast ===== */

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  max-width: 360px;
  display: none;
  border: 1px solid rgba(0, 185, 120, 0.35);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.toast.show { display: block; }
.toast strong { display: block; color: var(--petrol-dark); font-family: var(--display); font-size: 14px; font-weight: 900; }
.toast span { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }

/* ===== Responsivo ===== */

@media (max-width: 1060px) {
  .topbar-inner { grid-template-columns: 1fr; padding: 12px 0; }
  .step-nav { justify-content: flex-start; }
  .account-zone { justify-self: start; }

  .login-wrap, .dashboard-grid, .plan-hero, .roadmap-layout,
  .apostila-bar, .admin-layout, .estrutura-grid, .alunos-toolbar { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .exam-grid { grid-template-columns: repeat(2, 1fr); }

  body.login-page .topbar-inner {
    min-height: 70px;
    grid-template-columns: auto 1fr auto;
    padding: 0;
  }

  .login-view {
    padding: 24px 0 28px;
  }

  .login-view .login-wrap {
    gap: 14px;
  }

  .login-view .login-panel {
    padding: 20px;
  }

  .login-view .eyebrow {
    margin-bottom: 10px;
  }

  .login-view h2 {
    font-size: 30px;
  }

  .login-view .lead {
    margin-top: 10px;
    line-height: 1.45;
  }

  .login-view .form-grid {
    gap: 10px;
    margin-top: 12px;
  }

  .login-view .field {
    gap: 5px;
  }

  .login-view .field input,
  .login-view .button {
    min-height: 40px;
  }

  .login-view .demo-hint {
    margin-top: 10px;
    padding: 9px 11px;
    line-height: 1.35;
  }

  .login-view .login-aside {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .login-view .aside-line {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 7px;
    padding: 10px;
  }

  .login-view .row-icon {
    width: 32px;
    height: 32px;
  }

  .login-view .row-icon svg {
    width: 17px;
    height: 17px;
  }

  .login-view .aside-line strong {
    font-size: 13px;
  }

  .login-view .aside-line span {
    font-size: 11.5px;
    line-height: 1.35;
  }

  .login-social {
    margin-top: 10px;
  }
}

@media (min-width: 760px) and (max-width: 1060px) {
  .login-view .login-wrap {
    grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
    align-items: center;
  }

  .login-view .login-aside {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell { width: min(100% - 24px, 1180px); }
  .view { padding: 32px 0 48px; }
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .plans-grid, .exam-grid, .progress-row { grid-template-columns: 1fr; }
  .section-head { display: grid; }
  .module-head { grid-template-columns: 44px 1fr; }
  .module-status { grid-column: 2; justify-content: start; }
  .goal-row { grid-template-columns: 1fr; }
  .goal-actions { justify-content: flex-start; }
  .modal-body, .modal-head { padding-left: 16px; padding-right: 16px; }

  .login-view .login-aside {
    grid-template-columns: 1fr;
  }
}
