@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Roboto:wght@400;500;700&display=swap');

/* ============ BASE ============ */
:root {
  --principal: #4B347F;
  --botao: #7054A6;
  --cartao: #EEE8F7;
  --fundo: #FFFFFF;
  --texto: #282333;
  --destaque: #E8C66A;
  --apoio: #3C93FA;
  --texto-suave: rgba(40, 35, 51, .72);
  --borda: rgba(75, 52, 127, .18);
  --menu-largura: 264px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}


h1, h2, h3, .logo {
  font-family: 'Kaushan Script', cursive;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 .6em;
  color: var(--texto);
}


h2 { font-size: 1.55rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
canvas { display: block; width: 100% !important; max-height: 300px; }

:focus-visible { outline: 3px solid var(--apoio); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============ COMPONENTES ============ */
.btn {
  display: inline-block;
  padding: .7rem 1.2rem;
  border: 2px solid var(--botao);
  border-radius: 8px;
  background: var(--botao);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--principal); border-color: var(--principal); }
.btn:active { transform: translateY(1px); }
.btn-destaque { background: var(--destaque); border-color: var(--destaque); color: var(--texto); }
.btn-destaque:hover { background: #dcb64f; border-color: #dcb64f; }
.btn-claro { background: #fff; color: var(--principal); border-color: var(--botao); }
.btn-claro:hover { background: var(--cartao); color: var(--principal); border-color: var(--botao); }
.btn-pequeno { padding: .35rem .8rem; font-size: .88rem; }

.cartao {
  background: var(--cartao);
  border-radius: 12px;
  padding: 1.4rem;
  margin-bottom: 1.25rem;
}
.cartao > :last-child { margin-bottom: 0; }

.form { display: flex; flex-direction: column; gap: .9rem; }
.form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; font-size: .92rem; }
.form-linha { display: flex; flex-direction: row; gap: .6rem; align-items: stretch; flex-wrap: wrap; }
.form-linha > input, .form-linha > select { flex: 1 1 160px; }
input, select, textarea {
  width: 100%;
  padding: .65rem .75rem;
  border: 2px solid var(--borda);
  border-radius: 6px;
  background: #fff;
  color: var(--texto);
  font: inherit;
  font-weight: 400;
}
input:focus, select:focus, textarea:focus { border-color: var(--apoio); outline: none; }
textarea { resize: vertical; }
input[type="radio"], input[type="checkbox"] { width: auto; accent-color: var(--botao); }

.escolha-perfil { display: flex; gap: 1.2rem; border: 0; padding: 0; margin: 0; }
.escolha-perfil legend { font-weight: 700; font-size: .92rem; margin-bottom: .4rem; padding: 0; }
.escolha-perfil label { flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; }

.erro { color: #a3202d; font-weight: 700; margin: 0; }
.dica { color: var(--texto-suave); font-size: .9rem; margin: 0 0 .8rem; }
.vazio { color: var(--texto-suave); font-style: italic; }

.abas { display: flex; gap: .3rem; margin-bottom: 1.2rem; border-bottom: 2px solid var(--borda); flex-wrap: wrap; }
.aba {
  padding: .6rem 1rem;
  border: 0;
  border-bottom: 4px solid transparent;
  background: none;
  color: var(--texto);
  font-weight: 700;
  margin-bottom: -2px;
}
.aba:hover { color: var(--principal); }
.aba.ativa { border-bottom-color: var(--apoio); color: var(--principal); }

.chefe {
  color: #fff;
  font-family: 'Times New Roman', Times, serif;
}


.lista > li {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--borda);
}
.lista > li:last-child { border-bottom: 0; }
.lista small { color: var(--texto-suave); }

.rolagem { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; font-size: .93rem; }
.tabela th { background: var(--principal); color: #fff; text-align: left; padding: .7rem .8rem; white-space: nowrap; }
.tabela td { padding: .65rem .8rem; border-bottom: 1px solid var(--cartao); }
.tabela tr:last-child td { border-bottom: 0; }
.tabela .bom { color: #1d6b3a; font-weight: 700; }
.tabela .atencao { color: #a3202d; font-weight: 700; }

.tag {
  display: inline-block;
  padding: .15rem .65rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 700;
  background: var(--cartao);
  color: var(--principal);
}
.tag-aviso, .tag-projeto, .tag-evento { background: var(--destaque); color: var(--texto); }
.tag-prova { background: var(--principal); color: #fff; }
.tag-conversa, .tag-duvida, .tag-trabalho { background: var(--apoio); color: var(--texto); }

.progresso { height: 10px; background: #fff; border-radius: 99px; overflow: hidden; }
.progresso-barra { height: 100%; background: var(--destaque); border-radius: 99px; transition: width .4s; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 50;
  padding: .8rem 1.3rem;
  border-radius: 8px;
  background: var(--texto);
  color: #fff;
  border-left: 6px solid var(--destaque);
  max-width: 90vw;
}

.modal {
  width: min(640px, 92vw);
  padding: 1.6rem;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--texto);
}
.modal::backdrop { background: rgba(40, 35, 51, .6); }
.modal .fechar {
  position: absolute; top: .6rem; right: .8rem;
  width: 2.2rem; height: 2.2rem;
  border: 0; border-radius: 50%;
  background: var(--cartao); color: var(--principal);
  font-size: 1.4rem; line-height: 1;
}

/* ============ TELA DE ENTRADA ============ */
.topo-entrada {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem clamp(1rem, 5vw, 4rem);
  background: var(--principal);
}
.topo-entrada .logo { color: #fff; font-size: 4rem; margin: 0; }
.selo-escola { color: var(--destaque); font-weight: 700; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem);
  background: var(--principal);
  color: #fff;
}
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.8rem); max-width: 14ch; margin-bottom: 1.2rem; }
.hero-texto p { max-width: 52ch; font-size: 1.08rem; margin-bottom: 1.6rem; }

.cartao-acesso { background: #fff; color: var(--texto); box-shadow: 0 10px 30px rgba(40, 35, 51, .3); margin: 0; }
.cartao-acesso .form label input,
.cartao-acesso .form label select { background: var(--cartao); }
.demo-acessos { display: grid; gap: .5rem; }

.recursos { padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 4rem); }
.recursos > h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 1.5rem; }
.grade-recursos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.grade-recursos .cartao { margin: 0; border-left: 5px solid var(--apoio); border-radius: 4px 12px 12px 4px; }
.rodape { padding: 1.4rem; text-align: center; background: var(--texto); color: #fff; font-size: .9rem; }

/* ============ PLATAFORMA ============ */
#app { display: flex; min-height: 100vh; }

.menu {
  width: var(--menu-largura);
  flex-shrink: 0;
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  background: var(--principal);
  color: #fff;
}
.menu-topo { padding: 1.4rem 1.2rem 1rem; display: flex; flex-direction: column; }
.menu-topo .logo { color: #fff; font-size: 2.1rem; margin: 0; }
.menu-topo small { color: var(--destaque); font-weight: 700; }

.menu-nav { flex: 1; overflow-y: auto; padding: .5rem 0; }
.menu-item {
  display: block; width: 100%;
  padding: .8rem 1.2rem;
  border: 0; border-left: 5px solid transparent;
  background: none; color: #fff;
  text-align: left; font-size: .98rem;
}
.menu-item:hover { background: rgba(255, 255, 255, .1); }
.menu-item.ativo { background: var(--botao); border-left-color: var(--destaque); font-weight: 700; }

.menu-usuario {
  display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center;
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, .2);
}
.menu-usuario strong, .menu-usuario small { display: block; }
.menu-usuario small { color: rgba(255, 255, 255, .8); }
.btn-sair { grid-column: 1 / -1; padding: .45rem; }
.avatar {
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--destaque); color: var(--texto);
  font-weight: 700;
}

.conteudo { flex: 1; min-width: 0; }
.barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem clamp(1rem, 3vw, 2rem);
  background: #fff;
  border-bottom: 2px solid var(--cartao);
}
.barra h1 { flex: 1; margin: 0; font-size: 1.8rem; color: var(--principal); }
.btn-menu { display: none; padding: .5rem .9rem; border: 2px solid var(--botao); border-radius: 8px; background: #fff; color: var(--principal); font-weight: 700; }

.notif { position: relative; }
.contador {
  display: inline-block; min-width: 1.4rem; padding: 0 .35rem;
  border-radius: 99px; background: var(--destaque); color: var(--texto);
  font-size: .8rem; text-align: center;
}
.painel-notif {
  position: absolute; right: 0; top: calc(100% + .5rem);
  width: min(340px, 86vw); max-height: 360px; overflow-y: auto;
  padding: .5rem 1rem;
  background: #fff; border: 2px solid var(--cartao); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(40, 35, 51, .2);
}
.painel-notif li { padding: .7rem 0; border-bottom: 1px solid var(--cartao); font-size: .92rem; }
.painel-notif li:last-child { border-bottom: 0; }

.area-principal { padding: clamp(1rem, 3vw, 2rem); max-width: 1200px; }
.view > .cartao:last-child { margin-bottom: 0; }

/* ---- grades ---- */
.grade-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat {
  display: flex; flex-direction: column; gap: .2rem;
  padding: 1.1rem 1.2rem;
  background: var(--cartao);
  border-radius: 12px;
  border-bottom: 5px solid var(--destaque);
}
.stat span { font-size: .9rem; color: var(--texto-suave); }
.stat strong { font-size: 2rem; line-height: 1.1; color: var(--principal); }

.grade-graficos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1.25rem; }
.grade-duas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; align-items: start; }
.grade-duas > .cartao, .grade-graficos > .cartao { margin-bottom: 0; }
.grade-calendario { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.grade-calendario > div > .cartao { margin-bottom: 1.25rem; }
.filtro { margin-bottom: 1.25rem; max-width: 420px; }
.filtro label { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; }

.acoes { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.resultado { padding: 1rem; background: #fff; border-radius: 8px; max-height: 520px; overflow-y: auto; white-space: pre-wrap; }
.resultado h3 { font-size: 1.2rem; color: var(--principal); }

/* ---- calendário ---- */
.cal-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.cal-topo h2 { margin: 0; text-transform: capitalize; }
.cal-semana, .cal-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-semana span { text-align: center; font-weight: 700; font-size: .85rem; color: var(--principal); padding-bottom: .3rem; }
.cal-dia {
  min-height: 68px; padding: .3rem;
  display: flex; flex-direction: column; gap: .2rem;
  background: #fff; border: 2px solid transparent; border-radius: 6px;
  text-align: left; color: var(--texto); font-size: .88rem;
}
.cal-dia:hover { border-color: var(--botao); }
.cal-dia.fora { opacity: .4; }
.cal-dia.hoje { border-color: var(--apoio); font-weight: 700; }
.cal-dia.selecionado { background: var(--principal); color: #fff; }
.cal-pontos { display: flex; gap: 3px; flex-wrap: wrap; }
.ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--texto); border: 1px solid rgba(40, 35, 51, .35); }
.ponto.prova { background: var(--principal); }
.ponto.trabalho { background: var(--apoio); }
.ponto.projeto, .ponto.evento { background: var(--destaque); }
.ponto.pessoal { background: var(--botao); }

/* ---- turma e chat ---- */
.lista-colegas { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 1rem; }
.lista-colegas li { flex-direction: row; align-items: center; gap: .6rem; }
.chat-mensagens {
  display: flex; flex-direction: column; gap: .5rem;
  height: 340px; overflow-y: auto;
  padding: .8rem; margin-bottom: .8rem;
  background: #fff; border-radius: 8px;
}
.msg { max-width: 82%; padding: .5rem .8rem; border-radius: 12px 12px 12px 2px; background: var(--cartao); }
.msg small { display: block; font-weight: 700; color: var(--principal); }
.msg.minha { align-self: flex-end; background: var(--botao); color: #fff; border-radius: 12px 12px 2px 12px; }
.msg.minha small { color: var(--destaque); }

/* ---- mural ---- */
.grade-mural { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
.destaque-lateral { position: sticky; top: 5rem; border-top: 5px solid var(--destaque); }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.chip { padding: .4rem 1rem; border: 2px solid var(--botao); border-radius: 99px; background: #fff; color: var(--principal); font-weight: 700; font-size: .9rem; }
.chip.ativo { background: var(--principal); border-color: var(--principal); color: #fff; }

.post { padding: 1.2rem; margin-bottom: 1.25rem; background: var(--cartao); border-radius: 12px; }
.post-topo { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; flex-wrap: wrap; }
.post-topo .avatar { width: 2.3rem; height: 2.3rem; background: var(--principal); color: #fff; font-size: .9rem; }
.post-topo small { display: block; color: var(--texto-suave); }
.post h3 { font-size: 1.25rem; }
.post-acoes { display: flex; gap: .5rem; margin-top: .6rem; }
.post-acoes button { padding: .3rem .8rem; border: 2px solid var(--borda); border-radius: 99px; background: #fff; color: var(--principal); font-weight: 700; font-size: .85rem; }
.post-acoes button.curtido { background: var(--destaque); border-color: var(--destaque); color: var(--texto); }
.comentarios { margin-top: .8rem; padding: .6rem .8rem; background: #fff; border-radius: 8px; font-size: .92rem; }
.comentarios p { margin: 0 0 .4rem; }

/* ---- biblioteca ---- */
.prateleira { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 1.1rem; margin-top: 1.25rem; padding-bottom: .8rem; border-bottom: 10px solid #b99c5a; }
.livro { display: flex; flex-direction: column; background: var(--cartao); border-radius: 6px 6px 0 0; overflow: hidden; }
.capa { min-height: 150px; padding: .8rem; display: flex; align-items: flex-end; background: var(--botao); color: #fff; font-family: 'Kaushan Script', cursive; font-size: 1.2rem; line-height: 1.2; }
.livro-info { padding: .7rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; font-size: .88rem; }
.livro-info .btn { margin-top: auto; }
.status { font-weight: 700; }
.status.disponivel { color: #1d6b3a; }
.status.emprestado { color: #a3202d; }

.conversa { padding: 1.2rem; margin-bottom: 1.25rem; background: var(--cartao); border-radius: 12px; border-left: 6px solid var(--apoio); }
.conversa .comentario { padding: .5rem 0; border-top: 1px solid var(--borda); }
.conversa .comentario small { font-weight: 700; color: var(--principal); }

.pergunta-bloco { padding: .8rem; background: #fff; border-radius: 8px; display: flex; flex-direction: column; gap: .5rem; }

/* ============ TELAS PEQUENAS ============ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .grade-mural, .grade-calendario { grid-template-columns: 1fr; }
  .destaque-lateral { position: static; }
}

@media (max-width: 860px) {
  .menu {
    position: fixed; z-index: 30; left: 0; top: 0;
    transform: translateX(-100%);
    transition: transform .25s;
  }
  .menu.aberto { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(40, 35, 51, .55); }
  .btn-menu { display: inline-block; }
  .barra h1 { font-size: 1.4rem; }
}

@media (max-width: 520px) {
  .topo-entrada { flex-direction: column; gap: .3rem; align-items: flex-start; }
  .cal-dia { min-height: 48px; font-size: .78rem; }
  .stat strong { font-size: 1.6rem; }
}








.tooltip-container {
  position: relative;
  width: 55px;
  height: 55px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 17px;
  border-radius: 10px;
}

.tooltip {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  border-radius: 15px;
  box-shadow: inset 5px 5px 5px rgba(0, 0, 0, 0.2),
    inset -5px -5px 15px rgba(255, 255, 255, 0.1),
    5px 5px 15px rgba(0, 0, 0, 0.3), -5px -5px 15px rgba(255, 255, 255, 0.1);
}

.profile {
  background: #2a2b2f;
  border-radius: 10px 15px;
  padding: 10px;
  border: 1px solid #52382f;
}

.tooltip-container:hover .tooltip {
  top: -150px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.icon {
  text-decoration: none;
  color: #fff;
  display: block;
  position: relative;
}
.layer {
  width: 55px;
  height: 55px;
  transition: transform 0.3s;
}
.icon:hover .layer {
  transform: rotate(-35deg) skew(20deg);
}
.layer span {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  border: 1px solid #fff;
  border-radius: 15px;
  transition: all 0.3s;
}

.layer span,
.text {
  color: #e6683c;
  border-color: #e6683c;
}

.icon:hover.layer span {
  box-shadow: -1px 1px 3px #e6683c;
}
.icon .text {
  position: absolute;
  left: 50%;
  bottom: -5px;
  opacity: 0;
  font-weight: 500;
  transform: translateX(-50%);
  transition: bottom 0.3s ease, opacity 0.3s ease;
}
.icon:hover .text {
  bottom: -35px;
  opacity: 1;
}

.icon:hover .layer span:nth-child(1) {
  opacity: 0.2;
}
.icon:hover .layer span:nth-child(2) {
  opacity: 0.4;
  transform: translate(5px, -5px);
}
.icon:hover .layer span:nth-child(3) {
  opacity: 0.6;
  transform: translate(10px, -10px);
}
.icon:hover .layer span:nth-child(4) {
  opacity: 0.8;
  transform: translate(15px, -15px);
}
.icon:hover .layer span:nth-child(5) {
  opacity: 1;
  transform: translate(20px, -20px);
}

.instagramSVG {
  font-size: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: -webkit-linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f09433', endColorstr='#bc1888',GradientType=1 );
}
.user {
  display: flex;
  gap: 10px;
}
.img {
  width: 10px;
  height: 10px;
  font-size: 5px;
  font-weight: 10px;
  border: 1px solid #e6683c;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.name {
  font-size: 17px;
  font-weight: 700;
  color: #e6683c;
}
.details {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: #fff;
}
.about {
  color: #ccc;
  padding-top: 5px;
}
