/* =========================================================
   BMXR: preto, laranja e dourado da logo Luis Aguiar #26.
   Mesma estrutura de app do Dojo Virtual e do APP Mandala.
   ========================================================= */
:root {
  --bg:            #141414;
  --bg-alt:        #1c1c1c;
  --card:          #212121;
  --card-2:        #292929;
  --accent:        #f26522;
  --accent-dark:   #c23d0f;
  --gold:          #ffb703;
  --gradient:      linear-gradient(135deg, var(--accent), var(--accent-dark));
  --gradient-gold: linear-gradient(135deg, var(--gold), #d98f00);
  --text:          #f5f5f0;
  --text-muted:    #a8a8a0;
  --border:        rgba(255,255,255,.09);
  --safe-top:      env(safe-area-inset-top, 0px);
  --safe-bottom:   env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  overscroll-behavior-y: contain;
}

h1, h2, h3, h4, .display-font {
  font-family: 'Bebas Neue', 'Montserrat', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: .2px;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-gold { color: var(--gold); }

/* ---------- Faixa de detalhe no topo ---------- */
.faixa-topo {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
}

/* ---------- Shell do app ---------- */
.app-shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + var(--safe-top)) 16px 14px;
  background: rgba(20,20,20,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.app-topbar .voltar {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  flex: none;
  font-size: 1.1rem;
}
.app-topbar h1 {
  font-size: 1.05rem;
  margin: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-topbar h1.topbar-logo-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-topbar .topbar-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex: none;
}
.app-topbar .menu-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 1.1rem;
}

.app-content {
  flex: 1;
  padding: 16px 16px calc(28px + var(--safe-bottom));
}

/* ---------- Grade de tópicos (home) ---------- */
.topico-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}
@media (min-width: 400px) {
  .topico-grid { grid-template-columns: repeat(3, 1fr); }
}
.topico-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.topico-tile:active { transform: scale(.96); }
.topico-tile:hover { border-color: rgba(242,101,34,.5); background: var(--card-2); }
.topico-tile.em-breve { opacity: .55; }
.topico-tile .icone-wrap {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: 0 6px 18px rgba(242,101,34,.3);
}
.topico-tile .titulo {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}
.topico-tile .tag-em-breve {
  font-size: .62rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
}

/* ---------- Faixa do aluno (perfil) ---------- */
.perfil-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 18px;
}
.perfil-card img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex: none;
}
.perfil-card .info { flex: 1; min-width: 0; }
.perfil-card .info strong { display: block; font-size: 1rem; }
.perfil-card .faixa-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold);
}

/* ---------- Katas / Kihons (lista) ---------- */
.kata-lista { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.kata-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kata-card:hover { border-color: rgba(242,101,34,.5); }
.kata-card .icone-wrap {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  color: #fff;
  flex: none;
}
.kata-card .titulo { font-weight: 600; font-size: .95rem; flex: 1; }
.kata-card .titulo small { display: block; color: var(--text-muted); font-weight: 400; font-size: .78rem; margin-top: 2px; }
.kata-card .chevron { color: var(--text-muted); }

.kihon-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
}
.kihon-card .numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  margin-right: 8px;
}
.kihon-card p { color: var(--text-muted); font-size: .88rem; line-height: 1.6; margin: 10px 0 0; }

.conteudo-texto { color: var(--text); font-size: .98rem; line-height: 1.7; white-space: pre-line; }
.conteudo-texto img { max-width: 100%; height: auto; border-radius: 8px; }
.conteudo-texto iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 8px; margin: 10px 0; }

/* ---------- Cards genéricos / formulários ---------- */
.app-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}
.mb-3 { margin-bottom: 1rem; }
.app-form .form-label { display: block; color: var(--text-muted); font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
.app-form .form-control, .app-form .form-select {
  display: block;
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: .7rem .9rem;
  font-size: 1rem;
  font-family: inherit;
}
.app-form .form-control:focus, .app-form .form-select:focus {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(242,101,34,.2);
}
.app-form .form-control::placeholder { color: #6f6f68; }

.btn-gradient {
  background: var(--gradient);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  width: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 24px rgba(242,101,34,.3);
}
.btn-gradient:active { transform: scale(.98); }
.btn-gradient:disabled { opacity: .6; }

.btn-outline-app {
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-weight: 700;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  width: 100%;
  display: block;
  text-align: center;
}

.alert-app {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: .9rem;
  margin-bottom: 16px;
}
.alert-app-erro { background: rgba(242,101,34,.14); border: 1px solid rgba(242,101,34,.4); color: #ffd6d6; }
.alert-app-ok { background: rgba(0,156,59,.14); border: 1px solid rgba(0,156,59,.4); color: #bdf5d5; }
.alert-app-aviso {
  background: rgba(255,183,3,.14);
  border: 1px solid rgba(255,183,3,.4);
  color: #f5e2a8;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.alert-app-aviso .btn-reenviar {
  background: none;
  border: 1px solid rgba(245,226,168,.5);
  color: #f5e2a8;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Assinatura / cupom ---------- */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 5px 14px; font-size: .8rem; font-weight: 700;
}
.status-badge.ativa   { background: rgba(0,156,59,.15); border: 1px solid rgba(0,156,59,.4); color: #bdf5d5; }
.status-badge.pendente{ background: rgba(255,183,3,.15); border: 1px solid rgba(255,183,3,.4); color: #f5e2a8; }
.status-badge.expirada,
.status-badge.cancelada { background: rgba(242,101,34,.15); border: 1px solid rgba(242,101,34,.4); color: #ffd6d6; }

/* ---------- Splash / landing (index.php, antes do login) ---------- */
.splash {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(28px + var(--safe-top)) 24px calc(28px + var(--safe-bottom));
  background:
    radial-gradient(circle at 20% 0%, rgba(242,101,34,.3), transparent 55%),
    radial-gradient(circle at 100% 30%, rgba(255,183,3,.16), transparent 50%),
    var(--bg);
}
.splash-logo { width: 132px; margin: 0 auto 18px; display: block; }
.splash h1 { text-align: center; font-size: 1.7rem; margin-bottom: 6px; }
.splash .subtitulo { text-align: center; color: var(--text-muted); margin-bottom: 28px; font-size: .95rem; }
.splash-info {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
}
.splash-info .item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.splash-info .item:last-child { margin-bottom: 0; }
.splash-info .item i { color: var(--gold); font-size: 1.15rem; margin-top: 2px; flex: none; }
.splash-info .item span { font-size: .88rem; color: var(--text-muted); line-height: 1.5; }
.splash-actions { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.splash-footer-link { text-align: center; margin-top: 14px; color: var(--text-muted); font-size: .85rem; }
.splash-footer-link a { color: var(--gold); font-weight: 700; }

/* ---------- Splash de abertura (index.php, tipo boot de app nativo) ---------- */
.splash-boot {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(242,101,34,.3), transparent 55%),
    radial-gradient(circle at 100% 30%, rgba(255,183,3,.16), transparent 50%),
    var(--bg);
}
.splash-boot-logo {
  width: 160px;
  margin-bottom: 22px;
  animation: splashLogoPop .5s ease-out;
}
.splash-boot h1 { font-size: 1.5rem; margin-bottom: 4px; }
.splash-boot .subtitulo { color: var(--text-muted); font-size: .9rem; margin: 0 0 36px; letter-spacing: .04em; text-transform: uppercase; }
.splash-boot-loading { display: flex; gap: 8px; }
.splash-boot-loading span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  animation: splashDotBounce 1.1s ease-in-out infinite;
}
.splash-boot-loading span:nth-child(2) { animation-delay: .15s; }
.splash-boot-loading span:nth-child(3) { animation-delay: .3s; }

@keyframes splashLogoPop {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes splashDotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* ---------- Menu lateral ---------- */
.app-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.app-overlay.aberto { opacity: 1; pointer-events: auto; }
.app-drawer {
  position: fixed; top: 0; right: -280px; bottom: 0; width: 260px;
  background: var(--bg-alt); border-left: 1px solid var(--border);
  z-index: 41; padding: calc(20px + var(--safe-top)) 18px 20px;
  transition: right .22s ease;
  display: flex; flex-direction: column; gap: 6px;
}
.app-drawer.aberto { right: 0; }
.app-drawer .fechar { align-self: flex-end; width: 32px; height: 32px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.app-drawer .usuaria { color: var(--text-muted); font-size: .8rem; margin-bottom: 12px; }
.app-drawer a, .app-drawer button {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px; border-radius: 12px;
  color: var(--text); font-weight: 600; font-size: .92rem;
  background: none; border: none; width: 100%; text-align: left;
}
.app-drawer a:hover, .app-drawer button:hover { background: var(--card); }
.app-drawer i { width: 20px; text-align: center; color: var(--accent); }

/* ---------- Leitura do livro ---------- */
.sobretitulo {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .72rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
}
.titulo-leitura { font-size: 1.6rem; line-height: 1.15; margin: 0 0 14px; }
.titulo-parte { margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.leitura { font-size: 1.02rem; line-height: 1.7; }
.leitura p { margin: 0 0 1em; }
.leitura ul, .leitura ol { margin: 0 0 1em; padding-left: 1.25em; }
.leitura li { margin-bottom: .5em; }
.leitura li::marker { color: var(--accent); }
.leitura h3 { color: var(--gold); font-size: 1.3rem; line-height: 1.2; margin: 1.5em 0 .5em; }
.leitura strong { color: #fff; }
.leitura figure { margin: 1.2em 0; text-align: center; }
.leitura img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
  cursor: zoom-in;
}
.tabela-wrap {
  overflow-x: auto;
  margin: 0 0 1em;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.tabela-wrap table { border-collapse: collapse; width: 100%; font-size: .88rem; line-height: 1.4; }
.tabela-wrap th, .tabela-wrap td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.tabela-wrap th { background: var(--card-2); color: var(--gold); font-weight: 700; }
.tabela-wrap tr:last-child td { border-bottom: 0; }
.tabela-wrap small { color: var(--text-muted); }

.navegacao-capitulos { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.navegacao-capitulos a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: .9rem;
}
.navegacao-capitulos a span { flex: 1; min-width: 0; }
.navegacao-capitulos a.proximo { text-align: right; }
.navegacao-capitulos small { display: block; color: var(--text-muted); font-weight: 500; font-size: .74rem; }
.navegacao-capitulos i { color: var(--accent); }

.bloqueio-card {
  background: linear-gradient(160deg, rgba(242,101,34,.15), rgba(0,0,0,0));
  border: 1px solid rgba(242,101,34,.4);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
}
.bloqueio-card > i { font-size: 2rem; color: var(--gold); }
.bloqueio-card h3 { font-size: 1.4rem; margin: 8px 0 6px; }
.bloqueio-card p { color: var(--text-muted); font-size: .92rem; line-height: 1.55; margin: 0 0 16px; }
.bloqueio-card p strong { color: var(--text); }

.kata-card.bloqueado .icone-wrap { background: var(--card-2); color: var(--text-muted); }
.kata-card .titulo small { line-height: 1.35; }

/* ---------- Home ---------- */
.perfil-card img { object-fit: contain; background: var(--bg-alt); }
.perfil-card .faixa-badge a { text-decoration: underline; }
.continuar-card {
  display: block;
  background: linear-gradient(160deg, rgba(242,101,34,.18), rgba(255,183,3,.04));
  border: 1px solid rgba(242,101,34,.4);
  border-radius: 18px;
  padding: 16px;
}
.continuar-card .rotulo {
  display: block;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .7rem;
  color: var(--gold);
  font-weight: 700;
}
.continuar-card strong { display: block; margin: 4px 0 12px; font-size: 1rem; line-height: 1.3; }
.continuar-card small { color: var(--text-muted); font-size: .76rem; }
.progresso { display: block; height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; margin-bottom: 6px; }
.progresso span { display: block; height: 100%; min-width: 4px; border-radius: 999px; background: var(--gradient); }

/* ---------- Curso ---------- */
.slide { margin: 0 0 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.slide a { display: block; }
.slide img { display: block; width: 100%; height: auto; }
.slide details { padding: 10px 14px; font-size: .86rem; color: var(--text-muted); }
.slide summary { cursor: pointer; font-weight: 600; }
.slide details p { margin: 8px 0 0; line-height: 1.55; color: var(--text); }

/* ---------- Performance Lab e frequência ---------- */
.lab-resultado h3 { margin: 18px 0 8px; font-size: 1.2rem; color: var(--gold); }
.lab-destaque {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(160deg, rgba(242,101,34,.2), rgba(255,183,3,.05));
  border: 1px solid rgba(242,101,34,.45);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 10px;
}
.lab-destaque .rotulo { display: block; font-size: .74rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.lab-destaque strong { display: block; font-family: 'Bebas Neue', sans-serif; font-size: 3rem; line-height: 1.05; }
.lab-destaque strong em { font-style: normal; font-size: 1.3rem; color: var(--text-muted); }
.lab-destaque small { color: var(--text-muted); }
.lab-piloto { color: var(--text-muted); font-size: .85rem; margin: 0 0 8px; }
.lab-nota { font-size: .95rem; line-height: 1.55; margin: 0 0 8px; }
.lab-aviso { color: var(--text-muted); font-size: .8rem; line-height: 1.5; margin: 12px 0; }
.posicao { display: inline-block; white-space: nowrap; border-radius: 999px; padding: 2px 9px; font-size: .74rem; font-weight: 700; border: 1px solid transparent; }
.posicao-dentro { background: rgba(0,156,59,.16); border-color: rgba(0,156,59,.45); color: #bdf5d5; }
.posicao-abaixo { background: rgba(77,163,255,.14); border-color: rgba(77,163,255,.45); color: #cfe6ff; }
.posicao-acima { background: rgba(255,183,3,.14); border-color: rgba(255,183,3,.45); color: #ffe7ac; }
.form-duplo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; align-items: end; }
.app-form .form-select { appearance: auto; }
.app-form input[type="date"] { color-scheme: dark; min-height: 46px; }
.linha-check { display: flex; align-items: center; gap: 10px; }
.linha-check input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.linha-check .form-label { margin: 0; cursor: pointer; }
.btn-icone { width: 40px; height: 40px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; }
.btn-outline-app i, .btn-gradient i { margin-right: 4px; }
.btn-gradient, .btn-outline-app { cursor: pointer; text-align: center; font-size: 1rem; }
.zona-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.zona-topo span { font-weight: 700; font-size: 1.05rem; color: var(--gold); white-space: nowrap; }
.zona-topo small { color: var(--text-muted); font-weight: 500; font-size: .76rem; }

/* ---------- Busca ---------- */
.busca-form { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.busca-form .form-control { flex: 1; min-width: 0; }
.busca-form .btn-gradient { width: 48px; height: 48px; padding: 0; flex: none; }
.busca-form .btn-gradient i { margin: 0; }
.busca-vazio { color: var(--text-muted); font-size: .92rem; text-align: center; margin: 18px 0; }

/* ---------- Admin ---------- */
.admin-pagina { padding: 24px 16px; max-width: 720px; margin: 0 auto; }
.top-admin { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.top-admin h1 { margin: 0; font-size: 1.5rem; }
.grid-admin { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0 20px; }
@media (min-width: 500px) { .grid-admin { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center; }
.stat strong { display: block; font-size: 1.6rem; }
.stat span { color: var(--text-muted); font-size: .8rem; }
.links-admin { display: flex; flex-direction: column; gap: 10px; }
.links-admin a { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.links-admin i { color: var(--accent); }
.usuario-admin strong { display: block; }
.usuario-email { color: var(--text-muted); font-size: .82rem; margin: 2px 0 8px; word-break: break-word; }
.acoes-admin { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.acoes-admin button { background: var(--card-2); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 6px 13px; font-size: .8rem; font-weight: 600; cursor: pointer; }
.editor-html { font-family: Consolas, Menlo, monospace; font-size: .82rem !important; line-height: 1.5; }
.editor-barra {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
}
.editor-botao {
  min-width: 40px; height: 40px; padding: 0 8px;
  background: transparent; color: var(--text);
  border: 1px solid transparent; border-radius: 8px;
  font-size: 1.05rem; cursor: pointer;
}
.editor-botao:hover { background: var(--card); }
.editor-botao.ativo { background: var(--card); border-color: var(--gold); color: var(--gold); }
.editor-alternar { margin-left: auto; font-size: .82rem; font-weight: 600; border-color: var(--border); }
.editor-barra.modo-html .editor-botao:not(.editor-alternar) { display: none; }
.editor-visual {
  min-height: 420px; max-height: 70vh; overflow-y: auto;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 10px 10px;
  outline: none;
}
.editor-visual:focus { border-color: rgba(242,101,34,.55); }
.editor-visual[hidden], .editor-html[hidden] { display: none; }
.editor-visual img { cursor: default; }
.editor-visual > :first-child { margin-top: 0; }
.alert-app > div + div { margin-top: 4px; }

@media print {
  .app-topbar, .app-drawer, .app-overlay, .faixa-topo, .nao-imprimir, .lab-resultado .btn-outline-app, .alert-app, h2 { display: none !important; }
  html, body, .app-shell { background: #fff !important; color: #000 !important; }
  .lab-destaque, .tabela-wrap { border-color: #999 !important; background: #fff !important; }
  .lab-destaque small, .lab-destaque .rotulo, .lab-piloto, .lab-aviso, .tabela-wrap small { color: #333 !important; }
  .tabela-wrap th { background: #eee !important; color: #000 !important; }
  .lab-resultado h3 { color: #000 !important; }
  .posicao { color: #000 !important; border-color: #666 !important; background: #fff !important; }
}

/* ---------- Ajustes sobre a base do Dojo Virtual ---------- */
h1, h2, h3, h4, .display-font { font-weight: 400; letter-spacing: .4px; }
.app-topbar .menu-btn { color: var(--text); cursor: pointer; }
.app-drawer .fechar { color: var(--text); cursor: pointer; }
.app-form .form-select { padding-left: .6rem; padding-right: .3rem; font-size: .95rem; }
.leitura .btn-livro {
  display: block;
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(242,101,34,.55);
  color: var(--gold);
  font-weight: 700;
  border-radius: 999px;
  padding: .75rem 1.2rem;
}

/* ---------- Gestão de usuários e administradores ---------- */
.botao-novo { display: block; margin-bottom: 14px; }
.acoes-admin a { display: inline-flex; align-items: center; background: var(--gradient); color: #fff; border-radius: 999px; padding: 6px 13px; font-size: .8rem; font-weight: 700; }
.acoes-admin button.perigo { color: #ffd6d6; border-color: rgba(220,53,69,.55); background: rgba(220,53,69,.12); }
.linha-senha { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.linha-senha .form-control { flex: 1; min-width: 0; }
.btn-acao { background: var(--card-2); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 9px 14px; font-size: .82rem; font-weight: 600; cursor: pointer; flex: none; }
