/* =====================================================================
   EAD - Plataforma de Treinamentos
   AJUSTE GLOBAL RESPONSIVO PARA TODAS AS TELAS ADMIN
   Telas cobertas:
   Dashboard, Cursos, Módulos, Vídeos, Usuários, Liberações,
   Relatórios e Configurações.

   Como usar:
   1) Salve este arquivo em: assets/css/ead-admin-responsive-global.css
   2) Inclua DEPOIS do CSS principal do sistema:
      <link rel="stylesheet" href="assets/css/ead-admin-responsive-global.css?v=1.2">

   Importante:
   - Este arquivo foi feito como CSS de ajuste/reforço.
   - Ele não substitui regras PHP/HTML.
   - Para funcionar em todas as páginas, o ideal é incluir o link no
     arquivo comum do painel, como header.php, layout.php ou menu.php.
===================================================================== */

:root {
  --ead-bg: #f4f7fb;
  --ead-sidebar: #0b1f34;
  --ead-sidebar-2: #07192b;
  --ead-sidebar-hover: #1d2d42;
  --ead-primary: #2563eb;
  --ead-primary-dark: #1d4ed8;
  --ead-primary-soft: #e8f0ff;
  --ead-text: #07142f;
  --ead-muted: #64748b;
  --ead-border: #dbe4f0;
  --ead-card: #ffffff;
  --ead-success: #16a34a;
  --ead-success-soft: #d8f7e3;
  --ead-warning: #f97316;
  --ead-warning-soft: #fff1dd;
  --ead-purple: #7c3aed;
  --ead-purple-soft: #f0e7ff;
  --ead-shadow: 0 12px 35px rgba(15, 23, 42, .08);
  --ead-radius: 18px;
  --ead-sidebar-width: 280px;
  --ead-page-padding-x: 30px;
  --ead-page-padding-y: 28px;
}

/* =====================================================================
   BASE
===================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--ead-bg);
  color: var(--ead-text);
  font-family: Inter, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* Corrige telas onde o CSS principal falha e os itens ficam "soltos" */
body:not(.login-page) {
  background: var(--ead-bg);
}

/* =====================================================================
   LAYOUT GERAL
===================================================================== */

.wrapper,
.admin-wrapper,
.dashboard-wrapper,
.layout,
.app,
.app-layout,
.panel-layout {
  min-height: 100vh;
  display: flex;
  background: var(--ead-bg);
}

/* Sidebar */
.sidebar,
.admin-sidebar,
.side-menu,
.menu-lateral,
.nav-sidebar,
aside.sidebar,
aside.admin-sidebar {
  width: var(--ead-sidebar-width);
  min-width: var(--ead-sidebar-width);
  height: 100vh;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--ead-sidebar) 0%, var(--ead-sidebar-2) 100%);
  color: #fff;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::-webkit-scrollbar,
.admin-sidebar::-webkit-scrollbar,
.side-menu::-webkit-scrollbar,
.menu-lateral::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb,
.admin-sidebar::-webkit-scrollbar-thumb,
.side-menu::-webkit-scrollbar-thumb,
.menu-lateral::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18);
  border-radius: 999px;
}

/* Logo */
.logo,
.brand,
.sidebar-brand,
.admin-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.logo-icon,
.brand-icon,
.sidebar-logo-icon {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.logo h1,
.logo-title,
.brand-title,
.admin-logo h1 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -.04em;
}

.logo p,
.logo-subtitle,
.brand-subtitle,
.admin-logo p {
  margin: 3px 0 0;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 750;
}

/* Navegação */
.sidebar nav,
.admin-sidebar nav,
.side-menu nav,
.menu-lateral nav,
.nav-menu,
.menu,
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar a,
.admin-sidebar a,
.side-menu a,
.menu-lateral a,
.nav-menu a,
.menu a,
.sidebar-menu a,
.nav-link,
.menu-link {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #eff6ff;
  padding: 14px 17px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.1;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar a:hover,
.admin-sidebar a:hover,
.side-menu a:hover,
.menu-lateral a:hover,
.nav-menu a:hover,
.menu a:hover,
.sidebar-menu a:hover,
.nav-link:hover,
.menu-link:hover {
  background: var(--ead-sidebar-hover);
  color: #fff;
}

.sidebar a.active,
.admin-sidebar a.active,
.side-menu a.active,
.menu-lateral a.active,
.nav-menu a.active,
.menu a.active,
.sidebar-menu a.active,
.nav-link.active,
.menu-link.active,
.sidebar .active > a,
.admin-sidebar .active > a {
  background: var(--ead-primary);
  color: #fff;
  box-shadow: 0 12px 22px rgba(37, 99, 235, .24);
}

.sidebar-footer,
.user-area,
.profile-area {
  margin-top: auto;
  padding-top: 18px;
  color: #dbeafe;
}

/* Conteúdo */
.main,
.main-content,
.content,
.page-content,
.admin-content,
.dashboard-content,
.panel-content,
main {
  width: calc(100% - var(--ead-sidebar-width));
  min-height: 100vh;
  margin-left: var(--ead-sidebar-width);
  padding: var(--ead-page-padding-y) var(--ead-page-padding-x);
  background: var(--ead-bg);
}

/* =====================================================================
   CABEÇALHO DAS PÁGINAS
===================================================================== */

.page-header,
.content-header,
.top-header,
.header,
.admin-header,
.page-top,
.module-header,
.video-header,
.users-header,
.reports-header,
.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.page-title,
.title-area,
.header-title {
  min-width: 0;
}

.page-title h1,
.content-header h1,
.admin-header h1,
.page-top h1,
main h1,
.main-content h1,
.admin-content h1,
.dashboard-content h1 {
  margin: 0 0 4px;
  color: var(--ead-text);
  font-size: 36px;
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -.035em;
}

.page-title p,
.content-header p,
.admin-header p,
.page-top p,
.subtitle,
.lead,
.page-description {
  margin: 0;
  color: var(--ead-muted);
  font-size: 17px;
}

/* Ações do topo */
.header-actions,
.top-actions,
.actions,
.page-actions,
.toolbar,
.filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.btn,
button,
.button,
.btn-primary,
.btn-new,
.new-course,
.btn-add,
.btn-save,
.btn-search,
a.btn {
  border: 0;
  outline: 0;
  cursor: pointer;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--ead-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.btn:hover,
button:hover,
.button:hover,
.btn-primary:hover,
.btn-new:hover,
.new-course:hover,
.btn-add:hover,
.btn-save:hover,
.btn-search:hover {
  background: var(--ead-primary-dark);
  transform: translateY(-1px);
}

.btn-secondary,
.button-secondary,
.btn-light {
  background: #fff;
  color: var(--ead-primary);
  border: 1px solid var(--ead-border);
  box-shadow: none;
}

.btn-danger,
.button-danger {
  background: #dc2626;
}

.btn-danger:hover,
.button-danger:hover {
  background: #b91c1c;
}

/* Busca */
.search,
.search-box,
.search-input-wrapper,
.form-search,
.input-search {
  position: relative;
}

.search input,
.search-box input,
.search-input,
.input-search input,
input[type="search"] {
  width: 300px;
  height: 48px;
  border: 1px solid var(--ead-border);
  border-radius: 12px;
  background: #fff;
  color: var(--ead-text);
  font-size: 15px;
  padding: 0 16px;
  outline: none;
  transition: border .18s ease, box-shadow .18s ease;
}

.search input:focus,
.search-box input:focus,
.search-input:focus,
.input-search input:focus,
input[type="search"]:focus {
  border-color: var(--ead-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

/* =====================================================================
   CARDS DE INDICADORES - USADO EM TODAS AS TELAS
===================================================================== */

.stats-grid,
.cards-grid,
.dashboard-cards,
.cards-dashboard,
.indicators-grid,
.resumo-grid,
.kpi-grid,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 26px;
}

.stat-card,
.dashboard-card,
.indicator-card,
.card-resumo,
.summary-card,
.metric-card,
.kpi-card {
  min-height: 160px;
  background: var(--ead-card);
  border: 1px solid var(--ead-border);
  border-radius: var(--ead-radius);
  padding: 28px 26px;
  box-shadow: var(--ead-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
}

.stat-info,
.card-info,
.summary-info,
.metric-info {
  min-width: 0;
}

.stat-card h3,
.dashboard-card h3,
.indicator-card h3,
.card-resumo h3,
.summary-card h3,
.metric-card h3,
.kpi-card h3 {
  margin: 0 0 2px;
  color: #334155;
  font-size: 16px;
  font-weight: 850;
}

.stat-number,
.number,
.card-number,
.summary-number,
.metric-number,
.kpi-number,
.stat-card strong,
.dashboard-card strong {
  display: block;
  color: var(--ead-text);
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
}

.stat-label,
.card-label,
.summary-label,
.metric-label {
  display: block;
  margin-top: 10px;
  color: var(--ead-primary);
  font-size: 16px;
  font-weight: 850;
}

.stat-label span,
.card-label span {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  color: var(--ead-primary);
}

.icon-box,
.stat-icon,
.card-icon,
.summary-icon,
.metric-icon,
.kpi-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--ead-primary-soft);
  color: var(--ead-primary);
}

.stat-chart,
.card-chart,
.mini-chart {
  color: currentColor;
  opacity: .88;
}

/* Cores alternativas */
.modulos .icon-box,
.modules .icon-box,
.card-modulos .icon-box,
.stat-card.modules .stat-icon,
.stat-card.modulos .stat-icon {
  background: var(--ead-purple-soft);
  color: var(--ead-purple);
}

.videos .icon-box,
.card-videos .icon-box,
.stat-card.videos .stat-icon {
  background: #dffbe8;
  color: var(--ead-success);
}

.usuarios .icon-box,
.users .icon-box,
.card-usuarios .icon-box,
.card-users .icon-box,
.stat-card.users .stat-icon,
.stat-card.usuarios .stat-icon {
  background: var(--ead-warning-soft);
  color: var(--ead-warning);
}

/* =====================================================================
   CARDS, PAINÉIS, FORMULÁRIOS E TABELAS
===================================================================== */

.content-grid,
.form-table-grid,
.admin-grid,
.two-columns,
.grid-2,
.page-grid,
.management-grid,
.crud-grid {
  display: grid;
  grid-template-columns: minmax(360px, 400px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.card,
.panel,
.box,
.form-card,
.table-card,
.list-card,
.content-card,
.config-card,
.report-card,
.filter-card,
.user-card,
.module-card,
.video-card,
.permission-card {
  background: var(--ead-card);
  border: 1px solid var(--ead-border);
  border-radius: var(--ead-radius);
  box-shadow: var(--ead-shadow);
  padding: 24px;
}

.card-header,
.panel-header,
.box-header,
.form-card-header,
.table-card-header,
.list-card-header,
.config-card-header,
.report-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.card-header h2,
.panel-header h2,
.box-header h2,
.form-card h2,
.table-card h2,
.list-card h2,
.config-card h2,
.report-card h2,
.card h2,
.panel h2 {
  margin: 0;
  color: var(--ead-text);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -.025em;
}

/* Formulários */
form {
  margin: 0;
}

.form-group,
.field,
.input-group,
.form-row {
  margin-bottom: 18px;
}

label {
  display: inline-block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="search"]),
select,
textarea {
  width: 100%;
  border: 1px solid var(--ead-border);
  border-radius: 12px;
  background: #fff;
  color: var(--ead-text);
  font-size: 15px;
  padding: 13px 15px;
  outline: none;
  transition: border .18s ease, box-shadow .18s ease;
}

textarea {
  min-height: 118px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ead-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

/* Tabelas */
.table-responsive,
.table-wrapper,
.responsive-table,
.data-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ead-border);
  border-radius: 16px;
  background: #fff;
}

table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

thead th,
table th,
.data-table th {
  text-align: left;
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
  padding: 15px 18px;
  border-bottom: 1px solid var(--ead-border);
  white-space: nowrap;
}

tbody td,
table td,
.data-table td {
  color: #334155;
  font-size: 15px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ead-border);
  vertical-align: middle;
}

tbody tr:last-child td,
table tr:last-child td {
  border-bottom: none;
}

.course-info,
.item-info,
.media-info,
.user-info,
.module-info,
.video-info,
.permission-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.course-info h3,
.item-info h3,
.media-info h3,
.user-info h3,
.module-info h3,
.video-info h3,
.course-title,
.item-title,
.user-title,
.module-title,
.video-title {
  margin: 0 0 3px;
  color: var(--ead-text);
  font-size: 16px;
  line-height: 1.18;
  font-weight: 850;
}

.course-info p,
.item-info p,
.media-info p,
.user-info p,
.module-info p,
.video-info p,
.course-description,
.item-description,
.user-description,
.module-description,
.video-description {
  margin: 0;
  color: var(--ead-muted);
  font-size: 14px;
  line-height: 1.35;
}

.badge,
.status,
.status-active,
.badge-active,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--ead-success-soft);
  color: #008f4f;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.status-inactive,
.badge-inactive {
  background: #fee2e2;
  color: #b91c1c;
}

.actions-cell,
.table-actions,
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button,
.btn-icon,
.action-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--ead-border);
  border-radius: 12px;
  background: #fff;
  color: var(--ead-primary);
  box-shadow: none;
}

/* =====================================================================
   TELAS ESPECÍFICAS
===================================================================== */

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

/* Relatórios */
.reports-grid,
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.report-card {
  min-height: 150px;
}

/* Configurações */
.settings-grid,
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

/* Liberações / permissões */
.permissions-grid,
.liberacoes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

/* Lista de vídeos e módulos, quando usar cards em vez de tabela */
.module-list,
.video-list,
.user-list,
.course-list {
  display: grid;
  gap: 14px;
}

/* =====================================================================
   AJUSTE PRINCIPAL PARA NOTEBOOK/MONITOR 1366 x 768
===================================================================== */

@media (max-width: 1366px) and (max-height: 768px) {
  :root {
    --ead-sidebar-width: 280px;
    --ead-page-padding-x: 30px;
    --ead-page-padding-y: 26px;
    --ead-radius: 18px;
  }

  body {
    font-size: 15px;
  }

  .sidebar,
  .admin-sidebar,
  .side-menu,
  .menu-lateral,
  .nav-sidebar,
  aside.sidebar,
  aside.admin-sidebar {
    padding: 22px 18px;
  }

  .logo,
  .brand,
  .sidebar-brand,
  .admin-logo {
    margin-bottom: 30px;
  }

  .sidebar a,
  .admin-sidebar a,
  .side-menu a,
  .menu-lateral a,
  .nav-menu a,
  .menu a,
  .sidebar-menu a,
  .nav-link,
  .menu-link {
    min-height: 55px;
    padding: 13px 17px;
    font-size: 16px;
  }

  .page-header,
  .content-header,
  .top-header,
  .header,
  .admin-header,
  .page-top,
  .module-header,
  .video-header,
  .users-header,
  .reports-header,
  .settings-header {
    margin-bottom: 22px;
  }

  .page-title h1,
  .content-header h1,
  .admin-header h1,
  .page-top h1,
  main h1,
  .main-content h1,
  .admin-content h1,
  .dashboard-content h1 {
    font-size: 34px;
  }

  .page-title p,
  .content-header p,
  .admin-header p,
  .page-top p,
  .subtitle,
  .lead,
  .page-description {
    font-size: 16px;
  }

  .btn,
  button,
  .button,
  .btn-primary,
  .btn-new,
  .new-course,
  .btn-add,
  .btn-save,
  .btn-search,
  a.btn {
    min-height: 45px;
    padding: 11px 18px;
  }

  .search input,
  .search-box input,
  .search-input,
  .input-search input,
  input[type="search"] {
    width: 300px;
    height: 48px;
  }

  .stats-grid,
  .cards-grid,
  .dashboard-cards,
  .cards-dashboard,
  .indicators-grid,
  .resumo-grid,
  .kpi-grid,
  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
  }

  .stat-card,
  .dashboard-card,
  .indicator-card,
  .card-resumo,
  .summary-card,
  .metric-card,
  .kpi-card {
    min-height: 160px;
    padding: 25px 22px;
  }

  .stat-number,
  .number,
  .card-number,
  .summary-number,
  .metric-number,
  .kpi-number,
  .stat-card strong,
  .dashboard-card strong {
    font-size: 35px;
  }

  .icon-box,
  .stat-icon,
  .card-icon,
  .summary-icon,
  .metric-icon,
  .kpi-icon {
    width: 60px;
    height: 60px;
  }

  .content-grid,
  .form-table-grid,
  .admin-grid,
  .two-columns,
  .grid-2,
  .page-grid,
  .management-grid,
  .crud-grid {
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 20px;
  }

  .card,
  .panel,
  .box,
  .form-card,
  .table-card,
  .list-card,
  .content-card,
  .config-card,
  .report-card,
  .filter-card,
  .user-card,
  .module-card,
  .video-card,
  .permission-card {
    padding: 22px;
  }

  .card-header,
  .panel-header,
  .box-header,
  .form-card-header,
  .table-card-header,
  .list-card-header,
  .config-card-header,
  .report-card-header {
    margin-bottom: 18px;
  }

  .card-header h2,
  .panel-header h2,
  .box-header h2,
  .form-card h2,
  .table-card h2,
  .list-card h2,
  .config-card h2,
  .report-card h2,
  .card h2,
  .panel h2 {
    font-size: 21px;
  }

  .form-group,
  .field,
  .input-group,
  .form-row {
    margin-bottom: 16px;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="search"]),
  select,
  textarea {
    padding: 12px 15px;
  }

  textarea {
    min-height: 96px;
    max-height: 128px;
  }

  thead th,
  table th,
  .data-table th {
    padding: 14px 17px;
  }

  tbody td,
  table td,
  .data-table td {
    padding: 14px 17px;
  }

  .table-responsive,
  .table-wrapper,
  .responsive-table,
  .data-table-wrapper {
    max-height: 310px;
    overflow-y: auto;
  }

  .reports-grid,
  .report-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .settings-grid,
  .config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* =====================================================================
   TELAS MENORES / NOTEBOOKS MAIS ESTREITOS
===================================================================== */

@media (max-width: 1180px) {
  :root {
    --ead-sidebar-width: 245px;
    --ead-page-padding-x: 24px;
  }

  .stats-grid,
  .cards-grid,
  .dashboard-cards,
  .cards-dashboard,
  .indicators-grid,
  .resumo-grid,
  .kpi-grid,
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .form-table-grid,
  .admin-grid,
  .two-columns,
  .grid-2,
  .page-grid,
  .management-grid,
  .crud-grid {
    grid-template-columns: 1fr;
  }

  .reports-grid,
  .report-grid,
  .settings-grid,
  .config-grid {
    grid-template-columns: 1fr;
  }

  .search input,
  .search-box input,
  .search-input,
  .input-search input,
  input[type="search"] {
    width: 260px;
  }
}

/* =====================================================================
   TABLET / CELULAR
===================================================================== */

@media (max-width: 768px) {
  :root {
    --ead-sidebar-width: 100%;
    --ead-page-padding-x: 16px;
    --ead-page-padding-y: 22px;
  }

  .wrapper,
  .admin-wrapper,
  .dashboard-wrapper,
  .layout,
  .app,
  .app-layout,
  .panel-layout {
    display: block;
  }

  .sidebar,
  .admin-sidebar,
  .side-menu,
  .menu-lateral,
  .nav-sidebar,
  aside.sidebar,
  aside.admin-sidebar {
    position: relative;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: auto;
    padding: 18px;
  }

  .logo,
  .brand,
  .sidebar-brand,
  .admin-logo {
    margin-bottom: 18px;
  }

  .sidebar nav,
  .admin-sidebar nav,
  .side-menu nav,
  .menu-lateral nav,
  .nav-menu,
  .menu,
  .sidebar-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sidebar a,
  .admin-sidebar a,
  .side-menu a,
  .menu-lateral a,
  .nav-menu a,
  .menu a,
  .sidebar-menu a,
  .nav-link,
  .menu-link {
    min-height: 48px;
    font-size: 14px;
    padding: 11px 12px;
  }

  .main,
  .main-content,
  .content,
  .page-content,
  .admin-content,
  .dashboard-content,
  .panel-content,
  main {
    width: 100%;
    margin-left: 0;
    padding: var(--ead-page-padding-y) var(--ead-page-padding-x);
  }

  .page-header,
  .content-header,
  .top-header,
  .header,
  .admin-header,
  .page-top,
  .module-header,
  .video-header,
  .users-header,
  .reports-header,
  .settings-header {
    display: block;
  }

  .header-actions,
  .top-actions,
  .actions,
  .page-actions,
  .toolbar,
  .filter-actions {
    justify-content: flex-start;
    margin-top: 18px;
  }

  .search,
  .search-box,
  .search-input-wrapper,
  .form-search,
  .input-search {
    width: 100%;
  }

  .search input,
  .search-box input,
  .search-input,
  .input-search input,
  input[type="search"] {
    width: 100%;
  }

  .stats-grid,
  .cards-grid,
  .dashboard-cards,
  .cards-dashboard,
  .indicators-grid,
  .resumo-grid,
  .kpi-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .stat-card,
  .dashboard-card,
  .indicator-card,
  .card-resumo,
  .summary-card,
  .metric-card,
  .kpi-card {
    min-height: auto;
  }

  .content-grid,
  .form-table-grid,
  .admin-grid,
  .two-columns,
  .grid-2,
  .page-grid,
  .management-grid,
  .crud-grid,
  .reports-grid,
  .report-grid,
  .settings-grid,
  .config-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   CELULAR PEQUENO
===================================================================== */

@media (max-width: 480px) {
  .sidebar nav,
  .admin-sidebar nav,
  .side-menu nav,
  .menu-lateral nav,
  .nav-menu,
  .menu,
  .sidebar-menu {
    grid-template-columns: 1fr;
  }

  .page-title h1,
  .content-header h1,
  .admin-header h1,
  .page-top h1,
  main h1,
  .main-content h1,
  .admin-content h1,
  .dashboard-content h1 {
    font-size: 28px;
  }

  .card,
  .panel,
  .box,
  .form-card,
  .table-card,
  .list-card,
  .content-card,
  .config-card,
  .report-card,
  .filter-card,
  .user-card,
  .module-card,
  .video-card,
  .permission-card {
    padding: 18px;
  }

  .btn,
  button,
  .button,
  .btn-primary,
  .btn-new,
  .new-course,
  .btn-add,
  .btn-save,
  .btn-search,
  a.btn {
    width: 100%;
  }
}

/* =====================================================================
   Integração YouTube / Player de aula
===================================================================== */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
  box-shadow: 0 16px 35px rgba(15, 23, 42, .14);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-wrapper-sm {
  border-radius: 14px;
  box-shadow: none;
}

.youtube-preview {
  padding: 14px;
  border: 1px solid var(--ead-border);
  border-radius: 16px;
  background: #f8fafc;
}

.video-thumb {
  width: 86px;
  height: 50px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--ead-border);
  background: #e2e8f0;
  flex: 0 0 auto;
}

.aula-card h3 {
  font-weight: 850;
  letter-spacing: -.025em;
}

.progresso-card {
  position: sticky;
  top: 18px;
}

.progress {
  height: 14px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress-bar {
  background: var(--ead-primary);
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 991px) {
  .progresso-card {
    position: static;
  }
}


/* =====================================================================
   Correção da tabela de vídeos no admin
   Evita sobreposição entre título do vídeo e coluna Plataforma.
===================================================================== */
.videos-admin-table {
  table-layout: fixed;
  width: 100%;
}

.videos-admin-table th,
.videos-admin-table td {
  vertical-align: middle;
  overflow: hidden;
}

.videos-admin-table th:nth-child(1),
.videos-admin-table td:nth-child(1) {
  width: 18%;
}

.videos-admin-table th:nth-child(2),
.videos-admin-table td:nth-child(2) {
  width: 36%;
}

.videos-admin-table th:nth-child(3),
.videos-admin-table td:nth-child(3) {
  width: 13%;
}

.videos-admin-table th:nth-child(4),
.videos-admin-table td:nth-child(4) {
  width: 8%;
  text-align: center;
}

.videos-admin-table th:nth-child(5),
.videos-admin-table td:nth-child(5) {
  width: 12%;
  text-align: center;
}

.videos-admin-table th:nth-child(6),
.videos-admin-table td:nth-child(6) {
  width: 13%;
}

.video-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.video-cell .video-thumb,
.video-thumb-placeholder {
  width: 180px;
  height: 102px;
  min-width: 180px;
  max-width: 180px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  flex: 0 0 180px;
}

.video-thumb-placeholder {
  display: grid;
  place-items: center;
  background: #e8f0ff;
  color: var(--ead-primary);
}

.video-text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.video-title,
.video-text .item-title {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
}

.video-duration,
.video-text .item-desc {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.video-platform {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 1366px) {
  .videos-admin-table th:nth-child(1),
  .videos-admin-table td:nth-child(1) {
    width: 17%;
  }

  .videos-admin-table th:nth-child(2),
  .videos-admin-table td:nth-child(2) {
    width: 38%;
  }

  .video-cell .video-thumb,
  .video-thumb-placeholder {
    width: 160px;
    height: 90px;
    min-width: 160px;
    max-width: 160px;
    flex-basis: 160px;
  }
}

@media (max-width: 991px) {
  .videos-admin-table {
    min-width: 850px;
  }
}

/* =====================================================================
   Navegação da aula: botão Próximo/Anterior
===================================================================== */
.lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .lesson-nav,
  .lesson-nav-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .lesson-nav .btn,
  .lesson-nav-actions .btn {
    width: 100%;
  }
}

/* =====================================================================
   Lista de vídeos do aluno com miniaturas
   Tela: aluno/curso.php
===================================================================== */
.course-page-header h2 {
  margin: 0 0 6px;
  font-weight: 850;
  letter-spacing: -.03em;
  color: var(--ead-text);
}

.module-lessons-card {
  border: 1px solid var(--ead-border);
  border-radius: 18px;
  box-shadow: var(--ead-shadow);
  background: #fff;
}

.module-lessons-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.module-lessons-header h4 {
  font-weight: 850;
  letter-spacing: -.02em;
  color: var(--ead-text);
}

.course-video-list {
  display: grid;
  gap: 12px;
}

.course-video-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--ead-border);
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.course-video-item:hover {
  color: inherit;
  border-color: rgba(37, 99, 235, .35);
  background: #f8fbff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}

.course-video-thumb-wrap {
  position: relative;
  width: 180px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
  flex: 0 0 auto;
}

.course-video-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.course-video-thumb-placeholder {
  display: grid;
  place-items: center;
  color: var(--ead-primary);
  background: var(--ead-primary-soft);
  font-size: 28px;
}

.course-video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.course-video-content {
  min-width: 0;
}

.course-video-title {
  color: var(--ead-text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.course-video-description {
  color: var(--ead-muted);
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 7px;
}

.course-video-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ead-muted);
  font-size: 13px;
}

.course-video-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 88px;
}

@media (max-width: 991px) {
  .course-video-item {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .course-video-thumb-wrap {
    width: 150px;
  }

  .course-video-status {
    grid-column: 2;
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 575px) {
  .course-video-item {
    grid-template-columns: 1fr;
  }

  .course-video-thumb-wrap {
    width: 100%;
  }

  .course-video-status {
    grid-column: auto;
  }
}


/* =====================================================================
   V12 - Miniaturas pequenas nas listas de vídeos
   Objetivo: mostrar apenas uma miniatura pequena, sem ocupar tanto espaço.
===================================================================== */

/* Admin > Vídeos: deixa a miniatura da tabela pequena */
.videos-admin-table th:nth-child(1),
.videos-admin-table td:nth-child(1) {
  width: 22%;
}

.videos-admin-table th:nth-child(2),
.videos-admin-table td:nth-child(2) {
  width: 32%;
}

.video-cell {
  gap: 10px;
}

.video-cell .video-thumb,
.video-thumb-placeholder {
  width: 96px !important;
  height: 54px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  flex: 0 0 96px !important;
  border-radius: 8px;
}

.video-title,
.video-text .item-title {
  font-size: 14px;
  line-height: 1.2;
}

.video-duration,
.video-text .item-desc {
  font-size: 12px;
  line-height: 1.25;
}

/* Aluno > Curso: lista compacta com miniatura pequena */
.course-video-list {
  gap: 8px;
}

.course-video-item {
  grid-template-columns: 96px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  min-height: 72px;
}

.course-video-thumb-wrap {
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  aspect-ratio: 16 / 9;
  border-radius: 8px !important;
}

.course-video-play {
  width: 28px !important;
  height: 28px !important;
  font-size: 15px !important;
}

.course-video-title {
  font-size: 14px !important;
  line-height: 1.2 !important;
  margin-bottom: 3px !important;
}

.course-video-description {
  display: none !important;
}

.course-video-meta {
  font-size: 12px !important;
  gap: 8px !important;
}

.course-video-status {
  min-width: 72px !important;
}

.course-video-status .badge {
  font-size: 11px;
  padding: 5px 9px;
  min-height: 24px;
}

@media (max-width: 991px) {
  .course-video-item {
    grid-template-columns: 88px minmax(0, 1fr) auto !important;
  }

  .course-video-thumb-wrap {
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
  }

  .course-video-status {
    grid-column: auto !important;
    justify-content: flex-end !important;
  }
}

@media (max-width: 575px) {
  .course-video-item {
    grid-template-columns: 82px minmax(0, 1fr) !important;
    align-items: center;
  }

  .course-video-thumb-wrap {
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
  }

  .course-video-status {
    grid-column: 2 !important;
    justify-content: flex-start !important;
  }
}

/* =====================================================================
   V13 - Correção FORÇADA das miniaturas pequenas
   Motivo: alguns navegadores/servidores mantinham CSS antigo em cache.
   Essas regras usam classes novas e alta especificidade.
===================================================================== */

body .course-video-list {
  display: grid;
  gap: 8px !important;
}

body .course-video-list > a.course-video-item.ead-video-compact {
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 58px !important;
  padding: 7px 10px !important;
  border-radius: 12px !important;
}

body .course-video-item.ead-video-compact .course-video-thumb-wrap,
body .course-video-item.ead-video-compact .ead-thumb-mini-wrap {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 41px !important;
  min-height: 41px !important;
  max-height: 41px !important;
  aspect-ratio: auto !important;
  border-radius: 7px !important;
}

body .course-video-item.ead-video-compact .course-video-thumb,
body .course-video-item.ead-video-compact .ead-thumb-mini-img {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 41px !important;
  min-height: 41px !important;
  max-height: 41px !important;
  object-fit: cover !important;
  border-radius: 7px !important;
}

body .course-video-item.ead-video-compact .course-video-play {
  width: 22px !important;
  height: 22px !important;
  font-size: 12px !important;
  opacity: .92;
}

body .course-video-item.ead-video-compact .course-video-title {
  font-size: 14px !important;
  line-height: 1.2 !important;
  margin: 0 0 2px !important;
}

body .course-video-item.ead-video-compact .course-video-description {
  display: none !important;
}

body .course-video-item.ead-video-compact .course-video-meta {
  font-size: 12px !important;
  line-height: 1.2 !important;
  gap: 8px !important;
}

body .course-video-item.ead-video-compact .course-video-status {
  min-width: 66px !important;
  justify-content: flex-end !important;
}

body .course-video-item.ead-video-compact .course-video-status .badge {
  min-height: 22px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
}

body .videos-admin-table .video-cell.ead-video-admin-compact {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-width: 0 !important;
}

body .videos-admin-table .video-cell.ead-video-admin-compact .video-thumb,
body .videos-admin-table .video-cell.ead-video-admin-compact .video-thumb-mini,
body .videos-admin-table .video-cell.ead-video-admin-compact .video-thumb-placeholder {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 41px !important;
  min-height: 41px !important;
  max-height: 41px !important;
  object-fit: cover !important;
  border-radius: 7px !important;
}

body .videos-admin-table .video-text {
  min-width: 0 !important;
}

body .videos-admin-table .video-title {
  font-size: 13px !important;
  line-height: 1.18 !important;
  margin-bottom: 2px !important;
}

body .videos-admin-table .video-duration {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

@media (max-width: 575px) {
  body .course-video-list > a.course-video-item.ead-video-compact {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  body .course-video-item.ead-video-compact .course-video-status {
    grid-column: 2 !important;
    justify-content: flex-start !important;
  }
}

/* =====================================================================
   V14 - Correção de layout das telas administrativas
   Motivo: o seletor genérico "main" aplicava margem lateral duas vezes
   dentro do admin: .admin-content + .admin-main.
===================================================================== */

body .admin-layout {
  min-height: 100vh !important;
  display: flex !important;
  background: var(--ead-bg) !important;
}

body .admin-layout > .sidebar {
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  height: 100vh !important;
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
}

body .admin-layout > .admin-content {
  width: calc(100% - 280px) !important;
  max-width: none !important;
  min-height: 100vh !important;
  margin-left: 280px !important;
  padding: 0 !important;
  background: var(--ead-bg) !important;
}

body .admin-layout > .admin-content > .admin-main {
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 28px 30px !important;
  background: var(--ead-bg) !important;
}

body .admin-layout .page-hero {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 20px !important;
  margin: 0 0 24px !important;
}

body .admin-layout .page-hero h1 {
  margin: 0 0 4px !important;
  font-size: 34px !important;
  line-height: 1.08 !important;
  font-weight: 850 !important;
  letter-spacing: -.035em !important;
  color: var(--ead-text) !important;
}

body .admin-layout .page-hero p {
  margin: 0 !important;
  color: var(--ead-muted) !important;
  font-size: 16px !important;
}

body .admin-layout .page-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

body .admin-layout .kpi-grid {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin: 0 0 22px !important;
}

body .admin-layout .soft-card {
  background: #fff !important;
  border: 1px solid var(--ead-border) !important;
  border-radius: 18px !important;
  box-shadow: var(--ead-shadow) !important;
}

body .admin-layout .kpi-card {
  min-height: 128px !important;
  padding: 24px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
}

body .admin-layout .kpi-icon {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  background: var(--ead-primary-soft) !important;
  color: var(--ead-primary) !important;
}

body .admin-layout .kpi-green { background: var(--ead-success-soft) !important; color: #059669 !important; }
body .admin-layout .kpi-purple { background: var(--ead-purple-soft) !important; color: var(--ead-purple) !important; }
body .admin-layout .kpi-orange { background: var(--ead-warning-soft) !important; color: var(--ead-warning) !important; }

body .admin-layout .kpi-label {
  color: #334155 !important;
  font-size: 14px !important;
  line-height: 1.1 !important;
}

body .admin-layout .kpi-number {
  color: var(--ead-text) !important;
  font-size: 31px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: -.04em !important;
}

body .admin-layout .kpi-sub {
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 650 !important;
}

body .admin-layout .mini-spark {
  font-size: 18px !important;
  opacity: .85 !important;
}

body .admin-layout .table-card,
body .admin-layout .form-card,
body .admin-layout .filter-card,
body .admin-layout .content-card,
body .admin-layout .list-card,
body .admin-layout .config-card,
body .admin-layout .report-card {
  padding: 20px !important;
}

body .admin-layout .modern-table,
body .admin-layout .table-responsive {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  border-radius: 14px !important;
}

body .admin-layout table {
  width: 100% !important;
  margin-bottom: 0 !important;
}

body .admin-layout .content-grid,
body .admin-layout .form-table-grid,
body .admin-layout .admin-grid,
body .admin-layout .crud-grid,
body .admin-layout .management-grid {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
}

/* Corrige as páginas do aluno, que usam <main class="container"> e não devem herdar margem do admin */
body > nav.navbar + main.container,
body > nav.navbar + main.container-fluid {
  width: 100% !important;
  max-width: 1140px !important;
  min-height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
  background: transparent !important;
}

@media (max-width: 1366px) and (max-height: 768px) {
  body .admin-layout > .admin-content > .admin-main {
    padding: 26px 28px !important;
  }

  body .admin-layout .page-hero {
    margin-bottom: 22px !important;
  }

  body .admin-layout .page-hero h1 {
    font-size: 32px !important;
  }

  body .admin-layout .kpi-grid {
    gap: 16px !important;
    margin-bottom: 22px !important;
  }

  body .admin-layout .kpi-card {
    min-height: 126px !important;
    padding: 22px 20px !important;
  }

  body .admin-layout .content-grid,
  body .admin-layout .form-table-grid,
  body .admin-layout .admin-grid,
  body .admin-layout .crud-grid,
  body .admin-layout .management-grid {
    grid-template-columns: 318px minmax(0, 1fr) !important;
    gap: 18px !important;
  }
}

@media (max-width: 1180px) {
  body .admin-layout > .sidebar {
    width: 245px !important;
    min-width: 245px !important;
    max-width: 245px !important;
  }

  body .admin-layout > .admin-content {
    width: calc(100% - 245px) !important;
    margin-left: 245px !important;
  }

  body .admin-layout .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body .admin-layout .content-grid,
  body .admin-layout .form-table-grid,
  body .admin-layout .admin-grid,
  body .admin-layout .crud-grid,
  body .admin-layout .management-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 991px) {
  body .admin-layout > .sidebar {
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  body.sidebar-open .admin-layout > .sidebar {
    transform: translateX(0);
  }

  body .admin-layout > .admin-content {
    width: 100% !important;
    margin-left: 0 !important;
  }

  body .admin-layout > .admin-content > .admin-main {
    padding: 20px 16px !important;
  }

  body .admin-layout .page-hero {
    display: block !important;
  }

  body .admin-layout .page-actions {
    justify-content: flex-start !important;
    margin-top: 14px !important;
  }
}

@media (max-width: 768px) {
  body .admin-layout .kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =====================================================================
   V15 - Certificado e upload de imagem do curso
===================================================================== */
.course-cover-preview-box {
  border: 1px solid var(--ead-border);
  border-radius: 16px;
  padding: 10px;
  background: #f8fafc;
}

.course-cover-preview {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.course-admin-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.course-admin-thumb {
  width: 72px;
  min-width: 72px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--ead-border);
  background: #f8fafc;
}

.course-admin-thumb-placeholder {
  display: grid;
  place-items: center;
  color: var(--ead-primary);
  background: var(--ead-primary-soft);
  font-size: 20px;
}

.student-page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.student-course-card {
  overflow: hidden;
  border: 1px solid var(--ead-border);
  border-radius: 18px;
  box-shadow: var(--ead-shadow);
}

.student-course-cover {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: #f8fafc;
}

.student-course-cover-placeholder {
  display: grid;
  place-items: center;
  color: var(--ead-primary);
  background: linear-gradient(135deg, #e8f0ff, #f8fafc);
  font-size: 46px;
}

.student-course-body {
  padding: 18px;
}

.student-course-body h4 {
  font-weight: 850;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}

.student-course-body p {
  min-height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-page-header-rich {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--ead-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--ead-shadow);
}

.course-page-cover {
  width: 220px;
  height: 135px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--ead-border);
  background: #f8fafc;
}

.course-page-cover-placeholder {
  display: grid;
  place-items: center;
  color: var(--ead-primary);
  background: linear-gradient(135deg, #e8f0ff, #f8fafc);
  font-size: 48px;
}

.course-page-info h2 {
  font-weight: 900;
  letter-spacing: -.04em;
  margin-bottom: 6px;
}

.course-completion-box {
  max-width: 480px;
}

.course-certificate-action {
  display: flex;
  justify-content: flex-end;
}

.certificate-ready-card {
  border-color: rgba(22, 163, 74, .22);
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
}

@media (max-width: 992px) {
  .course-page-header-rich {
    grid-template-columns: 1fr;
  }

  .course-page-cover {
    width: 100%;
    height: 190px;
  }

  .course-certificate-action {
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {
  .student-course-cover {
    height: 130px;
  }

  .course-admin-thumb {
    width: 58px;
    min-width: 58px;
    height: 38px;
  }
}


/* =========================================================
   Materiais PDF por aula
========================================================= */
.current-material-box {
  border: 1px solid rgba(220, 38, 38, .18);
  background: #fff7f7;
  border-radius: 14px;
  padding: 12px 14px;
  color: #0f172a;
}

.video-material-admin {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
}

.lesson-material-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(220, 38, 38, .16);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #fff7f7);
}

.lesson-material-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.lesson-material-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fee2e2;
  color: #dc2626;
  font-size: 24px;
}

.lesson-material-card h5 {
  margin: 0 0 2px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
}

.lesson-material-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 576px) {
  .lesson-material-card {
    align-items: stretch;
    flex-direction: column;
  }

  .lesson-material-card .btn {
    width: 100%;
  }
}

/* =========================================================
   Cadastro público e solicitações de cursos - v17
========================================================= */
.public-register-page {
  max-width: 1120px;
  margin: 0 auto;
}

.public-register-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 28px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #0b1f34, #2563eb);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

.public-register-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.public-register-hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.04em;
}

.public-register-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: 16px;
}

.public-register-card,
.public-success-card {
  padding: 26px;
  border-radius: 24px;
}

.section-title {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.course-request-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.course-request-card {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 98px;
  padding: 12px 44px 12px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  transition: .18s ease;
}

.course-request-card:hover {
  border-color: rgba(37, 99, 235, .45);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.course-request-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.course-request-card img,
.request-placeholder {
  width: 88px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  background: #e8f0ff;
}

.request-placeholder {
  display: grid;
  place-items: center;
  color: #2563eb;
  font-size: 24px;
}

.request-content {
  min-width: 0;
}

.request-content strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
  margin-bottom: 4px;
}

.request-content small {
  display: block;
  color: #64748b;
  font-size: 13px;
  line-height: 1.3;
}

.request-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: transparent;
  background: #fff;
}

.course-request-card input:checked ~ .request-check {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.course-request-card:has(input:checked) {
  border-color: #2563eb;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.request-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.request-warning i {
  font-size: 22px;
}

.public-success-card {
  text-align: center;
}

.public-success-card .success-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: #059669;
  background: #d1fae5;
  font-size: 38px;
}

.public-success-card h2 {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.credential-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.credential-box div {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.credential-box span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.credential-box strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  word-break: break-word;
}

.requested-list {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.badge-soft-warning {
  background: #fef3c7;
  color: #92400e;
}

.requests-table td {
  vertical-align: middle;
}

.request-actions {
  flex-wrap: wrap;
}

@media (max-width: 992px) {
  .public-register-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .course-request-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .public-register-hero {
    padding: 22px;
  }

  .public-register-hero h1 {
    font-size: 28px;
  }

  .credential-box {
    grid-template-columns: 1fr;
  }

  .course-request-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .course-request-card img,
  .request-placeholder {
    width: 72px;
    height: 52px;
  }
}


/* =====================================================================
   V19 - Tela inicial / Login com botão Cadastre-se
===================================================================== */
.auth-page {
  min-height: calc(100vh - 88px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px 0;
}

.auth-hero-card {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 430px;
  gap: 28px;
  align-items: stretch;
}

.auth-hero-content,
.auth-login-card {
  background: #fff;
  border: 1px solid var(--ead-border);
  border-radius: 24px;
  box-shadow: var(--ead-shadow);
}

.auth-hero-content {
  padding: 42px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, .12), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7faff 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-hero-content .eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--ead-primary-soft);
  color: var(--ead-primary);
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 18px;
}

.auth-hero-content h1 {
  margin: 0 0 12px;
  color: var(--ead-text);
  font-size: 42px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.04em;
}

.auth-hero-content p {
  max-width: 560px;
  margin: 0;
  color: var(--ead-muted);
  font-size: 17px;
}

.auth-cta-box {
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--ead-border);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  display: grid;
  gap: 8px;
}

.auth-cta-box strong {
  color: var(--ead-text);
  font-size: 18px;
}

.auth-cta-box span {
  color: var(--ead-muted);
  font-size: 15px;
}

.auth-cta-box .btn {
  margin-top: 8px;
  width: fit-content;
  border: 1px solid var(--ead-border);
}

.auth-login-card {
  padding: 34px;
}

.auth-login-card h3 {
  margin: 0 0 6px;
  color: var(--ead-text);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.auth-register-mobile {
  display: none;
}

.navbar .btn.btn-light {
  color: var(--ead-primary) !important;
  font-weight: 850;
  box-shadow: none;
}

@media (max-width: 991px) {
  .auth-hero-card {
    grid-template-columns: 1fr;
  }
  .auth-hero-content {
    padding: 30px;
  }
  .auth-login-card {
    padding: 26px;
  }
}

@media (max-width: 640px) {
  .auth-page {
    padding: 20px 0;
  }
  .auth-hero-content h1 {
    font-size: 32px;
  }
  .auth-hero-content p {
    font-size: 15px;
  }
  .auth-cta-box {
    display: none;
  }
  .auth-register-mobile {
    display: block;
  }
}

/* =====================================================================
   V20 - REPAGINAÇÃO PRÓSPERO EAD
   Aplicado sobre a base existente para aproximar a interface dos mockups.
===================================================================== */
:root {
  --pros-primary: #165dff;
  --pros-primary-2: #0e47c7;
  --pros-primary-3: #0b2c6f;
  --pros-dark: #081c45;
  --pros-text: #102248;
  --pros-muted: #7382a3;
  --pros-bg: #f4f7fd;
  --pros-card: #ffffff;
  --pros-border: #e4ebf6;
  --pros-shadow: 0 20px 60px rgba(19, 54, 130, .08);
  --pros-radius: 22px;
}

body {
  background: linear-gradient(180deg, #f9fbff 0%, #f3f7ff 100%) !important;
  color: var(--pros-text);
}

.btn {
  border-radius: 14px;
  font-weight: 700;
  padding: .85rem 1.25rem;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pros-primary) 0%, #256eff 100%);
  border-color: transparent;
}
.btn-primary:hover,
.btn-primary:focus { background: linear-gradient(135deg, var(--pros-primary-2) 0%, var(--pros-primary) 100%); border-color: transparent; }
.btn-light, .btn-outline-primary { border-color: var(--pros-border); }

.form-control, .form-select {
  border-radius: 14px;
  border: 1px solid #dbe4f2;
  padding: .85rem 1rem;
  min-height: 52px;
  box-shadow: none !important;
}
.form-control:focus, .form-select:focus {
  border-color: #9bb9ff;
  box-shadow: 0 0 0 .2rem rgba(22,93,255,.08) !important;
}
textarea.form-control { min-height: 128px; }

.soft-card,
.card,
.table-card,
.form-card,
.aula-card,
.progresso-card,
.info-panel-card,
.module-sidebar-card,
.lesson-view-card {
  border: 1px solid rgba(222,230,243,.95) !important;
  border-radius: var(--pros-radius) !important;
  box-shadow: var(--pros-shadow) !important;
  background: #fff !important;
}

.badge-soft-primary {
  background: #edf3ff;
  color: var(--pros-primary);
  border-radius: 999px;
  padding: .55rem .9rem;
  font-weight: 700;
}

/* ADMIN LAYOUT */
.admin-layout { min-height: 100vh; background: transparent; }
.sidebar {
  background: linear-gradient(180deg, #0e3eb2 0%, #082c72 100%) !important;
  padding: 22px 20px;
  box-shadow: 10px 0 45px rgba(10, 40, 104, .18);
}
.sidebar-brand { display:block; margin-bottom: 26px; }
.sidebar-brand-logo { width: 100%; max-width: 230px; display: block; }
.sidebar-menu { gap: 8px; }
.sidebar-menu a {
  min-height: 56px; border-radius: 16px; padding: 15px 16px; font-weight: 700;
  color: rgba(255,255,255,.96); position: relative;
}
.sidebar-menu a i { font-size: 1.2rem; }
.sidebar-menu a.active {
  background: linear-gradient(90deg, rgba(38,111,255,1) 0%, rgba(31,98,247,1) 100%);
}
.sidebar-cta-card {
  margin-top: auto; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px; padding: 18px; color: #fff; display:flex; flex-direction:column; gap:14px;
}
.sidebar-cta-icon {
  width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.07));
  display:grid; place-items:center; font-size:1.6rem;
}
.sidebar-cta-text { color: rgba(255,255,255,.9); font-size: .98rem; line-height: 1.55; }
.sidebar-cta-card .btn { border:0; }
.sidebar-profile {
  margin-top: 18px; background: rgba(8,18,45,.24); border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px; padding: 14px; display:flex; gap:12px; align-items:center; color:#fff;
}
.profile-avatar,
.topbar-user-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #d9e5ff 0%, #8db0ff 100%);
  color: var(--pros-primary-3); font-weight: 800; display:grid; place-items:center;
}
.profile-name { font-weight: 700; }
.sidebar-profile small { color: rgba(255,255,255,.76); }
.profile-logout {
  color:#fff; width:38px; height:38px; border-radius:12px; display:grid; place-items:center;
  background: rgba(255,255,255,.08);
}
.sidebar-copy { color: rgba(255,255,255,.78); text-align:center; font-size:.85rem; margin-top:12px; }

.admin-content { margin-left: var(--ead-sidebar-width, 280px); width: calc(100% - var(--ead-sidebar-width, 280px)); }
.admin-topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223,230,241,.9); padding: 18px 30px; display:flex; justify-content:space-between; gap:20px; align-items:center;
}
.admin-topbar-left, .admin-topbar-right { display:flex; align-items:center; gap:14px; }
.admin-top-search {
  min-width: min(460px, 48vw); background:#fff; border:1px solid var(--pros-border); border-radius:16px;
  display:flex; align-items:center; gap:12px; padding: 0 16px; min-height: 56px;
}
.admin-top-search input { border:0; outline:0; flex:1; min-width:140px; }
.admin-top-search i { color: var(--pros-muted); }
.search-shortcut { color: var(--pros-muted); background:#f2f5fb; border-radius:10px; padding:4px 8px; font-size:.85rem; }
.topbar-icon-btn {
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--pros-border); background:#fff; position:relative;
}
.notif-badge {
  position:absolute; top:-5px; right:-3px; width:22px; height:22px; border-radius:50%; background:var(--pros-primary); color:#fff; display:grid; place-items:center; font-size:.75rem; font-weight:700;
}
.topbar-user { display:flex; align-items:center; gap:12px; padding-left: 8px; }
.topbar-user-meta { display:flex; flex-direction:column; }
.topbar-user-meta strong { font-size: 1rem; }
.topbar-user-meta small { color: var(--pros-muted); }
.admin-main { padding: 28px 30px 40px; }

.page-hero { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom: 22px; }
.page-hero h1 { font-size: 2.3rem; font-weight: 800; margin-bottom: .2rem; color: var(--pros-dark); }
.page-hero p { color: var(--pros-muted); font-size: 1.05rem; margin: 0; }
.page-actions { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.search-box {
  display:flex; align-items:center; gap:10px; padding: 0 14px; min-width: 300px;
  min-height: 52px; border-radius: 14px; background:#fff; border:1px solid var(--pros-border);
}
.search-box i { color: var(--pros-muted); }
.search-box input { border:0 !important; box-shadow:none !important; padding:0 !important; min-height: unset; }

.kpi-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:18px; margin-bottom:24px; }
.kpi-card { position:relative; overflow:hidden; min-height: 180px; padding: 24px; }
.kpi-icon { width:64px; height:64px; border-radius:50%; display:grid; place-items:center; font-size:1.5rem; }
.kpi-label { font-weight: 700; color: var(--pros-text); }
.kpi-number { font-size: 2.55rem; font-weight: 800; color: var(--pros-dark); line-height: 1; margin: 8px 0; }
.kpi-sub { font-weight: 700; }
.kpi-blue { background:#eaf1ff; color:#185efb; }
.kpi-green { background:#e9fbf0; color:#16a34a; }
.kpi-purple { background:#f2eafe; color:#7c3aed; }
.kpi-orange { background:#fff0df; color:#f59e0b; }
.mini-wave { position:absolute; left:0; right:0; bottom:0; height:60px; opacity:.9; background-size:cover; }
.stat-card-blue .mini-wave { background: radial-gradient(circle at 10% 200%, rgba(22,93,255,.1) 0 45%, transparent 46%), linear-gradient(180deg, transparent 0%, rgba(22,93,255,.08) 100%); }
.stat-card-green .mini-wave { background: radial-gradient(circle at 10% 200%, rgba(22,163,74,.1) 0 45%, transparent 46%), linear-gradient(180deg, transparent 0%, rgba(22,163,74,.08) 100%); }
.stat-card-purple .mini-wave { background: radial-gradient(circle at 10% 200%, rgba(124,58,237,.1) 0 45%, transparent 46%), linear-gradient(180deg, transparent 0%, rgba(124,58,237,.08) 100%); }
.stat-card-orange .mini-wave { background: radial-gradient(circle at 10% 200%, rgba(245,158,11,.1) 0 45%, transparent 46%), linear-gradient(180deg, transparent 0%, rgba(245,158,11,.08) 100%); }

.dashboard-main-grid,
.dashboard-bottom-grid { display:grid; gap:20px; margin-bottom: 22px; }
.dashboard-main-grid { grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); }
.dashboard-bottom-grid { grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); }
.dashboard-card-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:18px; }
.dashboard-card-head h5 { font-size: 1.45rem; font-weight: 800; margin-bottom:.3rem; color:var(--pros-dark); }
.dashboard-card-head p { margin:0; color: var(--pros-muted); }
.dashboard-progress-card, .activities-card, .approvals-card, .table-card { padding: 24px; }
.dashboard-progress-metrics { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:18px; margin-bottom: 20px; }
.metric-big { font-size: 2rem; font-weight: 800; color: var(--pros-dark); line-height:1; }
.progress-graphic {
  position: relative; height: 260px; border-radius: 20px; overflow:hidden;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f6ff 100%);
  border: 1px dashed #d9e3f5;
}
.progress-target-line { position:absolute; left:0; right:0; top:28%; border-top:2px dashed #9dd2ff; }
.progress-area {
  position:absolute; left:16px; right:16px; bottom:16px; top:52px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(22,93,255,.18) 0%, rgba(22,93,255,.05) 100%);
  clip-path: polygon(0% 72%, 8% 66%, 15% 61%, 25% 59%, 35% 55%, 45% 53%, 55% 47%, 65% 40%, 75% 36%, 84% 38%, 92% 32%, 100% 26%, 100% 100%, 0% 100%);
}
.activity-list, .approval-list { display:flex; flex-direction:column; gap:14px; }
.activity-item, .approval-item {
  display:flex; gap:12px; align-items:flex-start; padding: 12px; border-radius: 16px; background:#f8fbff; border:1px solid #edf2fa;
}
.activity-icon { width: 44px; height:44px; border-radius:14px; background:#edf3ff; color:var(--pros-primary); display:grid; place-items:center; flex:0 0 auto; }
.activity-item strong, .approval-item strong { display:block; font-size: .98rem; color: var(--pros-dark); }
.activity-item small, .approval-item small { display:block; color: var(--pros-muted); line-height:1.45; }
.approval-avatar {
  width:42px; height:42px; border-radius:50%; background:#fff0df; color:#b66a11; font-weight:800; display:grid; place-items:center; flex:0 0 auto;
}
.approval-actions { display:flex; gap:8px; align-items:center; }
.approval-actions .btn { width: 40px; height: 40px; padding:0; display:grid; place-items:center; }

.modern-table thead th { border:0; color: var(--pros-text); font-weight: 800; background:#f7faff; padding: 14px 12px; }
.modern-table tbody td { padding: 15px 12px; border-color:#eef2f8; }
.empty-state { color: var(--pros-muted); text-align:center; }

.content-grid { display:grid; grid-template-columns: minmax(360px, .92fr) minmax(0, 1.4fr); gap:20px; align-items:start; }
.form-card { padding: 22px; }
.card-header-clean { display:flex; align-items:center; gap:12px; margin-bottom: 18px; }
.section-icon { width: 42px; height: 42px; border-radius: 14px; background:#edf3ff; color:var(--pros-primary); display:grid; place-items:center; }
.card-title-clean { margin:0; font-size: 1.55rem; font-weight: 800; color: var(--pros-dark); }
.course-cover-preview-box { background:#f8fbff; border:1px solid var(--pros-border); border-radius:18px; padding: 14px; }
.course-cover-preview { width: 100%; border-radius: 18px; object-fit: cover; max-height: 220px; }

/* PUBLIC SHELL */
.public-shell { min-height: 100vh; display:flex; flex-direction:column; }
.public-navbar {
  position: sticky; top:0; z-index:30; background:rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(224,231,241,.85);
}
.public-navbar-inner {
  max-width: 1280px; margin:0 auto; padding: 14px 24px; display:flex; justify-content:space-between; gap:18px; align-items:center;
}
.public-brand img { height: 48px; width:auto; display:block; }
.public-navbar-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.help-link { color: var(--pros-primary); font-weight: 700; display:inline-flex; align-items:center; gap:8px; }
.public-main { width:min(1280px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 40px; flex:1; }
.public-footer {
  background: linear-gradient(180deg, #0f43bb 0%, #092d78 100%); color:#fff; margin-top:auto;
}
.public-footer-inner {
  max-width: 1280px; margin:0 auto; padding: 42px 24px 28px; display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px;
}
.public-footer h6 { font-size:1rem; font-weight:800; margin-bottom:14px; }
.public-footer a { color: rgba(255,255,255,.86); display:block; margin: 0 0 10px; }
.footer-brand-col p { color: rgba(255,255,255,.86); line-height:1.6; margin-top: 12px; }
.footer-logo { max-width: 250px; display:block; }
.footer-socials { display:flex; gap:12px; margin-top:10px; }
.footer-socials span {
  width: 36px; height: 36px; border-radius:50%; background:rgba(255,255,255,.1); display:grid; place-items:center;
}
.public-footer-copy { text-align:center; padding: 0 24px 22px; color: rgba(255,255,255,.78); font-size:.92rem; }
.student-footer { text-align:center; padding: 20px; color: var(--pros-muted); }

/* CADASTRO / LOGIN */
.public-register-page, .auth-page { display:flex; flex-direction:column; gap:24px; }
.public-register-hero, .auth-hero-card {
  border-radius: 28px; overflow:hidden; box-shadow: var(--pros-shadow); background: linear-gradient(135deg, #0d43c6 0%, #1c66ff 100%); color:#fff; position:relative;
}
.public-register-hero {
  padding: 34px 36px; display:flex; justify-content:space-between; gap:18px; align-items:flex-start;
}
.public-register-hero::after, .auth-hero-card::after {
  content:''; position:absolute; inset:auto -120px -110px auto; width:420px; height:420px; border-radius:50%;
  background: radial-gradient(circle, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 70%);
}
.eyebrow { display:inline-flex; align-items:center; gap:8px; text-transform:uppercase; letter-spacing:.04em; font-size:.82rem; font-weight:800; opacity:.95; }
.public-register-hero h1, .auth-hero-content h1 { color:#fff !important; font-size: 3.3rem; line-height:1.05; font-weight:900; margin: 12px 0 12px; max-width: 760px; }
.public-register-hero p, .auth-hero-content p { color: rgba(255,255,255,.92); font-size: 1.18rem; max-width: 760px; }
.public-register-hero .btn-light { background:#fff; color:var(--pros-primary); border:0; }
.public-register-card, .public-success-card, .auth-login-card {
  padding: 28px; border-radius: 26px !important;
}
.public-register-card { margin-top: -56px; position:relative; z-index:2; }
.course-request-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.course-request-card {
  position:relative; border:1px solid var(--pros-border); border-radius:20px; padding:14px; background:#fff; display:flex; gap:12px; align-items:flex-start;
}
.course-request-card input { position:absolute; inset:0; opacity:0; }
.course-request-card img, .request-placeholder {
  width:56px; height:56px; border-radius:16px; object-fit:cover; flex:0 0 auto;
}
.request-placeholder { display:grid; place-items:center; background:#eef4ff; color:var(--pros-primary); font-size:1.5rem; }
.request-check {
  position:absolute; top:12px; right:12px; width:24px; height:24px; border-radius:8px; border:1px solid var(--pros-border); display:grid; place-items:center; color:transparent; background:#fff;
}
.course-request-card input:checked ~ .request-check { background: var(--pros-primary); color:#fff; border-color: var(--pros-primary); }
.request-content { display:flex; flex-direction:column; gap:6px; }
.request-content strong { color: var(--pros-dark); }
.request-content small { color: var(--pros-muted); line-height:1.45; }
.request-warning {
  border-radius: 18px; background:#edf4ff; color:var(--pros-primary-3); padding: 16px 18px; display:flex; gap:12px; align-items:flex-start;
}
.auth-hero-card { display:grid; grid-template-columns: 1.2fr .9fr; gap: 0; }
.auth-hero-content { padding: 44px 38px; }
.auth-login-card { margin: 22px; align-self:center; }
.auth-cta-box {
  margin-top: 24px; padding: 18px; border-radius: 20px; background: rgba(255,255,255,.1); display:flex; flex-direction:column; gap:8px; max-width: 500px;
}
.auth-cta-box strong { font-size:1.15rem; }
.auth-cta-box span { color: rgba(255,255,255,.88); }

/* STUDENT */
.student-main { max-width: 1540px; margin:0 auto; width: 100%; }
.student-page-hero h2, .course-page-info h2, .lesson-heading h1 { color: var(--pros-dark); font-weight: 800; }
.student-course-card { border:0 !important; box-shadow: var(--pros-shadow) !important; border-radius:24px !important; overflow:hidden; }
.student-course-cover { height: 210px; width:100%; object-fit:cover; }
.student-course-cover-placeholder { display:grid; place-items:center; background:#edf3ff; color:var(--pros-primary); font-size:3rem; }
.student-course-body { padding: 22px; }
.student-course-body h4 { font-weight: 800; color: var(--pros-dark); }
.course-page-header-rich {
  background:#fff; border-radius:26px; border:1px solid var(--pros-border); box-shadow: var(--pros-shadow); padding: 22px; display:grid; grid-template-columns: 320px 1fr auto; gap: 22px; align-items:center;
}
.course-page-cover { width:100%; height:220px; object-fit:cover; border-radius:22px; }
.course-page-cover-placeholder { display:grid; place-items:center; background:#eef4ff; color:var(--pros-primary); font-size:3rem; }
.course-completion-box { border-radius:18px; background:#f8fbff; border:1px solid var(--pros-border); padding: 16px; }
.module-lessons-card { border-radius: 24px !important; }
.course-video-list { display:flex; flex-direction:column; gap:12px; }
.course-video-item {
  display:grid; grid-template-columns: 88px 1fr auto; gap:14px; align-items:center;
  border:1px solid var(--pros-border); border-radius:18px; padding:12px; background:#fff; color:inherit;
}
.course-video-thumb-wrap { position:relative; }
.course-video-thumb, .course-video-thumb-placeholder { width:72px; height:41px; border-radius:10px; object-fit:cover; background:#edf3ff; display:grid; place-items:center; }
.course-video-play, .module-thumb-play {
  position:absolute; inset:50% auto auto 50%; transform: translate(-50%, -50%); width:28px; height:28px; border-radius:50%; background:rgba(255,255,255,.92); display:grid; place-items:center; color:var(--pros-primary);
}
.course-video-title { font-weight: 700; color: var(--pros-dark); }
.course-video-description, .course-video-meta { color: var(--pros-muted); font-size: .92rem; }

/* ASSISTIR */
.breadcrumb-line { display:flex; gap:10px; align-items:center; color: var(--pros-muted); font-size: .98rem; flex-wrap:wrap; }
.breadcrumb-line a { color: var(--pros-primary-3); }
.lesson-view-card, .module-sidebar-card, .info-panel-card { padding: 24px; }
.lesson-module-tag { display:inline-block; color: var(--pros-primary); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-bottom:10px; }
.lesson-heading h1 { font-size: 2.05rem; margin-bottom: .35rem; }
.lesson-heading p { color: var(--pros-muted); margin-bottom: 20px; }
.video-wrapper-large { border-radius: 22px; overflow:hidden; }
.video-wrapper { position:relative; width:100%; padding-top: 56.25%; background:#0b1635; border-radius:22px; overflow:hidden; }
.video-wrapper iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.lesson-progress-row { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:18px; margin-top: 18px; }
.lesson-progress-box .progress { height: 10px; border-radius:999px; background:#edf1f9; }
.lesson-progress-box .progress-bar { border-radius:999px; }
.lesson-action-row { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-top: 22px; flex-wrap:wrap; }
.lesson-nav-buttons { display:flex; gap:12px; flex-wrap:wrap; }
.info-panel-card h4, .module-sidebar-card h3 { font-size: 1.5rem; font-weight: 800; color: var(--pros-dark); margin-bottom: .8rem; }
.info-panel-card p { color: var(--pros-muted); line-height:1.7; }
.info-meta { color: var(--pros-muted); display:flex; gap:8px; align-items:center; }
.download-list { display:flex; flex-direction:column; gap:12px; }
.download-item {
  display:flex; gap:12px; align-items:center; border:1px solid var(--pros-border); border-radius:18px; padding: 13px 14px; color: inherit;
}
.download-icon { width: 42px; height:42px; border-radius:14px; background:#fff0f0; color:#ef4444; display:grid; place-items:center; flex:0 0 auto; }
.download-info { display:flex; flex-direction:column; gap:4px; flex:1; }
.download-info strong { color: var(--pros-dark); }
.download-info small { color: var(--pros-muted); }
.module-sidebar-card p { color: var(--pros-muted); }
.module-progress-summary { display:flex; justify-content:space-between; gap:12px; font-size:.95rem; color: var(--pros-muted); margin: 8px 0 8px; }
.module-sidebar-card .progress { height: 8px; border-radius:999px; background:#edf1f9; }
.module-sidebar-card .progress-bar { border-radius:999px; }
.module-lesson-list { display:flex; flex-direction:column; gap:10px; }
.module-lesson-item {
  display:grid; grid-template-columns: 104px 1fr auto; gap:12px; align-items:center; border-radius:18px; border:1px solid var(--pros-border); padding: 10px; color:inherit; background:#fff;
}
.module-lesson-item.active { background:#eef4ff; border-color:#d9e6ff; }
.module-thumb { position:relative; width:104px; height:58px; border-radius:14px; overflow:hidden; background:#edf3ff; }
.module-thumb img, .module-thumb-placeholder { width:100%; height:100%; object-fit:cover; display:grid; place-items:center; }
.module-lesson-info strong { display:block; color: var(--pros-dark); line-height:1.35; font-size: .96rem; }
.module-lesson-info small { color: var(--pros-muted); display:block; margin-top: 6px; }
.module-lesson-status { white-space: nowrap; font-size: .92rem; }
.watching-dot { color: var(--pros-primary); font-weight: 700; }

/* RESPONSIVO */
@media (max-width: 1400px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-main-grid, .dashboard-bottom-grid, .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1199px) {
  .admin-content { margin-left: 0; width: 100%; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .course-page-header-rich { grid-template-columns: 1fr; }
  .auth-hero-card { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
  .admin-topbar { padding: 16px; }
  .admin-main { padding: 20px 16px 32px; }
  .admin-top-search { min-width: 0; width: 100%; }
  .admin-topbar-left { flex:1; }
  .page-hero, .lesson-action-row, .public-register-hero { flex-direction: column; }
  .dashboard-progress-metrics { grid-template-columns: 1fr; }
  .public-register-hero h1, .auth-hero-content h1 { font-size: 2.45rem; }
  .public-register-card { margin-top: 0; }
  .public-footer-inner { grid-template-columns: 1fr 1fr; }
  .lesson-progress-row { grid-template-columns: 1fr; }
  .module-lesson-item { grid-template-columns: 88px 1fr auto; }
  .course-request-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .public-navbar-inner, .public-main { width: calc(100% - 24px); padding-left: 0; padding-right: 0; }
  .public-navbar-inner { padding: 14px 0; }
  .public-brand img { height: 38px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .public-footer-inner { grid-template-columns: 1fr; }
  .course-request-grid, .dashboard-main-grid, .dashboard-bottom-grid { grid-template-columns: 1fr; }
  .lesson-heading h1, .page-hero h1 { font-size: 1.8rem; }
  .module-lesson-item { grid-template-columns: 72px 1fr; }
  .module-lesson-status { grid-column: 2; }
  .module-thumb { width:72px; height:44px; }
  .course-video-item { grid-template-columns: 1fr; }
  .course-page-header-rich { padding: 18px; }
}


/* =====================================================================
   V21 - Correção botão Acessar da tela de login
   O detalhe visual ::after do card ficava acima da área do formulário
   em alguns navegadores e podia bloquear o clique no botão.
===================================================================== */
.auth-hero-card::after,
.public-register-hero::after {
  pointer-events: none !important;
  z-index: 0 !important;
}

.auth-hero-card > *,
.public-register-hero > * {
  position: relative;
  z-index: 1;
}

.auth-login-card {
  position: relative;
  z-index: 3 !important;
}

.auth-login-card form,
.auth-login-card input,
.auth-login-card button,
.auth-login-card .btn {
  position: relative;
  z-index: 4;
  pointer-events: auto !important;
}

.auth-login-card button[type="submit"] {
  cursor: pointer;
}


/* =====================================================================
   V22 - Ajuste tela de login e cards do aluno em 1366x768
===================================================================== */

/* Corrige texto branco em cima de área clara na tela de login */
.auth-hero-content h1,
.auth-page .auth-hero-content h1 {
  color: #071b46 !important;
  text-shadow: none !important;
}

.auth-hero-content p,
.auth-page .auth-hero-content p {
  color: #475569 !important;
  text-shadow: none !important;
}

.auth-hero-content .eyebrow {
  color: #165dff !important;
  background: #edf3ff;
  border-radius: 999px;
  padding: 8px 14px;
}

.auth-cta-box {
  background: rgba(255,255,255,.82) !important;
  border: 1px solid #dbe7fb !important;
  color: #071b46 !important;
}

.auth-cta-box strong {
  color: #071b46 !important;
}

.auth-cta-box span {
  color: #64748b !important;
}

/* Reduz o tamanho dos cards de treinamento na área do aluno */
.student-course-grid {
  align-items: stretch;
}

.student-course-card {
  min-height: auto !important;
}

.student-course-cover {
  height: 150px !important;
  object-fit: contain !important;
  background: #ffffff;
  padding: 16px;
}

.student-course-cover-placeholder {
  height: 150px !important;
  padding: 0;
}

.student-course-body {
  padding: 18px 20px !important;
}

.student-course-body h4 {
  font-size: 1.22rem !important;
  line-height: 1.18 !important;
  margin-bottom: 8px !important;
}

.student-course-body p.text-muted {
  font-size: .94rem !important;
  line-height: 1.45 !important;
  margin-bottom: 12px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.student-course-body .progress {
  height: 9px;
  margin-bottom: 12px !important;
}

.student-course-body .d-grid {
  gap: 8px !important;
}

.student-course-body .btn {
  min-height: 42px;
  padding: 9px 14px;
  font-size: .94rem;
}

/* Ajuste específico para notebooks/monitores 1366x768 */
@media (max-width: 1366px) and (max-height: 768px) {
  .public-navbar-inner {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .public-brand img {
    height: 42px !important;
  }

  .student-main {
    padding-top: 20px !important;
  }

  .student-page-hero {
    margin-bottom: 18px !important;
  }

  .student-page-hero h2 {
    font-size: 1.9rem !important;
    margin-bottom: 4px !important;
  }

  .student-page-hero p {
    font-size: .98rem !important;
  }

  .student-course-grid {
    --bs-gutter-x: 14px;
    --bs-gutter-y: 14px;
  }

  .student-course-grid > [class*="col-"] {
    display: flex;
  }

  .student-course-card {
    width: 100%;
    border-radius: 22px !important;
  }

  .student-course-cover {
    height: 128px !important;
    padding: 12px !important;
  }

  .student-course-cover-placeholder {
    height: 128px !important;
  }

  .student-course-body {
    padding: 15px 18px !important;
  }

  .student-course-body h4 {
    font-size: 1.08rem !important;
    line-height: 1.18 !important;
    margin-bottom: 6px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .student-course-body p.text-muted {
    font-size: .88rem !important;
    line-height: 1.35 !important;
    margin-bottom: 10px !important;
    -webkit-line-clamp: 2;
  }

  .student-course-body .small {
    font-size: .82rem !important;
  }

  .student-course-body .progress {
    height: 8px !important;
    margin-bottom: 10px !important;
  }

  .student-course-body .btn {
    min-height: 38px !important;
    padding: 7px 12px !important;
    font-size: .88rem !important;
  }

  .student-course-body .d-grid {
    gap: 6px !important;
  }
}

/* Em telas um pouco maiores mantém conforto, mas sem cards exagerados */
@media (min-width: 1200px) {
  .student-course-cover {
    height: 145px !important;
  }
}
