/* Materiais opcionais da aula. */
.lesson-materials.material-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;max-width:900px;margin:24px auto}
.lesson-materials .material-btn{box-sizing:border-box;flex:1 1 150px;max-width:170px;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;padding:18px 12px;border-radius:12px;text-decoration:none;color:#fff;transition:transform .15s,box-shadow .15s}
.lesson-materials .material-btn:visited{color:#fff}
.lesson-materials .material-btn:hover{transform:translateY(-3px);box-shadow:0 6px 16px rgba(0,0,0,.18);color:#fff;text-decoration:none}
.lesson-materials .material-btn:focus-visible{outline:3px solid #172b4d;outline-offset:4px}
.lesson-materials .material-icon{width:48px;height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.18);border-radius:12px}
.lesson-materials .material-icon svg{width:26px;height:26px;fill:currentColor}
.lesson-materials .material-text{display:flex;flex-direction:column;line-height:1.3}
.lesson-materials .material-text strong{font-size:.95rem;font-weight:700}
.lesson-materials .material-text small{font-size:.78rem;opacity:.9;margin-top:3px}
.lesson-materials .material-slide{background:#d24726}
.lesson-materials .material-doc{background:#2b579a}
.lesson-materials .material-pdf{background:#6b4fbb}
.lesson-materials .material-spotify{background:#1db954}
.lesson-materials .material-youtube{background:#e62117}
.lesson-materials .material-spotify svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.material-remove{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:13px}
.material-remove input[type=checkbox]{width:auto;flex:0 0 auto}
@media(prefers-reduced-motion:reduce){.lesson-materials .material-btn{transition:none}.lesson-materials .material-btn:hover{transform:none}}

/* Mentoria de Mestrado — telas internas.
   Carregado por includes/layout.php. A home mantém seus próprios estilos. */
:root {
  --blue: #075bd8;
  --navy: #0b2a55;
  --text: #172b4d;
  --muted: #566783;
  --line: #dce5f0;
  --soft: #f4f7fc;
  --shadow: 0 4px 18px rgba(23, 43, 77, .045);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--soft);
  color: var(--text);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #80b4ff; outline-offset: 3px; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; overflow-wrap: anywhere; }
h1 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.035em; }
h2 { margin: 0 0 20px; font-size: 22px; letter-spacing: -.02em; }
h3 { margin: 0 0 12px; font-size: 18px; }
p { margin: 0 0 16px; overflow-wrap: anywhere; }
form { margin: 0; }
.muted, .help { color: var(--muted); }
.help { margin-top: 7px; font-size: 13px; overflow-wrap: anywhere; }

/* Cabeçalho e limites do conteúdo */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 28px;
  min-height: 82px;
  padding: 16px max(24px, calc((100% - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand-mark, .login-mentors-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 23px;
  font-weight: 800;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-size: 20px; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.topbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.topbar nav a { padding: 9px 14px; border-radius: 9px; color: #344765; font-size: 14px; font-weight: 600; }
.topbar nav a:hover, .topbar .nav-pill { color: var(--blue); background: #edf4ff; text-decoration: none; }
.container { width: min(1240px, calc(100% - 48px)); min-width: 0; margin: 0 auto; padding: 34px 0 48px; flex: 1; }
.section-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 24px; margin-bottom: 26px; text-align: left; }
.section-title > div:first-child { flex: 1 1 300px; min-width: 0; }
.section-title h2, .section-title p { margin-bottom: 0; }
.section-title h1 { margin-top: 4px; }
.section-title > .actions { flex: 0 1 auto; }
.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 23px max(24px, calc((100% - 1240px) / 2)); border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; }
.footer a { color: var(--muted); }

/* Cards e grades: minmax(0, ...) permite encolher tabelas e campos longos. */
.grid { display: grid; gap: 20px; align-items: start; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.stat { margin-top: 8px; color: var(--navy); font-size: 36px; line-height: 1.2; font-weight: 750; font-variant-numeric: tabular-nums; }
.grid-4 > .card { border-top: 3px solid var(--blue); }
.empty { padding: 32px 20px; color: var(--muted); text-align: center; }
.empty h2 { margin-bottom: 10px; }
.empty p:last-child { margin-bottom: 0; }

/* Ações e botões */
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-width: 0; }
.inline { display: inline-flex; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .15s, box-shadow .15s;
}
.btn:hover { background: #064cb4; color: #fff; text-decoration: none; }
.btn-secondary { border-color: #d4deeb; background: #f5f8fc; color: #30466a; }
.btn-secondary:hover { border-color: #b9c9df; background: #e8eff8; color: var(--navy); }
.btn-danger { border-color: #f4c8cc; background: #fff1f2; color: #ad2236; }
.btn-danger:hover { background: #ffe0e4; color: #90172a; }
.btn-success { background: #137844; color: #fff; }
.btn-success:hover { background: #0d6236; }
.btn-small { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }

/* Tabelas: a rolagem fica dentro do card em telas estreitas. */
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; font-size: 14px; }
.table th { padding: 13px 16px; border-bottom: 1px solid var(--line); background: #f4f7fc; color: #53647c; font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; }
.table td { padding: 17px 16px; border-bottom: 1px solid #e9eef5; vertical-align: middle; overflow-wrap: anywhere; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.table .actions { min-width: 210px; }
.table td > .btn { white-space: nowrap; }
.table .empty { padding: 30px; }
.cover-small { width: 76px; height: 52px; max-width: none; border-radius: 7px; background: #edf2fa; object-fit: cover; }

/* Formulários, incluindo os checkboxes e os campos ocultados pelo app.js. */
.form-group { min-width: 0; margin-bottom: 19px; }
.form-group label { display: block; margin-bottom: 7px; color: #2c4162; font-size: 14px; font-weight: 600; }
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-group select, .form-group textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #bdcce0;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
}
.form-group textarea { min-height: 132px; resize: vertical; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #697c96; opacity: 1; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7, 91, 216, .1); }
.form-group input[type="checkbox"], .form-group input[type="radio"] { width: 17px; height: 17px; margin: 0 7px 0 0; vertical-align: middle; accent-color: var(--blue); }
.form-group input[type="file"] { padding: 7px; font-size: 14px; }
.form-group input[type="file"]::file-selector-button { margin-right: 10px; padding: 6px 9px; border: 0; border-radius: 5px; background: #edf3fc; color: #30466a; cursor: pointer; }
form > .grid { gap: 0 20px; }

/* Avisos e estados */
.badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 6px; background: #eaf2ff; color: #285dab; font-size: 12px; line-height: 1.5; font-weight: 650; white-space: nowrap; }
.badge-success { background: #e8f7ee; color: #17673d; }
.badge-warning { background: #fff4d8; color: #805b08; }
.badge-danger { background: #ffecef; color: #ad2236; }
.alert, .notice { padding: 14px 16px; border: 1px solid #cedff9; border-radius: 9px; background: #edf4ff; color: #2c537f; overflow-wrap: anywhere; }
.alert { margin-bottom: 20px; }
.alert-success { border-color: #bde4cb; background: #edf9f1; color: #17673d; }
.alert-warning { border-color: #f1d89a; background: #fff8e6; color: #805b08; }
.alert-danger { border-color: #f3c4cb; background: #fff0f2; color: #ad2236; }

/* Módulos e aulas */
.module { min-width: 0; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.module-title { padding: 20px 22px; border-bottom: 1px solid var(--line); border-radius: 13px 13px 0 0; background: #edf3fc; color: var(--navy); font-weight: 700; overflow-wrap: anywhere; }
.module-title .section-title { margin: 0; gap: 16px; }
.module-title .section-title > div:first-child { flex-basis: 260px; }
.module-title .muted { margin-top: 4px; font-size: 14px; }
.module-sort-help { flex-wrap: wrap; }
.lesson-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 0; padding: 20px 22px; border-bottom: 1px solid #e9eef5; color: var(--text); }
.lesson-row:last-child { border-bottom: 0; border-radius: 0 0 13px 13px; }
.lesson-row > div:first-child, .lesson-row > span { min-width: 0; overflow-wrap: anywhere; }
.lesson-row > .actions { flex-shrink: 0; }
.lesson-row .muted { font-size: 14px; }
a.lesson-row:hover { background: #f8fbff; text-decoration: none; }
.lesson-state { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: #edf3fc; color: var(--blue); }
.lesson-state.done { background: #e8f7ee; color: #17673d; }
.lesson-content { overflow-wrap: anywhere; }
.lesson-content table { display: block; max-width: 100%; overflow-x: auto; }
.lesson-content pre { max-width: 100%; overflow-x: auto; }
.video-wrap { width: 100%; margin: 20px 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #081a35; }
.video-wrap iframe, .video-wrap video { display: block; width: 100%; height: 100%; border: 0; }
.pdf-frame { display: block; width: 100%; height: 72vh; min-height: 380px; border: 1px solid var(--line); border-radius: 9px; background: #f4f7fc; }
.progress { height: 8px; overflow: hidden; border-radius: 999px; background: #e7eef8; }
.progress > span { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--blue); }
.course-card { display: flex; flex-direction: column; height: 100%; padding: 0; overflow: hidden; }
.course-card .course-cover, .course-placeholder { width: 100%; height: 190px; object-fit: cover; }
.course-placeholder { display: grid; place-items: center; background: #e4efff; color: var(--blue); font-size: 44px; }
.course-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.course-body h2 { font-size: 21px; margin-bottom: 12px; }
.course-body .btn { margin-top: auto; }

/* As telas de entrada também usam o layout compartilhado. */
.login-shell { width: 100%; padding: 30px 0; }
.login-card { width: 100%; max-width: 470px; margin: auto; padding: 32px; }
.login-card h1 { margin-bottom: 26px; font-size: 28px; }
.mentoria-login-shell { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.mentoria-login-brand { display: flex; flex-direction: column; gap: 34px; padding: 40px; background: #0b2a55; color: #d9e7fb; }
.login-brand-content h1 { margin: 18px 0; color: #fff; font-size: clamp(28px, 3vw, 38px); }
.login-brand-content h1 em { color: #90bdff; font-style: normal; }
.login-back-home { display: block; margin-bottom: 28px; color: #d9e7fb; font-size: 14px; }
.eyebrow, .login-welcome { font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.eyebrow-light { color: #b9d7ff; }
.login-benefits { display: grid; gap: 19px; margin-top: 26px; }
.login-benefits > div { display: flex; align-items: flex-start; gap: 13px; }
.login-benefits b { color: #90bdff; }
.login-benefits strong, .login-benefits small { display: block; }
.login-benefits strong { color: #fff; }
.login-mentors-card { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 24px; border-top: 1px solid #345073; }
.login-mentors-card strong, .login-mentors-card small { display: block; }
.login-mentors-card strong { color: #fff; font-size: 14px; }
.login-mentors-card small { margin-top: 3px; font-size: 12px; }
.mentoria-login-form-wrap { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 40px; }
.mentoria-login-form { width: 100%; max-width: 390px; min-width: 0; }
.login-form-icon { margin-bottom: 18px; font-size: 36px; }
.login-welcome { color: var(--blue); }
.mentoria-login-form h2 { margin: 8px 0 14px; font-size: 28px; }
.login-email-field { margin-top: 26px; }
.input-with-icon { position: relative; }
.input-with-icon > span { position: absolute; left: 13px; top: 11px; color: var(--muted); }
.form-group .input-with-icon input { padding-left: 40px; }
.login-submit { justify-content: space-between; }
.login-security { margin-top: 20px; color: var(--muted); font-size: 12px; }
.login-free-link { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

@media (max-width: 1000px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mentoria-login-brand, .mentoria-login-form-wrap { padding: 28px; }
}
@media (max-width: 760px) {
  .topbar { padding: 16px 20px; gap: 16px; }
  .topbar nav { width: 100%; gap: 3px; }
  .topbar nav a { padding: 8px 11px; }
  .container { width: calc(100% - 32px); padding-top: 26px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 20px; }
  .course-card { padding: 0; }
  .section-title { gap: 16px; margin-bottom: 22px; }
  .section-title > div:first-child { flex-basis: 100%; }
  .section-title > .actions { width: 100%; }
  .area-admin .lesson-row { align-items: flex-start; flex-direction: column; gap: 14px; }
  .module-title, .lesson-row { padding: 18px; }
  .mentoria-login-shell { grid-template-columns: minmax(0, 1fr); }
  .mentoria-login-form { max-width: none; }
  .mentoria-login-form-wrap { grid-row: 1; }
  .footer { padding: 20px; }
}
@media (max-width: 420px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .container { width: calc(100% - 24px); }
  .card { padding: 17px; }
  .course-card { padding: 0; }
  .topbar { padding: 14px 12px; }
  .topbar nav a { padding: 8px 9px; font-size: 13px; }
  .mentoria-login-brand, .mentoria-login-form-wrap { padding: 24px 20px; }
  .btn { padding-inline: 14px; }
  .btn-small { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
