:root {
  color-scheme: light;
  --mipop-primary: #0d6efd;
  --mipop-ink: #1f2937;
}

[x-cloak] {
  display: none !important;
}

body {
  font-family: "Noto Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.app-shell {
  background: #f6f8fb;
}

.matoxi-shell .top-header .navbar,
.matoxi-auth-page {
  letter-spacing: 0;
}

.matoxi-shell .breadcrumb .material-icons-outlined {
  font-size: 20px;
  line-height: 1;
}

.matoxi-shell .dropdown-user .dropdown-item {
  border-radius: 0.65rem;
  margin: 0.15rem 0.5rem;
  width: calc(100% - 1rem);
}

.matoxi-shell .dropdown-user .dropdown-item .material-icons-outlined {
  font-size: 20px;
}

.matoxi-shell .language-menu {
  min-width: 13rem;
  padding: 0.4rem;
}

.matoxi-shell .language-menu .dropdown-item {
  width: 100%;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.matoxi-shell .language-menu .dropdown-item.active {
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

.matoxi-shell .language-menu .dropdown-item span[aria-hidden="true"],
.matoxi-shell .top-header [aria-label="Idioma"] span[aria-hidden="true"],
.matoxi-shell .top-header [aria-label="Language"] span[aria-hidden="true"] {
  font-size: 1.15rem;
  line-height: 1;
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d6efd, #02c27a);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.sidebar-wrapper .sidebar-header .logo-img {
  width: 36px;
  height: 36px;
}

.sidebar-wrapper .sidebar-header .mipop-theme-logo-dark {
  display: none;
}

html[data-bs-theme="dark"] .sidebar-wrapper .sidebar-header .mipop-theme-logo-light {
  display: none;
}

html[data-bs-theme="dark"] .sidebar-wrapper .sidebar-header .mipop-theme-logo-dark {
  display: block;
}

.sidebar-wrapper {
  display: flex;
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-wrapper .sidebar-header {
  position: relative;
  top: auto;
  width: 100%;
  flex: 0 0 70px;
}

.sidebar-wrapper .sidebar-nav {
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
  margin-top: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.sidebar-wrapper .sidebar-bottom {
  position: relative;
  bottom: auto;
  width: 100%;
  flex: 0 0 70px;
}

.sidebar-wrapper .sidebar-nav .sidebar-nav-collapsed {
  display: none;
}

.sidebar-wrapper .sidebar-group-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 6px 16px;
  border: 0;
  border-radius: 0.75rem;
  outline: 0;
  color: #5f5f5f;
  background: transparent;
  font: inherit;
  font-size: 15px;
  text-align: left;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.sidebar-wrapper .sidebar-group-toggle .parent-icon {
  line-height: 1;
}

.sidebar-wrapper .sidebar-group-toggle .menu-title {
  min-width: 0;
  flex: 1;
  margin-left: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-wrapper .sidebar-group-toggle:hover,
.sidebar-wrapper .sidebar-group-toggle:focus-visible {
  color: #008cff;
  background-color: rgba(0, 140, 255, 0.05);
}

.sidebar-wrapper .sidebar-group.has-active > .sidebar-group-toggle {
  color: #008cff;
  background-color: rgba(13, 110, 253, 0.09);
}

.sidebar-wrapper .sidebar-group-chevron {
  margin-left: 6px;
  font-size: 20px;
  transition: transform 0.2s ease;
}

.sidebar-wrapper .sidebar-group.is-open > .sidebar-group-toggle .sidebar-group-chevron {
  transform: rotate(180deg);
}

.sidebar-wrapper .sidebar-group-items[hidden] {
  display: none !important;
}

.sidebar-wrapper .sidebar-nav .metismenu .sidebar-group-items {
  padding: 2px 0 4px;
}

.sidebar-wrapper .sidebar-nav .metismenu .sidebar-child-item > a {
  padding-left: 28px;
  font-size: 14px;
}

.sidebar-wrapper .sidebar-nav .metismenu .sidebar-child-item .material-icons-outlined {
  font-size: 20px;
}

html[data-bs-theme="dark"] .sidebar-wrapper .sidebar-group-toggle {
  color: #a7acb1;
}

html[data-bs-theme="dark"] .sidebar-wrapper .sidebar-group-toggle:hover,
html[data-bs-theme="dark"] .sidebar-wrapper .sidebar-group-toggle:focus-visible,
html[data-bs-theme="dark"] .sidebar-wrapper .sidebar-group.has-active > .sidebar-group-toggle {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

.mipop-sidebar-tooltip {
  position: fixed;
  z-index: 2000;
  max-width: min(16rem, calc(100vw - 16px));
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.45rem;
  color: #f8fafc;
  background: #0f172a;
  box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.2);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mipop-sidebar-tooltip[hidden] {
  display: none !important;
}

.sidebar-wrapper .sidebar-bottom form {
  display: inline-flex;
}

.sidebar-wrapper .sidebar-bottom button.footer-icon {
  padding: 0;
}

@media (min-width: 1200px) {
  body.toggled .sidebar-wrapper .sidebar-nav-expanded {
    display: none;
  }

  body.toggled .sidebar-wrapper .sidebar-nav-collapsed {
    display: flex;
  }

  body.toggled .sidebar-wrapper .sidebar-header .sidebar-close,
  body.toggled .sidebar-wrapper:hover .sidebar-header .sidebar-close {
    display: none !important;
  }

  body.toggled .sidebar-wrapper .sidebar-header .logo-icon,
  body.toggled .sidebar-wrapper .sidebar-header .logo-img {
    flex: 0 0 36px;
  }

  body.toggled .sidebar-wrapper .sidebar-bottom {
    display: grid;
    grid-template-columns: repeat(2, 28px);
    grid-auto-rows: 28px;
    align-content: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    padding: 5px;
    gap: 4px !important;
    overflow: hidden;
  }

  body.toggled .sidebar-wrapper .sidebar-bottom > .dark-mode,
  body.toggled .sidebar-wrapper .sidebar-bottom > form {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0 !important;
  }

  body.toggled .sidebar-wrapper .sidebar-bottom > :last-child:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
  }

  body.toggled .sidebar-wrapper .sidebar-bottom .footer-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
  }

  body.toggled .sidebar-wrapper .sidebar-bottom .footer-icon .material-icons-outlined {
    font-size: 19px;
  }
}

.matoxi-shell .sidebar-nav .metismenu a {
  letter-spacing: 0;
}

.matoxi-shell .sidebar-nav .metismenu .mm-active > a {
  background-color: rgba(13, 110, 253, 0.09);
  border-radius: 0.75rem;
}

.wh-48 {
  width: 48px;
  height: 48px;
}

.wh-64 {
  width: 64px;
  height: 64px;
}

.matoxi-auth-page .section-authentication-cover {
  min-height: 100vh;
}

.matoxi-auth-page .auth-cover-left {
  background:
    radial-gradient(circle at 20% 20%, rgba(13, 110, 253, 0.08), transparent 32%),
    radial-gradient(circle at 78% 72%, rgba(2, 194, 122, 0.1), transparent 28%),
    #fff;
}

.matoxi-auth-page .auth-cover-card {
  width: min(100%, 500px);
}

.matoxi-auth-page .auth-brand {
  max-height: 42px;
  width: auto;
}

.matoxi-dashboard-card {
  overflow: hidden;
}

.matoxi-stat-icon {
  width: 48px;
  height: 48px;
}

.matoxi-mini-chart {
  min-height: 92px;
}

.table-scroll {
  overflow-x: auto;
}

.table-scroll table {
  margin-bottom: 0;
}

.table-scroll thead th {
  white-space: nowrap;
}

.mipop-empty-state {
  background: var(--bs-body-bg);
}

.matoxi-shell .rounded-lg.border.border-slate-200.bg-white,
.matoxi-shell form.rounded-lg.border.border-slate-200.bg-white,
.matoxi-shell section.rounded-lg.border.border-slate-200.bg-white {
  border-color: var(--bs-border-color) !important;
  border-radius: 1rem !important;
  box-shadow: 0 0.1rem 0.7rem rgba(0, 0, 0, 0.04) !important;
}

.matoxi-shell input[class*="border-slate"],
.matoxi-shell textarea[class*="border-slate"],
.matoxi-shell select[class*="border-slate"] {
  border-color: var(--bs-border-color) !important;
  border-radius: 0.7rem !important;
  background-color: var(--bs-body-bg);
}

.matoxi-shell input[class*="border-slate"]:focus,
.matoxi-shell textarea[class*="border-slate"]:focus,
.matoxi-shell select[class*="border-slate"]:focus {
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.16) !important;
}

.matoxi-shell table {
  color: var(--bs-body-color);
}

.table-scroll {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.table-scroll::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.sidebar-panel {
  transform: translateX(-100%);
  transition: transform 180ms ease;
}

.sidebar-panel.is-mobile-open {
  transform: translateX(0);
}

.shell-content {
  transition: padding-left 180ms ease;
}

@media (min-width: 1024px) {
  .sidebar-panel {
    transform: translateX(0);
  }

  .sidebar-panel.is-sidebar-collapsed {
    transform: translateX(-100%);
  }

  .shell-content {
    padding-left: 18rem;
  }

  .shell-content.is-sidebar-collapsed {
    padding-left: 0;
  }
}

.mipop-content h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.mipop-content p,
.mipop-content li {
  color: #334155;
  line-height: 1.75;
}

.mipop-content ul,
.mipop-content ol {
  margin: 0.75rem 0 0.75rem 1.35rem;
}

.mipop-content ul {
  list-style: disc;
}

.mipop-content ol {
  list-style: decimal;
}

.mipop-content a {
  color: #0369a1;
  font-weight: 700;
  text-decoration: underline;
}

.mipop-content img {
  display: block;
  height: auto;
  max-width: 100%;
}

.mipop-content img[data-import-key] {
  margin: 0.75rem auto;
  border: 1px solid #cbd5e1;
  break-inside: avoid;
  page-break-inside: avoid;
}

.mipop-content .mipop-imported-images {
  margin-top: 1rem;
}

.ql-editor img {
  cursor: grab;
  height: auto;
  max-width: 100%;
}

.ql-editor img.mipop-editor-image-selected {
  outline: 2px solid #0284c7;
  outline-offset: 3px;
}

.ql-editor img.mipop-editor-image-dragging {
  cursor: grabbing;
  opacity: 0.55;
}

.ql-editor {
  min-height: 190px;
  font-size: 0.95rem;
  line-height: 1.65;
}

[data-bs-theme=dark] .bg-white,
[data-bs-theme=dark] .bg-slate-50,
[data-bs-theme=dark] .bg-slate-100,
[data-bs-theme=dark] .bg-sky-50,
[data-bs-theme=dark] .bg-emerald-50,
[data-bs-theme=dark] .bg-amber-50,
[data-bs-theme=dark] .bg-rose-50,
[data-bs-theme=dark] .bg-violet-50,
[data-bs-theme=dark] .bg-fuchsia-50 {
  background-color: var(--bs-body-bg-2) !important;
}

dialog.organizational-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-height: 85dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: #fff;
}

dialog.organizational-dialog::backdrop {
  background: rgba(2, 6, 23, 0.65);
}

[data-bs-theme=dark] dialog.organizational-dialog {
  background-color: var(--bs-body-bg-2, #181c1f) !important;
  color: var(--bs-body-color, #e2e8f0) !important;
}

[data-bs-theme=dark] .text-slate-950,
[data-bs-theme=dark] .text-slate-900,
[data-bs-theme=dark] .text-slate-800,
[data-bs-theme=dark] .text-slate-700,
[data-bs-theme=dark] .text-slate-600 {
  color: var(--bs-body-color) !important;
}

[data-bs-theme=dark] .text-slate-500,
[data-bs-theme=dark] .text-slate-400 {
  color: #a7acb1 !important;
}

[data-bs-theme=dark] .border-slate-100,
[data-bs-theme=dark] .border-slate-200,
[data-bs-theme=dark] .border-slate-300 {
  border-color: var(--bs-border-color) !important;
}

[data-bs-theme=dark] input,
[data-bs-theme=dark] textarea,
[data-bs-theme=dark] select {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme=dark] :is(.mipop-show, .mipop-quick-view) .mipop-content {
  color: #e2e8f0;
}

[data-bs-theme=dark] .mipop-show .mipop-show-status.text-emerald-700 {
  color: #6ee7b7 !important;
}

[data-bs-theme=dark] .mipop-show .mipop-show-status.text-rose-700 {
  color: #fda4af !important;
}

[data-bs-theme=dark] .mipop-show .mipop-show-status.text-amber-700 {
  color: #fcd34d !important;
}

[data-bs-theme=dark] .mipop-show :is(.mipop-show-status.text-sky-700, .mipop-show-reference) {
  color: #7dd3fc !important;
}

[data-bs-theme=dark] :is(.mipop-show, .mipop-quick-view) .mipop-content :is(h1, h2, h3, h4, h5, h6) {
  color: #f8fafc !important;
}

[data-bs-theme=dark] :is(.mipop-show, .mipop-quick-view) .mipop-content :is(p, li, td, th, blockquote) {
  color: #cbd5e1 !important;
}

[data-bs-theme=dark] :is(.mipop-show, .mipop-quick-view) .mipop-content a {
  color: #7dd3fc !important;
}

[data-bs-theme=dark] :is(.mipop-show, .mipop-quick-view) .mipop-content [style*="color"] {
  color: inherit !important;
}

[data-bs-theme=dark] .mipop-quick-view .text-sky-800 {
  color: #7dd3fc !important;
}

[data-bs-theme=dark] .mipop-show > article.mipop-content .mipop-print > div:first-child {
  border-bottom-color: #475569 !important;
}

[data-bs-theme=dark] .mipop-show .mipop-ai-resource-playful {
  background-color: #2a1c31 !important;
  border-color: #674073 !important;
}

[data-bs-theme=dark] .mipop-show .mipop-ai-resource-flowchart {
  background-color: #132b38 !important;
  border-color: #28566d !important;
}

[data-bs-theme=dark] .mipop-show .mipop-ai-resource-checklist {
  background-color: #142d29 !important;
  border-color: #2b6255 !important;
}

[data-bs-theme=dark] .mipop-show .mipop-ai-resource-quiz {
  background-color: #241d38 !important;
  border-color: #58467f !important;
}

[data-bs-theme=dark] .mipop-show .mipop-ai-resource-playful .text-fuchsia-800 {
  color: #f0abfc !important;
}

[data-bs-theme=dark] .mipop-show .mipop-ai-resource-flowchart .text-sky-800 {
  color: #7dd3fc !important;
}

[data-bs-theme=dark] .mipop-show .mipop-ai-resource-checklist .text-emerald-800 {
  color: #6ee7b7 !important;
}

[data-bs-theme=dark] .mipop-show .mipop-ai-resource-quiz .text-violet-800 {
  color: #c4b5fd !important;
}

.mipop-checklist-compact > ul {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mipop-checklist-compact li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.mipop-checklist-box {
  flex: 0 0 auto;
  color: #059669;
  line-height: 1.4;
}

.mipop-checklist-title {
  position: relative;
  min-width: 0;
}

.mipop-checklist-title > strong {
  display: inline-block;
  color: #0f172a;
  line-height: 1.4;
  cursor: help;
}

.mipop-checklist-title > strong:focus-visible {
  border-radius: 3px;
  outline: 2px solid #10b981;
  outline-offset: 3px;
}

.mipop-checklist-tooltip {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  z-index: 20;
  width: max-content;
  max-width: min(28rem, 72vw);
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #334155;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.25rem);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  pointer-events: none;
}

.mipop-checklist-title:hover .mipop-checklist-tooltip,
.mipop-checklist-title:focus-within .mipop-checklist-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

[data-bs-theme=dark] .mipop-show .mipop-checklist-title > strong {
  color: #e2e8f0;
}

[data-bs-theme=dark] .mipop-show .mipop-checklist-box {
  color: #6ee7b7;
}

[data-bs-theme=dark] .mipop-show .mipop-checklist-tooltip {
  border-color: #475569;
  background: #0f172a;
  color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.6);
}

.mipop-ai-slides,
.mipop-ai-animation {
  color: #0f172a;
}

.mipop-ai-slides > header,
.mipop-ai-animation > header {
  margin-bottom: 1rem;
}

.mipop-ai-slides > header span,
.mipop-ai-animation > header span {
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mipop-ai-slides > header h3,
.mipop-ai-animation > header h3 {
  margin: 0.25rem 0 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.mipop-ai-frames {
  display: grid;
  gap: 1rem;
}

.mipop-ai-slides .mipop-ai-frames {
  grid-auto-columns: minmax(280px, 82%);
  grid-auto-flow: column;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
}

.mipop-ai-frame {
  min-height: 180px;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #0ea5e9;
  border-radius: 8px;
  background: #fff;
  scroll-snap-align: start;
}

.mipop-ai-frame-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

.mipop-ai-frame h4 {
  margin: 0.75rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 900;
}

.mipop-ai-frame strong {
  display: block;
  margin-top: 0.75rem;
  color: #9f1239;
}

.mipop-ai-animation .mipop-ai-frame {
  animation: mipop-ai-frame-reveal 7s ease-in-out infinite;
}

.mipop-ai-animation .mipop-ai-frame:nth-child(2) { animation-delay: 0.12s; }
.mipop-ai-animation .mipop-ai-frame:nth-child(3) { animation-delay: 0.24s; }
.mipop-ai-animation .mipop-ai-frame:nth-child(4) { animation-delay: 0.36s; }
.mipop-ai-animation .mipop-ai-frame:nth-child(5) { animation-delay: 0.48s; }
.mipop-ai-animation .mipop-ai-frame:nth-child(6) { animation-delay: 0.6s; }
.mipop-ai-animation .mipop-ai-frame:nth-child(7) { animation-delay: 0.72s; }
.mipop-ai-animation .mipop-ai-frame:nth-child(8) { animation-delay: 0.84s; }

@keyframes mipop-ai-frame-reveal {
  0%, 100% { transform: translateY(0); border-left-color: #0ea5e9; }
  45% { transform: translateY(-3px); border-left-color: #e11d48; }
}

@media (prefers-reduced-motion: reduce) {
  .mipop-ai-animation .mipop-ai-frame {
    animation: none;
  }
}

[data-bs-theme=dark] .mipop-ai-slides,
[data-bs-theme=dark] .mipop-ai-animation {
  color: var(--bs-body-color);
}

[data-bs-theme=dark] .mipop-ai-frame {
  border-color: var(--bs-border-color);
  background: var(--bs-body-bg-2);
}
