:root{
  --app-bg:#f5f5f7;
  --app-text:#1f2933;

  --sidebar-bg:#ffffff;
  --sidebar-border:#e5e7eb;
  --sidebar-text:#4b5563;
  --sidebar-link-hover-bg:#f3f4f6;

  --topbar-bg:#ffffff;
  --topbar-border:#e5e7eb;
}

body.role-admin{--accent:#2563EB}
body.role-secretaria{--accent:#0EA5E9}
body.role-coordenacao{--accent:#6366F1}
body.role-professor{--accent:#22C55E}
body.role-aluno{--accent:#F59E0B}
body.role-guest{--accent:#2563EB}

body.layout-core{
  background:var(--app-bg);
  color:var(--app-text);
  min-height:100vh;
}

.app-shell{
  min-height:100vh;
  display:flex;
}

/* Sidebar */
.app-sidebar{
  width:260px;
  background:var(--sidebar-bg);
  border-right:1px solid var(--sidebar-border);
  padding:1.25rem 1rem;
  position:sticky;
  top:0;
  height:100vh;
}

.sidebar-header{
  padding-bottom:.75rem;
  border-bottom:1px solid var(--sidebar-border);
  margin-bottom:1rem;
}

.brand-badge{
  width:36px;height:36px;border-radius:999px;
  background:var(--accent);
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:700;font-size:18px;
}

.brand-title{font-weight:600;font-size:14px}
.brand-subtitle{font-size:11px;color:#9ca3af}

.sidebar-section{margin-bottom:1.25rem}
.sidebar-section-title{
  font-size:11px;text-transform:uppercase;letter-spacing:.08em;
  color:#9ca3af;margin-bottom:.35rem;
}

.sidebar-link{
  display:flex;align-items:center;
  padding:.45rem .6rem;border-radius:.5rem;
  color:var(--sidebar-text);font-size:14px;text-decoration:none;
  margin-bottom:.15rem;
  transition:background-color .12s ease,color .12s ease,transform .05s ease;
}
.sidebar-link:hover{
  background:var(--sidebar-link-hover-bg);
  color:#111827;
  transform:translateX(1px);
}

.sidebar-footer{
  border-top:1px solid var(--sidebar-border);
  padding-top:.75rem;
  font-size:13px;
}
.role-badge{
  background-color:rgba(37,99,235,.1);
  color:var(--accent);
  border-radius:999px;
  padding:.1rem .6rem;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

/* Topbar */
.app-topbar{
  height:56px;
  background:var(--topbar-bg);
  border-bottom:1px solid var(--topbar-border);
  padding:0 .75rem;
}
.topbar-title{font-size:16px;font-weight:600}

.app-main{flex:1;min-width:0}

/* A casca do app ocupa 100vh (altura inteira da tela) */
.app-shell{
  min-height: 100vh;
}

/* Sidebar fica com altura da tela e com rolagem interna */
.app-sidebar{
  height: 100vh;
  position: sticky;   /* gruda no topo quando rolar */
  top: 0;
  overflow-y: auto;   /* ✅ rolagem própria */
}

/* Dá um respiro pro rodapé do sidebar não colar */
.sidebar-footer{
  padding-bottom: 16px;
}
