/* ESTILOS GLOBALES eMath365 Studio */
:root {
  --primary-color: #0d6efd;
  --bg-projector: #f8fafc;
  --bg-chalkboard: #11231a;
  --chalk-yellow: #facc15;
  --chalk-cyan: #38bdf8;
  --chalk-rose: #f43f5e;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
}

body {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   NUEVO MENÚ PRINCIPAL ESTILIZADO (OPCIÓN A: ISLA FLOTANTE GLASS DOCK)
   ========================================================================== */
.app-header-container {
  flex-shrink: 0;
  padding: 8px 16px;
  background: transparent;
  z-index: 1030;
  position: relative;
}

/* Base de la Isla Flotante */
.glass-dock {
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.07), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  padding: 5px 14px;
  transition: all 0.25s ease;
}

/* Marca / Logo */
.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #0d6efd, #4f46e5);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.28);
  transition: transform 0.2s ease;
}

.navbar-brand:hover .brand-icon {
  transform: scale(1.05);
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.4px;
  font-size: 1.12rem;
  color: #0f172a;
  line-height: 1;
}

.brand-accent {
  color: #0d6efd;
}

.brand-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 6px;
  background-color: #e0edff;
  color: #0d6efd;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Botones de Herramientas de Aula en el Dock */
.btn-dock-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-dock-tool:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-dock-tool:active {
  transform: translateY(0);
}

.btn-dock-tool.active,
.btn-dock-tool.btn-primary {
  background: #0d6efd !important;
  color: #ffffff !important;
  border-color: #0d6efd !important;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.35);
}

.btn-dock-theme {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(240, 253, 244, 0.7);
  color: #166534;
}

.btn-dock-theme:hover {
  background: #dcfce7;
  color: #15803d;
  border-color: #22c55e;
}

@media (max-width: 1199.98px) {
  .nav-tools-group {
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
  }
  body.theme-chalkboard .nav-tools-group {
    border-top-color: rgba(35, 62, 48, 0.6);
  }
}

.main-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

/* TEMA PIZARRA ESCOLAR */
body.theme-chalkboard {
  background-color: #0e1e16;
  color: #f1f5f9;
}

body.theme-chalkboard .glass-dock {
  background: rgba(18, 38, 28, 0.92);
  border-color: rgba(35, 62, 48, 0.85);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45), 0 0 15px rgba(74, 222, 128, 0.05);
}

body.theme-chalkboard .brand-title {
  color: #f1f5f9;
}

body.theme-chalkboard .brand-badge {
  background-color: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

body.theme-chalkboard .btn-dock-tool {
  background: #14281f;
  border-color: #233e30;
  color: #cbd5e1;
}

body.theme-chalkboard .btn-dock-tool:hover {
  background: #1d3b2c;
  color: #f1f5f9;
  border-color: #2f5440;
}

body.theme-chalkboard .btn-dock-theme {
  background: rgba(20, 83, 45, 0.4);
  border-color: rgba(74, 222, 128, 0.35);
  color: #4ade80;
}

body.theme-chalkboard .btn-dock-theme:hover {
  background: rgba(20, 83, 45, 0.7);
  color: #86efac;
}

body.theme-chalkboard aside {
  background-color: #13241b !important;
  border-color: #243d2f !important;
  color: #e2e8f0 !important;
}

body.theme-chalkboard .card {
  background-color: #182e22;
  border-color: #243e30;
  color: #f1f5f9;
}

body.theme-chalkboard .btn-outline-secondary {
  border-color: #3b5a48;
  color: #e2e8f0;
}

body.theme-chalkboard .btn-outline-secondary:hover {
  background-color: #243e30;
}

/* ESTILOS COMUNES DE PANELES */
.sidebar-panel {
  width: 380px;
  overflow-y: auto;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-panel-right {
  border-right: none !important;
  border-left: 1px solid #e2e8f0 !important;
}

body.theme-chalkboard .sidebar-panel-right {
  border-left: 1px solid #243d2f !important;
}

.canvas-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: #ffffff;
}

body.theme-chalkboard .canvas-container {
  background-color: #11231a;
}

/* DESLIZADORES */
input[type=range] {
  cursor: pointer;
  accent-color: #0d6efd;
}

body.theme-chalkboard input[type=range] {
  accent-color: #38bdf8;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
body.theme-chalkboard .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #2a4738;
}

/* ==========================================================================
   ESTILOS MENÚ PRINCIPAL (HOMOLOGADO CON eGestion360-Web)
   ========================================================================== */
/* Bootstrap 5.3 solo trae bg-opacity-10/25/50/75: sin esta regla las etiquetas de las
   tarjetas quedan con fondo opaco del mismo color que el texto (píldoras vacías). */
.bg-opacity-15 {
  --bs-bg-opacity: 0.15;
}

.menu-scroll-container {
  overflow-y: auto;
  height: 100%;
  width: 100%;
}

.menu-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  border-radius: 1rem;
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0.85rem 1.75rem rgba(15, 23, 42, 0.12) !important;
}

.menu-icon {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

.menu-card:hover .menu-icon {
  transform: scale(1.1);
}

/* Compatibilidad con Tema Pizarra Escolar (theme-chalkboard) */
body.theme-chalkboard .menu-scroll-container {
  background-color: #0e1e16;
}

body.theme-chalkboard .menu-welcome-alert {
  background-color: rgba(6, 78, 59, 0.4) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #ecfdf5 !important;
}

body.theme-chalkboard .menu-welcome-alert .text-secondary-emphasis {
  color: #d1fae5 !important;
}

body.theme-chalkboard .menu-card {
  background-color: #14281f !important;
  border: 1px solid #233e30 !important;
  color: #f1f5f9;
}

body.theme-chalkboard .menu-card:hover {
  border-color: #3b5a48 !important;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.5) !important;
}

body.theme-chalkboard .menu-card .card-title {
  color: #f8fafc;
}

body.theme-chalkboard .menu-card .card-text {
  color: #94a3b8 !important;
}

body.theme-chalkboard .menu-info-card {
  background-color: #14281f !important;
  border: 1px solid #233e30 !important;
  color: #f1f5f9;
}

body.theme-chalkboard .menu-info-card h5,
body.theme-chalkboard .menu-info-card strong {
  color: #f8fafc !important;
}

body.theme-chalkboard .menu-info-card .text-muted {
  color: #94a3b8 !important;
}

/* ==========================================================================
   BOTÓN VOLVER AL MENÚ PRINCIPAL
   ========================================================================== */
.btn-back-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0d6efd;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(13, 110, 253, 0.08);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-back-menu:hover {
  background: #0d6efd;
  color: #ffffff !important;
  border-color: #0d6efd;
  transform: translateX(-3px);
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.28);
}

.btn-back-menu:active {
  transform: translateX(0);
}

/* Modo Pizarra Escolar (theme-chalkboard) */
body.theme-chalkboard .btn-back-menu {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(74, 222, 128, 0.35);
  color: #4ade80;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

body.theme-chalkboard .btn-back-menu:hover {
  background: #10b981;
  color: #0e1e16 !important;
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(74, 222, 128, 0.35);
}


