
/* escola.fun — ferramentas v2 */
:root {
  --ef-navy:#102a43;
  --ef-blue:#0d6efd;
  --ef-soft:#f6f9fb;
  --ef-line:#d8e4ed;
  --ef-green:#198754;
  --ef-red:#dc3545;
  --ef-yellow:#ffc107;
}

.school-tool-panel {
  border:1px solid var(--ef-line);
  border-radius:1.1rem;
  background:#fff;
  box-shadow:0 10px 32px rgba(16,42,67,.05);
  padding:1rem;
}
.school-tool-panel + .school-tool-panel { margin-top:1rem; }

.school-tool-label {
  display:block;
  margin-bottom:.4rem;
  color:var(--ef-navy);
  font-size:.82rem;
  font-weight:800;
}
.school-tool-muted { color:#708391; font-size:.8rem; }
.school-tool-actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.school-tool-empty {
  padding:2rem 1rem;
  border:1px dashed #c8d8e4;
  border-radius:1rem;
  background:#fafcfd;
  color:#718493;
  text-align:center;
}
.school-tool-empty i { display:block; font-size:2rem; color:#9bb0bf; margin-bottom:.5rem; }

.tool-kpi-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.7rem;
}
.tool-kpi {
  padding:.8rem;
  border:1px solid var(--ef-line);
  border-radius:.9rem;
  background:#fafcfd;
}
.tool-kpi strong { display:block; font-size:1.3rem; color:var(--ef-navy); }
.tool-kpi span { color:#718493; font-size:.7rem; }

/* Tools hub */
.tools-category { margin-bottom:2.5rem; }
.tools-category-title {
  display:flex;
  align-items:center;
  gap:.65rem;
  margin-bottom:1rem;
}
.tools-category-title span {
  width:42px;height:42px;border-radius:.8rem;display:flex;align-items:center;justify-content:center;
  background:#eaf3ff;color:var(--ef-blue);font-size:1.1rem;
}
.tools-hub-card {
  height:100%;display:flex;flex-direction:column;padding:1rem;border:1px solid var(--ef-line);
  border-radius:1rem;background:#fff;text-decoration:none;color:inherit;transition:.16s ease;
}
.tools-hub-card:hover { transform:translateY(-2px); box-shadow:0 12px 30px rgba(16,42,67,.08); border-color:#9ec5fe; }
.tools-hub-card i { color:var(--ef-blue); font-size:1.35rem; }
.tools-hub-card strong { display:block; margin:.55rem 0 .3rem; font-size:1rem; }
.tools-hub-card small { color:#718493; line-height:1.45; }

/* Planner */
.planner-task {
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.8rem;padding:.75rem;
  border:1px solid var(--ef-line);border-radius:.85rem;background:#fff;margin-bottom:.55rem;
}
.planner-task-title { font-weight:800;color:var(--ef-navy); }
.planner-task-meta { display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.35rem; }
.planner-chip { padding:.22rem .45rem;border-radius:999px;background:#f0f4f7;color:#627889;font-size:.65rem;font-weight:700; }
.planner-chip.is-high { background:#fff0f2;color:#a51f30; }
.planner-day {
  border:1px solid var(--ef-line);border-radius:1rem;background:#fff;overflow:hidden;margin-bottom:.8rem;
}
.planner-day-head { display:flex;justify-content:space-between;gap:1rem;padding:.75rem .85rem;background:#f7fafc;border-bottom:1px solid var(--ef-line); }
.planner-block { display:flex;justify-content:space-between;gap:1rem;padding:.7rem .85rem;border-bottom:1px solid #edf2f5; }
.planner-block:last-child { border-bottom:0; }
.planner-block strong { display:block; }
.planner-block span { color:#718493;font-size:.72rem; }

/* Pomodoro */
.pomo-shell {
  position:relative;overflow:hidden;border-radius:1.4rem;padding:2rem;background:linear-gradient(135deg,#102a43,#155a7a);color:#fff;
  box-shadow:0 18px 46px rgba(16,42,67,.18);text-align:center;
}
.pomo-mode { text-transform:uppercase;letter-spacing:.1em;font-weight:900;font-size:.75rem;color:#9ed8ea; }
.pomo-time { font-size:clamp(4.2rem,15vw,8rem);font-weight:900;line-height:1;font-variant-numeric:tabular-nums;margin:.7rem 0; }
.pomo-cycles { display:flex;justify-content:center;gap:.4rem;margin:1rem 0; }
.pomo-dot { width:12px;height:12px;border-radius:50%;background:rgba(255,255,255,.2); }
.pomo-dot.is-done { background:#35d09f; }
.pomo-shell.is-break { background:linear-gradient(135deg,#0f5132,#1d7f59); }

/* Weekly schedule */
.week-grid {
  display:grid;grid-template-columns:repeat(5,minmax(180px,1fr));gap:.7rem;overflow-x:auto;padding-bottom:.3rem;
}
.week-day {
  min-height:420px;border:1px solid var(--ef-line);border-radius:1rem;background:#f9fbfd;padding:.65rem;
}
.week-day h3 { font-size:.86rem;text-transform:uppercase;letter-spacing:.04em;color:#506a7d; }
.week-entry {
  margin-top:.5rem;padding:.65rem;border-radius:.8rem;background:#fff;border:1px solid #dce6ed;box-shadow:0 5px 14px rgba(16,42,67,.04);
}
.week-entry strong,.week-entry span { display:block; }
.week-entry span { color:#708391;font-size:.7rem;margin-top:.15rem; }

/* Printable sheets */
.print-sheet-wrap {
  display:flex;
  justify-content:center;
  padding:1rem;
  background:#e8eef3;
  border-radius:1rem;
  overflow:auto;
}

.print-sheet {
  position:relative;
  width:210mm;
  height:297mm;
  min-height:0;
  box-sizing:border-box;
  overflow:hidden;
  background:#fff;
  color:#111;
  box-shadow:0 12px 35px rgba(16,42,67,.14);
}

.paper-pattern {
  position:absolute;
  inset:0;
  z-index:0;
  width:210mm;
  height:297mm;
  pointer-events:none;
}

.print-sheet-content {
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  width:100%;
  height:100%;
  box-sizing:border-box;
  padding:14mm;
}

.print-sheet-title {
  flex:0 0 auto;
  margin:0 0 6mm;
  padding:.8mm 1.5mm;
  background:rgba(255,255,255,.92);
  color:#111;
  font-size:16pt;
  line-height:1.15;
}

.print-sheet-body {
  flex:1 1 auto;
  min-height:0;
}

.cornell-sheet {
  display:grid;
  grid-template-columns:32% 68%;
  grid-template-rows:minmax(0,1fr) 22%;
  width:100%;
  height:100%;
  border:1px solid #333;
  box-sizing:border-box;
}

.cornell-cues {
  border-right:1px solid #333;
  padding:4mm;
}

.cornell-notes {
  padding:4mm;
}

.cornell-summary {
  grid-column:1 / -1;
  border-top:1px solid #333;
  padding:4mm;
}

.answer-lines {
  display:grid;
  grid-template-rows:repeat(24, minmax(0,1fr));
  height:100%;
}

.answer-row {
  display:grid;
  grid-template-columns:8mm 1fr;
  align-items:end;
  gap:2mm;
}

.answer-row b {
  padding-bottom:1.2mm;
}

.answer-line {
  height:100%;
  min-height:7mm;
  border-bottom:1px solid #555;
}

.checklist-line {
  display:grid;
  grid-template-columns:6mm 1fr;
  align-items:center;
  gap:3mm;
  height:calc(100% / 22);
  min-height:8mm;
}

.check-box-print {
  display:block;
  width:5mm;
  height:5mm;
  box-sizing:border-box;
  border:1px solid #111;
}

.checklist-writing-line {
  display:block;
  width:100%;
  height:100%;
  border-bottom:1px solid #aaa;
}

/* Seating */
.seat-grid { display:grid;gap:.55rem;justify-content:center; }
.seat {
  min-height:76px;min-width:100px;padding:.55rem;border:1px solid #cfdde7;border-radius:.8rem;background:#fff;display:flex;
  align-items:center;justify-content:center;text-align:center;font-weight:800;color:var(--ef-navy);cursor:grab;position:relative;
}
.seat.is-blocked { background:#edf1f4;color:#8a99a5;border-style:dashed;cursor:not-allowed; }
.seat.is-selected { border-color:var(--ef-blue);box-shadow:0 0 0 .2rem rgba(13,110,253,.13); }
.seat small { position:absolute;top:.25rem;left:.35rem;color:#9aabb7;font-size:.58rem;font-weight:700; }
.teacher-desk { max-width:360px;margin:0 auto 1rem;padding:.6rem;border-radius:.8rem;text-align:center;background:#102a43;color:#fff;font-weight:800; }

/* Whiteboard */
.whiteboard-toolbar { display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;padding:.55rem;border:1px solid var(--ef-line);border-radius:.9rem;background:#fff;position:sticky;top:72px;z-index:20; }
.whiteboard-stage-wrap { margin-top:.7rem;padding:.75rem;border-radius:1rem;background:#dfe7ed;overflow:auto; }
.whiteboard-stage { position:relative;width:1100px;height:650px;margin:auto;background:#fff;box-shadow:0 10px 25px rgba(16,42,67,.12); }
.whiteboard-stage.is-grid { background-image:linear-gradient(#e7edf1 1px,transparent 1px),linear-gradient(90deg,#e7edf1 1px,transparent 1px);background-size:28px 28px; }
.whiteboard-stage.is-lined { background-image:repeating-linear-gradient(to bottom,#fff 0,#fff 31px,#dbe6ed 32px); }

/* Presentation timer */
.presentation-display { text-align:center;padding:1.5rem;border-radius:1.2rem;background:#102a43;color:#fff; }
.presentation-name { color:#9ed8ea;font-size:clamp(1.4rem,4vw,2.5rem);font-weight:800;min-height:1.2em; }
.presentation-time { font-size:clamp(4rem,13vw,7rem);font-weight:900;line-height:1;font-variant-numeric:tabular-nums; }
.presentation-time.is-over { color:#ff8b94; }
.results-table td,.results-table th { vertical-align:middle; }

/* Converter */
.converter-value { font-size:1.5rem;font-weight:800; }
.converter-equals { text-align:center;color:#8093a1;font-size:1.5rem;padding-top:2rem; }
.converter-explain { padding:.8rem;border-radius:.8rem;background:#f5f8fa;color:#627889;font-size:.8rem; }

/* Rubrics */
.rubric-criterion { border:1px solid var(--ef-line);border-radius:1rem;background:#fff;padding:.8rem;margin-bottom:.75rem; }
.rubric-levels { display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:.5rem;overflow-x:auto; }
.rubric-preview { overflow:auto;border:1px solid var(--ef-line);border-radius:1rem;background:#fff; }
.rubric-preview table { min-width:900px;margin:0; }
.rubric-preview th { background:#f4f8fa; }

/* Certificates */
.certificate-wrap { padding:1rem;background:#e7edf2;border-radius:1rem;overflow:auto; }
.certificate {
  width:297mm;min-height:210mm;background:#fff;margin:auto;box-shadow:0 12px 35px rgba(16,42,67,.15);
  padding:16mm 20mm;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;
  border:8px solid #102a43;outline:2px solid #18a9bb;outline-offset:-14px;
}
.certificate-logo { max-width:42mm;max-height:28mm;object-fit:contain;margin-bottom:5mm; }
.certificate-kicker { text-transform:uppercase;letter-spacing:.15em;color:#159aaa;font-weight:900;font-size:10pt; }
.certificate-title { font-size:30pt;font-weight:900;color:#102a43;margin:4mm 0; }
.certificate-name { font-size:24pt;font-weight:850;color:#0d6efd;border-bottom:1px solid #aebcc7;padding:0 8mm 2mm;margin:3mm 0; }
.certificate-text { max-width:220mm;font-size:13pt;line-height:1.5; }
.certificate-bottom { display:flex;justify-content:space-between;width:100%;margin-top:15mm;gap:15mm;font-size:10pt; }
.certificate-sign { min-width:65mm;border-top:1px solid #555;padding-top:2mm; }

/* Answer sheets */
.answer-sheet { width:210mm;min-height:297mm;background:#fff;padding:12mm;margin:auto;box-shadow:0 12px 35px rgba(16,42,67,.14); }
.answer-header { display:grid;grid-template-columns:2fr 1fr 1fr;gap:5mm;margin-bottom:7mm; }
.answer-field { border-bottom:1px solid #222;min-height:8mm; }
.answer-mcq-grid { display:grid;grid-template-columns:repeat(2,1fr);gap:3mm 8mm; }
.answer-q { display:flex;align-items:center;gap:2mm;min-height:9mm; }
.answer-q-num { width:8mm;font-weight:800; }
.answer-bubble { width:5mm;height:5mm;border:1px solid #222;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:7pt; }
.answer-open { margin-bottom:5mm; }
.answer-open-line { border-bottom:1px solid #aaa;height:8mm; }

/* Bingo */
.bingo-card { break-inside:avoid;width:190mm;min-height:260mm;background:#fff;margin:0 auto 10mm;padding:10mm;border:2px solid #102a43; }
.bingo-title { text-align:center;font-size:22pt;font-weight:900;color:#102a43;margin-bottom:6mm; }
.bingo-grid { display:grid;border-left:1px solid #222;border-top:1px solid #222; }
.bingo-cell { min-height:28mm;padding:3mm;border-right:1px solid #222;border-bottom:1px solid #222;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:750;overflow-wrap:anywhere; }

/* Word search */
.wordsearch-grid { display:grid;gap:0;width:max-content;margin:auto;border:1px solid #222;background:#fff; }
.wordsearch-cell { width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-weight:850;border:1px solid #edf0f2;font-size:.95rem; }
.wordsearch-cell.is-solution { background:#fff3cd;color:#664d03; }
.word-list-print { display:flex;flex-wrap:wrap;gap:.5rem 1rem;justify-content:center;margin-top:1rem; }

/* Crossword */
.crossword-grid { display:grid;gap:0;width:max-content;margin:auto;background:#222;border:2px solid #222; }
.crossword-cell { position:relative;width:34px;height:34px;background:#fff;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:1rem;border:1px solid #cfd5da; }
.crossword-cell.is-black { background:#222;border-color:#222; }
.crossword-number { position:absolute;top:1px;left:2px;font-size:.48rem;font-weight:800;color:#555; }
.crossword-clues { columns:2;column-gap:2rem; }
.crossword-clue { break-inside:avoid;margin-bottom:.5rem; }

/* Better sorter */
.draw-winner { padding:1.5rem;text-align:center;border-radius:1.2rem;background:linear-gradient(135deg,#102a43,#155a7a);color:#fff; }
.draw-winner small { display:block;text-transform:uppercase;letter-spacing:.08em;color:#9ed8ea;font-weight:850; }
.draw-winner strong { display:block;font-size:clamp(2rem,7vw,4rem);line-height:1.15;margin-top:.3rem;overflow-wrap:anywhere; }
.draw-history { display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.7rem; }
.draw-history span { padding:.3rem .5rem;border-radius:999px;background:#edf3f7;color:#5d7485;font-size:.68rem; }

@media(max-width:991.98px){
  .tool-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rubric-levels{grid-template-columns:repeat(4,220px)}
}
@media(max-width:767.98px){
  .week-grid{grid-template-columns:repeat(5,240px)}
  .pomo-shell{padding:1.2rem}
  .whiteboard-toolbar{top:66px}
  .rubric-levels{grid-template-columns:repeat(4,200px)}
  .crossword-clues{columns:1}
  .certificate{transform-origin:top left}
  .answer-mcq-grid{grid-template-columns:1fr}
}
@media print {
  header, nav, footer, .navbar, .no-print, .tool-hero, .print-hide { display:none !important; }
  body { background:#fff !important; }
  main, section, .container { max-width:none !important; width:100% !important; padding:0 !important; margin:0 !important; }
  .print-sheet-wrap,.certificate-wrap,.school-tool-panel { padding:0 !important;border:0 !important;box-shadow:none !important;background:#fff !important; }
  .print-sheet,.certificate,.answer-sheet,.bingo-card { box-shadow:none !important;margin:0 auto !important; }
  .print-sheet {
    width:210mm !important;
    height:297mm !important;
    min-height:0 !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
    page-break-after:avoid !important;
    break-after:avoid-page !important;
  }
  .paper-pattern {
    display:block !important;
    width:210mm !important;
    height:297mm !important;
  }
  .week-grid { overflow:visible !important; }
}
