/* ==========================================================================
   Academia Plaorc — Design system (estilo Cobalt). Sem estilos inline.
   ========================================================================== */

/* ---- Reset & base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* Brilho ambiente da marca — fixo, na página inteira, com parallax no scroll */
body::before {
  content: "";
  position: fixed;
  inset: -16% -8%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 80% at 100% 50%, rgba(255, 74, 84, .22), transparent 62%),
    radial-gradient(36% 62% at 0% 55%, rgba(11, 77, 131, .12), transparent 60%);
  transform: translate3d(0, min(calc(var(--sy, 0) * 0.028px), 80px), 0);
  animation: ambient-float 32s ease-in-out infinite alternate;
}
@keyframes ambient-float {
  from { background-position: 0 0, 0 0; }
  to   { background-position: -2.5% -2%, 2.5% 2%; }
}
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(44% 80% at 100% 50%, rgba(255, 74, 84, .26), transparent 62%),
    radial-gradient(38% 62% at 0% 55%, rgba(47, 124, 187, .20), transparent 60%);
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; transform: none; }
}

/* Reveal ao rolar (ativado só quando o JS está presente) */
.js-anim .reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.15s ease, transform 1.15s cubic-bezier(.2, .7, .2, 1); }
.js-anim .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; transition: none; }
}
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4, h5 { line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(28px, 4.4vw, 46px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 20px; }
p { color: var(--txt); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- Layout helpers ----------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.eyebrow { color: var(--acc); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.lead { font-size: 18px; color: var(--mut); }
.muted { color: var(--mut); }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }

.grid { display: grid; gap: 20px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---- Marca --------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--txt); }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--acc-grad); flex: 0 0 auto; box-shadow: var(--shadow-sm); }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--mut); letter-spacing: .02em; }
/* Logo em imagem (wordmark plaorc academia). */
.brand-logo { height: 40px; width: auto; display: block; }
.brand-chip { display: inline-flex; align-items: center; }
.site-footer .brand-logo { height: 34px; }
.auth-aside .brand-logo { height: 48px; }
/* Fundo claro (chip) onde a logo colorida ficaria com baixo contraste. */
:root[data-theme="dark"] .brand-chip { background: #fff; padding: 6px 11px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.auth-aside .brand-chip { background: #fff; padding: 8px 13px; border-radius: 14px; box-shadow: 0 10px 26px rgba(0, 0, 0, .18); }

/* ---- Botões -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius);
  padding: 11px 20px; font-size: 14px; font-weight: 600; line-height: 1;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.btn-primary { background: var(--acc); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px color-mix(in srgb, var(--acc) 38%, transparent); }
.btn-ghost { background: transparent; color: var(--txt); border-color: var(--bd); }
.btn-ghost:hover { border-color: var(--acc); color: var(--acc); }
.btn-soft { background: var(--acc-weak); color: var(--acc); }
.btn-soft:hover { background: color-mix(in srgb, var(--acc) 22%, transparent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 10px 22px color-mix(in srgb, var(--danger) 36%, transparent); }
.btn-hotmart { background: #f04e23; color: #fff; }
.btn-hotmart:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(240, 78, 35, .38); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---- Badges / pills ------------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: var(--pill); }
.badge-accent { background: var(--acc-weak); color: var(--acc); }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge-muted { background: var(--surf-2); color: var(--mut); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---- Cards --------------------------------------------------------------- */
.card { background: var(--surf); border: 1px solid var(--bd); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-hover { transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--acc) 40%, var(--bd)); }
.surface { background: var(--surf); border: 1px solid var(--bd); border-radius: var(--radius-lg); }

/* ---- Course / content card ---------------------------------------------- */
.course-card { display: flex; flex-direction: column; overflow: hidden; }
.course-card .cover { aspect-ratio: 16 / 9; background: var(--acc-grad); position: relative; overflow: hidden; }
.course-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.course-card .cover .cover-tag { position: absolute; top: 12px; left: 12px; }
.course-card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-card .body h3 { font-size: 17px; font-weight: 700; }
.course-card .meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--mut); flex-wrap: wrap; margin-top: auto; }
.course-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--bd); }
.price { font-weight: 800; font-size: 18px; }
.price-free { color: var(--acc-2); }
/* Vitrine sem valor anunciado: o card diz EM BREVE no lugar do preço. Menor e
   com espaçamento de rótulo para não competir com o título do curso. */
.price-breve {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--acc-2);
}

/* ---- Forms --------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field-label, label.field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--txt); }
.field-input {
  width: 100%; background: var(--bg); border: 1px solid var(--bd); border-radius: var(--radius);
  padding: 12px 14px; font-size: 14px; color: var(--txt); font-family: inherit; transition: border-color var(--t-fast), box-shadow var(--t-fast); outline: none;
}
.field-input::placeholder { color: color-mix(in srgb, var(--mut) 80%, transparent); }
.field-input:focus { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-weak); }
.field-textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%); background-position: right 18px center, right 13px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field-file { width: 100%; font-size: 13px; color: var(--mut); }
.field-check { width: 16px; height: 16px; accent-color: var(--acc); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.help-text, .helptext { font-size: 12px; color: var(--mut); margin-top: 6px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--danger); font-size: 12.5px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mut); }

/* ---- Alerts / mensagens -------------------------------------------------- */
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); font-size: 14px; font-weight: 500; border: 1px solid var(--bd); background: var(--surf); transition: opacity .4s; }
.alert.is-hiding { opacity: 0; }
.alert-success { background: var(--ok-bg); color: var(--ok-fg); border-color: transparent; }
.alert-error, .alert-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.alert-info { background: var(--info-bg); color: var(--info-fg); border-color: transparent; }
.alert-warning { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
.alert button { background: none; border: none; color: inherit; font-size: 18px; line-height: 1; opacity: .7; margin-left: auto; }
.messages-stack { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.messages-stack .alert { box-shadow: var(--shadow); }

/* ==========================================================================
   Site público — navbar, hero, footer
   ========================================================================== */
.site-nav { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--surf) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bd); }
.site-nav .inner { display: flex; align-items: center; justify-content: space-between; height: var(--topbar-h); gap: 18px; }
.site-nav-links { display: flex; align-items: center; gap: 26px; }
.site-nav-links a { font-size: 14px; color: var(--mut); font-weight: 500; transition: color var(--t-fast); }
.site-nav-links a:hover, .site-nav-links a.active { color: var(--txt); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: var(--surf); border: 1px solid var(--bd); border-radius: var(--radius); width: 40px; height: 40px; color: var(--txt); font-size: 18px; }
@media (max-width: 860px) {
  .site-nav-links { position: absolute; top: var(--topbar-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--surf); border-bottom: 1px solid var(--bd); padding: 8px 22px 16px; display: none; }
  .site-nav-links.is-open { display: flex; }
  .site-nav-links a { padding: 12px 0; border-bottom: 1px solid var(--bd); }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

.hero { position: relative; overflow: hidden; padding: 84px 0 72px; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--acc); background: var(--acc-weak); padding: 7px 15px; border-radius: var(--pill); font-weight: 600; margin-bottom: 20px; }
.hero-title { font-size: clamp(34px, 6vw, 60px); font-weight: 800; letter-spacing: -.035em; line-height: 1.03; }
.hero-title em { font-style: normal; color: var(--acc); }
.hero-sub { color: var(--mut); font-size: 18px; max-width: 560px; margin-top: 20px; }
.hero-actions { display: flex; gap: 13px; margin-top: 30px; flex-wrap: wrap; }
.hero-glow { position: absolute; top: -20%; right: -10%; width: 620px; height: 480px; background: radial-gradient(ellipse, var(--acc-weak), transparent 70%); filter: blur(24px); pointer-events: none; z-index: 0; }
.hero .container { position: relative; z-index: 1; }

/* Hero com mídia (duas colunas) */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 30px; } }
.hero-media { position: relative; }
.hero-media::before { content: ""; position: absolute; inset: -16px; background: var(--acc-grad); filter: blur(46px); opacity: .30; border-radius: 40px; z-index: 0; }
.hero-figure { position: relative; z-index: 1; margin: 0; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--bd); box-shadow: var(--shadow-lg); aspect-ratio: 3 / 2; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-float { position: absolute; z-index: 2; left: -14px; bottom: 20px; background: var(--surf); border: 1px solid var(--bd); border-radius: var(--radius); padding: 11px 15px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 11px; }
.hero-float b { font-size: 14px; display: block; line-height: 1.2; }
@media (max-width: 520px) { .hero-float { left: 8px; bottom: 10px; } }

/* Faixa de fotos (aprenda na prática) */
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .photo-strip { grid-template-columns: 1fr; } }
.photo-strip figure { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--bd); aspect-ratio: 3 / 2; box-shadow: var(--shadow-sm); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.photo-strip figure:hover img { transform: scale(1.06); }
.photo-strip figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px; color: #fff; font-weight: 700; font-size: 14px; background: linear-gradient(to top, rgba(8, 12, 24, .82), transparent); }

/* ---- Fundo em degradê da marca (hero + CTA) ---------------------------- */
.hero-brand {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(65% 110% at 6% 95%, rgba(6, 58, 102, .85), transparent 60%),
    linear-gradient(120deg, #0b4d83 0%, #163a63 44%, #3a1f3f 100%);
}
/* Brilho vermelho forte na lateral direita */
.hero-brand::after {
  content: "";
  position: absolute;
  top: 46%;
  right: -70px;
  width: 560px;
  height: 560px;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(255, 74, 84, .95), rgba(190, 26, 34, .55) 42%, transparent 72%);
  filter: blur(42px);
  pointer-events: none;
  z-index: 0;
}
.hero-brand .container { position: relative; z-index: 1; }
.hero-brand .hero-glow { display: none; }
/* Halo vermelho atrás da foto */
.hero-brand .hero-media::before {
  display: block;
  inset: -30px;
  background: radial-gradient(circle at 62% 50%, rgba(255, 74, 84, .95), transparent 64%);
  filter: blur(42px);
  opacity: .8;
  border-radius: 50%;
}
.hero-brand .hero-badge { background: rgba(255, 255, 255, .16); color: #fff; }
.hero-brand .hero-title { color: #fff; }
.hero-brand .hero-title em { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .5); text-underline-offset: 6px; text-decoration-thickness: 3px; }
.hero-brand .hero-sub { color: rgba(255, 255, 255, .88); }
.hero-brand .btn-primary { background: #fff; color: var(--acc); }
.hero-brand .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, .30); }
.hero-brand .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero-brand .btn-ghost:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, .12); }

.cta-brand {
  border: 0; color: #fff;
  background:
    radial-gradient(90% 140% at 90% 0%, rgba(154, 19, 24, .55), transparent 55%),
    linear-gradient(120deg, #0b4d83, #5c2a4f 60%, #9a1318);
}
.cta-brand .eyebrow { color: rgba(255, 255, 255, .82); }
.cta-brand h2 { color: #fff; }
.cta-brand p { color: rgba(255, 255, 255, .86); }
.cta-brand .btn-primary { background: #fff; color: var(--acc); }
.cta-brand .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, .30); }
.cta-brand .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.cta-brand .btn-ghost:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, .12); }

.preview-panel { background: var(--surf); border: 1px solid var(--bd); border-radius: var(--radius-xl); padding: 18px; box-shadow: var(--shadow-lg); }
.preview-bars { height: 120px; background: var(--bg); border-radius: var(--radius); display: flex; align-items: flex-end; gap: 8px; padding: 14px; }
.preview-bars i { flex: 1; background: var(--acc-grad); border-radius: 4px 4px 0 0; }

.logos-row { display: flex; gap: 34px; justify-content: center; flex-wrap: wrap; opacity: .6; font-weight: 700; }

/* Depoimentos */
.testimonial { margin: 0; }
.testimonial blockquote { margin: 0; font-size: 15px; line-height: 1.65; color: var(--txt); }
.testimonial blockquote::before { content: "\201C"; display: block; font-family: Georgia, 'Times New Roman', serif; font-size: 46px; line-height: .5; color: var(--acc); opacity: .55; margin-bottom: 4px; }
.testimonial figcaption { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.testimonial figcaption b { display: block; font-size: 14px; line-height: 1.2; }
.testimonial figcaption span { font-size: 12.5px; color: var(--mut); }
.testimonial .logo-badge { width: 54px; height: 54px; border-radius: 13px; background: #fff; border: 1px solid var(--bd); object-fit: cover; flex: 0 0 auto; box-shadow: var(--shadow-sm); }

.site-footer { border-top: 1px solid var(--bd); background: var(--surf); padding: 44px 0 30px; margin-top: 40px; }
.site-footer .cols { display: grid; grid-template-columns: 1.5fr repeat(2, 1fr); gap: 28px; }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); margin-bottom: 12px; font-weight: 700; }
.site-footer a { display: block; color: var(--mut); font-size: 14px; padding: 4px 0; }
.site-footer a:hover { color: var(--acc); }
.site-footer .bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--bd); color: var(--mut); font-size: 13px; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   Shell da área logada (aluno / admin) — sidebar + topbar
   ========================================================================== */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.app-sidebar { background: var(--surf); border-right: 1px solid var(--bd); padding: 20px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.app-sidebar .brand { padding: 4px 8px 18px; }
.app-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.app-nav .nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); font-weight: 700; padding: 16px 12px 6px; }
.app-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: var(--radius); font-size: 14px; color: var(--mut); font-weight: 500; transition: background var(--t-fast), color var(--t-fast); }
.app-nav a:hover { background: var(--bg); color: var(--txt); }
.app-nav a.active { background: var(--acc); color: #fff; font-weight: 600; }
.app-nav a .ico { width: 18px; text-align: center; flex: 0 0 auto; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 14px 8px 4px; margin-top: 10px; border-top: 1px solid var(--bd); }
.sidebar-user b { font-size: 13px; display: block; line-height: 1.2; }
.sidebar-user span { font-size: 12px; color: var(--mut); }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar { height: var(--topbar-h); border-bottom: 1px solid var(--bd); background: color-mix(in srgb, var(--surf) 86%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 26px; }
.app-topbar h1 { font-size: 20px; font-weight: 700; }
.app-topbar .actions { display: flex; align-items: center; gap: 10px; }
.app-content { padding: 26px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--mut); }

.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--acc-grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--bd); background: var(--surf); color: var(--txt); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; transition: background var(--t-fast); }
.icon-btn:hover { background: var(--bg); }
.sidebar-toggle { display: none; }

/* Stat cards */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat { background: var(--surf); border: 1px solid var(--bd); border-radius: var(--radius-lg); padding: 18px; transition: transform var(--t), border-color var(--t); }
.stat:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--acc) 40%, var(--bd)); }
.stat .label { font-size: 13px; color: var(--mut); }
.stat .value { font-size: 26px; font-weight: 800; display: block; margin: 6px 0 8px; }
.stat .ico { float: right; color: var(--acc); font-size: 18px; }

/* Progress bar */
.progress { height: 7px; border-radius: var(--pill); background: var(--surf-2); overflow: hidden; }
.progress-fill { height: 100%; background: var(--acc-grad); border-radius: var(--pill); transition: width .4s ease; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--mut); margin-bottom: 6px; }

/* Tabelas */
.table-wrap { background: var(--surf); border: 1px solid var(--bd); border-radius: var(--radius-lg); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 13px 16px; color: var(--mut); font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--bd); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--bd); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--bg); }
.table .cell { display: flex; align-items: center; gap: 10px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Toolbar de filtros/busca */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search { flex: 1; min-width: 200px; }
.toolbar .search input { width: 100%; }

/* Empty states */
.empty-state { text-align: center; padding: 56px 20px; color: var(--mut); }
.empty-state .emo { font-size: 40px; margin-bottom: 12px; }

/* ==========================================================================
   Player de aula (área do aluno)
   ========================================================================== */
.player-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 980px) { .player-grid { grid-template-columns: 1fr; } }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #000; border: 1px solid var(--bd); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Marca d'água com o e-mail de quem está assistindo. Ela PASSEIA pelos quatro
   cantos: uma marca fixa é recortada em dez segundos de edição, uma que se move
   obriga a recortar o vídeo inteiro. Não impede gravar a tela — impede gravar
   a tela e dizer que não foi você. */
.video-frame .video-watermark { position: absolute; top: 10px; right: 12px; z-index: 3; font-size: 12px; color: rgba(255, 255, 255, .55); background: rgba(0, 0, 0, .3); padding: 3px 9px; border-radius: 6px; pointer-events: none; user-select: none; letter-spacing: .3px; animation: watermark-walk 40s steps(1, end) infinite; }
@keyframes watermark-walk {
  0%   { top: 10px; right: 12px; bottom: auto; left: auto; }
  25%  { top: auto; right: 12px; bottom: 46px; left: auto; }
  50%  { top: auto; right: auto; bottom: 46px; left: 12px; }
  75%  { top: 10px; right: auto; bottom: auto; left: 12px; }
  100% { top: 10px; right: 12px; bottom: auto; left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  /* Sem animação para quem pediu menos movimento — a marca continua lá, parada. */
  .video-frame .video-watermark { animation: none; }
}
.video-frame .secure-video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; object-fit: contain; }
.video-empty { display: flex; align-items: center; justify-content: center; color: #9aa; height: 100%; }
.lesson-tabs { display: flex; gap: 6px; margin: 20px 0 14px; border-bottom: 1px solid var(--bd); }
.lesson-tabs button { background: none; border: none; padding: 10px 4px; margin-right: 16px; color: var(--mut); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; }
.lesson-tabs button.active { color: var(--acc); border-color: var(--acc); }
.transcript { white-space: pre-wrap; color: var(--txt); line-height: 1.7; }

.module-list .module { border: 1px solid var(--bd); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: var(--surf); }
.module-head { padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 14px; }
.lesson-row { display: flex; align-items: center; gap: 11px; padding: 11px 16px; border-top: 1px solid var(--bd); font-size: 14px; color: var(--txt); transition: background var(--t-fast); }
.lesson-row:hover { background: var(--bg); }
.lesson-row.active { background: var(--acc-weak); color: var(--acc); font-weight: 600; }
.lesson-row.locked { color: var(--mut); cursor: not-allowed; }
.lesson-row .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--bd); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: 0 0 auto; }
.lesson-row.done .tick { background: var(--acc-2); border-color: var(--acc-2); color: #fff; }
.material-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--bd); border-radius: var(--radius); margin-bottom: 8px; transition: border-color var(--t-fast); }
.material-item:hover { border-color: var(--acc); }
.material-item .m-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--acc-weak); color: var(--acc); display: inline-flex; align-items: center; justify-content: center; }

/* ---- Auth (login/cadastro) ---------------------------------------------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { background: var(--acc-grad); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside h2 { font-size: 34px; line-height: 1.1; }
.auth-aside p { color: rgba(255, 255, 255, .85); margin-top: 14px; max-width: 380px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 26px; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* ---- Utilities ----------------------------------------------------------- */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.text-sm { font-size: 13px; } .text-lg { font-size: 18px; }
.hidden { display: none; }
.divider { height: 1px; background: var(--bd); border: 0; margin: 18px 0; }
.narrow { max-width: 520px; margin-inline: auto; }
.mx-auto { margin-inline: auto; }
.auth-aside .brand { color: #fff; }
.auth-aside .brand-mark { background: rgba(255, 255, 255, .92); }
.link-acc { color: var(--acc); font-weight: 600; }
.tag { display: inline-block; font-size: 12px; color: var(--mut); background: var(--surf-2); padding: 3px 9px; border-radius: var(--pill); }

/* ---- Responsivo do shell ------------------------------------------------- */
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; left: 0; top: 0; z-index: 120; width: var(--sidebar-w); transform: translateX(-100%); transition: transform var(--t); }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(6, 8, 20, .5); z-index: 110; }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .sidebar-toggle { display: inline-flex; }
  .player-grid { grid-template-columns: 1fr; }
}
