/* IDENTIDADE: altere as variáveis para ajustes de interface. A logo é o arquivo original. */
:root {
  --blue: #203e80;
  --blue-dark: #152e64;
  --yellow: #fac900;
  --green: #177766;
  --ink: #20304c;
  --muted: #64738a;
  --line: #dce4ef;
  --bg: #f4f7fc;
  --red: #a72436;
  --radius: 18px;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--blue);
}
button {
  border: 0;
  border-radius: 11px;
  background: var(--blue);
  color: white;
  padding: 12px 18px;
  font-weight: 650;
}
button:hover {
  filter: brightness(0.95);
}
button.secondary {
  background: white;
  color: var(--blue);
  border: 1px solid var(--line);
}
button.danger {
  background: var(--red);
}
button.link {
  background: none;
  color: var(--blue);
  padding: 8px;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #abbad0;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  min-height: 46px;
}
textarea {
  min-height: 110px;
}
input[type="checkbox"] {
  width: 19px;
  min-height: 19px;
  accent-color: var(--blue);
}
label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 14px 0 6px;
}
h1 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.18;
  margin: 8px 0 16px;
}
h2 {
  font-size: 1.35rem;
  margin: 0 0 15px;
}
h3 {
  font-size: 1.05rem;
  margin: 0 0 10px;
}
p {
  line-height: 1.55;
}
small,
.muted {
  color: var(--muted);
}
:focus-visible {
  outline: 3px solid #bc8400;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -100px;
  background: white;
  padding: 10px;
  z-index: 1000;
}
.skip:focus {
  top: 0;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.brand {
  background: var(--blue);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}
.brand img {
  width: min(350px, 85%);
  height: auto;
}
.brand p {
  max-width: 390px;
  color: #e1e9fb;
}
.brand .tag {
  color: var(--yellow);
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.auth-card {
  width: 100%;
  max-width: 530px;
}
.auth-card .logo-mobile {
  display: none;
}
.panel,
.card,
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.panel {
  margin: 18px 0;
}
.email {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid #abbad0;
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.email input {
  border: 0;
  border-radius: 0;
  min-width: 110px;
  flex: 1;
  width: 100px;
}
.email span {
  display: flex;
  align-items: center;
  padding: 10px;
  font-size: 0.77rem;
  background: #edf2fa;
  overflow-wrap: anywhere;
}
.password {
  display: flex;
  gap: 6px;
}
.password button {
  background: #eaf0fb;
  color: var(--blue);
  padding: 10px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 400;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
}
.full {
  width: 100%;
  margin-top: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.topbar {
  height: 76px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.topbar .brand-name {
  font-size: 1.25rem;
  color: var(--blue);
  font-weight: 800;
}
.layout {
  max-width: 1220px;
  padding: 30px 28px 70px;
  margin: auto;
}
.hero {
  border-radius: 22px;
  padding: 30px;
  background: var(--blue);
  color: white;
  margin: 18px 0 28px;
  border-bottom: 5px solid var(--yellow);
}
.hero p {
  color: #dfe8fc;
}
.hero button {
  background: var(--yellow);
  color: #173063;
}
.eyebrow {
  font-size: 0.73rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 750;
}
.card {
  text-align: left;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 156px;
  box-shadow: 0 3px 12px #203e8005;
}
.card .symbol {
  color: var(--blue);
  background: #edf3fe;
  border-radius: 12px;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.card span {
  font-weight: 400;
  line-height: 1.5;
  font-size: 0.9rem;
  color: var(--muted);
}
.card strong {
  font-size: 1.05rem;
}
.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background: #edf2fa;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 650;
}
.badge.ok {
  background: #e6f5ee;
  color: #14614d;
}
.badge.warn {
  background: #fff2c7;
  color: #6e4b00;
}
.stat strong {
  font-size: 2rem;
  display: block;
  margin: 8px 0;
}
.list {
  display: grid;
  gap: 10px;
}
.list-item {
  background: white;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 12px;
}
.list-item button {
  flex-shrink: 0;
}
.filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.notice {
  background: #edf3ff;
  border-left: 4px solid var(--blue);
  padding: 14px 18px;
  border-radius: 8px;
  line-height: 1.5;
}
.notice.warning {
  background: #fff5d9;
  border-color: #dab000;
}
.empty {
  text-align: center;
  padding: 45px 20px;
  color: var(--muted);
}
.drawer-back {
  position: fixed;
  inset: 0;
  background: #10204466;
  z-index: 40;
}
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(350px, 90vw);
  background: white;
  padding: 24px;
  overflow: auto;
  z-index: 41;
  box-shadow: -10px 0 40px #10204433;
}
.drawer nav button {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  color: var(--ink);
  padding: 13px 12px;
  margin-top: 4px;
}
.drawer nav button:hover {
  background: #edf2fa;
}
.words {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}
.word {
  background: white;
  color: var(--ink);
  border: 1px solid #adbad0;
  min-height: 56px;
  font-weight: 600;
}
.word small {
  display: block;
  font-weight: 400;
}
.word.error {
  background: #fff0ee;
  color: #9e2330;
  border: 2px solid #ae3040;
}
.word.error:after {
  content: " ✕";
}
.word:disabled {
  opacity: 1;
}
.timer {
  font-size: 2.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--blue);
  font-weight: 800;
}
.record-head {
  position: sticky;
  top: 76px;
  background: #f4f7fc;
  z-index: 10;
  padding: 12px 0;
}
.big-number {
  font-size: 4.5rem;
  line-height: 1;
  color: var(--blue);
  font-weight: 800;
}
.progress {
  height: 9px;
  background: #e6ecf5;
  border-radius: 9px;
  overflow: hidden;
}
progress {
  width: 100%;
  height: 12px;
  accent-color: var(--green);
}
.notification.unread {
  border-left: 4px solid var(--blue);
  background: #f3f7ff;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: #172d52;
  color: white;
  padding: 0;
  border-radius: 12px;
  z-index: 80;
}
#toast.active {
  padding: 14px 20px;
}
#busy {
  position: fixed;
  inset: 0;
  background: #ffffffb8;
  display: grid;
  place-items: center;
  z-index: 90;
  font-size: 1.3rem;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
}
td,
th {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--blue);
}
.steps {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 700;
}
.foot {
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--muted);
}
.error-text {
  color: var(--red);
}
.editor-row {
  display: grid;
  grid-template-columns: 40px 1fr 100px;
  align-items: center;
  gap: 10px;
  margin: 7px 0;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.school-block {
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 12px 0;
}
.role-pick {
  display: block;
  text-align: left;
  margin: 12px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.role-pick input {
  width: 18px;
  min-height: 18px;
}
.recovery {
  max-width: 600px;
  margin: 40px auto;
}
@media (max-width: 850px) {
  .auth {
    grid-template-columns: 1fr;
  }
  .brand {
    display: none;
  }
  .auth-main {
    padding: 24px 18px;
    align-items: flex-start;
  }
  .auth-card .logo-mobile {
    display: block;
    width: 150px;
    margin: auto;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .words {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filters {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .layout {
    padding: 20px 16px 50px;
  }
  .topbar {
    padding: 8px 16px;
  }
  .grid,
  .grid.two,
  .filters {
    grid-template-columns: 1fr;
  }
  .panel,
  .card {
    padding: 18px;
  }
  .hero {
    padding: 24px;
  }
  .words {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .email span {
    width: 100%;
    font-size: 0.8rem;
  }
  .auth-card h1 {
    font-size: 1.6rem;
  }
  .editor-row {
    grid-template-columns: 30px 1fr 75px;
  }
  .row.between {
    align-items: flex-start;
  }
  button {
    min-height: 44px;
  }
  .topbar small {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Sininho vetorial: não depende de fontes de emoji instaladas. */
.notification-button { display: inline-flex; align-items: center; gap: 6px; }
/* Impressão da lista de leitura: o navegador remove controles de navegação. */
@media print {
 .topbar, .foot, .notice, #toast, #busy, main > .row > button { display: none !important; }
 body { background: white; color: black; }
 .layout { max-width: none; padding: 0; }
 .words { grid-template-columns: repeat(5, 1fr); gap: 8px; }
 .word { break-inside: avoid; border: 1px solid #777; }
}
