/* =============================================================================
   MGK — Camada de compatibilidade Vikinger (overview / badges)
   Sobrescreve resíduos do Material Dashboard / Bootstrap legado
   ============================================================================= */

/* --- Layout centralizado (overview.html) --- */
/* O sidebar.js do Vikinger aplica translate() e desloca o conteúdo — desativamos */
body.mgk-school-layout .content-grid {
  transform: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: min(1184px, calc(100vw - 340px));
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

@media (max-width: 1366px) {
  body.mgk-school-layout .content-grid {
    max-width: calc(100vw - 320px);
  }
}

@media (max-width: 960px) {
  body.mgk-school-layout .content-grid {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Menu lateral único (overview.html) — sem faixa duplicada de ícones */
body.mgk-school-layout #navigation-widget-small {
  display: none !important;
}

body.mgk-school-layout #navigation-widget.navigation-widget {
  left: 0;
  width: 300px;
  z-index: 10001;
}

body.mgk-school-layout #navigation-widget .menu {
  margin-top: 20px;
}

body.mgk-school-layout #navigation-widget.navigation-widget.hidden {
  transform: translate(-100%, 0);
  pointer-events: none;
}

body.mgk-school-layout.mgk-sidebar-collapsed .content-grid {
  max-width: min(1184px, calc(100vw - 120px));
}

body.mgk-school-layout.mgk-chat-open .content-grid {
  max-width: min(1184px, calc(100vw - 600px));
}

body.mgk-school-layout.mgk-sidebar-collapsed.mgk-chat-open .content-grid {
  max-width: min(1184px, calc(100vw - 380px));
}

/* Chat lateral direito (mensagens) — markup overview.html */
body.mgk-school-layout .mgk-chat-widget.chat-widget {
  z-index: 10000;
}

body.mgk-school-layout .mgk-chat-widget .chat-widget-form {
  padding: 0 28px 16px;
}

body.mgk-school-layout .mgk-chat-widget .chat-widget-form .interactive-input {
  width: 100%;
}

body.mgk-school-layout .mgk-chat-widget .chat-widget-form .interactive-input input {
  width: 100%;
  padding-right: 48px;
}

body.mgk-school-layout .mgk-chat-widget .chat-widget-form .interactive-input-action {
  cursor: pointer;
  visibility: hidden;
}

body.mgk-school-layout .mgk-chat-widget.chat-widget.closed .chat-widget-form {
  display: none;
}

body.mgk-school-layout .mgk-chat-message-link {
  cursor: pointer;
}

body.mgk-school-layout .mgk-chat-message-link:hover {
  background-color: rgba(119, 80, 248, 0.08);
}

body.mgk-school-layout .mgk-chat-widget .chat-widget-button .burger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 20px;
}

body.mgk-school-layout .mgk-chat-widget .chat-widget-button .burger-icon-bar {
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

body.mgk-school-layout .mgk-chat-widget .chat-widget-button .burger-icon-bar:nth-child(2) {
  width: 70%;
  margin-left: auto;
}

body.mgk-school-layout .mgk-chat-widget .chat-widget-button .burger-icon-bar:nth-child(3) {
  width: 40%;
  margin-left: auto;
}

/* Brinquedoteca iframe */
.mgk-brinquedoteca-box {
  overflow: hidden;
}

.mgk-brinquedoteca-toolbar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #2f3749;
}

.mgk-brinquedoteca-iframe {
  display: block;
  width: 100%;
  min-height: calc(100vh - 220px);
  height: 75vh;
  border: 0;
  background: #fff;
}

body[data-mgk-theme="light"] .mgk-brinquedoteca-toolbar {
  border-bottom-color: #e5e7eb;
}

.content-grid .mgk-legacy,
.content-grid .main-panel {
  width: 100%;
  max-width: 1184px;
  margin: 0 auto;
  padding: 0;
  float: none;
  background: transparent;
}

.mgk-legacy > .content,
.main-panel > .content {
  padding: 0 0 32px;
}

.mgk-legacy .container-fluid {
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
}

/* Remove grid bootstrap quebrado */
.mgk-legacy .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-left: 0;
  margin-right: 0;
}

.mgk-legacy .row > [class*="col-"] {
  flex: 1 1 220px;
  max-width: 280px;
  padding: 0;
}

.mgk-legacy .row > .col-lg-12,
.mgk-legacy .row > .col-md-120,
.mgk-legacy .row > [class*="col-lg-12"] {
  flex: 1 1 100%;
  max-width: 100%;
}

/* --- Stats / cards no estilo overview (stats-box) --- */
.mgk-legacy .card-stats {
  background: #1d2333;
  border-radius: 12px;
  border: 1px solid #2f3749;
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.06);
  margin-bottom: 0;
  overflow: hidden;
  height: 100%;
}

body[data-mgk-theme="light"] .mgk-legacy .card-stats {
  background: #fff;
  border-color: #eaeaf5;
  box-shadow: 0 0 40px 0 rgba(94, 92, 154, 0.06);
}

.mgk-legacy .card-stats .card-header {
  background: transparent !important;
  box-shadow: none !important;
  padding: 22px 20px 12px;
}

.mgk-legacy .card-stats .card-category,
.mgk-legacy .card-stats .card-title,
.mgk-legacy .card-stats h3 {
  color: #fff !important;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
}

body[data-mgk-theme="light"] .mgk-legacy .card-stats .card-category,
body[data-mgk-theme="light"] .mgk-legacy .card-stats .card-title,
body[data-mgk-theme="light"] .mgk-legacy .card-stats h3 {
  color: #3e3f5e !important;
}

.mgk-legacy .card-stats .card-icon {
  border-radius: 10px;
}

.mgk-legacy .card-stats .card-footer {
  display: none;
}

/* --- Widget-box para cards de conteúdo --- */
.mgk-legacy .card:not(.card-stats) {
  background: #1d2333;
  border-radius: 12px;
  border: 1px solid #2f3749;
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.06);
  margin-bottom: 28px;
  width: 100%;
}

body[data-mgk-theme="light"] .mgk-legacy .card:not(.card-stats) {
  background: #fff;
  border-color: #eaeaf5;
}

.mgk-legacy .card:not(.card-stats) .card-header {
  background: transparent !important;
  border-bottom: 1px solid #2f3749;
  padding: 26px 28px 0;
}

body[data-mgk-theme="light"] .mgk-legacy .card:not(.card-stats) .card-header {
  border-bottom-color: #eaeaf5;
}

.mgk-legacy .card-title,
.mgk-legacy .card-category,
.mgk-legacy h3,
.mgk-legacy h4,
.mgk-legacy h5,
.mgk-legacy label,
.mgk-legacy p,
.mgk-legacy .section-title {
  color: #fff !important;
}

body[data-mgk-theme="light"] .mgk-legacy .card-title,
body[data-mgk-theme="light"] .mgk-legacy .card-category,
body[data-mgk-theme="light"] .mgk-legacy h3,
body[data-mgk-theme="light"] .mgk-legacy h4,
body[data-mgk-theme="light"] .mgk-legacy h5,
body[data-mgk-theme="light"] .mgk-legacy label,
body[data-mgk-theme="light"] .mgk-legacy p {
  color: #3e3f5e !important;
}

.mgk-legacy .text-dark,
.mgk-legacy .text-muted {
  color: #adafca !important;
}

body[data-mgk-theme="light"] .mgk-legacy .text-dark,
body[data-mgk-theme="light"] .mgk-legacy .text-muted {
  color: #8f91ac !important;
}

/* --- Tabelas (modo escuro/claro) --- */
.mgk-legacy .table,
.mgk-legacy table,
.content-grid .table {
  width: 100%;
  color: #adafca;
  border-collapse: collapse;
  margin-top: 16px;
}

.mgk-legacy .table thead th,
.mgk-legacy table thead th {
  background: #21283b !important;
  color: #fff !important;
  border-color: #2f3749 !important;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 14px;
}

.mgk-legacy .table td,
.mgk-legacy table td {
  background: transparent !important;
  color: #adafca !important;
  border-color: #2f3749 !important;
  padding: 10px 14px;
  vertical-align: middle;
}

.mgk-legacy .table-striped tbody tr:nth-of-type(odd) td {
  background: rgba(37, 43, 61, 0.45) !important;
}

.mgk-legacy .table-striped tbody tr:nth-of-type(even) td {
  background: rgba(29, 35, 51, 0.65) !important;
}

.mgk-legacy .table-hover tbody tr:hover td {
  background: rgba(35, 210, 226, 0.08) !important;
}

body[data-mgk-theme="light"] .mgk-legacy .table,
body[data-mgk-theme="light"] .mgk-legacy table {
  color: #3e3f5e;
}

body[data-mgk-theme="light"] .mgk-legacy .table thead th,
body[data-mgk-theme="light"] .mgk-legacy table thead th {
  background: #f5f5fa !important;
  color: #3e3f5e !important;
  border-color: #eaeaf5 !important;
}

body[data-mgk-theme="light"] .mgk-legacy .table td,
body[data-mgk-theme="light"] .mgk-legacy table td {
  color: #3e3f5e !important;
  border-color: #eaeaf5 !important;
}

body[data-mgk-theme="light"] .mgk-legacy .table-striped tbody tr:nth-of-type(odd) td {
  background: #fafafa !important;
}

body[data-mgk-theme="light"] .mgk-legacy .table-striped tbody tr:nth-of-type(even) td {
  background: #fff !important;
}

/* Tabelas customizadas inline */
.mgk-legacy table.custom-table thead,
.mgk-legacy table.custom-table tbody tr:nth-child(odd) {
  background: #21283b !important;
}

.mgk-legacy table.custom-table th,
.mgk-legacy table.custom-table td {
  color: #adafca !important;
  border-color: #2f3749 !important;
}

body[data-mgk-theme="light"] .mgk-legacy table.custom-table thead,
body[data-mgk-theme="light"] .mgk-legacy table.custom-table tbody tr:nth-child(odd) {
  background: #f5f5fa !important;
}

body[data-mgk-theme="light"] .mgk-legacy table.custom-table th,
body[data-mgk-theme="light"] .mgk-legacy table.custom-table td {
  color: #3e3f5e !important;
}

.mgk-legacy .text-warning {
  color: #ffd943 !important;
}

/* --- Formulários --- */
.mgk-legacy .form-control,
.mgk-legacy select.form-control,
.mgk-legacy input.form-control,
.mgk-legacy textarea.form-control {
  background: #21283b !important;
  border: 1px solid #2f3749 !important;
  color: #fff !important;
  border-radius: 12px;
  padding: 10px 14px;
  height: auto;
}

body[data-mgk-theme="light"] .mgk-legacy .form-control {
  background: #fff !important;
  border-color: #eaeaf5 !important;
  color: #3e3f5e !important;
}

.mgk-legacy .form-control::placeholder {
  color: #8f91ac;
}

/* --- Botões Vikinger (padding correto em todo o sistema) --- */
body.mgk-school-layout .button,
body.mgk-school-layout a.button,
body.mgk-school-layout button.button,
.content-grid .button,
.content-grid a.button,
.content-grid button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  height: auto;
  line-height: 1.25;
  padding: 14px 36px;
  border-radius: 10px;
  border: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 3px 5px 10px 0 rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

body.mgk-school-layout .button.full,
.content-grid .button.full {
  display: flex;
  width: 100%;
}

body.mgk-school-layout .button.small,
.content-grid .button.small {
  min-height: 40px;
  padding: 10px 28px;
  font-size: 0.75rem;
}

body.mgk-school-layout .button.medium,
.content-grid .button.medium {
  min-height: 54px;
  padding: 16px 40px;
}

body.mgk-school-layout .button.secondary,
.content-grid .button.secondary {
  background-color: #7750f8;
  color: #fff;
  box-shadow: 4px 7px 12px 0 rgba(119, 80, 248, 0.2);
}

body.mgk-school-layout .button.secondary:hover,
.content-grid .button.secondary:hover {
  background-color: #9668ff;
  color: #fff;
}

body.mgk-school-layout .button.void,
.content-grid .button.void {
  background: transparent;
  color: #9aa4bf;
  box-shadow: none;
}

body.mgk-school-layout .button.tertiary,
.content-grid .button.tertiary {
  background-color: #fd4350;
  color: #fff;
  box-shadow: 4px 7px 12px 0 rgba(253, 67, 80, 0.2);
}

body.mgk-school-layout .button.primary,
.content-grid .button.primary {
  background-color: #40d04f;
  color: #fff;
}

/* Bootstrap legado alinhado ao Vikinger */
.mgk-legacy .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  min-height: 48px;
  padding: 14px 36px;
  line-height: 1.25;
  border: none;
  box-shadow: 3px 5px 10px 0 rgba(0, 0, 0, 0.2);
}

.mgk-legacy .btn-sm {
  min-height: 40px;
  padding: 10px 28px;
  font-size: 0.75rem;
}

.mgk-legacy .btn-warning { background: #ffd943; color: #3e3f5e; }
.mgk-legacy .btn-success { background: #4fd69c; color: #fff; }
.mgk-legacy .btn-danger  { background: #ff5384; color: #fff; }
.mgk-legacy .btn-info    { background: #23d2e2; color: #fff; }
.mgk-legacy .btn-secondary { background: #3e3f5e; color: #fff; }
.mgk-legacy .btn-outline-light {
  border: 1px solid #2f3749;
  color: #adafca;
  background: transparent;
}

/* --- Alerts --- */
.mgk-legacy .alert {
  border-radius: 12px;
  border: none;
  color: #fff;
}

.mgk-legacy .alert-warning {
  background: rgba(255, 217, 67, 0.15);
  color: #ffd943;
}

.mgk-legacy .alert-info {
  background: rgba(35, 210, 226, 0.12);
  color: #23d2e2;
}

.mgk-legacy .custom-alert {
  background: rgba(35, 210, 226, 0.12) !important;
  color: #adafca !important;
  border: 1px solid #2f3749 !important;
}

/* --- Menu lateral --- */
#navigation-widget .menu .material-icons {
  font-size: 20px;
  margin-right: 10px;
  vertical-align: middle;
  opacity: 0.9;
}

#navigation-widget .menu-item-link {
  display: flex;
  align-items: center;
  gap: 4px;
}

#navigation-widget .nav-link a,
#navigation-widget .collapse-item {
  display: block;
  padding: 8px 0 8px 40px;
  font-size: 0.82rem;
  color: #adafca;
  text-decoration: none;
}

#navigation-widget .nav-link a:hover {
  color: #23d2e2;
}

#navigation-widget .collapse {
  display: none;
}

#navigation-widget .collapse.show {
  display: block;
}

#navigation-widget .logo .mgk-logo-trigger {
  cursor: pointer;
  text-decoration: none;
  display: block;
}

#navigation-widget .logo img,
#navigation-widget .logo .mgk-logo-animated-img {
  width: 160px;
  max-width: 160px;
  height: auto;
  margin: 16px auto;
  display: block;
}

#navigation-widget-small .material-icons {
  font-size: 22px;
}

/* --- Header / dropdowns Vikinger --- */
.header .mgk-theme-toggle-wrap {
  display: inline-flex;
  margin-right: 6px;
}

.mgk-theme-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 14px !important;
  font-size: 0.8rem !important;
}

/* --- Ranking / badges --- */
.mgk-legacy .ranking-container {
  justify-content: center;
  gap: 16px;
}

.mgk-legacy .students-flip-front,
.mgk-legacy .students-flip-back {
  background: #21283b !important;
  border: 1px solid #2f3749 !important;
  color: #adafca !important;
}

.mgk-legacy .students-flip-front,
.mgk-legacy .students-flip-back,
.mgk-legacy .flip-info p {
  color: #adafca !important;
}

.mgk-legacy .currency-item {
  color: #fff !important;
  background: #21283b !important;
  border: 1px solid #2f3749 !important;
}

body[data-mgk-theme="light"] .mgk-legacy .currency-item {
  color: #3e3f5e !important;
  background: #fff !important;
}

/* --- Modais bootstrap dentro do tema --- */
.mgk-legacy .modal-content {
  background: #1d2333;
  border: 1px solid #2f3749;
  color: #adafca;
  border-radius: 12px;
}

body[data-mgk-theme="light"] .mgk-legacy .modal-content {
  background: #fff;
  color: #3e3f5e;
}

.mgk-legacy .modal-header,
.mgk-legacy .modal-footer {
  border-color: #2f3749;
}

.mgk-legacy .close {
  color: #adafca;
  opacity: 0.8;
}

/* --- Configurações flutuantes --- */
.fixed-plugin {
  z-index: 9990;
}

.fixed-plugin .dropdown-menu {
  background: #1d2333;
  border: 1px solid #2f3749;
  color: #adafca;
  max-height: 80vh;
  overflow-y: auto;
  min-width: 300px;
  padding: 16px;
  border-radius: 12px;
}

body[data-mgk-theme="light"] .fixed-plugin .dropdown-menu {
  background: #fff;
  color: #3e3f5e;
  border-color: #eaeaf5;
}

.fixed-plugin .dropdown-menu h5,
.fixed-plugin .dropdown-menu label {
  color: inherit !important;
}

.fixed-plugin .mgk-theme-toggle {
  width: 100%;
  justify-content: center;
  margin-bottom: 10px;
}

/* --- Footer --- */
.mgk-school-footer {
  padding: 24px 0 40px;
  text-align: center;
  font-size: 0.85rem;
  color: #8f91ac;
}

.mgk-school-footer a {
  color: #23d2e2;
}

/* --- Modal de logout (centralizado na viewport) --- */
body.mgk-logout-open {
  overflow: hidden;
}

.mgk-logout-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mgk-logout-modal.mgk-logout-modal--open {
  display: flex;
}

.mgk-logout-modal[hidden]:not(.mgk-logout-modal--open) {
  display: none !important;
}

.mgk-logout-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, 0.72);
  backdrop-filter: blur(6px);
  animation: mgk-logout-fade-in 0.25s ease;
}

.mgk-logout-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 32px;
  border-radius: 16px;
  background: #1d2333;
  border: 1px solid #2f3749;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  text-align: center;
  animation: mgk-logout-slide-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-mgk-theme="light"] .mgk-logout-modal__dialog {
  background: #fff;
  border-color: #dedeea;
  box-shadow: 0 24px 64px rgba(62, 63, 94, 0.18);
}

.mgk-logout-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(173, 175, 202, 0.12);
  color: #adafca;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.mgk-logout-modal__close:hover {
  background: rgba(119, 80, 248, 0.2);
  color: #fff;
}

.mgk-logout-modal__close .icon-cross {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.mgk-logout-modal__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(119, 80, 248, 0.25), rgba(35, 210, 226, 0.2));
  border: 1px solid rgba(119, 80, 248, 0.35);
}

.mgk-logout-modal__icon .icon-leave-group {
  width: 32px;
  height: 32px;
  fill: #23d2e2;
}

.mgk-logout-modal__pretitle {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #23d2e2;
  margin-bottom: 8px;
}

.mgk-logout-modal__title {
  font-family: "Titillium Web", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

body[data-mgk-theme="light"] .mgk-logout-modal__title {
  color: #3e3f5e;
}

.mgk-logout-modal__text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #adafca;
  margin-bottom: 28px;
}

body[data-mgk-theme="light"] .mgk-logout-modal__text {
  color: #8f91ac;
}

.mgk-logout-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.mgk-logout-modal__actions .button {
  flex: 1 1 140px;
  max-width: 180px;
  justify-content: center;
}

@keyframes mgk-logout-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mgk-logout-slide-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Login --- */
.mgk-login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.mgk-login-logo-wrap {
  display: inline-block;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.45s ease;
}

.mgk-login-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 210, 226, 0.45) 0%, rgba(119, 80, 248, 0.2) 45%, transparent 70%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.45s ease, transform 0.45s ease;
  z-index: 0;
  pointer-events: none;
}

.mgk-login-logo-wrap::after {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(135deg, #23d2e2, #7750f8, #40d04f, #23d2e2) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transform: rotate(0deg) scale(0.95);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 0 28px rgba(35, 210, 226, 0.35), 0 0 48px rgba(119, 80, 248, 0.25);
}

.mgk-login-logo-wrap img,
.mgk-login-logo-wrap .mgk-logo-animated-img {
  position: relative;
  z-index: 2;
  max-width: 300px;
  width: 300px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
  transition: filter 0.45s ease;
}

.mgk-login-logo-wrap:hover {
  transform: translateY(-8px) scale(1.06);
  filter: drop-shadow(0 16px 32px rgba(35, 210, 226, 0.35));
}

.mgk-login-logo-wrap:hover::before {
  opacity: 1;
  transform: scale(1);
  animation: mgk-logo-pulse 1.8s ease-in-out infinite;
}

.mgk-login-logo-wrap:hover::after {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  animation: mgk-logo-ring-spin 2.4s linear infinite;
}

.mgk-login-logo-wrap:hover img {
  filter: drop-shadow(0 0 20px rgba(35, 210, 226, 0.55)) drop-shadow(0 0 40px rgba(119, 80, 248, 0.25));
}

@keyframes mgk-logo-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes mgk-logo-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.landing .mgk-login-school-name.landing-info-title {
  font-size: 5.5rem !important;
}

@media screen and (max-width: 1500px) {
  .landing .mgk-login-school-name.landing-info-title {
    font-size: 3.25rem !important;
  }
}

.landing .mgk-login-errors {
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 83, 132, 0.15);
  color: #ff6b7a;
}

/* --- Section banner / header (overview.html) --- */
.content-grid .section-banner {
  margin-bottom: 8px;
}

.content-grid .section-banner-title,
.content-grid .section-header .section-title,
.content-grid .section-header .section-pretitle {
  color: #fff;
}

body[data-mgk-theme="light"] .content-grid .section-banner-title,
body[data-mgk-theme="light"] .content-grid .section-header .section-title,
body[data-mgk-theme="light"] .content-grid .section-header .section-pretitle {
  color: #3e3f5e;
}

.content-grid .section-banner-text {
  color: #8f91ac;
}

.mgk-section-banner {
  margin-bottom: 20px;
}

/* Grid Vikinger para cards de estatística */
.mgk-legacy .grid.centered {
  justify-content: center;
}

.mgk-legacy .grid.grid-3-3-3-3 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 992px) {
  .mgk-legacy .grid.grid-3-3-3-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .mgk-legacy .grid.grid-3-3-3-3 {
    grid-template-columns: 1fr;
  }
}

/* thead.text-warning do bootstrap legado */
.mgk-legacy .table thead.text-warning th {
  color: #ffd943 !important;
}

body[data-mgk-theme="light"] .mgk-legacy .table thead.text-warning th {
  color: #e8a700 !important;
}

/* code tags */
.mgk-legacy code {
  color: #23d2e2;
  background: rgba(35, 210, 226, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- Overview dashboard (ranking hexagonal, widgets) --- */
.content-grid .grid.grid-layout-1 {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1100px) {
  .content-grid .grid.grid-layout-1 {
    grid-template-columns: 1fr;
  }
}

.content-grid .grid-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mgk-ranking-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.mgk-ranking-grid-full {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.mgk-ranking-total {
  font-size: 0.85rem;
  color: #8f91ac;
  margin-bottom: 8px;
}

@media (max-width: 1200px) {
  .mgk-ranking-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .mgk-ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .mgk-ranking-grid {
    grid-template-columns: 1fr;
  }
}

.mgk-ranking-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px 20px;
  gap: 8px;
}

.mgk-ranking-card .mgk-photo-hex {
  margin: 0 auto;
}

.mgk-ranking-position {
  font-size: 0.75rem;
  font-weight: 700;
  color: #23d2e2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mgk-ranking-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

body[data-mgk-theme="light"] .mgk-ranking-name {
  color: #3e3f5e;
}

.mgk-ranking-xp {
  font-size: 0.85rem;
  color: #8f91ac;
}

.mgk-ranking-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
  font-size: 0.8rem;
  color: #adafca;
}

.mgk-ranking-stats img {
  vertical-align: middle;
  margin-right: 4px;
}

.mgk-ranking-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 4px;
}

.mgk-destaques-widget .mgk-destaques-ticker {
  min-height: 48px;
  overflow: hidden;
  position: relative;
}

.mgk-destaques-ticker-inner {
  transition: opacity 0.4s ease;
  color: #adafca;
  line-height: 1.5;
}

.mgk-destaques-ticker-inner a {
  color: inherit;
  text-decoration: none;
}

.mgk-destaques-ticker-inner a:hover {
  color: #23d2e2;
}

.mgk-destaques-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #23d2e2;
}

.mgk-alert-widget.mgk-alert-birthday .widget-box-content {
  color: #ff6bb5;
}

.mgk-alert-widget.mgk-alert-merchant .widget-box-content {
  color: #ffd943;
}

.content-grid .section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.content-grid .stats-box {
  min-width: 0;
}

.mgk-legacy-below-overview {
  margin-top: 32px;
  padding-top: 8px;
  border-top: 1px solid rgba(63, 72, 95, 0.5);
}

.mgk-professor-disciplines-header {
  margin-top: 40px;
}

.mgk-professor-disciplines-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.mgk-professor-discipline-card.stats-box.small {
  padding: 20px 16px 14px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.mgk-professor-discipline-card .stats-box-value-wrap {
  margin-bottom: 8px;
}

.mgk-professor-discipline-card .stats-box-value.mgk-activity-letter {
  font-size: 1.5rem;
}

.mgk-professor-discipline-card .stats-box-title {
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 4px;
}

.mgk-professor-discipline-card .stats-box-text {
  font-size: 0.82rem;
  margin-bottom: 0;
}

.mgk-professor-discipline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(173, 175, 202, 0.14);
}

.mgk-professor-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(119, 80, 248, 0.45), rgba(35, 210, 226, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: #fff;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.mgk-professor-action-btn:hover {
  background: linear-gradient(135deg, rgba(119, 80, 248, 0.75), rgba(35, 210, 226, 0.55));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(119, 80, 248, 0.35);
}

.mgk-professor-action-btn .material-icons {
  font-size: 19px;
  line-height: 1;
  color: #fff;
}

body[data-mgk-theme="light"] .mgk-professor-discipline-actions {
  border-top-color: rgba(62, 63, 94, 0.12);
}

body[data-mgk-theme="light"] .mgk-professor-action-btn {
  background: linear-gradient(135deg, rgba(97, 93, 250, 0.85), rgba(35, 210, 226, 0.7));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

body[data-mgk-theme="light"] .mgk-chat-widget .mgk-chat-message-time {
  color: #615dfa;
}

@media (max-width: 900px) {
  .mgk-professor-disciplines-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .mgk-professor-disciplines-grid {
    grid-template-columns: 1fr;
  }
}

/* Avatar hexagonal puro CSS + img (ranking + card XP) — sem canvas Vikinger */
.mgk-photo-hex {
  position: relative;
  width: 100px;
  height: 108px;
  margin: 0 auto;
  flex-shrink: 0;
}

.mgk-photo-hex::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: 0;
  background: linear-gradient(155deg, #40d04f 0%, #40d04f 36%, #293249 40%, #293249 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.mgk-photo-hex__fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--mgk-hex-bg, #293249);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.mgk-photo-hex__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: transparent;
}

.mgk-photo-hex__level {
  position: absolute;
  right: -2px;
  bottom: 2px;
  z-index: 2;
  min-width: 28px;
  height: 30px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #7750f8;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.mgk-ranking-card .mgk-photo-hex {
  width: 88px;
  height: 96px;
}

.mgk-photo-hex--sm {
  width: 40px;
  height: 44px;
  margin: 0;
}

.mgk-photo-hex--sm::before {
  inset: -3px;
}

.mgk-destaques-timeline .user-status-avatar .mgk-photo-hex--sm,
.mgk-destaques-crud .user-status-avatar .mgk-photo-hex--sm {
  position: absolute;
  top: 0;
  left: 0;
}

.post-comment.mgk-destaque-resposta .mgk-photo-hex--sm {
  position: absolute;
  top: 28px;
  left: 28px;
}

/* Chat — avatar pequeno + layout da mensagem */
.mgk-chat-widget .user-avatar.small .user-avatar-content {
  overflow: visible;
}

.mgk-hex-avatar-overlay-img--chat {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 32px;
  object-fit: cover;
  z-index: 2;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: #21283b;
}

.mgk-chat-widget .hexagon-image-30-32 {
  opacity: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  position: absolute;
}

.mgk-chat-widget .user-status {
  position: relative;
  padding-right: 4px;
}

.mgk-chat-message-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-right: 4px;
}

.mgk-chat-widget .mgk-chat-message-head .user-status-title {
  margin-top: 0;
  line-height: 1.25;
}

.mgk-chat-widget .mgk-chat-message-head .user-status-title .bold {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.mgk-chat-widget .mgk-chat-message-time {
  position: static !important;
  top: auto !important;
  right: auto !important;
  float: none !important;
  margin-top: 0 !important;
  font-size: 0.7rem;
  color: #23d2e2;
  line-height: 1.2;
}

.mgk-chat-widget .user-status-text.small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.35;
  margin-top: 6px;
  padding-right: 0;
}


/* --- Destaques timeline (profile-timeline / newsfeed) --- */
.mgk-destaques-timeline {
  margin-top: 8px;
}

.mgk-destaques-timeline .grid-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mgk-destaque-post {
  margin-bottom: 0;
}

.mgk-destaque-post .post-option.mgk-like-btn,
.mgk-destaque-post .post-option.mgk-reply-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: inherit;
  font: inherit;
  color: inherit;
  padding: 0;
}

/* --- Formulários Vikinger: label flutuante sem conflito com placeholder --- */
body.mgk-school-layout .form-input.mgk-labeled-input label,
body.mgk-school-layout .form-input:has(> label) label,
.content-grid .form-input.mgk-labeled-input label,
.content-grid .form-input:has(> label) label,
.landing .form-input.mgk-labeled-input label,
.landing .form-input:has(> label) label {
  top: -6px;
  left: 12px;
  font-size: 0.75rem;
  padding: 0 6px;
  background-color: #1d2333;
  z-index: 2;
  pointer-events: none;
}

body[data-mgk-theme="light"] .landing .form-input:has(> label) label {
  background-color: #fff;
}

body.mgk-school-layout .form-input.mgk-labeled-input.active label,
body.mgk-school-layout .form-input:has(> label) label,
.content-grid .form-input.mgk-labeled-input label {
  top: -6px;
  left: 12px;
  font-size: 0.75rem;
}

body[data-mgk-theme="light"] .form-input:has(> label) label,
body[data-mgk-theme="light"] .form-input.mgk-labeled-input label {
  background-color: #fff;
}

body.mgk-school-layout .form-input:has(> label) input::placeholder,
body.mgk-school-layout .form-input:has(> label) textarea::placeholder,
.content-grid .form-input:has(> label) input::placeholder {
  color: transparent;
}

.landing .form-input input {
  padding-top: 16px;
}

.mgk-destaque-date,
.mgk-destaque-date-inline {
  font-size: 0.7rem;
  color: #6b7289;
  line-height: 1.3;
}

.mgk-destaque-date {
  margin-top: 2px;
}

.mgk-destaque-date-inline {
  display: block;
  margin-top: 4px;
}

.mgk-reply-form-wrap {
  padding: 16px 28px 20px;
  border-top: 1px solid #2f3749;
}

.mgk-reply-form .form-textarea textarea {
  min-height: 80px;
}

.mgk-reply-form .button {
  margin-top: 12px;
}

.mgk-reply-list {
  padding: 0 28px 20px;
}

.mgk-destaque-resposta .post-comment-text-author {
  font-weight: 700;
  color: #23d2e2;
  margin-right: 6px;
}

.mgk-resposta-date {
  margin: 4px 0 0 52px;
}

.mgk-destaque-post .post-option.mgk-like-btn.active .post-option-text,
.mgk-destaque-post .post-option.mgk-like-btn.active .post-option-icon {
  color: #23d2e2;
  fill: #23d2e2;
}

.mgk-destaque-post .widget-box-status .mgk-destaque-picture {
  width: 100%;
  height: auto;
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(21, 27, 43, 0.6);
  line-height: 0;
}

.mgk-destaque-post .widget-box-status .mgk-destaque-picture img {
  width: 100%;
  height: auto;
  max-height: min(70vh, 640px);
  display: block;
  object-fit: contain;
  object-position: center;
}

body[data-mgk-theme="light"] .mgk-destaque-post .widget-box-status .mgk-destaque-picture {
  background: #f5f5fa;
}

.mgk-destaque-quick-post {
  margin-bottom: 8px;
}

.mgk-destaque-quick-post form {
  margin: 0;
}

.mgk-destaque-quick-post .quick-post-header {
  padding-bottom: 0;
}

.mgk-destaque-image-row {
  margin-top: 12px;
}

.mgk-destaque-feedback {
  margin: 12px 16px 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.mgk-destaque-feedback-success {
  background: rgba(64, 208, 79, 0.15);
  color: #40d04f;
}

.mgk-destaque-feedback-danger {
  background: rgba(255, 83, 132, 0.15);
  color: #ff5384;
}

.mgk-destaque-migration-hint {
  margin-top: 12px;
  font-size: 0.8rem;
  color: #ffd943;
}

.mgk-destaque-crud-link {
  margin-top: 16px;
}

/* CRUD / detalhes — coluna central larga (igual ao mural) */
.mgk-destaques-crud .mgk-destaques-crud-main {
  width: 100%;
  min-width: 0;
}

.mgk-destaques-crud .mgk-destaques-crud-spacer {
  min-width: 0;
}

@media (max-width: 960px) {
  .mgk-destaques-crud .mgk-destaques-crud-spacer {
    display: none;
  }

  .mgk-destaques-crud .mgk-destaques-crud-main {
    grid-column: 1 / -1;
  }
}

.mgk-destaques-crud .widget-box,
.mgk-destaques-crud .mgk-destaque-post {
  width: 100%;
}

.mgk-destaques-crud .form-input input,
.mgk-destaques-crud .form-textarea textarea,
.content-grid .mgk-destaque-quick-post .form-input input,
.content-grid .mgk-destaque-quick-post .form-textarea textarea {
  background-color: #1d2333 !important;
  border: 1px solid #3f485f !important;
  color: #fff !important;
  border-radius: 12px;
}

body[data-mgk-theme="light"] .mgk-destaques-crud .form-input input,
body[data-mgk-theme="light"] .mgk-destaques-crud .form-textarea textarea {
  background-color: #fff !important;
  border-color: #eaeaf5 !important;
  color: #3e3f5e !important;
}

.mgk-destaques-crud .mgk-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.mgk-crud-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mgk-crud-list-item {
  padding: 16px;
}

.mgk-crud-list-text {
  color: #adafca;
  line-height: 1.6;
  margin-bottom: 12px;
}

.mgk-crud-thumb {
  width: 100%;
  max-width: 280px;
  max-height: 180px;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}

.mgk-crud-thumb img {
  width: 100%;
  height: auto;
  max-height: 180px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.mgk-crud-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mgk-destaque-crud-form label {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-weight: 700;
}

body[data-mgk-theme="light"] .mgk-destaque-crud-form label {
  color: #3e3f5e;
}

.mgk-destaques-timeline .simple-dropdown-link {
  display: block;
  padding: 8px 16px;
  color: #adafca;
  text-decoration: none;
}

.mgk-destaques-timeline .simple-dropdown-link:hover {
  color: #23d2e2;
}

@media (max-width: 960px) {
  .mgk-destaques-timeline.grid-3-6-3 {
    grid-template-columns: 1fr;
  }
}

/* --- Painel do aluno (profile-stats overview.html) --- */
.mgk-aluno-profile-stats.profile-stats {
  margin-bottom: 24px;
  overflow: visible;
  height: auto !important;
  min-height: 0;
  padding-bottom: 24px !important;
}

.mgk-aluno-profile-stats .profile-stats-cover {
  padding: 20px 16px 28px;
}

.mgk-aluno-profile-stats .profile-stats-cover-text {
  font-size: 0.85rem;
  line-height: 1.35;
  padding: 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mgk-aluno-profile-stats .profile-stats-info {
  padding: 0 20px 24px;
  overflow: visible;
}

.mgk-aluno-profile-stats .mgk-photo-hex {
  margin-top: -40px;
}

.mgk-aluno-profile-stats .featured-stat-list {
  margin-top: 18px;
  padding: 0 4px;
  gap: 8px;
}

.mgk-aluno-profile-stats .featured-stat {
  padding: 8px 4px;
}

.mgk-aluno-profile-stats .featured-stat-title {
  margin-top: 6px;
}

.mgk-aluno-profile-stats .featured-stat-subtitle,
.mgk-aluno-profile-stats .featured-stat-text {
  margin-top: 4px;
}

.mgk-aluno-profile-stats .featured-stat-text a {
  color: #23d2e2;
  text-decoration: none;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.mgk-aluno-profile-stats .featured-stat-text a:hover {
  text-decoration: underline;
}

.mgk-progress-mini {
  width: 88%;
  max-width: 120px;
  height: 8px;
  border-radius: 8px;
  background: #2f3749;
  overflow: hidden;
  margin: 8px auto 10px;
}

.mgk-progress-mini-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s ease;
}

.mgk-progress-mini-bar.xp {
  background: linear-gradient(90deg, #ffd700, #ff8c00);
}

.mgk-progress-mini-bar.level {
  background: linear-gradient(90deg, #23d2e2, #7750f8);
}

.mgk-aluno-rank-title {
  text-align: center;
  font-weight: 700;
  color: #fff;
  margin: 16px 0 12px;
  font-size: 0.9rem;
  padding: 0 12px;
}

.mgk-aluno-currency-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 16px;
  padding: 0 8px;
}

.mgk-aluno-currency {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #21283b;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 72px;
  justify-content: center;
}

.mgk-aluno-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
  padding: 0 16px 8px;
  width: 100%;
  box-sizing: border-box;
}

.mgk-aluno-quick-links .button {
  flex: 1 1 100px;
  min-width: 0;
  max-width: 140px;
  text-align: center;
  justify-content: center;
}

/* Cards de atividades (stats-box) */
.mgk-aluno-activities .mgk-aluno-activity-card.stats-box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-bottom: 20px;
  min-height: 280px;
  margin-bottom: 0;
}

.mgk-aluno-activity-card .stats-box-value-wrap {
  padding-top: 8px;
}

.mgk-aluno-activity-card .mgk-activity-letter {
  font-size: 1.75rem;
  line-height: 1;
}

.mgk-aluno-activity-card .stats-box-title,
.mgk-aluno-activity-card .stats-box-text {
  padding: 0 16px;
}

.mgk-aluno-activity-picker {
  margin-top: auto;
  padding: 16px 20px 0;
  width: 100%;
  box-sizing: border-box;
}

.mgk-aluno-picker-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.mgk-discipline-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #3f485f;
  background-color: #1d2333;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  appearance: auto;
}

.mgk-discipline-select:focus {
  border-color: #7750f8;
  outline: none;
}

.mgk-discipline-select option {
  background: #1d2333;
  color: #fff;
  padding: 8px;
}

/* Página de badges (badges.html) */
.mgk-badges-page-grid .badge-item-stat {
  padding: 28px 20px 24px;
  min-height: 320px;
}

.mgk-badges-page-grid .badge-item-stat-image-preview {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin: 0 auto 8px;
  opacity: 0.85;
}

.mgk-badges-page-grid .badge-item-stat-image {
  display: block;
  width: auto;
  max-width: 140px;
  max-height: 140px;
  object-fit: contain;
  margin: 12px auto 16px;
}

.mgk-badges-page-grid .badge-item-stat-title {
  padding: 0 12px;
  line-height: 1.3;
  word-break: break-word;
}

.mgk-badges-page-grid .badge-item-stat-text {
  padding: 8px 12px 16px;
  line-height: 1.4;
}

.mgk-badges-page-grid .progress-stat {
  width: 100%;
  padding: 0 8px;
  margin-top: 4px;
}

.mgk-badges-page-grid .progress-stat-bar {
  height: 6px;
  border-radius: 4px;
  background: #2f3749;
}

.mgk-badge-unlocked .mgk-badge-progress-bar {
  width: 100% !important;
  background: linear-gradient(90deg, #1df377, #ffd200);
}

.mgk-badge-unlocked .bar-progress-text {
  font-weight: 700;
  letter-spacing: 0.05em;
}

body[data-mgk-theme="light"] .mgk-aluno-rank-title {
  color: #3e3f5e;
}

body[data-mgk-theme="light"] .mgk-aluno-currency {
  background: #f5f6fa;
  color: #3e3f5e;
}

body[data-mgk-theme="light"] .mgk-discipline-select {
  background: #fff;
  color: #3e3f5e;
  border-color: #eaeaf5;
}

body[data-mgk-theme="light"] .mgk-aluno-picker-label {
  color: #8f91ac;
}

/* --- Perfil + criador de avatar DiceBear --- */
.mgk-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  margin-top: 8px;
}

.mgk-profile-form-box .form-row.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mgk-profile-form .form-input input[readonly],
.mgk-profile-form .form-input input:read-only {
  opacity: 0.75;
  cursor: not-allowed;
}

.mgk-profile-feedback {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
}

.mgk-profile-feedback-success {
  background: rgba(64, 208, 79, 0.15);
  color: #40d04f;
  border: 1px solid rgba(64, 208, 79, 0.35);
}

.mgk-profile-feedback-danger {
  background: rgba(253, 93, 147, 0.12);
  color: #fd5d93;
  border: 1px solid rgba(253, 93, 147, 0.35);
}

.mgk-profile-hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #adafca;
}

.mgk-profile-avatar-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.mgk-profile-avatar-wrap .mgk-photo-hex {
  width: 120px;
  height: 130px;
}

.mgk-profile-role {
  margin: 0;
  font-size: 0.8rem;
  color: #adafca;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mgk-profile-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

body[data-mgk-theme="light"] .mgk-profile-name {
  color: #3e3f5e;
}

.mgk-profile-upload-form {
  width: 100%;
  margin-top: 8px;
}

.mgk-profile-upload-form input[type="file"] {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed #3f485f;
  background: #1d2333;
  color: #adafca;
  font-size: 0.85rem;
}

body[data-mgk-theme="light"] .mgk-profile-upload-form input[type="file"] {
  background: #fff;
  border-color: #eaeaf5;
  color: #3e3f5e;
}

.mgk-profile-avatar-btn {
  margin-top: 4px;
}

.button.full {
  width: 100%;
  justify-content: center;
}

.mgk-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.mgk-avatar-creator-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.mgk-avatar-creator-preview-hex {
  --mgk-avatar-bg: #b6e3f4;
  position: relative;
  width: 200px;
  height: 218px;
  margin: 0 auto;
}

.mgk-avatar-creator-preview-hex::before {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: 0;
  background: linear-gradient(155deg, #40d04f 0%, #40d04f 36%, #293249 40%, #293249 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.mgk-avatar-creator-preview-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--mgk-avatar-bg, #b6e3f4);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.mgk-avatar-creator-preview-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: transparent;
}

.mgk-avatar-creator-credit {
  margin-top: 14px;
  text-align: center;
  font-size: 0.8rem;
  color: #adafca;
}

.mgk-avatar-creator-credit a {
  color: #23d2e2;
}

.mgk-avatar-creator-controls .form-row.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.mgk-avatar-seed-actions {
  padding-bottom: 4px;
}

.mgk-avatar-creator-actions {
  margin-top: 24px;
}

.mgk-avatar-migration-hint {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 210, 0, 0.1);
  color: #ffd200;
  font-size: 0.85rem;
}

.mgk-avatar-creator input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid #3f485f;
  background: #1d2333;
  cursor: pointer;
}

.mgk-avatar-creator input[type="range"] {
  width: 100%;
  margin-top: 8px;
}

.mgk-avatar-extras-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #3f485f;
}

.mgk-avatar-extras-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

body[data-mgk-theme="light"] .mgk-avatar-extras-title {
  color: #3e3f5e;
}

.mgk-avatar-extras-hint,
.mgk-avatar-extras-empty {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: #adafca;
  line-height: 1.45;
}

.mgk-avatar-extra-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mgk-avatar-extra-item .form-input input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid #3f485f;
  background: #1d2333;
  cursor: pointer;
}

@media (max-width: 720px) {
  .mgk-avatar-extra-fields {
    grid-template-columns: 1fr;
  }
}

/* --- Agente de IA — botão robô + chat (todos os painéis) --- */
.mgk-ai-agent {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 10050;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.mgk-ai-agent-fab,
.mgk-ai-agent-panel {
  pointer-events: auto;
}

/* Robô flutuante — fora do card de mensagens, à esquerda do botão verde */
body.mgk-has-ai-agent .mgk-ai-agent-fab {
  position: fixed;
  right: 92px;
  bottom: 14px;
  z-index: 10051;
  width: 52px !important;
  min-width: 52px;
  max-width: 52px;
  height: 52px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #7750f8 0%, #23d2e2 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(35, 210, 226, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.mgk-has-ai-agent .mgk-ai-agent-fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 28px rgba(119, 80, 248, 0.5);
}

body.mgk-has-ai-agent.mgk-ai-agent-open .mgk-ai-agent-fab,
body.mgk-has-ai-agent.mgk-chat-open .mgk-ai-agent-fab {
  right: 312px;
}

body.mgk-has-ai-agent.mgk-ai-agent-open .mgk-ai-agent-panel,
body.mgk-has-ai-agent.mgk-chat-open .mgk-ai-agent-panel {
  right: 316px;
}

.mgk-ai-agent-fab-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
}

.mgk-ai-agent-fab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mgk-ai-agent-panel {
  position: fixed;
  right: 24px;
  left: auto;
  bottom: 96px;
  z-index: 10049;
  width: min(380px, calc(100vw - 48px));
  height: min(520px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: #21283b;
  border: 1px solid #3f485f;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

body[data-mgk-theme="light"] .mgk-ai-agent-panel {
  background: #fff;
  border-color: #eaeaf5;
}

.mgk-ai-agent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #1d2333;
  border-bottom: 1px solid #3f485f;
}

body[data-mgk-theme="light"] .mgk-ai-agent-header {
  background: #f5f6fa;
  border-color: #eaeaf5;
}

.mgk-ai-agent-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mgk-ai-agent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7750f8, #23d2e2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mgk-ai-agent-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

body[data-mgk-theme="light"] .mgk-ai-agent-title {
  color: #3e3f5e;
}

.mgk-ai-agent-subtitle {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: #adafca;
}

.mgk-ai-agent-header-actions {
  display: flex;
  gap: 6px;
}

.mgk-ai-agent-icon-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: #293249;
  color: #adafca;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mgk-ai-agent-icon-btn:hover {
  color: #23d2e2;
  background: #323a50;
}

.mgk-ai-agent-messages {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.mgk-ai-msg {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.mgk-ai-msg--bot {
  align-items: flex-start;
}

.mgk-ai-msg--user {
  align-items: flex-end;
}

.mgk-ai-msg-author {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #adafca;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  max-width: 100%;
}

.mgk-ai-msg--user .mgk-ai-msg-author {
  color: #23d2e2;
}

.mgk-ai-msg-bubble {
  display: block;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 88%;
  width: auto;
  min-width: 2.5rem;
  box-sizing: border-box;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.mgk-ai-msg--bot .mgk-ai-msg-bubble {
  background: #293249;
  color: #fff;
  border-bottom-left-radius: 4px;
}

.mgk-ai-msg--user .mgk-ai-msg-bubble {
  background: linear-gradient(135deg, #7750f8, #5a3fd4);
  color: #fff;
  border-bottom-right-radius: 4px;
}

body[data-mgk-theme="light"] .mgk-ai-msg--bot .mgk-ai-msg-bubble {
  background: #f0f2f8;
  color: #3e3f5e;
}

.mgk-ai-msg-bubble p {
  margin: 0 0 0.5em;
}

.mgk-ai-msg-bubble p:last-child {
  margin-bottom: 0;
}

.mgk-ai-md-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0.65em 0 0.35em !important;
  color: #23d2e2;
}

.mgk-ai-msg-bubble .mgk-ai-md-title:first-child {
  margin-top: 0 !important;
}

.mgk-ai-md-list {
  margin: 0.35em 0 0.5em;
  padding-left: 1.15em;
  list-style: disc;
}

.mgk-ai-md-list--num {
  list-style: decimal;
}

.mgk-ai-md-list li {
  margin-bottom: 0.35em;
  line-height: 1.4;
}

.mgk-ai-msg-bubble strong {
  font-weight: 700;
}

.mgk-ai-agent-form {
  padding: 12px 14px 14px;
  border-top: 1px solid #3f485f;
}

body[data-mgk-theme="light"] .mgk-ai-agent-form {
  border-color: #eaeaf5;
}

.mgk-ai-agent-form .interactive-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mgk-ai-agent-form .interactive-input input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 48px;
}

.mgk-ai-agent-send {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #23d2e2;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mgk-ai-agent-send:hover {
  background: #1bb8c9;
}

.mgk-ai-typing span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 2px;
  border-radius: 50%;
  background: #adafca;
  animation: mgk-ai-dot 1.2s infinite ease-in-out;
}

.mgk-ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.mgk-ai-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes mgk-ai-dot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

@media (max-width: 520px) {
  body.mgk-has-ai-agent .mgk-ai-agent-fab {
    right: 84px;
    bottom: 10px;
    width: 48px !important;
    min-width: 48px;
    max-width: 48px;
    height: 48px;
  }

  body.mgk-has-ai-agent.mgk-ai-agent-open .mgk-ai-agent-fab,
  body.mgk-has-ai-agent.mgk-chat-open .mgk-ai-agent-fab {
    right: 292px;
  }

  .mgk-ai-agent-panel,
  body.mgk-has-ai-agent.mgk-ai-agent-open .mgk-ai-agent-panel,
  body.mgk-has-ai-agent.mgk-chat-open .mgk-ai-agent-panel {
    right: 12px;
    left: 12px;
    bottom: 84px;
    width: auto;
  }
}

@media (max-width: 960px) {
  .mgk-profile-layout {
    grid-template-columns: 1fr;
  }

  .mgk-profile-form-box .form-row.split {
    grid-template-columns: 1fr;
  }

  .mgk-avatar-creator-layout {
    grid-template-columns: 1fr;
  }
}

/* ——— Créditos / financeiro aluno ——— */
.mgk-creditos-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mgk-creditos-saldo-box {
  background: linear-gradient(135deg, #615dfa 0%, #23d2e2 100%);
  border: none;
}

.mgk-creditos-saldo-box--low {
  background: linear-gradient(135deg, #f7941d 0%, #ffb347 100%);
}

.mgk-creditos-saldo-box--zero {
  background: linear-gradient(135deg, #e44d4d 0%, #ff6b6b 100%);
}

.mgk-creditos-saldo-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: #fff;
}

.mgk-creditos-saldo-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.mgk-creditos-saldo-value {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.mgk-creditos-saldo-hint {
  font-size: 0.85rem;
  opacity: 0.85;
  margin: 4px 0 0;
}

.mgk-creditos-filter {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mgk-creditos-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.mgk-creditos-stat {
  padding: 14px;
  border-radius: 12px;
  background: rgba(97, 93, 250, 0.08);
  border: 1px solid rgba(97, 93, 250, 0.15);
}

body[data-mgk-theme="dark"] .mgk-creditos-stat {
  background: rgba(119, 80, 248, 0.12);
  border-color: rgba(119, 80, 248, 0.25);
}

.mgk-creditos-stat-label {
  display: block;
  font-size: 0.78rem;
  opacity: 0.8;
  margin-bottom: 6px;
  color: #1f2430;
}

.mgk-creditos-stat-value {
  font-size: 1.35rem;
  color: #111827;
  font-weight: 700;
}

body[data-mgk-theme="dark"] .mgk-creditos-stat-label {
  color: #ffffff;
  opacity: 0.88;
}

body[data-mgk-theme="dark"] .mgk-creditos-stat-value {
  color: #ffffff;
}

.mgk-creditos-stat-value--add {
  color: #2ecc71;
}

.mgk-creditos-stat-value--sub {
  color: #e74c3c;
}

.mgk-creditos-op {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.mgk-creditos-op--add {
  background: rgba(46, 204, 113, 0.15);
  color: #27ae60;
}

.mgk-creditos-op--sub {
  background: rgba(231, 76, 60, 0.15);
  color: #c0392b;
}

.mgk-credito-notif-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mgk-credito-notif-item {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #dedeea;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body[data-mgk-theme="dark"] .mgk-credito-notif-item {
  background: #1d2333;
  border-color: #3f485f;
}

.mgk-credito-notif-item:hover {
  border-color: #615dfa;
  box-shadow: 0 4px 16px rgba(97, 93, 250, 0.12);
}

.mgk-credito-notif-item--unread {
  border-left: 4px solid #615dfa;
}

.mgk-credito-notif-item-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.mgk-credito-notif-item-text {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 6px;
}

.mgk-credito-notif-item-date {
  font-size: 0.75rem;
  opacity: 0.65;
}

.mgk-credito-notif-meta {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.mgk-credito-notif-meta li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body[data-mgk-theme="dark"] .mgk-credito-notif-meta li {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.mgk-notif-credito-item {
  display: block;
  text-align: left;
}

.mgk-notif-credito-item--unread .mgk-notif-credito-title {
  font-weight: 700;
}

.mgk-notif-credito-title {
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.mgk-notif-credito-text {
  font-size: 0.78rem;
  opacity: 0.8;
  line-height: 1.3;
}

/* Badge do sininho (notificações) */
.mgk-notif-badge {
  position: absolute;
  top: 10px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.45);
  pointer-events: none;
}

.header .action-list .action-list-item {
  position: relative;
}

.mgk-notif-empty {
  padding: 12px 16px;
  font-size: 0.85rem;
  opacity: 0.75;
  margin: 0;
}

.mgk-notif-inline-count {
  font-weight: 700;
  color: #e74c3c;
}

.mgk-notif-dropdown .dropdown-box-list-item {
  white-space: normal;
}

/* Toast alerta de créditos no login */
.mgk-credito-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000001;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 380px;
  padding: 18px 20px 18px 16px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  color: #fff;
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.mgk-credito-toast--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mgk-credito-toast--low {
  background: linear-gradient(135deg, #f7941d 0%, #ff9f43 55%, #ffb347 100%);
}

.mgk-credito-toast--zero {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 55%, #ff6b6b 100%);
}

.mgk-credito-toast-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
}

.mgk-credito-toast-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.mgk-credito-toast-text {
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 10px;
  opacity: 0.95;
}

.mgk-credito-toast-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
}

.mgk-credito-toast-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  padding: 0;
}

.mgk-credito-toast-close:hover {
  opacity: 1;
}

.mgk-creditos-top-actions {
  margin-bottom: 4px;
}

.mgk-creditos-feedback--ok .widget-box-content {
  border-left: 4px solid #2ecc71;
}

.mgk-creditos-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mgk-creditos-input-row input {
  max-width: 120px;
}

.mgk-creditos-input-hint {
  font-size: 0.78rem;
  opacity: 0.7;
  white-space: nowrap;
}

.mgk-creditos-uso-valor {
  color: #e6c619 !important;
  font-weight: 700;
}

.mgk-creditos-hint--sub {
  color: #d4a017 !important;
  opacity: 1;
  font-weight: 700;
}

.mgk-creditos-hint--sub .mgk-creditos-hint-icon {
  color: #d4a017;
  font-size: 16px;
  vertical-align: middle;
  margin-right: 2px;
}

.mgk-btn-virar-creditos {
  background: #e74c3c !important;
  color: #fff !important;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.mgk-btn-virar-creditos:hover {
  background: #c0392b !important;
}

.mgk-prof-fin-subtotal {
  margin-top: 12px;
  font-size: 0.95rem;
}

@media (max-width: 520px) {
  .mgk-creditos-stats {
    grid-template-columns: 1fr;
  }

  .mgk-credito-toast {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* --- Relatório de alunos (admin) --- */
.mgk-relatorio-alunos-page .mgk-relatorio-alunos-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.mgk-relatorio-alunos-page .paragraph,
.mgk-relatorio-alunos-detalhe .paragraph,
.mgk-relatorio-aluno-meta {
  color: #adafca;
}

body[data-mgk-theme="light"] .mgk-relatorio-alunos-page .paragraph,
body[data-mgk-theme="light"] .mgk-relatorio-alunos-detalhe .paragraph,
body[data-mgk-theme="light"] .mgk-relatorio-aluno-meta {
  color: #3e3f5e;
}

.mgk-relatorio-alunos-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.mgk-relatorio-alunos-stat {
  background: rgba(97, 93, 250, 0.1);
  border: 1px solid rgba(119, 80, 248, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
}

body[data-mgk-theme="dark"] .mgk-relatorio-alunos-stat {
  background: rgba(119, 80, 248, 0.14);
  border-color: rgba(119, 80, 248, 0.3);
}

body[data-mgk-theme="light"] .mgk-relatorio-alunos-stat {
  background: rgba(119, 80, 248, 0.06);
  border-color: rgba(119, 80, 248, 0.15);
}

.mgk-relatorio-alunos-stat-label {
  display: block;
  font-size: 0.78rem;
  color: #adafca;
  margin-bottom: 6px;
}

body[data-mgk-theme="light"] .mgk-relatorio-alunos-stat-label {
  color: #8f91ac;
}

.mgk-relatorio-alunos-stat-value {
  display: block;
  font-size: 1.2rem;
  color: #fff;
  font-weight: 700;
}

body[data-mgk-theme="light"] .mgk-relatorio-alunos-stat-value {
  color: #3e3f5e;
}

.mgk-relatorio-alunos-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.mgk-relatorio-alunos-page .form-input input[type="text"],
.mgk-relatorio-alunos-detalhe .form-input input[type="text"] {
  background-color: #1d2333 !important;
  border: 1px solid #3f485f !important;
  color: #fff !important;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 1rem;
  font-weight: 700;
}

body[data-mgk-theme="light"] .mgk-relatorio-alunos-page .form-input input[type="text"],
body[data-mgk-theme="light"] .mgk-relatorio-alunos-detalhe .form-input input[type="text"] {
  background-color: #fff !important;
  border-color: #dedeea !important;
  color: #3e3f5e !important;
}

.mgk-relatorio-alunos-page .form-input input::placeholder,
.mgk-relatorio-alunos-detalhe .form-input input::placeholder {
  color: #6b7289 !important;
  opacity: 1;
}

.mgk-relatorio-aulas-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.mgk-relatorio-aulas-search {
  flex: 1;
  min-width: 240px;
  max-width: 480px;
  margin: 0;
}

.mgk-relatorio-aulas-toolbar .button {
  width: auto;
  flex-shrink: 0;
  margin: 0;
}

.mgk-relatorio-empty {
  margin: 0;
}

.mgk-relatorio-alunos-page .table,
.mgk-relatorio-alunos-detalhe .table {
  width: 100%;
  color: #adafca;
  border-collapse: collapse;
  margin-top: 0;
  font-size: 0.85rem;
}

.mgk-relatorio-alunos-page .table thead th,
.mgk-relatorio-alunos-detalhe .table thead th {
  background: #21283b !important;
  color: #fff !important;
  border-color: #2f3749 !important;
  padding: 12px 14px;
}

.mgk-relatorio-alunos-page .table td,
.mgk-relatorio-alunos-detalhe .table td {
  color: #adafca !important;
  border-color: #2f3749 !important;
  padding: 10px 14px;
  vertical-align: top;
}

.mgk-relatorio-alunos-page .table-striped tbody tr:nth-of-type(odd) td,
.mgk-relatorio-alunos-detalhe .table-striped tbody tr:nth-of-type(odd) td {
  background: rgba(37, 43, 61, 0.45) !important;
}

.mgk-relatorio-alunos-page .table-striped tbody tr:nth-of-type(even) td,
.mgk-relatorio-alunos-detalhe .table-striped tbody tr:nth-of-type(even) td {
  background: rgba(29, 35, 51, 0.65) !important;
}

body[data-mgk-theme="light"] .mgk-relatorio-alunos-page .table,
body[data-mgk-theme="light"] .mgk-relatorio-alunos-detalhe .table {
  color: #3e3f5e;
}

body[data-mgk-theme="light"] .mgk-relatorio-alunos-page .table thead th,
body[data-mgk-theme="light"] .mgk-relatorio-alunos-detalhe .table thead th {
  background: #f5f5fa !important;
  color: #3e3f5e !important;
  border-color: #eaeaf5 !important;
}

body[data-mgk-theme="light"] .mgk-relatorio-alunos-page .table td,
body[data-mgk-theme="light"] .mgk-relatorio-alunos-detalhe .table td {
  color: #3e3f5e !important;
  border-color: #eaeaf5 !important;
}

body[data-mgk-theme="light"] .mgk-relatorio-alunos-page .table-striped tbody tr:nth-of-type(odd) td,
body[data-mgk-theme="light"] .mgk-relatorio-alunos-detalhe .table-striped tbody tr:nth-of-type(odd) td {
  background: #fafafa !important;
}

body[data-mgk-theme="light"] .mgk-relatorio-alunos-page .table-striped tbody tr:nth-of-type(even) td,
body[data-mgk-theme="light"] .mgk-relatorio-alunos-detalhe .table-striped tbody tr:nth-of-type(even) td {
  background: #fff !important;
}

.mgk-relatorio-section-title {
  font-size: 0.95rem;
  margin: 20px 0 8px;
  color: #fff;
}

body[data-mgk-theme="light"] .mgk-relatorio-section-title {
  color: #3e3f5e;
}

.mgk-relatorio-table {
  width: 100%;
  font-size: 0.85rem;
}

.mgk-relatorio-aluno-periodo {
  font-size: 0.8rem;
  font-weight: normal;
  opacity: 0.75;
  margin-left: 8px;
}

.mgk-relatorio-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: #adafca;
}

body[data-mgk-theme="light"] .mgk-relatorio-list {
  color: #3e3f5e;
}

.mgk-relatorio-alunos-detalhe .widget-box + .widget-box {
  margin-top: 16px;
}

/* Videoaulas — player interativo do aluno */
.mgk-aulas-page {
  margin-top: 8px;
}

.mgk-aulas-filter {
  margin-bottom: 16px;
}

.mgk-aulas-filter-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
}

.mgk-aulas-filter-form {
  flex: 1 1 320px;
}

.mgk-aulas-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mgk-aulas-period-label {
  margin: 0;
  font-size: 0.9rem;
  color: #adafca;
  align-self: center;
}

body[data-mgk-theme="light"] .mgk-aulas-period-label {
  color: #6b6d80;
}

.mgk-aulas-player {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.mgk-aulas-player.is-theater {
  grid-template-columns: 1fr;
}

.mgk-aulas-player.is-theater .mgk-aulas-playlist {
  display: none;
}

.mgk-aulas-player.is-theater .mgk-aulas-video-ratio {
  padding-top: 48%;
}

@media (max-width: 991px) {
  .mgk-aulas-player {
    grid-template-columns: 1fr;
  }
}

.mgk-aulas-playlist-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.mgk-aulas-playlist-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid #2f3749;
  border-radius: 10px;
  background: #1d2333;
  color: #fff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

body[data-mgk-theme="light"] .mgk-aulas-playlist-item {
  background: #fff;
  color: #3e3f5e;
  border-color: #e3e6ee;
}

.mgk-aulas-playlist-item:hover,
.mgk-aulas-playlist-item.is-active {
  border-color: #7750f8;
  background: rgba(119, 80, 248, 0.12);
  transform: translateY(-1px);
}

.mgk-aulas-playlist-item.is-watched:not(.is-active) {
  opacity: 0.88;
}

.mgk-aulas-playlist-thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #13151f;
}

.mgk-aulas-playlist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mgk-aulas-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #7750f8;
}

.mgk-aulas-playlist-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mgk-aulas-playlist-index {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7750f8;
  font-weight: 600;
}

.mgk-aulas-playlist-title {
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 600;
}

.mgk-aulas-playlist-date {
  font-size: 0.75rem;
  color: #adafca;
}

body[data-mgk-theme="light"] .mgk-aulas-playlist-date {
  color: #8f90a0;
}

.mgk-aulas-watched-icon {
  color: #61d36f;
  font-size: 20px;
}

.mgk-aulas-video-shell {
  position: relative;
  background: #000;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.mgk-aulas-video-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

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

.mgk-aulas-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  pointer-events: none;
}

.mgk-aulas-video-overlay .material-icons {
  font-size: 56px;
  opacity: 0.85;
}

.mgk-aulas-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #2f3749;
  background: #1d2333;
  border-radius: 0 0 12px 12px;
}

body[data-mgk-theme="light"] .mgk-aulas-controls {
  background: #f8f8fb;
  border-color: #e3e6ee;
}

.mgk-aulas-controls .button.is-active {
  color: #7750f8;
}

.mgk-aulas-progress-wrap {
  flex: 1;
  min-width: 0;
}

.mgk-aulas-now {
  display: block;
  font-size: 0.78rem;
  color: #adafca;
  margin-bottom: 4px;
}

.mgk-aulas-progress {
  height: 6px;
  border-radius: 999px;
  background: #2f3749;
  overflow: hidden;
}

.mgk-aulas-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7750f8, #4fd1c5);
  transition: width 0.25s ease;
}

.mgk-aulas-meta {
  margin-top: 14px;
}

.mgk-aulas-meta-date {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: #adafca;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mgk-aulas-meta-title {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.mgk-aulas-meta-desc {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #adafca;
}

body[data-mgk-theme="light"] .mgk-aulas-meta-desc {
  color: #3e3f5e;
}

.mgk-aulas-meta-desc p {
  margin: 0 0 8px;
}

.mgk-aulas-comments {
  margin-top: 14px;
}

.mgk-aulas-comment-sent {
  padding: 12px;
  border-radius: 10px;
  background: rgba(97, 211, 111, 0.1);
  border: 1px solid rgba(97, 211, 111, 0.35);
}

.mgk-aulas-replies {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.mgk-aulas-reply + .mgk-aulas-reply {
  margin-top: 8px;
}

.mgk-aulas-empty {
  margin-top: 16px;
}

/* Auditoria administrativa */
.mgk-audit-page .mgk-audit-intro .paragraph {
  margin: 0 0 8px;
}

.mgk-audit-retention code {
  font-size: 0.82rem;
  word-break: break-all;
}

.mgk-audit-filter-form .form-row.split {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.mgk-audit-filter-form .form-item {
  min-width: 0;
}

.mgk-audit-filter-form .form-input {
  width: 100%;
  margin: 0;
}

.mgk-audit-filter-form .form-input.small label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #adafca;
  margin-bottom: 8px;
}

.mgk-audit-filter-form .form-input input,
.mgk-audit-filter-form .form-input select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  background-color: #1d2333;
  border: 1px solid #3f485f;
  border-radius: 12px;
  color: #fff;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
}

.mgk-audit-filter-form .form-input input[type="date"] {
  color-scheme: dark;
  line-height: 1.2;
}

.mgk-audit-filter-form .form-input input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  cursor: pointer;
  opacity: 0.9;
}

.mgk-audit-filter-form .form-input select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23adafca' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.mgk-audit-filter-form .form-input input::placeholder {
  color: #6b7289;
  opacity: 1;
}

body[data-mgk-theme="light"] .mgk-audit-filter-form .form-input.small label {
  color: #3e3f5e;
}

body[data-mgk-theme="light"] .mgk-audit-filter-form .form-input input,
body[data-mgk-theme="light"] .mgk-audit-filter-form .form-input select {
  background-color: #fff;
  border-color: #dedeea;
  color: #3e3f5e;
}

body[data-mgk-theme="light"] .mgk-audit-filter-form .form-input input[type="date"] {
  color-scheme: light;
}

body[data-mgk-theme="light"] .mgk-audit-filter-form .form-input input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
}

@media (max-width: 1200px) {
  .mgk-audit-filter-form .form-row.split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .mgk-audit-filter-form .form-row.split {
    grid-template-columns: 1fr;
  }
}

.mgk-audit-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mgk-audit-results-head {
  padding-bottom: 0;
}

.mgk-audit-count {
  margin: 0;
  font-size: 0.9rem;
  color: #adafca;
}

.mgk-audit-table-wrap {
  overflow-x: auto;
}

.mgk-audit-table {
  width: 100%;
  font-size: 0.85rem;
}

.mgk-audit-table th,
.mgk-audit-table td {
  vertical-align: top;
  padding: 10px 8px;
}

.mgk-audit-action-label {
  display: block;
  margin-bottom: 4px;
}

.mgk-audit-action-code {
  display: block;
  font-size: 0.75rem;
  opacity: 0.85;
}

.mgk-audit-details summary {
  cursor: pointer;
  color: #7750f8;
  margin-bottom: 4px;
}

.mgk-audit-details ul {
  margin: 6px 0 8px;
  padding-left: 18px;
}

.mgk-audit-details li {
  margin-bottom: 2px;
}

.mgk-audit-tech {
  margin-top: 8px;
  max-height: 220px;
  overflow: auto;
  font-size: 0.72rem;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  white-space: pre-wrap;
  word-break: break-word;
}

.mgk-audit-tech.hidden {
  display: none;
}

.mgk-audit-empty {
  text-align: center;
  padding: 24px;
  color: #adafca;
}

.mgk-audit-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0 4px;
}

body[data-mgk-theme="light"] .mgk-audit-count {
  color: #3e3f5e;
}

body[data-mgk-theme="light"] .mgk-audit-tech {
  background: #f0f2f8;
}
