/* Desenvolvido por Rodmar Junior | beezip.com.br */

/* ══════════════════════════════════════════════════════
   VARIÁVEIS
══════════════════════════════════════════════════════ */
:root {
  --teal:        #1a9b8c;
  --teal-dark:   #137a6e;
  --teal-light:  #e8f5f3;
  --bg:          #f8f9fa;
  --white:       #ffffff;
  --text:        #1a1a2e;
  --text-muted:  #6c757d;
  --border:      #e9ecef;
  --shadow-sm:   0 2px 12px rgba(0,0,0,.08);
  --shadow-md:   0 4px 20px rgba(0,0,0,.12);
  --radius:      12px;
  --radius-sm:   8px;
  --red:         #e53e3e;
  --red-light:   #fff5f5;
  --green:       #2f855a;
  --green-light: #f0fff4;
  --off-white:   #f8f9fa;
  --teal-mid:    #a8ddd7;
  --trans:       .2s ease;
}

/* ══════════════════════════════════════════════════════
   RESET + BASE
══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  padding-top: 64px;
}
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }

/* ══════════════════════════════════════════════════════
   BOTÕES
══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: var(--radius-sm); border: none;
  font-family: 'Inter', sans-serif; font-weight: 600;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  white-space: nowrap; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-teal    { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); box-shadow: 0 4px 14px rgba(26,155,140,.35); transform: translateY(-1px); }

.btn-outline { background: transparent; border: 1.5px solid var(--teal); color: var(--teal); }
.btn-outline:hover { background: var(--teal-light); }

.btn-gray    { background: #e9ecef; color: #495057; }
.btn-gray:hover { background: #dee2e6; }

.btn-ghost   { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.25); }

.btn-ghost-dark { background: transparent; border: 1.5px solid var(--border); color: var(--text-muted); }
.btn-ghost-dark:hover { background: var(--bg); color: var(--text); }

.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #276749; }

.btn-danger  { background: var(--red); color: #fff; }
.btn-danger:hover { background: #c53030; }

.btn-sm  { padding: 6px 14px; font-size: 13px; }
.btn-lg  { padding: 13px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

.btn-marcar-modulo { border-style: dashed !important; }

/* Botão voltar */
.btn-back {
  background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--text-muted); padding: 6px 0; display: flex; align-items: center;
  gap: 4px; transition: color var(--trans); flex-shrink: 0;
}
.btn-back:hover { color: var(--text); }

/* ══════════════════════════════════════════════════════
   FORMULÁRIOS
══════════════════════════════════════════════════════ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 10px; background: var(--white); color: var(--text);
  outline: none; transition: border-color var(--trans), box-shadow var(--trans);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal); box-shadow: 0 0 0 4px rgba(26,155,140,.12);
}
.field textarea { resize: vertical; min-height: 80px; }
.field input::placeholder { color: var(--text-muted); opacity: .6; }

/* ══════════════════════════════════════════════════════
   TOAST + LOADING
══════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; right: 24px; padding: 12px 20px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-md); z-index: 9999;
  opacity: 0; transform: translateY(8px);
  transition: opacity .25s, transform .25s; pointer-events: none; max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-ok   { background: var(--teal); color: #fff; }
.toast-err  { background: var(--red);  color: #fff; }
.toast-info { background: #2d3748;     color: #fff; }

.loading-overlay {
  position: fixed; inset: 0; background: rgba(248,249,250,.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998; backdrop-filter: blur(3px);
}
.spinner {
  width: 44px; height: 44px; border: 4px solid var(--border);
  border-top-color: var(--teal); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════
   BARRA DE PROGRESSO
══════════════════════════════════════════════════════ */
.progress-bar {
  height: 6px; background: var(--border); border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--teal); border-radius: 99px; transition: width .5s ease;
}
.progress-bar.thin  { height: 4px; }
.progress-bar.thick { height: 8px; }

/* Avatar */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}

/* Inline error */
.inline-error { color: var(--red); font-size: 13px; margin-top: 8px; display: none; }
.inline-error.show { display: block; }

/* ══════════════════════════════════════════════════════
   LOGIN
══════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0d6b60 0%, #1a9b8c 55%, #22c5b2 100%);
  position: relative; overflow: hidden;
}
.login-page::before {
  content: ''; position: absolute; width: 600px; height: 600px; border-radius: 50%;
  border: 80px solid rgba(255,255,255,.05); top: -200px; right: -200px;
}
.login-page::after {
  content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%;
  border: 60px solid rgba(255,255,255,.05); bottom: -150px; left: -100px;
}
.login-card {
  background: var(--white); border-radius: 24px; padding: 48px 44px;
  width: 100%; max-width: 420px; box-shadow: 0 32px 80px rgba(0,0,0,.2);
  position: relative; z-index: 1; animation: slideUp .5s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.login-logo { display: flex; justify-content: center; margin-bottom: 28px; }
.login-logo img { height: 56px; object-fit: contain; }
.login-title { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.login-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.login-btn {
  width: 100%; padding: 14px; background: var(--teal); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background var(--trans), transform var(--trans);
}
.login-btn:hover { background: var(--teal-dark); }
.login-btn:active { transform: scale(.98); }

/* ══════════════════════════════════════════════════════
   HEADER ALUNO (branco)
══════════════════════════════════════════════════════ */
.portal-header {
  background: linear-gradient(90deg, #ffffff 0%, #f8faf9 100%);
  height: 64px; display: flex; align-items: center;
  padding: 0 28px; gap: 16px; position: fixed; top: 0; left: 0; right: 0;
  z-index: 200; border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 16px rgba(0,0,0,.07);
}
.header-brand {
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.header-logo-img { height: 36px; object-fit: contain; flex-shrink: 0; }
.header-brand-name {
  font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Compatibilidade tutor.html que usa .header-logo */
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo img { height: 36px; object-fit: contain; }
.header-logo span { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--text); }
.header-welcome { font-size: 14px; color: var(--text-muted); }

.header-right {
  margin-left: auto; display: flex; align-items: center; gap: 16px;
}
.header-user-info { display: flex; align-items: center; gap: 8px; }
.header-user-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.header-progress-wrap { display: flex; align-items: center; gap: 8px; }
.header-progress-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.header-progress-bar {
  width: 100px; height: 7px; background: var(--border); border-radius: 99px; overflow: hidden;
}
.header-progress-fill {
  height: 100%; border-radius: 99px; transition: width .5s;
  background: linear-gradient(90deg, var(--teal) 0%, #22c5b2 50%, var(--teal) 100%);
  background-size: 200px 100%;
  animation: shimmer 2.4s linear infinite;
}
.header-pct { font-size: 12px; font-weight: 700; color: var(--teal); white-space: nowrap; }

/* ══════════════════════════════════════════════════════
   SCREENS (BASE)
══════════════════════════════════════════════════════ */
.screen { min-height: calc(100vh - 64px); }

.screen-topbar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 16px 32px; display: flex; align-items: center; gap: 20px;
  position: sticky; top: 64px; z-index: 50;
}
.screen-topbar-info { flex: 1; min-width: 0; }
.screen-title {
  font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2;
}

/* ══════════════════════════════════════════════════════
   HOME SCREEN
══════════════════════════════════════════════════════ */
.home-wrap { max-width: 1000px; margin: 0 auto; padding: 60px 24px 48px; }

.home-greeting { text-align: center; margin-bottom: 52px; }
.home-hello {
  font-size: 38px; font-weight: 700; color: var(--text); margin-bottom: 10px;
}
.home-hello span { color: var(--teal); }
.home-welcome { font-size: 16px; color: var(--text-muted); margin-bottom: 6px; }
.home-sub { font-size: 14px; color: var(--text-muted); opacity: .7; }

.home-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.home-card {
  background: var(--white); border-radius: var(--radius); padding: 32px 24px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border-top: 4px solid var(--teal);
  display: flex; flex-direction: column; gap: 14px;
}
.home-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md), inset 4px 0 0 var(--teal); }
.home-card-icon {
  width: 52px; height: 52px; background: var(--teal-light); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--teal);
}
.home-card-icon svg { width: 28px; height: 28px; }
.home-card-title { font-size: 20px; font-weight: 700; color: var(--text); }
.home-card-desc  { font-size: 14px; color: var(--text-muted); line-height: 1.55; flex: 1; }
.home-prog-wrap  { display: flex; align-items: center; gap: 10px; }
.home-prog-bar   { flex: 1; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.home-prog-fill  { height: 100%; background: var(--teal); border-radius: 99px; transition: width .5s; }
.home-prog-pct   { font-size: 12px; font-weight: 700; color: var(--teal); white-space: nowrap; }
.home-card .btn  { margin-top: auto; }
.home-card-secondary { border-top-color: #adb5bd; }
.home-card-secondary .home-card-icon { background: #f1f3f5; color: #495057; }

/* ══════════════════════════════════════════════════════
   TRILHA SCREEN (TIMELINE)
══════════════════════════════════════════════════════ */
.trilha-prog-wrap { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.trilha-prog-bar  {
  width: 200px; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; flex-shrink: 0;
}
.trilha-prog-fill { height: 100%; background: var(--teal); border-radius: 99px; transition: width .5s; }
.trilha-prog-text { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

.timeline-wrap { max-width: 780px; margin: 0 auto; padding: 40px 24px 60px; }
.timeline      { display: flex; flex-direction: column; }

.tl-item       { display: flex; gap: 20px; }

.tl-step       { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 52px; }
.tl-circle {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; font-weight: 700; font-size: 15px; flex-shrink: 0;
  transition: all .25s; box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.tl-done    .tl-circle { background: var(--teal); color: #fff; }
.tl-active  .tl-circle { background: var(--white); border: 2px solid var(--teal); color: var(--teal); }
.tl-pending .tl-circle { background: var(--white); border: 2px solid #dee2e6; color: var(--text-muted); }

.tl-connector {
  width: 2px; flex: 1; min-height: 24px; margin: 6px 0;
  background: var(--border);
}
.tl-done .tl-connector { background: var(--teal); }

.tl-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  padding: 20px 24px; flex: 1; margin-bottom: 16px;
  transition: box-shadow .2s, transform .2s;
}
.tl-card:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.tl-item:last-child .tl-card { margin-bottom: 0; }

.tl-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tl-mod-name    { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.tl-mod-meta    { font-size: 12px; color: var(--text-muted); }

.tl-badge       { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; flex-shrink: 0; }
.badge-done     { background: var(--green-light); color: var(--green); }
.badge-active   { background: var(--teal-light); color: var(--teal-dark); }
.badge-pending  { background: #f1f3f5; color: var(--text-muted); }

.tl-prog-row    { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tl-prog        { flex: 1; }
.tl-pct         { font-size: 12px; font-weight: 700; color: var(--teal); white-space: nowrap; }

.tl-card-footer { margin-top: 12px; }

/* Seção de avaliação dentro do card da trilha */
.tl-aval-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.tl-aval-item   { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: var(--radius-sm); }
.tl-aval-open   { background: var(--teal-light); }
.tl-aval-done   { background: var(--green-light); }
.tl-aval-locked { background: #f8f9fa; opacity: .6; }
.tl-aval-left   { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tl-aval-icon   { font-size: 18px; flex-shrink: 0; }
.tl-aval-nome   { font-size: 13px; font-weight: 600; color: var(--text); }
.tl-aval-score  { font-size: 12px; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════
   TODOS OS TREINAMENTOS (IMAGE GRID)
══════════════════════════════════════════════════════ */
.todos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px; padding: 32px; max-width: 1280px; margin: 0 auto;
}

.img-card {
  border-radius: var(--radius); overflow: hidden; position: relative;
  height: 210px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.img-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.img-card:hover .img-card-bg { transform: scale(1.05); }

.img-card-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  background-color: var(--teal); transition: transform .35s ease;
}
.img-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.05) 100%);
}
.img-card-body {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px;
}
.img-card-num   { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.7); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.img-card-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 10px; line-height: 1.25; }
.img-prog-bar   { flex: 1; height: 4px; background: rgba(255,255,255,.3); border-radius: 99px; overflow: hidden; }
.img-prog-fill  { height: 100%; background: #fff; border-radius: 99px; }
.img-card-prog  { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.img-card-pct   { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.9); white-space: nowrap; }
.img-card-btn   { background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.6); color: #fff; align-self: flex-start; }
.img-card-btn:hover { background: rgba(255,255,255,.3); }

/* ══════════════════════════════════════════════════════
   VISÃO DA AULA (PLAYER + LISTA)
══════════════════════════════════════════════════════ */
.lesson-view {
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  flex-direction: column; z-index: 100;
}

.lesson-topbar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 12px 20px; display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.lesson-mod-title  { font-size: 16px; font-weight: 700; flex: 1; }
.lesson-mod-prog   { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lesson-mod-prog .progress-bar { width: 110px; }
.lesson-mod-prog .mod-pct { font-size: 12px; font-weight: 700; color: var(--teal); min-width: 32px; text-align: right; }

.lesson-body       { display: grid; grid-template-columns: 1fr 320px; flex: 1; overflow: hidden; min-height: 0; }

.player-area       { display: flex; flex-direction: column; border-right: 1px solid var(--border); overflow-y: auto; }
.player-wrap       { width: 100%; aspect-ratio: 16/9; background: #000; position: relative; flex-shrink: 0; }
.player-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; display: block; }
.player-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: rgba(255,255,255,.5); font-size: 14px;
}
.player-placeholder svg { opacity: .3; width: 52px; height: 52px; }

.player-actions    {
  padding: 14px 20px; border-top: 1px solid var(--border); background: var(--white);
  display: flex; flex-direction: column; gap: 10px; flex-shrink: 0;
}
.player-title-row  { display: flex; align-items: center; gap: 10px; }
.player-title-text { flex: 1; font-weight: 600; font-size: 14px; color: var(--text); }
.player-nav        { display: flex; gap: 8px; }
.player-btns       { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.lesson-sidebar    { overflow: hidden; background: #f5faf9; display: flex; flex-direction: column; }
.sidebar-header    {
  padding: 14px 16px 10px; font-size: 11px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sidebar-count-text { font-weight: 400; text-transform: none; letter-spacing: 0; }
.lesson-list       { flex: 1; overflow-y: auto; }

.lesson-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--trans);
}
.lesson-item:hover { background: var(--bg); }
.lesson-item.active { background: var(--teal-light); border-left: 3px solid var(--teal); }
.lesson-item.active .lesson-item-title { color: var(--teal-dark); font-weight: 600; }
.lesson-item-check {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px; transition: all var(--trans);
}
.lesson-item.done .lesson-item-check { background: var(--teal); border-color: var(--teal); }
.lesson-item-title { font-size: 13px; line-height: 1.4; flex: 1; }
.lesson-item-num   { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.aval-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  cursor: pointer; transition: background var(--trans); background: var(--teal-light);
}
.aval-item:hover  { background: #c8eae7; }
.aval-item.locked { opacity: .45; cursor: not-allowed; pointer-events: none; background: var(--bg); }
.aval-item.done   { background: var(--green-light); }
.aval-item-icon   { font-size: 18px; flex-shrink: 0; }
.aval-item-info .aval-item-name   { font-size: 13px; font-weight: 600; color: var(--teal-dark); }
.aval-item-info .aval-item-status { font-size: 11px; color: var(--text-muted); }
.aval-item.done .aval-item-info .aval-item-name { color: var(--green); }

/* ══════════════════════════════════════════════════════
   AVALIAÇÃO
══════════════════════════════════════════════════════ */
.aval-view {
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  flex-direction: column; overflow: hidden; z-index: 100;
}
.aval-topbar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 12px 20px; display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.aval-topbar h2 { font-size: 16px; font-weight: 700; flex: 1; }
.aval-body {
  flex: 1; overflow-y: auto; padding: 24px;
  max-width: 800px; width: 100%; margin: 0 auto;
}
.aval-body h3    { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.aval-desc       { color: var(--text-muted); margin-bottom: 24px; }
.questao-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.questao-num      { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.questao-enunciado{ font-size: 15px; font-weight: 600; margin-bottom: 14px; line-height: 1.5; }
.opcoes-lista     { display: flex; flex-direction: column; gap: 8px; }
.opcao-label {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--trans);
}
.opcao-label:hover    { border-color: var(--teal); background: var(--teal-light); }
.opcao-label input[type=radio] { margin-top: 2px; accent-color: var(--teal); }
.opcao-label.correta  { border-color: var(--green); background: var(--green-light) !important; }
.opcao-label.errada   { border-color: var(--red);   background: var(--red-light)   !important; }
.questao-feedback     { margin-top: 10px; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: var(--radius-sm); }
.questao-feedback.ok  { background: var(--green-light); color: var(--green); }
.questao-feedback.err { background: var(--red-light);   color: var(--red);   }
.aval-submit-wrap     { margin-top: 24px; display: flex; justify-content: center; }
.aval-result {
  background: var(--teal-light); border: 1.5px solid #a8ddd7; border-radius: var(--radius);
  padding: 28px; text-align: center; margin-top: 16px; display: none;
}
.aval-result h4 { font-size: 24px; font-weight: 700; color: var(--teal-dark); margin-bottom: 6px; }
.aval-result p  { color: var(--text-muted); }

/* ══════════════════════════════════════════════════════
   PORTAL TUTOR
══════════════════════════════════════════════════════ */
.tutor-body {
  padding: 28px; display: flex; flex-direction: column; gap: 24px;
  overflow-y: auto; height: calc(100vh - 64px);
}
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.stat-card  {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm); border: 1.5px solid var(--border);
}
.stat-card .s-icon  { font-size: 26px; margin-bottom: 8px; }
.stat-card .s-val   { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 700; color: var(--teal); }
.stat-card .s-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

.tutor-tabs {
  display: flex; border-bottom: 2px solid var(--border); gap: 4px;
  background: var(--white); padding: 0 28px; flex-shrink: 0;
}
.tutor-tab {
  padding: 12px 18px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--text-muted); border: none; background: none; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color var(--trans);
}
.tutor-tab:hover { color: var(--teal); }
.tutor-tab.active { color: var(--teal); border-bottom-color: var(--teal); }

.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-header h3 { font-size: 18px; font-weight: 700; margin-right: auto; }

.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 14px; border-radius: 99px; border: 1.5px solid var(--border);
  background: var(--white); font-size: 12px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: all var(--trans);
}
.chip:hover    { border-color: var(--teal); color: var(--teal); }
.chip.active   { background: var(--teal); color: #fff; border-color: var(--teal); }

.table-wrap    { background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--border); overflow: auto; }
table          { width: 100%; border-collapse: collapse; min-width: 600px; }
thead th       {
  padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted);
  background: var(--bg); border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td       { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

.aluno-cell    { display: flex; align-items: center; gap: 8px; }
.aluno-name    { font-weight: 600; }
.aluno-email   { font-size: 11px; color: var(--text-muted); }
.prog-cell .prog-pct { font-size: 12px; font-weight: 700; color: var(--teal); margin-bottom: 3px; }
.prog-cell .progress-bar { min-width: 80px; }

.empty-state   { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state .e-icon { font-size: 44px; display: block; margin-bottom: 12px; opacity: .35; }

.manage-section       { display: none; }
.manage-section.active{ display: block; }
.card-list            { display: flex; flex-direction: column; gap: 12px; }
.manage-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
}
.manage-card .mc-info    { flex: 1; }
.manage-card .mc-title   { font-weight: 700; font-size: 15px; }
.manage-card .mc-sub     { font-size: 12px; color: var(--text-muted); }
.manage-card .mc-actions { display: flex; gap: 8px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 5000;
  display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
.modal {
  background: var(--white); border-radius: 16px; padding: 28px;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.22), 0 4px 16px rgba(0,0,0,.1);
}
.modal h3          { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.modal-close       { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--bg); }
.modal-footer      { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ══════════════════════════════════════════════════════
   REDESIGN — melhorias visuais
══════════════════════════════════════════════════════ */

/* Animações */
@keyframes shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position:  200px 0; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbars customizadas */
::-webkit-scrollbar            { width: 6px; height: 6px; }
::-webkit-scrollbar-track      { background: transparent; }
::-webkit-scrollbar-thumb      { background: rgba(26,155,140,.28); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover{ background: rgba(26,155,140,.48); }

/* Elevação nos cards da home ao hover */
.home-card { transition: transform .22s ease, box-shadow .22s ease; }

/* Brilho nos cards de imagem */
.img-card:hover .img-card-bg { transform: scale(1.07); }

/* Tutor — stat cards com ícone de fundo */
.stat-card { position: relative; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.stat-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.12); transform: translateY(-2px); }
.stat-card .s-icon {
  position: relative; z-index: 1;
}
.stat-card::before {
  content: attr(data-icon);
  position: absolute; bottom: -8px; right: -4px;
  font-size: 64px; opacity: .06; line-height: 1; pointer-events: none;
  transform: rotate(-10deg);
}

/* Tutor — sidebar item ativo com borda esquerda */
.t-nav-item.active {
  background: var(--teal-light); color: var(--teal); font-weight: 600;
  border-left: 3px solid var(--teal); padding-left: 9px;
}

/* Tabelas — linhas alternadas */
.t-table tbody tr:nth-child(even) td { background: #fafbfc; }
.t-table tbody tr:hover td           { background: var(--teal-light) !important; }
tbody tr:nth-child(even)             { background: #fafbfc; }

/* Gráficos — bordas de grade mais suaves já via Chart.js options;
   Aqui deixamos os chart-cards com visual melhorado */
.chart-card { transition: box-shadow .2s; }
.chart-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }

/* Linha conectora da timeline com gradiente */
.tl-done .tl-connector {
  background: linear-gradient(180deg, var(--teal) 0%, var(--teal-mid) 100%);
}

/* Micro-animação nas screens do aluno */
.screen { animation: fadeIn .28s ease; }

/* Login btn hover elevation */
.login-btn:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(26,155,140,.35); }

/* Ícones da sidebar levemente maiores */
.t-nav-icon { font-size: 17px; }

/* Print */
@media print {
  .portal-header .btn-ghost, .filter-chips, .btn-teal, .btn-outline,
  .btn-danger, .btn-gray, .btn-success, .manage-section, .modal-overlay,
  .tutor-tabs, .section-header .btn { display: none !important; }
  .tutor-body  { height: auto; overflow: visible; padding: 0; }
  .table-wrap  { border: none; overflow: visible; }
  .print-header{ display: block !important; }
  @page { margin: 20mm; }
}
.print-header { display: none; margin-bottom: 20px; }
.print-header h2 { font-size: 20px; font-weight: 700; }
.print-header p  { font-size: 13px; color: #666; }

/* ══════════════════════════════════════════════════════
   RESPONSIVO
══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .home-cards      { grid-template-columns: 1fr 1fr; }
  .stats-grid      { grid-template-columns: repeat(2,1fr); }
  .lesson-body     { grid-template-columns: 1fr; }
  .lesson-sidebar  { border-right: none; border-top: 1px solid var(--border); max-height: 280px; }
}
@media (max-width: 640px) {
  .home-cards      { grid-template-columns: 1fr; }
  .stats-grid      { grid-template-columns: 1fr; }
  .portal-header   { padding: 0 16px; }
  .header-progress-wrap { display: none; }
  .header-brand-name    { display: none; }
  .home-wrap       { padding: 32px 16px; }
  .timeline-wrap   { padding: 24px 16px; }
  .todos-grid      { padding: 16px; grid-template-columns: repeat(2,1fr); }
  .screen-topbar   { padding: 12px 16px; }
}
