/* Modern Teal Sidebar Styling */
/* ========================================== */

/* Main sidebar container */
.bg-menu-theme {
  background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%) !important;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* App brand styling */
.bg-menu-theme .app-brand {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 0 0 12px 12px;
  margin: 8px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bg-menu-theme .app-brand-link {
  color: #ffffff !important;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bg-menu-theme .app-brand-link:hover {
  color: #a7f3d0 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Logo styling */
.bg-menu-theme .app-brand-logo {
  /* background: rgba(255, 255, 255, 0.2); */
  border-radius: 12px;
  padding: 10px;
  margin-right: 12px;
  transition: all 0.3s ease;
}

.bg-menu-theme .app-brand-logo img {
  filter: brightness(1.3) contrast(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
  width: 67px !important;
  height: 67px !important;
  object-fit: contain;
}

.bg-menu-theme .app-brand-link:hover .app-brand-logo img {
  filter: brightness(1.5) contrast(1.3) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.bg-menu-theme .app-brand-logo svg {
  filter: brightness(1.2) contrast(1.1);
  transition: all 0.3s ease;
}

.bg-menu-theme .app-brand-link:hover .app-brand-logo svg {
  filter: brightness(1.4) contrast(1.2);
}

/* Navbar Logo specific constraints */
.modern-navbar .app-brand-logo img {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain;
  transition: all 0.3s ease;
}

.modern-navbar .app-brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #14b8a6;
  text-transform: none !important;
  letter-spacing: 0.8px;
  background: linear-gradient(45deg, #0f766e, #14b8a6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dark-style .modern-navbar .app-brand-text {
  background: linear-gradient(45deg, #14b8a6, #a7f3d0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* App brand text */
.bg-menu-theme .app-brand-text {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: none !important;
  letter-spacing: 0.8px;
  background: linear-gradient(45deg, #ffffff, #a7f3d0, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

/* Tito specific styling - Enhanced for better visibility */
.bg-menu-theme h5 {
  font-size: 2.8rem !important;
  font-weight: 900 !important;
  text-transform: none !important;
  letter-spacing: 2px !important;
  background: linear-gradient(45deg, #7dfff4, #7dfff4, #7dfff4) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  text-shadow:
    0 0 10px rgba(102, 199, 191, 0.1),
    0 2px 8px rgba(102, 199, 191, 0.1),
    0 4px 12px rgba(102, 199, 191, 0.1) !important;
  transition: all 0.3s ease !important;
  margin: 0 !important;
  position: relative;
  z-index: 2;
}

/* Add a glowing effect behind the text */
.bg-menu-theme h5::before {
  content: 'TiTO';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #14b8a6, #0d9488, #14b8a6);
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: blur(2px);
  opacity: 0.3;
  z-index: -1;
}

.bg-menu-theme .app-brand-link:hover h5::before {
  opacity: 0.6;
  filter: blur(3px);
}

.bg-menu-theme .app-brand-link:hover .app-brand-text {
  background: linear-gradient(45deg, #a7f3d0, #ffffff, #a7f3d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: scale(1.05);
}

/* Logo container enhancement */
.bg-menu-theme .app-brand {
  position: relative;
  overflow: hidden;
}

.bg-menu-theme .app-brand::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.bg-menu-theme .app-brand:hover::before {
  left: 100%;
}

/* Tito title glow animation */
@keyframes titleGlow {
  0% {
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.5),
      0 2px 8px rgba(0, 0, 0, 0.3),
      0 4px 12px rgba(20, 184, 166, 0.4);
  }

  50% {
    text-shadow:
      0 0 15px rgba(255, 255, 255, 0.7),
      0 0 25px rgba(20, 184, 166, 0.5),
      0 2px 8px rgba(0, 0, 0, 0.3),
      0 4px 12px rgba(20, 184, 166, 0.6);
  }

  100% {
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.5),
      0 2px 8px rgba(0, 0, 0, 0.3),
      0 4px 12px rgba(20, 184, 166, 0.4);
  }
}

.bg-menu-theme h5 {
  animation: titleGlow 4s ease-in-out infinite;
}

/* Menu toggle button */
.bg-menu-theme .layout-menu-toggle {
  color: #ffffff !important;
  transition: all 0.3s ease;
}

.bg-menu-theme .layout-menu-toggle:hover {
  color: #a7f3d0 !important;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

/* Menu items */
.bg-menu-theme .menu-link {
  color: #e0f2f1 !important;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 2px 8px;
  position: relative;
  overflow: hidden;
}

.bg-menu-theme .menu-link:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bg-menu-theme .menu-link:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: #14b8a6;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

/* Active menu items */
.bg-menu-theme .menu-item.active>.menu-link:not(.menu-toggle) {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

/* Menu toggle items */
.bg-menu-theme .menu-item.active>.menu-toggle,
.bg-menu-theme .menu-item.open>.menu-toggle {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-radius: 8px;
  margin: 2px 8px;
}

/* Menu headers - removed horizontal bar */
.bg-menu-theme .menu-header {
  color: #a7f3d0 !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  margin: 16px 8px 8px 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border-left: none !important;
  border-bottom: none !important;
  border-top: none !important;
  border-right: none !important;
}

/* Submenu styling */
.bg-menu-theme .menu-sub {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  margin: 4px 8px;
  padding: 4px 0;
}

.bg-menu-theme .menu-sub .menu-link {
  margin: 1px 8px;
  padding-left: 2rem;
  font-size: 0.9rem;
  position: relative;
}

.bg-menu-theme .menu-sub .menu-link:before {
  content: '•';
  position: absolute;
  left: 1rem;
  color: #14b8a6;
  font-weight: bold;
}

.bg-menu-theme .menu-sub .menu-item.active>.menu-link {
  background: rgba(20, 184, 166, 0.2) !important;
  color: #ffffff !important;
  border-left: 3px solid #14b8a6;
}

/* Icons styling */
.bg-menu-theme .menu-icon {
  color: #a7f3d0;
  transition: all 0.3s ease;
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.bg-menu-theme .menu-link:hover .menu-icon {
  color: #ffffff;
}

.bg-menu-theme .menu-item.active .menu-icon {
  color: #ffffff;
}

/* Badge styling */
.bg-menu-theme .badge {
  background: #14b8a6 !important;
  color: #ffffff !important;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Menu inner shadow */
.bg-menu-theme .menu-inner-shadow {
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.8) 0%, rgba(13, 148, 136, 0.4) 50%, transparent 100%) !important;
}

/* Scrollbar styling */
.bg-menu-theme .ps__thumb-y {
  background: rgba(255, 255, 255, 0.3) !important;
  border-radius: 4px;
}

.bg-menu-theme .ps__rail-y:hover .ps__thumb-y {
  background: rgba(255, 255, 255, 0.5) !important;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
  .bg-menu-theme .menu-link {
    margin: 1px 4px;
  }

  .bg-menu-theme .menu-sub {
    margin: 2px 4px;
  }

  .bg-menu-theme .menu-header {
    margin: 12px 4px 6px 4px;
  }
}

/* Removed all animations for cleaner look */

/* Modern glassmorphism effect */
.bg-menu-theme {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Removed pulse animation on hover */

/* Modern scrollbar - make vertical bar smaller */
.bg-menu-theme::-webkit-scrollbar {
  width: 1px;
}

.bg-menu-theme::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.bg-menu-theme::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.bg-menu-theme::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 243, 208, 0.8) !important;
}

/* Also style for non-webkit browsers */
.bg-menu-theme {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Make scrollbar same size as desktop on tablet and expand sidebar slightly */
@media (min-width: 768px) and (max-width: 1199px) {
  .bg-menu-theme::-webkit-scrollbar {
    width: 1px !important;
  }

  .bg-menu-theme::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3) !important;
  }

  .bg-menu-theme::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 243, 208, 0.8) !important;
  }

  .bg-menu-theme {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
  }

  /* Expand sidebar slightly on tablet to prevent horizontal scroll */
  .bg-menu-theme,
  #layout-menu.layout-menu,
  .layout-menu {
    width: 18rem !important;
    min-width: 18rem !important;
  }
}

/* Enhanced focus states for accessibility */
.bg-menu-theme .menu-link:focus {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

/* Modern loading state */
.bg-menu-theme.loading .menu-item {
  opacity: 0.6;
  pointer-events: none;
}

/* Bottom dock navigation (inspired by base.html) */
.bottom-nav {
  position: fixed;
  bottom: 29px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 26px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(0, 0, 0, 0.04);
  z-index: 1030;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-muted, #6b7280);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.bottom-nav-item i {
  font-size: 1.35rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item span {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0.7;
  transition: all 0.25s ease;
}

.bottom-nav-item:hover {
  transform: translateY(-4px) scale(1.08);
  color: var(--text-primary, #111827);
}

.bottom-nav-item:hover i {
  transform: scale(1.05);
}

.bottom-nav-item:hover span {
  opacity: 1;
}

.bottom-nav-item.active {
  color: #ffc700;
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  width: 3px;
  height: 3px;
  background: #ffc700;
  border-radius: 50%;
}

.bottom-nav-separator {
  width: 1px;
  height: 32px;
  background: var(--border-color, #e5e7eb);
  margin: 0 6px;
  align-self: center;
}

.bottom-nav-item:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 3px;
}

@supports (padding: max(0px)) {
  .bottom-nav {
    padding-bottom: max(env(safe-area-inset-bottom, 0), 9px);
  }
}

@media (max-width: 575.98px) {
  .bottom-nav {
    left: 8px;
    right: 8px;
    transform: none;
    justify-content: space-around;
    gap: 4px;
    padding: 8px 10px;
  }

  .bottom-nav-item span {
    display: none;
  }
}

.dashboard-shell {
  width: 100%;
  margin: 0;
  padding-top: 1.5rem;
  padding-bottom: 7rem;
}

.dashboard-header {
  border-radius: 1.5rem;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 0.85rem 1.25rem;
  gap: 0.9rem;
}

.dark-style .dashboard-header {
  background: #30334e;
  border-color: rgba(148, 163, 184, 0.15);
  box-shadow: 0 22px 55px rgba(15, 20, 34, 0.4);
}

.dashboard-header-main h2 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.dashboard-header-main p {
  font-size: 0.9rem;
}

.dashboard-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dashboard-header-meta span {
  font-size: 0.9rem;
}

.dashboard-header-refresh {
  border-radius: 999px;
  padding-inline: 1rem;
  font-weight: 600;
}

.dashboard-stat-row {
  margin-bottom: 2.25rem;
}

.dashboard-stat-card {
  border-radius: 18px;
  border: none;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(148, 163, 184, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(129, 140, 248, 0.4);
}

.dashboard-stat-title {
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #9ca3af;
}

.dashboard-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111827;
}

.dashboard-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-stat-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.15);
}

.dashboard-stat-icon-circle i {
  font-size: 1.4rem;
}

.dashboard-stat-icon-success {
  background: #ecfdf3;
  color: #15803d;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.18);
}

.dashboard-stat-icon-warning {
  background: #fffbeb;
  color: #b45309;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.18);
}

.dashboard-stat-icon-info {
  background: #e0f2fe;
  color: #0369a1;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.18);
}

.dashboard-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.dashboard-chart-card {
  border-radius: 20px;
  border: none;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(148, 163, 184, 0.1);
  overflow: hidden;
}

.dashboard-stat-card-body {
  min-height: 120px;
  max-height: 160px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-chart-container {
  max-width: 48vw;
  margin-left: auto;
  margin-right: auto;
}

.modern-navbar {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: #f3f4f8 !important;
  box-shadow: 0 6px 20px rgba(148, 163, 184, 0.25);
  border-bottom: none;
}

.dark-style .modern-navbar {
  box-shadow: 0 16px 40px rgba(15, 20, 34, 0.4);
  border-bottom-color: transparent;
}

.modern-navbar.container-xxl,
.modern-navbar.container-fluid,
.modern-navbar .container-xxl,
.modern-navbar .container-fluid {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.modern-navbar-right {
  width: 100%;
  gap: 1.25rem;
}

.modern-navbar-search {
  max-width: 560px;
  margin-left: 0;
  margin-right: auto;
}

.modern-search-pill {
  width: 100%;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid rgba(148, 163, 184, 0.6);
  justify-content: flex-start;
  gap: 0.4rem;
}

.modern-search-pill i {
  color: #9ca3af;
  margin-right: 0.5rem;
}

.modern-search-pill input {
  font-size: 0.9rem;
  background: transparent;
  padding-left: 0.25rem;
  flex: 1;
  min-width: 0;
}

.dark-style .modern-search-pill {
  background: #30334e;
  border-color: rgba(148, 163, 184, 0.3);
}

.dark-style .modern-search-pill input {
  color: #e5e7eb;
}

.modern-search-shortcut {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.dark-style .modern-search-shortcut {
  border-color: rgba(148, 163, 184, 0.8);
  color: #cbd5f5;
}

.modern-navbar-user-label {
  font-size: 0.9rem;
  color: #6b7280;
}

.dark-style .modern-navbar-user-label {
  color: #e5e7eb;
}

.modern-navbar-user-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.modern-navbar-user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
}

.dark-style .modern-navbar-user-name {
  color: #e5e7eb;
}

.modern-navbar-role-pill {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dark-style .modern-navbar-role-pill {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.modern-navbar-user-dropdown .avatar {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.modern-navbar-user-dropdown .avatar:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.3);
}

.modern-navbar-avatar {
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.2);
  border: none;
}

.content-footer.footer {
  padding-bottom: 5.5rem;
}