/* ================================================================
   atividade.css — Motor de Atividades Gamificadas NEXO
   Escopo: .act-page  (isola do Bootstrap e do styles.css global)
   ================================================================ */

.act-page {
  --act-bg:      #f5f6f7;
  --act-shell:   #0a2540;
  --act-blue:    var(--nx-blue);
  --act-blue-d:  var(--nx-blue-dark);
  --act-blue-l:  #e8f1fb;
  --act-ink:     #1d2d3e;
  --act-mut:     #5a6b7f;
  --act-line:    #dfe4ea;
  --act-ok:      var(--nx-green);
  --act-ok-bg:   #e8f5ec;
  --act-ok-line: #abdcb9;
  --act-err:     #bb0000;
  --act-err-bg:  #ffeaea;
  --act-gold:    #c89b3c;
  --act-silver:  #9aa6b2;
  --act-bronze:  #b07a47;
  --act-sh:      0 1px 2px rgba(10,37,64,.06),0 4px 16px rgba(10,37,64,.08);
  --act-sh-lg:   0 8px 30px rgba(10,37,64,.14);

  background: var(--act-bg);
  min-height: 100vh;
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--act-ink);
}

/* ── back bar (breadcrumb sobre fundo claro — sem faixa azul) ── */
.act-back-bar {
  background: transparent;
  color: var(--act-mut);
  padding: 18px 40px 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.act-back-bar a {
  color: var(--nx-blue);
  text-decoration: none;
  font-weight: 600;
}
.act-back-bar a:hover { text-decoration: underline; }
.act-back-bar .sep   { color: #B6C0CC; }
.act-back-bar .crumb { color: var(--act-mut); }

/* ── wrap ────────────────────────────────────────────────────── */
.act-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

/* ── head ────────────────────────────────────────────────────── */
.act-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.act-kick {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--act-blue);
  background: var(--act-blue-l);
  padding: 5px 11px;
  border-radius: 6px;
}
.act-mech-tag {
  font-size: 12px;
  color: var(--act-mut);
  font-weight: 600;
  margin-left: auto;
}

/* ── card ────────────────────────────────────────────────────── */
.act-card {
  background: #fff;
  border: 1px solid var(--act-line);
  border-radius: 16px;
  box-shadow: var(--act-sh);
  overflow: hidden;
  margin-bottom: 16px;
}
.act-card-top {
  background: linear-gradient(135deg,var(--nx-navy) 0%,var(--nx-blue) 100%);
  padding: 24px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.act-card-top::after {
  content:"";
  position:absolute;
  right:-40px; top:-40px;
  width:170px; height:170px;
  background:radial-gradient(circle,rgba(255,255,255,.10),transparent 70%);
}
.act-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(255,255,255,.16);
  padding: 4px 10px;
  border-radius: 5px;
  margin-bottom: 11px;
}
.act-q {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.act-dose {
  font-size: 13.5px;
  color: rgba(255,255,255,.82);
  margin-top: 9px;
  line-height: 1.6;
}
.act-dose b { color: #fff; font-weight: 600; }

.act-body {
  padding: 22px 26px 24px;
}
.act-instr {
  font-size: 13px;
  color: var(--act-mut);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ── SEQUÊNCIA ───────────────────────────────────────────────── */
.act-slots {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.act-slot {
  flex: 1;
  min-width: 90px;
  min-height: 88px;
  border: 2px dashed var(--act-line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  transition: all .18s;
  background: #fafbfc;
}
.act-slot .pos {
  position: absolute;
  top: 7px; left: 9px;
  font-size: 11px;
  font-weight: 700;
  color: var(--act-mut);
  opacity: .5;
}
.act-slot .ph { font-size: 11.5px; color: #a8b3bf; }
.act-slot.over    { border-color: var(--act-blue); background: var(--act-blue-l); transform: scale(1.03); }
.act-slot.filled  { border-style: solid; border-color: var(--act-blue); background: #fff; }
.act-slot.correct { border-color: var(--act-ok-line); background: var(--act-ok-bg); }
.act-slot.wrong   { border-color: #e89a9a; background: var(--act-err-bg); animation: act-shake .4s; }

@keyframes act-shake {
  0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)}
}

.act-bank {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 16px;
  background: #f7f9fb;
  border-radius: 12px;
  margin-bottom: 20px;
  min-height: 70px;
  align-items: center;
}
.act-piece {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--act-line);
  border-radius: 10px;
  padding: 10px 15px;
  cursor: grab;
  box-shadow: var(--act-sh);
  user-select: none;
  transition: transform .14s, box-shadow .14s;
  font-weight: 600;
  font-size: 13px;
}
.act-piece:hover    { transform: translateY(-2px); box-shadow: var(--act-sh-lg); }
.act-piece.dragging { opacity: .4; cursor: grabbing; }
.act-pic { width: 20px; height: 20px; }

/* ── CLASSIFICAR ─────────────────────────────────────────────── */
.act-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(140px,1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.act-col {
  border: 2px dashed var(--act-line);
  border-radius: 12px;
  padding: 12px;
  min-height: 130px;
  background: #fafbfc;
  transition: all .18s;
}
.act-col.over { border-color: var(--act-blue); background: var(--act-blue-l); }
.act-col-h {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--act-mut);
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--act-line);
}
.act-chip-item {
  background: #fff;
  border: 1px solid var(--act-line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 7px;
  cursor: grab;
  box-shadow: var(--act-sh);
  user-select: none;
  transition: transform .12s;
}
.act-chip-item:hover    { transform: translateX(2px); }
.act-chip-item.dragging { opacity: .4; cursor: grabbing; }
.act-chip-item.correct  { border-color: var(--act-ok-line); background: var(--act-ok-bg); cursor: default; }
.act-chip-item.wrong    { border-color: #e89a9a; background: var(--act-err-bg); }
.act-chip-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  background: #f7f9fb;
  border-radius: 12px;
  margin-bottom: 16px;
  min-height: 58px;
  align-items: flex-start;
}
.act-chip-pool .act-chip-item { margin-bottom: 0; }

/* ── MAPA ────────────────────────────────────────────────────── */
.act-map-area {
  display: flex;
  gap: 32px;
  margin-bottom: 18px;
  position: relative;
}
.act-map-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.act-node {
  border: 1.5px solid var(--act-line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  background: #fff;
}
.act-node:hover       { border-color: var(--act-blue); }
.act-node.sel         { border-color: var(--act-blue); background: var(--act-blue-l); box-shadow: 0 0 0 3px rgba(10,110,209,.12); }
.act-node.linked      { border-color: var(--act-ok-line); background: var(--act-ok-bg); cursor: default; }
.act-node.left        { font-weight: 700; }
.act-node.wrong-flash { border-color: #e89a9a; background: var(--act-err-bg); }
svg.act-links {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ── ESPECTRO ────────────────────────────────────────────────── */
.act-spectrum { margin-bottom: 18px; }
.act-sp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--act-mut);
  font-weight: 600;
  margin-bottom: 6px;
}
.act-sp-track {
  position: relative;
  height: 8px;
  background: linear-gradient(90deg,#abdcb9,#ffd591,#e89a9a);
  border-radius: 6px;
  margin: 4px 0 18px;
}
.act-page input[type="range"] {
  position: absolute;
  inset: -9px 0;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.act-page input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--act-blue);
  box-shadow: var(--act-sh-lg);
}
.act-page input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--act-blue);
  box-shadow: var(--act-sh-lg);
}
.act-sp-val {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--act-blue);
  margin: 6px 0 4px;
}
.act-sp-fb {
  text-align: center;
  font-size: 13px;
  color: var(--act-mut);
  min-height: 36px;
  padding: 0 20px;
  line-height: 1.5;
}

/* ── PREVER ──────────────────────────────────────────────────── */
.act-opts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.act-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--act-line);
  border-radius: 11px;
  padding: 13px 16px;
  cursor: pointer;
  transition: all .14s;
  font-size: 14px;
  background: #fff;
}
.act-opt:hover     { border-color: var(--act-blue); background: var(--act-blue-l); }
.act-opt .act-box  {
  width: 22px; height: 22px;
  border: 2px solid var(--act-line);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .14s;
  font-size: 14px;
  font-weight: bold;
  color: transparent;
}
.act-opt.sel .act-box      { background: var(--act-blue); border-color: var(--act-blue); color: #fff; }
.act-opt.correct .act-box  { background: var(--act-ok); border-color: var(--act-ok); color: #fff; }
.act-opt.correct           { border-color: var(--act-ok-line); background: var(--act-ok-bg); cursor: default; }
.act-opt.wrong-pick        { border-color: #e89a9a; background: var(--act-err-bg); cursor: default; }
.act-opt.wrong-pick .act-box { background: #e89a9a; border-color: #e89a9a; color: #fff; }

.act-reveal {
  display: none;
  margin-top: 8px;
  padding: 16px 18px;
  background: var(--act-blue-l);
  border-radius: 11px;
  font-size: 13.5px;
  color: var(--act-ink);
  line-height: 1.55;
  animation: act-slide-up .4s;
}
.act-reveal.show { display: block; }
.act-reveal b    { color: var(--act-blue-d); }

/* ── LACUNA ──────────────────────────────────────────────────── */
.act-cloze {
  font-size: 15px;
  line-height: 2.2;
  color: var(--act-ink);
  margin-bottom: 18px;
}
.act-blank {
  display: inline-block;
  min-width: 120px;
  border-bottom: 2.5px solid var(--act-blue);
  text-align: center;
  padding: 2px 12px;
  font-weight: 700;
  color: var(--act-blue);
  vertical-align: middle;
  min-height: 30px;
  transition: all .18s;
}
.act-blank.filled  { background: var(--act-blue-l); border-radius: 6px 6px 0 0; }
.act-blank.correct { color: var(--act-ok); border-color: var(--act-ok); background: var(--act-ok-bg); border-radius: 6px; }
.act-blank.wrong   { color: var(--act-err); border-color: var(--act-err); background: var(--act-err-bg); animation: act-shake .4s; }
.act-word-bank {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 14px;
  background: #f7f9fb;
  border-radius: 12px;
  margin-bottom: 18px;
}
.act-word {
  background: #fff;
  border: 1px solid var(--act-line);
  border-radius: 9px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: grab;
  box-shadow: var(--act-sh);
  user-select: none;
  transition: transform .12s;
}
.act-word:hover    { transform: translateY(-2px); }
.act-word.dragging { opacity: .4; cursor: grabbing; }
.act-word.used     { opacity: .3; pointer-events: none; }

/* ── CASO ────────────────────────────────────────────────────── */
.act-cenario {
  background: #f7f9fb;
  border-left: 3px solid var(--act-blue);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 16px;
}
.act-pergunta {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}
.act-caso-opt {
  border: 1.5px solid var(--act-line);
  border-radius: 11px;
  padding: 13px 16px;
  cursor: pointer;
  transition: all .14s;
  margin-bottom: 10px;
  background: #fff;
}
.act-caso-opt:hover   { border-color: var(--act-blue); background: var(--act-blue-l); }
.act-caso-opt.correct { border-color: var(--act-ok-line); background: var(--act-ok-bg); cursor: default; }
.act-caso-opt.wrong   { border-color: #e89a9a; background: var(--act-err-bg); cursor: default; }
.act-opt-txt { font-size: 14px; }
.act-porque {
  font-size: 12px;
  color: var(--act-mut);
  margin-top: 7px;
  display: none;
  font-style: italic;
  padding-left: 2px;
  line-height: 1.5;
}
.act-porque.show { display: block; }

/* ── REFORMULAR ──────────────────────────────────────────────── */
.act-ref-prompt {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.5;
}
.act-ref-area {
  width: 100%;
  box-sizing: border-box;
  min-height: 100px;
  border: 1.5px solid var(--act-line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: border-color .15s;
}
.act-ref-area:focus { border-color: var(--act-blue); box-shadow: 0 0 0 3px rgba(10,110,209,.1); }
.act-word-count {
  font-size: 12px;
  color: var(--act-mut);
  margin-top: 5px;
  text-align: right;
}
.act-word-count.ok { color: var(--act-ok); }

/* ── RESULT (feedback_ok após resolver) ──────────────────────── */
.act-result {
  display: none;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--act-ok-bg);
  border: 1px solid var(--act-ok-line);
  align-items: flex-start;
  gap: 14px;
}
.act-result.show { display: flex; animation: act-slide-up .4s; }
.act-result-ic   { width: 36px; height: 36px; flex-shrink: 0; }
.act-result h4   { font-size: 14px; color: var(--act-ok); margin: 0 0 4px; }
.act-result p    { font-size: 13px; color: #3d6b4f; line-height: 1.55; margin: 0; }
.act-credited {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  background: #fff;
  border: 1px solid var(--act-ok-line);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--act-ok);
}

@keyframes act-slide-up {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── REFLEXÃO ────────────────────────────────────────────────── */
.act-reflect-wrap {
  display: none;
  margin-top: 14px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--act-line);
  border-radius: 14px;
  box-shadow: var(--act-sh);
}
.act-reflect-wrap.show { display: block; animation: act-slide-up .4s .1s both; }
.act-reflect-k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--act-blue);
  margin-bottom: 8px;
}
.act-reflect-q {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.45;
}
.act-reflect-txt {
  width: 100%;
  box-sizing: border-box;
  min-height: 80px;
  border: 1px solid var(--act-line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13.5px;
  resize: vertical;
  outline: none;
  transition: border-color .15s;
}
.act-reflect-txt:focus {
  border-color: var(--act-blue);
  box-shadow: 0 0 0 3px rgba(10,110,209,.1);
}

/* ── FOOTER (botão + recompensa) ─────────────────────────────── */
.act-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.act-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 13px 26px;
  cursor: pointer;
  transition: all .16s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.act-btn-primary {
  background: var(--act-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(10,110,209,.28);
}
.act-btn-primary:hover    { background: var(--act-blue-d); }
.act-btn-primary:disabled {
  background: #c5cdd6;
  box-shadow: none;
  cursor: not-allowed;
}
.act-btn-secondary {
  background: transparent;
  color: var(--act-blue);
  border: 1.5px solid var(--act-blue);
}
.act-btn-secondary:hover { background: var(--act-blue-l); }

.act-reward-info { font-size: 13px; color: var(--act-mut); margin-left: auto; }
.act-reward-info strong { color: var(--act-ink); }

/* ── STATUS (sucesso / já concluída / erro) ───────────────────── */
.act-success-box {
  margin-top: 20px;
  padding: 20px 24px;
  background: var(--act-ok-bg);
  border: 1px solid var(--act-ok-line);
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  animation: act-slide-up .4s;
}
.act-success-ic  { font-size: 30px; flex-shrink: 0; }
.act-success-h   { font-size: 16px; font-weight: 700; color: var(--act-ok); margin-bottom: 5px; }
.act-success-p   { font-size: 13.5px; color: #3d6b4f; line-height: 1.55; }
.act-success-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: var(--act-ok);
  color: #fff !important;
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.act-success-cta:hover { background: #0a6631; }

.act-ja-box {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--act-blue-l);
  border: 1px solid #b4cff0;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.act-ja-box a { color: var(--act-blue); font-weight: 600; }

/* ── empty state ─────────────────────────────────────────────── */
.act-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--act-mut);
}
.act-empty-ic { font-size: 44px; margin-bottom: 14px; }
.act-empty h3 { font-size: 20px; font-weight: 700; color: var(--act-ink); margin-bottom: 8px; }
.act-empty p  { font-size: 14px; line-height: 1.65; max-width: 380px; margin: 0 auto 24px; }

/* ── coin burst (animação pós-conclusão) ─────────────────────── */
.act-coin-burst {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 24px;
  height: 24px;
}
