:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1b2433;
  --muted: #667085;
  --border: #e4e9f1;
  --primary: #0f62ae;
  --primary-dark: #0b4f8f;
  --primary-soft: #e8f1fb;
  --hero-from: #0d62ab;
  --hero-to: #0784cf;
  --success: #12805c;
  --success-soft: #e3f5ee;
  --warn: #b25e09;
  --warn-soft: #fdf1e3;
  --danger: #c0352b;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(15, 40, 80, .07);
  --font: "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--primary); }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }

/* ---------------- Hero / cabeçalho ---------------- */
.hero {
  background-color: var(--hero-from);
  background-image: url("/assets/img/background.jpeg");
  background-size: cover;
  background-position: center 35%;
  color: #fff;
}
.hero.big { padding-bottom: 4.5rem; }
.topbar {
  max-width: 1150px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.1rem 1.25rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; }
.logo-img { height: 42px; width: auto; display: block; }
#nav { display: flex; gap: .25rem; flex: 1; justify-content: flex-end; flex-wrap: wrap; }
#nav a {
  text-decoration: none; color: #fff; font-weight: 500;
  padding: .45rem .8rem; border-radius: 8px;
  display: inline-flex; align-items: center; gap: .4rem;
  opacity: .88;
}
#nav a:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
#nav a.active { opacity: 1; background: rgba(255, 255, 255, .2); }
.user { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: .55rem;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
  color: #fff; font: inherit; font-weight: 500; cursor: pointer;
  padding: .35rem .8rem .35rem .4rem; border-radius: 999px;
}
.user-btn:hover, .user-btn[aria-expanded=true] { background: rgba(255, 255, 255, .22); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; color: var(--primary); font-weight: 700; font-size: .9rem;
  display: grid; place-items: center;
}
.caret { font-size: .75rem; opacity: .85; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 30;
  min-width: 230px; background: #fff; color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 40, 80, .18); padding: .4rem 0; overflow: hidden;
}
.dd-head { padding: .6rem 1rem .7rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; display: flex; flex-direction: column; }
.dd-head span { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.dd-head .dd-role { margin-top: .3rem; align-self: flex-start; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: .72rem; padding: .1rem .55rem; border-radius: 999px; }
.user-dropdown button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  font: inherit; color: var(--text); padding: .6rem 1rem; cursor: pointer;
}
.user-dropdown button:hover { background: var(--primary-soft); color: var(--primary-dark); }
.user-dropdown .dd-danger { color: var(--danger); }
.user-dropdown .dd-danger:hover { background: #fdecea; color: var(--danger); }

.hero-text { max-width: 720px; margin: 0 auto; text-align: center; padding: 2.5rem 1.25rem 0; }
.hero-text h1 { font-size: clamp(1.7rem, 3.6vw, 2.45rem); margin: .9rem 0 1.4rem; line-height: 1.3; }
.hero-text p { font-size: 1.05rem; margin: 0 0 1.5rem; opacity: .95; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.small-eyebrow { font-size: .65rem; opacity: .85; font-weight: 500; }

main { max-width: 1150px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }

/* ---------------- Menu lateral do admin ---------------- */
.layout.with-sidebar {
  max-width: 1300px; margin: 0 auto; padding: 2rem 1.25rem 3rem;
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.75rem; align-items: start;
}
.layout.with-sidebar main { max-width: none; margin: 0; padding: 0; }
body.is-admin .topbar { max-width: 1300px; }
.admin-sidebar {
  position: sticky; top: 1rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .75rem 0;
}
.admin-sidebar .sb-title { padding: .35rem 1.25rem .6rem; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.admin-sidebar a {
  display: flex; align-items: center; gap: .7rem;
  padding: .75rem 1.25rem; text-decoration: none; color: var(--text); font-weight: 500;
  border-left: 3px solid transparent;
}
.admin-sidebar a svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.admin-sidebar a:hover { background: var(--bg); }
.admin-sidebar a.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; border-left-color: var(--primary); }
.admin-sidebar a.active svg { color: var(--primary); }
.admin-sidebar .badge.count { margin-left: auto; background: var(--danger); color: #fff; }
.admin-sidebar .sb-sep { height: 1px; background: var(--border); margin: .6rem 0; }

/* ---------------- Cards & layout ---------------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.25rem;
}
.card + .card { margin-top: 1rem; }
.stats > .card, .grid > .card { margin-top: 0; }
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.page-head h1 { margin: 0; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.meta { display: flex; gap: .75rem; color: var(--muted); font-size: .85rem; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 260px 1fr; gap: 1.75rem; align-items: start; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.back { display: inline-block; margin-bottom: .75rem; text-decoration: none; font-size: .9rem; font-weight: 500; }
.intro { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }

/* Cartão de curso (padrão do site de inscrições) */
.course-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.course-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15, 40, 80, .12); }
.course-cover {
  position: relative; height: 140px;
  background: linear-gradient(160deg, #1a5fae, #1467b8);
  display: grid; place-items: center;
}
.course-cover img { height: 46px; width: auto; }
.course-cover .pill {
  position: absolute; top: .75rem; left: .75rem;
  background: #fff; color: var(--primary-dark); font-size: .72rem; font-weight: 700;
  padding: .2rem .6rem; border-radius: 999px;
}
.course-body { padding: 1.1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.course-body h3 { margin: 0; font-size: 1.02rem; }
.course-body .desc { color: var(--muted); font-size: .88rem; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.course-body .info { display: flex; flex-direction: column; gap: .2rem; color: var(--muted); font-size: .85rem; }
.course-body .info span { display: flex; align-items: center; gap: .45rem; }
.course-body .info svg { width: 15px; height: 15px; color: var(--primary); flex: none; }
.course-body .btn.block { margin-top: auto; }

/* Menu lateral */
.side-card { padding: .6rem 0; }
.side-menu { list-style: none; padding: 0; margin: 0; }
.side-menu li, .side-menu a {
  display: block; padding: .85rem 1.25rem; text-decoration: none;
  color: var(--text); font-weight: 500; cursor: pointer;
  border-left: 3px solid transparent;
}
.side-menu li:hover, .side-menu a:hover { background: var(--bg); }
.side-menu .active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; border-left-color: var(--primary); }
.side-note { padding: .6rem 1.25rem .4rem; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--border); margin-top: .4rem; }

/* ---------------- Botões ---------------- */
.btn {
  border: 1px solid transparent; border-radius: 8px;
  padding: .55rem 1.1rem; font: inherit; font-weight: 700;
  cursor: pointer; background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; gap: .35rem; text-decoration: none;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.block { width: 100%; justify-content: flex-start; padding: .75rem 1rem; }
.btn.white { background: #fff; color: var(--primary); }
.btn.white:hover { background: #eef4fb; }
.btn.secondary { background: var(--card); color: var(--text); border-color: var(--border); font-weight: 500; }
.btn.secondary:hover { background: var(--bg); }
.btn.ghost { background: transparent; color: var(--muted); font-weight: 500; }
.btn.ghost:hover { background: var(--bg); color: var(--text); }
.btn.danger { background: var(--card); color: var(--danger); border-color: var(--border); font-weight: 500; }
.btn.danger:hover { background: #fdecea; }
.btn.small { padding: .3rem .65rem; font-size: .85rem; }
.icon-btn { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }

/* ---------------- Formulários ---------------- */
label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .3rem; }
.field { margin-bottom: .9rem; }
.hint { color: var(--muted); font-size: .8rem; margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=number], textarea, select {
  width: 100%; font: inherit; color: inherit;
  padding: .6rem .75rem; border: 1px solid var(--border);
  border-radius: 8px; background: #fff;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.checks { display: flex; flex-direction: column; gap: .35rem; max-height: 200px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: .5rem .75rem; }
.checks label { font-weight: 400; display: flex; gap: .5rem; align-items: center; margin: 0; }
.link-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: .5rem; margin-bottom: .5rem; }
.error { color: var(--danger); font-size: .9rem; margin: .5rem 0; }

/* ---------------- Login ---------------- */
.login-wrap {
  position: fixed; inset: 0; overflow: auto;
  background: var(--hero-from) url("/assets/img/background.jpeg") center 35% / cover no-repeat;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.75rem; padding: 2rem 1rem;
}
.login-logo { height: 80px; width: auto; }
.login-wrap .eyebrow { color: #fff; margin-top: -.75rem; }
.login-card { width: 100%; max-width: 400px; padding: 1.75rem; }
.login-card h2 { text-align: center; margin-bottom: 1.25rem; }

/* ---------------- Tabelas ---------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* ---------------- Badges ---------------- */
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.answered { background: var(--success-soft); color: var(--success); }
.badge.count { background: #fff; color: var(--primary); min-width: 1.3rem; text-align: center; }
.tag { display: inline-block; background: var(--primary-soft); color: var(--primary-dark); padding: .1rem .5rem; border-radius: 6px; font-size: .8rem; margin: 0 .25rem .25rem 0; }

/* ---------------- Aulas ---------------- */
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list li {
  padding: .7rem 1.1rem; cursor: pointer; border-left: 3px solid transparent;
  display: flex; gap: .5rem; align-items: baseline;
}
.lesson-list li:hover { background: var(--bg); }
.lesson-list li.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; border-left-color: var(--primary); }
.lesson-list .num { color: var(--muted); font-size: .85rem; min-width: 1.4rem; }
.side-title { padding: .6rem 1.1rem .5rem; margin: 0; }
.lesson-list li.done .num { color: var(--success); font-weight: 700; }
.side-progress { padding: 0 1.1rem .75rem; }

/* ---------------- Progresso ---------------- */
.progress { display: flex; flex-direction: column; gap: .3rem; }
.progress-track { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--primary); transition: width .3s; }
.progress.full .progress-fill { background: var(--success); }
.progress-label { font-size: .8rem; color: var(--muted); }
.progress.full .progress-label { color: var(--success); font-weight: 700; }
.progress.compact { flex-direction: row; align-items: center; gap: .5rem; }
.progress.compact .progress-track { flex: 1; min-width: 60px; }
.progress.compact .progress-label { min-width: 2.6rem; text-align: right; }
.tag-pct { opacity: .75; }

.complete-bar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; padding: .85rem 1rem; border: 1px dashed var(--border); border-radius: 10px; }
.complete-bar.done { border-style: solid; border-color: transparent; background: var(--success-soft); color: var(--success); font-weight: 700; }
.btn.success { background: var(--success); }
.btn.success:hover { background: #0d6a4c; }
.lesson-admin { display: flex; gap: .75rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.lesson-admin:last-child { border-bottom: 0; }
.lesson-admin .info { flex: 1; min-width: 0; }

.content-body { white-space: pre-wrap; word-wrap: break-word; }
.video { position: relative; padding-top: 56.25%; border-radius: 10px; overflow: hidden; background: #000; margin: 1rem 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.links { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-direction: column; gap: .45rem; }
.links a {
  display: flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 500;
  padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 10px;
  word-break: break-all;
}
.links a:hover { border-color: var(--primary); background: var(--primary-soft); }
.links a::before { content: "🔗"; }

/* ---------------- Perguntas ---------------- */
.question { border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1rem; }
.question + .question { margin-top: .75rem; }
.question .q-text, .question .a-text { white-space: pre-wrap; word-wrap: break-word; }
.question .answer { margin-top: .6rem; padding: .6rem .8rem; background: var(--success-soft); border-radius: 8px; }
.question .answer.waiting { background: var(--warn-soft); color: var(--warn); }
.q-head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .35rem; font-size: .85rem; color: var(--muted); }

.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--border); background: var(--card); padding: .4rem .9rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 500; }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { cursor: pointer; transition: transform .15s; }
.stat:hover { transform: translateY(-2px); }
.stat .n { font-size: 1.9rem; font-weight: 700; color: var(--primary); }

/* ---------------- Modal / toast ---------------- */
.modal { position: fixed; inset: 0; background: rgba(10, 30, 60, .5); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal-box { background: var(--card); border-radius: 14px; width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; padding: 1.25rem 1.5rem; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.modal-head h3 { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }

/* ---------------- Situação / obrigatórios ---------------- */
.badge.st-concluido { background: var(--success-soft); color: var(--success); }
.badge.st-atrasado { background: #fdecea; color: var(--danger); }
.badge.st-atrasado-soft { background: #fdecea; color: var(--danger); font-weight: 500; }
.badge.st-em_andamento { background: var(--primary-soft); color: var(--primary-dark); }
.badge.st-nao_iniciado { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.badge.st-vencendo { background: var(--warn-soft); color: var(--warn); }
.tag.tag-concluido { background: var(--success-soft); color: var(--success); }
.tag.tag-atrasado { background: #fdecea; color: var(--danger); }
.tag-link { text-decoration: none; }
.tag-link:hover { text-decoration: underline; }
.course-cover .pill.pill-required { background: var(--warn); color: #fff; }
.notice { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1.25rem; display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.danger { background: #fdecea; color: var(--danger); }
.notice.info { background: var(--primary-soft); color: var(--primary-dark); }
.summary { display: inline-flex; gap: .6rem; flex-wrap: wrap; font-size: .85rem; }
.summary .sm-ok { color: var(--success); font-weight: 500; }
.summary .sm-late { color: var(--danger); font-weight: 700; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--bg); }
table.matrix th { white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: 0; font-size: .8rem; }
.req-item { display: flex; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.req-item:last-child { border-bottom: 0; }
.req-main { flex: 1; min-width: 0; }
.nav-count { margin-left: .35rem; background: var(--danger); color: #fff; }

/* ---------------- Avaliações ---------------- */
.modal-box.wide { max-width: 820px; }
.q-editor { border: 1px solid var(--border); border-radius: 10px; padding: .75rem .9rem; margin-bottom: .75rem; background: var(--bg); }
.q-editor textarea { min-height: 60px; background: #fff; }
.opt-row { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.opt-row input[type=radio] { width: 1.1rem; height: 1.1rem; accent-color: var(--success); }
.exam-q { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.exam-q:last-of-type { border-bottom: 0; }
.exam-q-text { font-weight: 500; margin-bottom: .6rem; white-space: pre-wrap; }
.exam-q-text .q-n { color: var(--primary); font-weight: 700; margin-right: .35rem; }
.exam-opt { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .4rem; cursor: pointer; }
.exam-opt:hover { background: var(--bg); }
.exam-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.exam-opt input { margin-top: .2rem; accent-color: var(--primary); }
.review-item { padding: .45rem .75rem; border-radius: 8px; margin-bottom: .35rem; font-weight: 500; }
.review-item.ok { background: var(--success-soft); color: var(--success); }
.review-item.bad { background: #fdecea; color: var(--danger); }
.notice.success { background: var(--success-soft); color: var(--success); }
.lesson-list.exam-link { border-top: 1px solid var(--border); margin-top: .4rem; padding-top: .4rem; }

/* ---------------- Documentos ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.chip { font: inherit; font-size: .8rem; border: 1px solid var(--border); background: var(--primary-soft); color: var(--primary-dark); border-radius: 999px; padding: .15rem .6rem; cursor: pointer; }
.chip:hover { border-color: var(--primary); }
.doc-code { white-space: nowrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; background: var(--bg); padding: .05rem .35rem; border-radius: 4px; letter-spacing: .04em; }
.doc-card .doc-icon { font-size: 1.6rem; }
.doc-card.revoked { opacity: .7; }
.tpl-thumb { background: var(--primary); color: #fff; font-weight: 700; }
.tpl-item .row .btn { white-space: nowrap; }
.login-verify { color: #fff; font-size: .9rem; opacity: .9; }
.login-verify:hover { opacity: 1; }
.verify-wrap.in-app { max-width: 460px; margin: 1rem auto; }
.verify-wrap.in-app .login-card { max-width: none; }

/* ---------------- Secretaria ---------------- */
.stat.mini { padding: .8rem 1rem; }
.stat.mini .n { font-size: 1.5rem; }
.stat.late .n { color: var(--danger); }
.due.late { color: var(--danger); font-weight: 700; }
.due.soon { color: var(--warn); font-weight: 700; }
tr.row-late td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.proto-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.25rem; align-items: start; }
.proto-side { position: sticky; top: 1rem; }
.side-kv { display: flex; flex-direction: column; gap: .15rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.side-kv:last-child { border-bottom: 0; }
.side-kv > span:first-child { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.side-kv .btn { align-self: flex-start; margin-top: .25rem; padding-left: 0; }
dl.answers { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: .5rem 1rem; margin: 0; }
dl.answers dt { color: var(--muted); font-size: .9rem; }
dl.answers dd { margin: 0; white-space: pre-wrap; }
.timeline { display: flex; flex-direction: column; gap: .75rem; }
.tl-item { border-left: 3px solid var(--border); padding: .4rem .9rem; border-radius: 0 8px 8px 0; }
.tl-item.tl-staff { border-left-color: var(--primary); background: var(--primary-soft); }
.tl-item.tl-student { border-left-color: var(--success); background: var(--bg); }
.tl-item.tl-internal { border-left-color: var(--warn); background: var(--warn-soft); }
.tl-item.tl-system { border-left-style: dashed; }
.tl-meta { font-size: .82rem; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: .1rem; }
.tl-meta strong { color: var(--text); }
.tl-body { margin-top: .3rem; white-space: pre-wrap; }
.tl-doc { margin-top: .5rem; }
.file-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.file-chip { display: inline-flex; align-items: center; gap: .1rem; border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: .25rem .6rem; font-size: .88rem; text-decoration: none; }
.file-chip:hover { border-color: var(--primary); }
.reply-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: .75rem; }
.proto-row { display: flex; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.proto-row:last-child { border-bottom: 0; }
.proto-row:hover strong { color: var(--primary); }
.type-card { text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; border: 1px solid var(--border); }
.type-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.fe-grid { display: grid; grid-template-columns: 1fr 200px auto auto; gap: .5rem; align-items: center; }
.field-editor textarea { margin-top: .5rem; min-height: 70px; }

/* ---------------- Notificações ---------------- */
.bell { position: relative; margin-right: -.75rem; }
.bell-btn { position: relative; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); color: #fff; }
.bell-btn:hover, .bell-btn[aria-expanded=true] { background: rgba(255, 255, 255, .22); }
.bell-icon { width: 20px; height: 20px; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--hero-from); }
.bell-panel { position: absolute; right: -3.5rem; top: calc(100% + .5rem); z-index: 31; width: min(380px, calc(100vw - 1.5rem));
  background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 40, 80, .18); overflow: hidden; }
.bell-head { display: flex; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.bell-list { max-height: min(60vh, 440px); overflow-y: auto; }
.bell-foot { display: block; text-align: center; padding: .65rem; border-top: 1px solid var(--border); font-weight: 500; font-size: .9rem; text-decoration: none; }
.bell-foot:hover { background: var(--bg); }
.link-btn { background: none; border: 0; color: var(--primary); font: inherit; font-size: .82rem; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.notif-item { display: flex; gap: .7rem; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border);
  padding: .75rem 1rem; font: inherit; color: inherit; cursor: pointer; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: #f3f8fe; }
.notif-item.unread:hover { background: var(--primary-soft); }
.notif-ic { font-size: 1.15rem; line-height: 1.3; }
.notif-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.notif-title { font-weight: 500; }
.notif-item.unread .notif-title { font-weight: 700; }
.notif-body { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.notif-item.compact .notif-body { white-space: nowrap; }
.notif-time { color: var(--muted); font-size: .75rem; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); margin-top: .45rem; flex: none; }
.notif-page { padding: 0; overflow: hidden; }

/* ---------------- Relatórios ---------------- */
.report-tabs { flex-wrap: wrap; }
.report-filters { margin-bottom: 1rem; }
.report-filters select { width: auto; max-width: 260px; }
.filter-date { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 400; font-size: .85rem; color: var(--muted); }
.filter-date input { width: auto; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.report-summary .stat { cursor: default; box-shadow: none; background: var(--bg); margin: 0; }
.report-summary .stat:hover { transform: none; }
.report-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: .8rem; }
.report-table th.sortable:hover { color: var(--primary); }
.report-table td { font-size: .9rem; }
.report-table .num { text-align: right; }

/* ---------------- Equipe ---------------- */
.profile-item { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.profile-item:last-child { border-bottom: 0; }

/* ---------------- Dashboards ---------------- */
#dd-extra:not(:empty) { border-bottom: 1px solid var(--border); margin-bottom: .3rem; padding-bottom: .3rem; }
.dash-section { font-size: 1.05rem; margin: 1.75rem 0 .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi-row .card { margin: 0; }
.kpi { display: flex; flex-direction: column; gap: .2rem; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; border: 1px solid transparent; }
a.kpi:hover { transform: translateY(-2px); border-color: var(--border); }
.kpi-value { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--text); }
.kpi-label { color: var(--muted); font-size: .9rem; }
.kpi-hint { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.kpi-danger .kpi-value { color: var(--danger); }
.kpi-danger .kpi-hint { color: var(--danger); font-weight: 500; }
.kpi-warn .kpi-value { color: var(--warn); }
.kpi-row.with-hero { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
.kpi-hero .hero-fig { font-size: 3.25rem; font-weight: 700; line-height: 1.05; color: var(--primary-dark); margin: .15rem 0; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.dash-grid .card { margin: 0; }
.viz-card h3 { margin: 0; }
.viz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.viz-head .link-btn { white-space: nowrap; }
.viz-body { position: relative; }
.viz-rel { position: relative; }
.seg-bar { display: flex; gap: 2px; height: 28px; background: #fff; }
.seg { border-radius: 4px; display: flex; align-items: center; padding-left: .5rem; font-size: .8rem; font-weight: 700; min-width: 4px; cursor: default; outline-offset: 2px; }
.seg:hover, .seg:focus { filter: brightness(1.08); }
.viz-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .85rem; font-size: .88rem; color: var(--text); }
.lg-item { display: inline-flex; align-items: center; gap: .4rem; }
.lg-item strong { font-variant-numeric: tabular-nums; }
.lg-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.viz-tip { display: inline-flex; flex-direction: column; gap: .05rem; margin-top: .6rem; background: #1b2433; color: #fff; padding: .4rem .65rem; border-radius: 8px; font-size: .8rem; pointer-events: none; }
.viz-tip strong { font-size: .95rem; }
.viz-tip span { opacity: .8; }
.viz-tip.floating { position: absolute; top: 0; transform: translateX(-50%); margin: 0; white-space: nowrap; z-index: 2; }
.viz-svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-tick { font-size: 10.5px; fill: #898781; font-variant-numeric: tabular-nums; }
.viz-val { font-size: 12px; font-weight: 700; fill: var(--text); }
.viz-hit { cursor: default; outline: none; }
.viz-hit:focus { stroke: var(--primary); stroke-width: 1; }
.meter-list { display: flex; flex-direction: column; }
.meter-row { display: grid; grid-template-columns: minmax(140px, 1.4fr) minmax(80px, 1.6fr) auto auto; gap: .75rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.meter-row:last-child { border-bottom: 0; }
.meter-row:hover .meter-name { color: var(--primary); }
.meter-name { font-weight: 500; font-size: .92rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.meter-track { height: 8px; border-radius: 999px; overflow: hidden; display: block; }
.meter-fill { display: block; height: 100%; border-radius: 999px; }
.meter-fig { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.meter-late { min-width: 0; }
.dash-list { display: flex; flex-direction: column; }
.dash-li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border: 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; background: none; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.dash-li:last-child { border-bottom: 0; }
.dash-li:hover strong { color: var(--primary); }
.dash-li-end { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; flex: none; }
.txt-warn { color: var(--warn); font-weight: 500; }
.txt-ok { color: var(--success); font-weight: 500; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.home-grid .card { margin: 0; }
.home-grid > .stack { display: flex; flex-direction: column; gap: 1rem; }
.continue-list { display: flex; flex-direction: column; gap: .9rem; }
.continue-item { padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 10px; }
.continue-item .progress { margin-top: .6rem; }
.notice-link { text-decoration: none; }
.notice-link:hover { filter: brightness(.97); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------- Pop-up de avisos ---------------- */
.popup { z-index: 55; }
.popup-box { position: relative; background: var(--card); border-radius: var(--radius); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; box-shadow: 0 12px 40px rgba(10, 30, 60, .3); }
.popup-close { position: absolute; top: .5rem; right: .6rem; width: 2.2rem; height: 2.2rem; border-radius: 999px; background: rgba(255, 255, 255, .9); z-index: 1; }
.popup-img { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: var(--bg); border-radius: var(--radius) var(--radius) 0 0; }
.popup-content { padding: 1.25rem 1.5rem 1.25rem; }
.popup-content h3 { margin: 0 2rem .6rem 0; }
.popup-img:not([hidden]) + .popup-content h3 { margin-right: 0; }
.popup-actions { display: flex; align-items: center; gap: .5rem; margin-top: 1.25rem; }

.ann-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 1rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.ann-item:last-child { border-bottom: 0; }
.ann-thumb { width: 96px; height: 72px; border-radius: 8px; object-fit: cover; background: var(--bg); display: grid; place-items: center; color: var(--muted); font-size: .75rem; }
.ann-item .desc { color: var(--muted); font-size: .9rem; margin-top: .2rem; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge.off { background: var(--bg); color: var(--muted); }
.img-preview { max-width: 100%; max-height: 180px; border-radius: 8px; border: 1px solid var(--border); display: block; margin-bottom: .5rem; }
.check-inline { display: flex; gap: .5rem; align-items: center; font-weight: 400; margin: .35rem 0 0; }

.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); background: #1b2433; color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 60; box-shadow: var(--shadow); }
.toast.err { background: var(--danger); }

@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
  .layout.with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-top: 1rem; }
  .admin-sidebar { position: static; display: flex; overflow-x: auto; padding: .25rem; }
  .admin-sidebar .sb-title, .admin-sidebar .sb-sep { display: none; }
  .admin-sidebar a { border-left: 0; border-radius: 8px; white-space: nowrap; padding: .6rem .9rem; }
  .link-row { grid-template-columns: 1fr; }
  .proto-layout, .reply-grid, dl.answers, .fe-grid { grid-template-columns: 1fr; }
  .proto-side { position: static; }
  .dash-grid, .home-grid { grid-template-columns: 1fr; }
  .kpi-row.with-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-hero { grid-column: 1 / -1; }
  .meter-row { grid-template-columns: 1fr auto; }
  .meter-track { grid-column: 1 / -1; grid-row: 2; }
  .bell-panel { position: fixed; left: .75rem; right: .75rem; top: 4.75rem; width: auto; }
  .ann-item { grid-template-columns: 72px 1fr; }
  .ann-item > .row { grid-column: 1 / -1; }
  .ann-thumb { width: 72px; height: 56px; }
  .topbar { gap: .75rem; }
  #nav { justify-content: flex-start; order: 3; width: 100%; }
  #user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero.big { padding-bottom: 3rem; }
}

/* =====================================================================
   Área do aluno: menu lateral escuro + barra branca no topo
   ===================================================================== */
:root { --ssb-w: 268px; --ssb-bg: #12304f; --ssb-active: #2a6ea8; --student-bg: #f3f6fa; }
.menu-toggle, .crumb { display: none; }

body.is-shell { background: var(--student-bg); }
/* Menu lateral */
.student-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--ssb-w); z-index: 40;
  background: var(--ssb-bg); color: #fff; overflow-y: auto; padding: 1.1rem .75rem 1.5rem;
  display: flex; flex-direction: column;
}
.ssb-brand { display: flex; flex-direction: column; gap: .35rem; padding: .25rem .6rem 1rem; margin-bottom: .75rem;
  border-bottom: 1px solid rgba(255, 255, 255, .14); text-decoration: none; color: #fff; }
.ssb-brand img { height: 40px; width: auto; align-self: flex-start; }
.ssb-brand span { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.ssb-nav { display: flex; flex-direction: column; gap: 2px; }
.ssb-title { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .5); padding: 1.1rem .75rem .45rem; }
.ssb-nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .75rem; border-radius: 8px; white-space: nowrap;
  color: rgba(255, 255, 255, .86); text-decoration: none; font-size: .92rem; font-weight: 500; }
.ssb-nav a svg { width: 17px; height: 17px; flex: none; opacity: .75; }
.ssb-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ssb-nav a.active { background: var(--ssb-active); color: #fff; font-weight: 700; }
.ssb-nav a.active svg { opacity: 1; }
.ssb-nav a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.ssb-count { margin-left: auto; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .05rem .45rem; }

/* Barra do topo branca */
body.is-shell .hero { background: #fff; color: var(--text); border-bottom: 1px solid var(--border); margin-left: var(--ssb-w);
  position: sticky; top: 0; z-index: 30; }
body.is-shell .hero.big { padding-bottom: 0; }
body.is-shell .hero-text { display: none; }
body.is-shell .topbar { max-width: none; padding: .7rem 1.75rem; gap: 1rem; flex-wrap: nowrap; }
body.is-shell .brand, body.is-shell #nav { display: none; }
body.is-shell .crumb { display: flex; align-items: center; gap: .45rem; flex: 1; min-width: 0; color: var(--muted); font-size: .92rem; }
body.is-shell .crumb strong { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.is-shell .crumb-sep { opacity: .6; }
body.is-shell .bell { margin-right: 0; }
body.is-shell .bell-btn, body.is-shell .user-btn { background: var(--bg); border-color: var(--border); color: var(--text); }
body.is-shell .bell-btn:hover, body.is-shell .bell-btn[aria-expanded=true],
body.is-shell .user-btn:hover, body.is-shell .user-btn[aria-expanded=true] { background: var(--primary-soft); }
body.is-shell .bell-count { border-color: #fff; }
body.is-shell .avatar { background: var(--primary-soft); color: var(--primary-dark); }
body.is-shell .bell-panel { right: 0; }

/* Conteúdo */
body.is-shell .layout { margin-left: var(--ssb-w); }
body.is-shell main { max-width: 1120px; padding: 1.75rem 1.75rem 3rem; }

/* Dashboard do aluno */
.sd-hello h1 { font-size: 1.75rem; margin: 0; color: #12304f; }
.sd-hello p { margin: .2rem 0 1.25rem; }
.sd-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.sd-kpi { margin: 0 !important; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .35rem; transition: transform .15s, border-color .15s; }
.sd-kpi:hover { transform: translateY(-2px); border-color: var(--primary); }
.sd-kpi-value { font-size: 2.1rem; font-weight: 700; line-height: 1; }
.sd-kpi-label { color: var(--muted); font-size: .88rem; }
.sd-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 1rem; margin-bottom: 1rem; align-items: start; }
.sd-row .card { margin: 0; }
.sd-card + .sd-card { margin-top: 0; }
.sd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.sd-card-head h3 { margin: 0; color: #12304f; }
.sd-learn { display: flex; flex-direction: column; gap: .35rem; }
.sd-learn-item { display: block; text-decoration: none; color: inherit; padding: .55rem .6rem; margin: 0 -.6rem; border-radius: 8px; }
.sd-learn-item:hover { background: var(--bg); }
.sd-learn-top { display: flex; align-items: center; gap: .5rem; justify-content: space-between; }
.sd-learn-title { font-weight: 500; }
.sd-learn-bar { display: grid; grid-template-columns: 1fr 3rem; gap: .9rem; align-items: center; margin-top: .4rem; }
.sd-track { display: block; height: 8px; border-radius: 999px; background: #e3e9f1; overflow: hidden; }
.sd-fill { display: block; height: 100%; border-radius: 999px; background: #2a6ea8; }
.sd-pct { font-size: .85rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.sd-next { font-size: .8rem; color: var(--primary); margin-top: .25rem; min-height: 1em; }
.sd-quick { display: flex; flex-direction: column; gap: .6rem; }
.sd-quick-btn { display: block; text-align: center; padding: .6rem .75rem; border-radius: 8px; background: var(--primary-soft); color: var(--primary-dark);
  text-decoration: none; font-weight: 500; font-size: .92rem; border: 1px solid transparent; }
.sd-quick-btn:hover { border-color: var(--primary); background: #dbe9f8; }
.sd-table th { font-size: .72rem; }
.sd-table td { vertical-align: middle; }
.sd-extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.sd-extras .card { margin: 0; }
body.is-shell main > .sd-card { margin-top: 0; }
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { color: var(--primary); text-decoration: underline; }

/* Meu perfil */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.profile-grid .card { margin: 0; }
.profile-top { display: flex; gap: 1rem; align-items: center; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; flex: none; }
.profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-top: 1.25rem; }
.profile-stats > div { background: var(--bg); border-radius: 10px; padding: .7rem; display: flex; flex-direction: column; }
.profile-stats strong { font-size: 1.35rem; color: var(--primary-dark); }
.profile-stats span { font-size: .78rem; color: var(--muted); }

/* Minhas aulas */
.lesson-rows { display: flex; flex-direction: column; }
.lesson-row { display: grid; grid-template-columns: 26px 1fr auto; gap: .75rem; align-items: center; padding: .6rem .4rem; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; border-radius: 6px; }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: var(--bg); }
.lr-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.lesson-row.done .lr-check { background: var(--success); border-color: var(--success); color: #fff; }
.lesson-row.done .lr-title { color: var(--muted); }

/* Celular / tablet: menu lateral vira gaveta */
.sb-overlay { position: fixed; inset: 0; background: rgba(10, 30, 60, .45); z-index: 39; }
@media (max-width: 900px) {
  body.is-shell .menu-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px;
    border: 1px solid var(--border); background: var(--bg); border-radius: 10px; cursor: pointer; padding: 0 10px; flex: none; }
  body.is-shell .menu-toggle { align-items: center; }
  body.is-shell .menu-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }
  body.is-shell .crumb > span:first-child, body.is-shell .crumb .crumb-sep { display: none; }
  .student-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.ssb-open .student-sidebar { transform: none; box-shadow: 4px 0 24px rgba(0, 0, 0, .25); }
  body.is-shell .hero, body.is-shell .layout { margin-left: 0; }
  body.is-shell .topbar { padding: .6rem 1rem; }
  body.is-shell main { padding: 1.25rem 1rem 2.5rem; }
  .sd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .sd-kpi { padding: .9rem; }
  .sd-kpi-value { font-size: 1.6rem; }
  .sd-row, .sd-extras, .profile-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.is-shell #user-name { display: none; }
}
@media (max-width: 480px) {
  .sd-kpis { grid-template-columns: 1fr; }
}

/* ---------------- Secretaria: etapas, previsão e confirmação ---------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; counter-reset: s; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .45rem; padding: 0 .25rem; }
.step:not(:last-child)::after { content: ''; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; background: var(--border); }
.step.done:not(:last-child)::after { background: var(--success); }
.step-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: #fff; border: 2px solid var(--border); color: var(--muted); position: relative; z-index: 1; }
.step.done .step-dot { background: var(--success); border-color: var(--success); color: #fff; }
.step.current .step-dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.step.warn .step-dot { background: var(--warn); border-color: var(--warn); color: #fff; box-shadow: 0 0 0 4px var(--warn-soft); }
.step.cancel .step-dot { background: var(--muted); border-color: var(--muted); color: #fff; }
.step.skip { opacity: .45; }
.step-txt { display: flex; flex-direction: column; gap: .1rem; font-size: .85rem; }
.step-txt strong { font-size: .9rem; }
.step-txt span { color: var(--muted); font-size: .78rem; }
.step.current .step-txt strong { color: var(--primary-dark); }
.step.warn .step-txt strong { color: var(--warn); }
.proto-track { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 1.25rem; align-items: center; }
.forecast { display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); }
.forecast.ok { background: var(--success-soft); color: var(--success); }
.forecast.bad { background: #fdecea; color: var(--danger); }
.forecast.warn { background: var(--warn-soft); color: var(--warn); }
.forecast-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.forecast strong { font-size: 1.1rem; }
.forecast span:not(.forecast-label) { font-size: .85rem; }
.new-proto { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1rem; align-items: start; }
.new-proto .card { margin: 0; }
.new-proto-side { position: sticky; top: 5rem; }
.how { margin: 0; padding-left: 1.2rem; font-size: .88rem; color: var(--text); display: flex; flex-direction: column; gap: .4rem; }
.proto-created { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--success-soft); color: var(--success); margin-bottom: 1rem; border: 1px solid #bfe5d5; }
.pc-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; font-size: 1.3rem; font-weight: 700; flex: none; }
.proto-created strong { font-size: 1.05rem; }
.pc-number { font-size: 1.15rem !important; letter-spacing: .03em; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: .25rem; }
  .step { flex-direction: row; text-align: left; align-items: flex-start; gap: .75rem; padding: .25rem 0; }
  .step:not(:last-child)::after { top: 34px; bottom: -8px; left: 15px; right: auto; width: 2px; height: auto; }
  .proto-track, .new-proto { grid-template-columns: 1fr; }
  .new-proto-side { position: static; }
}

/* Equipe: mesmo layout (menu escuro + barra branca); conteúdo um pouco mais largo */
body.is-admin.is-shell main { max-width: 1240px; }
body.is-admin .student-sidebar .ssb-title:first-of-type { padding-top: 1rem; }
.admin-kpis { margin-bottom: 1rem; }
.admin-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 1rem; margin-bottom: 1rem; }
.admin-row.single { grid-template-columns: 1fr; }
.admin-row .card { margin: 0; }
.ring-card { display: flex; flex-direction: column; align-items: stretch; }
.ring-link { display: block; align-self: center; }
.ring { width: 150px; height: 150px; display: block; }
.ring-val { font-size: 26px; font-weight: 700; fill: #12304f; }
.ring-cap { text-align: center; font-weight: 500; margin-top: .4rem; }
.att-num { font-weight: 700; font-variant-numeric: tabular-nums; }
body.is-admin main > .card + .card { margin-top: 1rem; }
@media (max-width: 900px) {
  .admin-row { grid-template-columns: 1fr; }
  .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
.sla-input { width: 80px !important; padding: .35rem .5rem !important; }
.settings-form { max-width: 760px; }
.audit-path { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .75rem; }
@media (max-width: 760px) { body.is-shell .bell-panel { right: .75rem; } }

/* ---------------- Módulos dos cursos ---------------- */
.module-admin { border: 1px solid var(--border); border-radius: 10px; padding: .25rem .9rem .5rem; margin-top: .75rem; }
.module-admin.loose { border-style: dashed; }
.module-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.module-admin .lesson-admin:last-child { border-bottom: 0; }
.module-side { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .75rem 1.1rem .35rem; font-size: .78rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 1px solid var(--border); margin-top: .25rem; }
.module-count { font-variant-numeric: tabular-nums; background: var(--bg); border-radius: 999px; padding: .05rem .5rem; letter-spacing: 0; }
.module-count.done { background: var(--success-soft); color: var(--success); }
.lesson-module { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin-bottom: .2rem; }
.lr-module { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
