/* ============================================================
   Panelux - Main Stylesheet (Bootstrap 5 HTML Version)
   ============================================================ */

/* Google Fonts */
@import url('https://cdn.controlipe.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   CSS Custom Properties (Light Mode - Default)
   ============================================================ */
:root {
  --body-bg: #f4f5fa;
  --card-bg: #ffffff;
  --card-border: #e8e8ef;
  --header-bg: #ffffff;
  --header-border: #e8e8ef;
  --dropdown-bg: #ffffff;
  --dropdown-border: #e8e8ef;
  --input-bg: #ffffff;
  --input-border: #e2e8f0;
  --text-primary: #2d3436;
  --text-secondary: #6e6b7b;
  --text-muted: #a0a0b0;
  --text-heading: #333;
  --surface-hover: #f4f5fa;
  --surface-alt: #f8f8fb;
  --surface-border: #e8e8ef;
  --table-bg: #ffffff;
  --table-border: #e8e8ef;
  --table-hover: #f8f8fb;
  --table-stripe: #fafafe;
  --list-group-bg: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --shadow-lg: rgba(0, 0, 0, 0.12);
  --overlay-bg: rgba(0, 0, 0, 0.5);
  --scrollbar-track: #f1f1f1;
  --scrollbar-thumb: #c1c1c1;
  --scrollbar-thumb-hover: #a1a1a1;
  --kbd-bg: #e8e8ef;
  --badge-subtle-bg: rgba(108, 92, 231, 0.1);
  --code-bg: #f4f5fa;
  --modal-bg: #ffffff;
  --breadcrumb-divider-color: #6c757d;
  --bs-body-bg: #f4f5fa;
  --bs-body-color: #2d3436;
  --bs-card-bg: #ffffff;
  --bs-card-border-color: #e8e8ef;
  --bs-border-color: #e8e8ef;
  --bs-tertiary-bg: #f8f8fb;
}

/* ============================================================
   Dark Mode
   ============================================================ */
[data-theme="dark"] {
  --body-bg: #0c0a1d;
  --card-bg: #0f172a;
  --card-border: #1e1b4b;
  --header-bg: #0f172a;
  --header-border: #1e1b4b;
  --dropdown-bg: #131136;
  --dropdown-border: #1e1b4b;
  --input-bg: #131136;
  --input-border: #1e1b4b;
  --text-primary: #e2e4e9;
  --text-secondary: #a0a3b1;
  --text-muted: #6b6e7e;
  --text-heading: #f0f0f5;
  --surface-hover: #131136;
  --surface-alt: #0e0d24;
  --surface-border: #1e1b4b;
  --table-bg: #0f172a;
  --table-border: #1e1b4b;
  --table-hover: #131136;
  --table-stripe: #0e0d24;
  --list-group-bg: #0f172a;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-lg: rgba(0, 0, 0, 0.4);
  --overlay-bg: rgba(0, 0, 0, 0.7);
  --scrollbar-track: #0e0d24;
  --scrollbar-thumb: #1e1b4b;
  --scrollbar-thumb-hover: #252154;
  --kbd-bg: #1e1b4b;
  --badge-subtle-bg: rgba(108, 92, 231, 0.2);
  --code-bg: #131136;
  --modal-bg: #131136;
  --breadcrumb-divider-color: #6b6e7e;
  --bs-body-bg: #0c0a1d;
  --bs-body-color: #e2e4e9;
  --bs-card-bg: #0f172a;
  --bs-card-border-color: #1e1b4b;
  --bs-border-color: #1e1b4b;
  --bs-tertiary-bg: #0e0d24;
}

/* ============================================================
   Base Styles
   ============================================================ */
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--body-bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: #6C5CE7;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #5a47d0;
}

/* ============================================================
   Layout System
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--body-bg);
  transition: background-color 0.3s ease;
}

.admin-main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: 270px;
  transition: margin-left 0.3s ease;
  overflow-x: hidden;
}

.admin-content {
  flex: 1;
  margin-top: 64px;
}

/* Horizontal Layout */
.layout-horizontal .admin-main-wrapper {
  margin-left: 0 !important;
}
.layout-horizontal .admin-content {
  margin-top: 110px;
}

/* Boxed Layout */
.layout-boxed {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
  position: relative;
}

/* Boxed: Sidebar stays fixed but within the boxed container */
.layout-boxed .sidebar {
  position: fixed !important;
  top: 0;
  left: auto !important;
  height: 100vh;
  flex-shrink: 0;
  z-index: 1050;
}

/* Boxed: Header becomes sticky instead of fixed */

.layout-boxed .admin-header {
  position: sticky !important;
  top: 0;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  transform: none !important;
  max-width: none !important;
}

/* Boxed: Main wrapper margin for sidebar */
.layout-boxed .admin-main-wrapper {
  margin-left: 270px !important;
  margin-right: 0 !important;
}

/* Boxed: Content no margin-top since header is sticky in-flow */
.layout-boxed .admin-content {
  margin-top: 0 !important;
  min-height: calc(100vh - 64px);
}

/* Boxed + Horizontal: no sidebar margin */
.layout-boxed.layout-horizontal .admin-main-wrapper {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Boxed: Horizontal nav sticky */
.layout-boxed .horizontal-nav {
  position: sticky !important;
  top: 64px;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  transform: none !important;
  max-width: none !important;
}

/* RTL + Boxed */
[dir="rtl"] .layout-boxed .sidebar {
  left: auto !important;
  right: auto !important;
}
[dir="rtl"] .layout-boxed .admin-main-wrapper {
  margin-left: 0 !important;
  margin-right: 270px !important;
}
[dir="rtl"] .layout-boxed.layout-horizontal .admin-main-wrapper {
  margin-right: 0 !important;
}

@media (max-width: 1199.98px) {
  .layout-boxed .admin-main-wrapper {
    margin-left: 0 !important;
  }
  [dir="rtl"] .layout-boxed .admin-main-wrapper {
    margin-right: 0 !important;
  }
}

/* Mobile overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  transition: opacity 0.3s ease;
  display: none;
}
.sidebar-mobile-open .sidebar-overlay {
  display: block;
}

@media (max-width: 1199.98px) {
  .admin-main-wrapper {
    margin-left: 0 !important;
  }
  .admin-header {
    padding-left: 0 !important;
  }
  .layout-horizontal .admin-content {
    margin-top: 64px;
  }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar-mobile-open .sidebar {
    transform: translateX(0);
  }
}

/* Sidebar collapsed on Desktop */
@media (min-width: 1200px) {
  body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-collapsed .admin-main-wrapper {
    margin-left: 0 !important;
  }
  body.sidebar-collapsed .admin-header {
    padding-left: 0;
  }
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 270px;
  background: linear-gradient(180deg, #09487f 0%, #063258 55%, #04213d 100%);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, margin 0.3s ease, width 0.3s ease;
  box-shadow: 4px 0 35px rgba(4, 33, 61, 0.45);
}
.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.4) 0%, rgba(9, 72, 127, 0.2) 50%, rgba(56, 189, 248, 0.05) 100%);
}

/* Sidebar Header Centered (Favicon em destaque no topo) */
.sidebar-header-centered {
  padding: 20px 16px 12px;
  position: relative;
  text-align: center;
}
.sidebar-brand-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.sidebar-brand-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.25s ease;
}
.sidebar-brand-centered:hover {
  transform: scale(1.03);
}
.brand-logo-container {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  margin-bottom: 8px;
}
.brand-logo-hero {
  height: 34px;
  width: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.brand-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Linha divisória elegante entre Favicon e Menu */
.sidebar-divider {
  height: 1px;
  width: 85%;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.35) 50%, transparent 100%);
}

/* Botões de Toggle da Sidebar (Desktop e Mobile) */
.btn-close-sidebar,
.btn-desktop-toggle {
  position: absolute;
  right: 12px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
  z-index: 10;
}

.btn-close-sidebar:hover,
.btn-desktop-toggle:hover {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.5);
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* Sidebar Menu Wrapper */
.sidebar-menu-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding: 6px 0;
}
.sidebar-menu-wrapper::-webkit-scrollbar { width: 4px; }
.sidebar-menu-wrapper::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu-wrapper::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Group Headers */
.sidebar-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 8px;
  white-space: nowrap;
  overflow: hidden;
}
.group-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(56, 189, 248, 0.75);
  flex-shrink: 0;
}
.group-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.3), transparent);
}

/* Menu List */
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-menu-item {
  margin: 3px 10px;
}

/* Icon Wrapper (Vidro Fosco com borda e efeito de luz) */
.sidebar-icon-wrap {
  min-width: 32px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: all 0.25s ease;
}

/* Sidebar Links */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.sidebar-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}
.sidebar-link:hover .sidebar-icon-wrap {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
}
.sidebar-link:hover .sidebar-icon {
  color: #38bdf8;
}
.sidebar-link.active,
.sidebar-menu-item.active > .sidebar-link {
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.22) 0%, rgba(9, 72, 127, 0.45) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 15px rgba(4, 33, 61, 0.3);
}
.sidebar-link.active::before,
.sidebar-menu-item.active > .sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #38bdf8, #0284c7);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}
.sidebar-link.active .sidebar-icon-wrap,
.sidebar-menu-item.active > .sidebar-link .sidebar-icon-wrap {
  background: linear-gradient(135deg, #0284c7 0%, #09487f 100%);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}
.sidebar-link.active .sidebar-icon,
.sidebar-menu-item.active > .sidebar-link .sidebar-icon {
  color: #ffffff;
}

.sidebar-icon {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.25s;
}
.sidebar-text {
  font-size: 0.84rem;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Badge */
.sidebar-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.sidebar-badge.badge-danger {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.sidebar-badge.badge-success {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.sidebar-badge.badge-warning {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Sidebar Chevron */
.sidebar-chevron {
  font-size: 0.58rem;
  transition: transform 0.3s ease;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.35);
}
.sidebar-chevron.rotated {
  transform: rotate(90deg);
  color: #38bdf8;
}

/* Submenu */
.sidebar-submenu {
  list-style: none;
  padding: 2px 0 2px 0;
  margin: 0;
  display: none;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.sidebar-submenu.nested {
  padding-left: 10px;
}
.sidebar-menu-item.submenu-open > .sidebar-submenu {
  display: block;
}
.sidebar-submenu-item {
  margin: 0;
}
.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 14px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  border-radius: 8px;
  margin: 2px 6px;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-sublink:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  padding-left: 18px;
}
.sidebar-sublink.active {
  color: #ffffff;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
}
.sidebar-sublink.active .sidebar-bullet {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
  width: 7px;
  height: 7px;
}
.sidebar-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  transition: all 0.25s;
}
.sidebar-bullet.small {
  width: 4px;
  height: 4px;
}

/* Subicon Styles */
.sidebar-subicon {
  font-size: 0.72rem;
  width: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.sidebar-sublink:hover .sidebar-subicon {
  color: #38bdf8;
  transform: scale(1.15);
}
.sidebar-sublink.active .sidebar-subicon {
  color: #38bdf8;
}

/* Subtle Mini-Dots for Notifications */
.sidebar-mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
}
.sidebar-mini-dot.dot-emerald {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}
.sidebar-mini-dot.dot-amber {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
}
.sidebar-mini-dot.dot-blue {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.8);
}
.sidebar-mini-dot.dot-rose {
  background: #f43f5e;
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.8);
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 14px 14px;
  background: rgba(4, 33, 61, 0.5);
  backdrop-filter: blur(6px);
}
.sidebar-footer-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.sidebar-footer-action i {
  width: 16px;
  text-align: center;
  font-size: 0.8rem;
}
.sidebar-footer-action:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}
.sidebar-footer-action--danger {
  color: rgba(248, 113, 113, 0.85);
}
.sidebar-footer-action--danger:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}
.sidebar-footer-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}
.sidebar-version-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.68rem;
  color: rgba(147, 197, 253, 0.6);
}
.sidebar-version-footer .version-tag {
  font-weight: 700;
  color: rgba(56, 189, 248, 0.9);
  background: rgba(56, 189, 248, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}
.sidebar-version-footer .version-dot {
  color: rgba(255, 255, 255, 0.3);
}
.sidebar-version-footer .version-name {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.footer-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  position: relative;
}
.footer-avatar-online {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid #04213d;
}
.footer-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ============================================================
   Modern Sidebar Enhancements & System Branding
   ============================================================ */
.sidebar-system-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  margin-top: 6px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #34d399;
  text-transform: uppercase;
}
.status-beacon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Search Input Box in Sidebar */
.sidebar-search-container {
  padding: 10px 14px 4px;
}
.sidebar-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 10px;
  transition: all 0.25s ease;
}
.sidebar-search-box:focus-within {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}
.sidebar-search-box .search-icon {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-right: 8px;
}
.sidebar-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.78rem;
  width: 100%;
}
.sidebar-search-box input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.search-clear-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0 4px;
}
.search-clear-btn:hover { color: #ffffff; }

/* Custom Gradient Icon Wrappers for Modules */
.icon-gradient-dashboard { background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.4)) !important; border-color: rgba(59, 130, 246, 0.4) !important; color: #60a5fa !important; }
.icon-gradient-analysis { background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(147, 51, 234, 0.4)) !important; border-color: rgba(168, 85, 247, 0.4) !important; color: #c084fc !important; }
.icon-gradient-reports { background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.4)) !important; border-color: rgba(16, 185, 129, 0.4) !important; color: #34d399 !important; }
.icon-gradient-admin { background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.4)) !important; border-color: rgba(245, 158, 11, 0.4) !important; color: #fbbf24 !important; }
.icon-gradient-demands { background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(225, 29, 72, 0.4)) !important; border-color: rgba(244, 63, 94, 0.4) !important; color: #fb7185 !important; }
.icon-gradient-system { background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(8, 145, 178, 0.4)) !important; border-color: rgba(6, 182, 212, 0.4) !important; color: #22d3ee !important; }

/* Primicia System Widget Card */
.sidebar-widget-card {
  margin: 14px 12px 6px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}
.sidebar-widget-card:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(9, 72, 127, 0.25) 100%);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}
.widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.widget-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  font-size: 0.85rem;
}
.widget-titles {
  display: flex;
  flex-direction: column;
}
.widget-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}
.widget-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.55);
}
.widget-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 10px;
  overflow: hidden;
}
.widget-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 8px #10b981;
}
.footer-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-role {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   ADMIN HEADER (ESTILIZAÇÃO PREMIUM GLASSMORPHISM PRIMICIA)
   ============================================================ */
.admin-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 66px;
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  z-index: 1030;
  padding-left: 270px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px -2px rgba(9, 72, 127, 0.05);
}

[data-theme="dark"] .admin-header,
.dark .admin-header {
  background: rgba(13, 17, 23, 0.85) !important;
  border-bottom-color: rgba(30, 41, 59, 0.8);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-brand {
  display: none;
  align-items: center;
  text-decoration: none;
}

.mobile-brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Sidebar Toggle */
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(9, 72, 127, 0.06);
  border: 1px solid rgba(9, 72, 127, 0.15);
  color: #09487f;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
}

.sidebar-toggle:hover {
  background: #09487f;
  border-color: #09487f;
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(9, 72, 127, 0.3);
}

[data-theme="dark"] .sidebar-toggle,
.dark .sidebar-toggle {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

[data-theme="dark"] .sidebar-toggle:hover,
.dark .sidebar-toggle:hover {
  background: #38bdf8;
  color: #0d1117;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
}

/* Barra de Pesquisa Global */
.header-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 290px;
  height: 42px;
}

.header-search:hover {
  background: #ffffff;
  border-color: rgba(9, 72, 127, 0.4);
  box-shadow: 0 4px 16px rgba(9, 72, 127, 0.1);
  transform: translateY(-1px);
}

[data-theme="dark"] .header-search,
.dark .header-search {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .header-search:hover,
.dark .header-search:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15);
}

.header-search .search-icon {
  color: #09487f;
  font-size: 0.9rem;
}

[data-theme="dark"] .header-search .search-icon,
.dark .header-search .search-icon {
  color: #38bdf8;
}

.header-search .search-placeholder {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 500;
  flex: 1;
}

.search-kbd {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(9, 72, 127, 0.08);
  border: 1px solid rgba(9, 72, 127, 0.2);
  border-radius: 6px;
  color: #09487f;
  letter-spacing: 0.03em;
}

[data-theme="dark"] .search-kbd,
.dark .search-kbd {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

/* Botões de Ação Gerais (Dark Mode, Notificações) */
.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(241, 245, 249, 0.7);
  color: #475569;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  position: relative;
}

.header-btn:hover {
  background: rgba(9, 72, 127, 0.08);
  color: #09487f;
  border-color: rgba(9, 72, 127, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(9, 72, 127, 0.15);
}

[data-theme="dark"] .header-btn,
.dark .header-btn {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(51, 65, 85, 0.8);
  color: #94a3b8;
}

[data-theme="dark"] .header-btn:hover,
.dark .header-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

/* Badge de Hub API */
.header-api-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(9, 72, 127, 0.08) 0%, rgba(56, 189, 248, 0.15) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #09487f !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: all 0.25s ease !important;
}

[data-theme="dark"] .header-api-badge,
.dark .header-api-badge {
  color: #38bdf8 !important;
}

.header-api-badge:hover {
  background: linear-gradient(135deg, #09487f 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35) !important;
  transform: translateY(-2px) !important;
}

.header-api-badge:hover i {
  color: #ffffff !important;
}

/* Pill / Crachá de Usuário */
.header-user-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.header-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 12px 3px 4px;
  background: rgba(241, 245, 249, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 14px;
  transition: all 0.25s ease;
}

.header-user-pill:hover {
  background: #ffffff;
  border-color: rgba(9, 72, 127, 0.3);
  box-shadow: 0 4px 14px rgba(9, 72, 127, 0.12);
  transform: translateY(-1px);
}

[data-theme="dark"] .header-user-pill,
.dark .header-user-pill {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .header-user-pill:hover,
.dark .header-user-pill:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #09487f 0%, #0284c7 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(9, 72, 127, 0.3);
}

.user-pill-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.user-pill-name {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #1e293b;
}

[data-theme="dark"] .user-pill-name,
.dark .user-pill-name {
  color: #f8fafc;
}

.user-pill-role {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #09487f;
}

[data-theme="dark"] .user-pill-role,
.dark .user-pill-role {
  color: #38bdf8;
}

.user-pill-chevron {
  font-size: 0.7rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.header-user-btn[aria-expanded="true"] .user-pill-chevron {
  transform: rotate(180deg);
}

/* Dropdowns com Efeito Floating Glass */
.header-dropdown {
  border-radius: 20px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 20px 45px -10px rgba(9, 72, 127, 0.15) !important;
  backdrop-filter: blur(16px) !important;
  padding: 8px !important;
  margin-top: 8px !important;
  overflow: hidden !important;
}

[data-theme="dark"] .header-dropdown,
.dark .header-dropdown {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: rgba(30, 41, 59, 0.9) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5) !important;
}

/* Notification badge */
.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: #ea5455;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============================================================
   Extensions & Fixes
   ============================================================ */

/* Notifications Dropdown Premium (Desktop & Mobile) */
.notifications-dropdown {
    width: 380px !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(85vh - 50px);
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
    margin-top: 10px !important;
}

[data-theme="dark"] .notifications-dropdown,
.dark .notifications-dropdown {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

.notifications-list {
    max-height: 360px !important;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notifications-list::-webkit-scrollbar {
    width: 5px;
}
.notifications-list::-webkit-scrollbar-track {
    background: transparent;
}
.notifications-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
[data-theme="dark"] .notifications-list::-webkit-scrollbar-thumb,
.dark .notifications-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 12px;
    }
    .notifications-dropdown {
        position: fixed !important;
        top: 64px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        transform: none !important;
        margin: 0 auto !important;
        border-radius: 1.25rem !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
        z-index: 10050 !important;
    }
    .notifications-list {
        max-height: min(380px, calc(70vh - 100px)) !important;
    }
    .user-dropdown {
        position: fixed !important;
        top: 64px !important;
        right: 12px !important;
        left: auto !important;
        width: calc(100vw - 24px) !important;
        max-width: 290px !important;
        transform: none !important;
        border-radius: 1.25rem !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
        z-index: 10050 !important;
    }
}

/* Sidebar Active Link - Improved visibility and less intrusive */
.sidebar-link.active,
.sidebar-menu-item.active > .sidebar-link {
    background: rgba(108, 92, 231, 0.15) !important;
    color: #fff !important;
    border-right: 3px solid #6c5ce7;
    border-radius: 10px 4px 4px 10px;
}
.sidebar-link.active::before {
    display: none;
}

.sidebar-sublink.active {
    color: #a78bfa !important;
    background: rgba(167, 139, 250, 0.08) !important;
    font-weight: 600;
}

/* Search results styles */
.search-results-list {
    max-height: 400px;
    overflow-y: auto;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    color: var(--text-primary);
}
.search-result-item i {
    width: 20px;
    text-align: center;
    color: #6c5ce7;
}
.search-result-item:hover {
    background: var(--surface-hover);
    color: #6c5ce7;
    transform: translateX(5px);
}


/* Avoid text selection in header interactive elements */
.admin-header, .sidebar-header, .sidebar-footer {
    user-select: none;
}

/* Ensure search trigger is always clickable */
.header-search {
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
}

/* Global Footer Glassmorphism */
#main-footer {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(232, 232, 239, 0.5) !important;
    transition: all 0.3s ease;
}
.dark #main-footer {
    background: rgba(30, 41, 59, 0.4) !important;
    border-color: rgba(51, 65, 85, 0.4) !important;
}
#main-footer:hover {
    background: rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* ============================================================
   Toast Notifications
   ============================================================ */
/* ============================================================
   Toast & Flash Notifications System (Unified & Robust)
   ============================================================ */
#toast-container, #flash-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  pointer-events: none;
  width: 100%;
  max-width: 400px;
}

.toast, .flash-message {
  position: relative;
  pointer-events: auto;
  display: flex !important;
  align-items: start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 14px;
  color: inherit;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.2),
    0 2px 10px rgba(0, 0, 0, 0.1);
  
  opacity: 0;
  transform: translateY(20px);
}

/* Animação de Entrada */
.toast.show, .flash-message.show {
  animation: toastEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Animação de Saída */
.toast:not(.show), .flash-message:not(.show) {
  animation: toastExit 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes toastEntrance {
  0% { transform: translateY(30px) scale(0.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes toastExit {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(20px) scale(0.9); opacity: 0; }
}

/* Estilos de Categoria */
.toast.success, .flash-message.success { background: rgba(20, 83, 45, 0.9); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); }
.toast.error, .toast.danger, .flash-message.error, .flash-message.danger { background: rgba(127, 29, 29, 0.9); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); }
.toast.warning, .flash-message.warning { background: rgba(120, 53, 15, 0.9); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); }
.toast.info, .flash-message.info { background: rgba(30, 58, 138, 0.9); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); }

/* Dark mode: manter as cores vibrantes */
[data-theme="dark"] .toast, [data-theme="dark"] .flash-message {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Barra de progresso */
.toast::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  width: 0%;
}
.toast.show::after {
  animation: toastProgress 4s linear forwards;
}
@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 0.9rem;
}
.toast-message { flex: 1; font-weight: 600; }
.toast-close {
  background: none;
  border: none;
  color: #fff;
  opacity: 0.6;
  cursor: pointer;
  padding: 2px;
  transition: opacity 0.2s;
}
.toast-close:hover { opacity: 1; }

/* ============================================================
   Custom Premium Animations & Styles
   ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceSlow {
  0%, 100% { transform: translateY(-5%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-bounce-slow {
  animation: bounceSlow 3s infinite;
}

/* Glassmorphism utility */
.glass-effect {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass-effect {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(30, 41, 59, 0.5);
}

/* Custom Scrollbar for premium feel */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 3px;
}

/* ============================================================
   Mobile-First Responsive Rules (Transforma Tabelas em Cards 100% Responsivos)
   ============================================================ */
@media (max-width: 768px) {
  /* Previne qualquer rolagem lateral das tabelas */
  .table-responsive,
  .dataTables_wrapper,
  .overflow-x-auto {
    overflow-x: visible !important;
    width: 100% !important;
  }

  /* Transforma a estrutura HTML da tabela em Cards Verticalizados */
  .admin-content-section table,
  table.mobile-card-table,
  .dataTables_wrapper table.dataTable {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border: none !important;
  }

  .admin-content-section table thead,
  table.mobile-card-table thead,
  .dataTables_wrapper table.dataTable thead {
    display: none !important;
  }

  .admin-content-section table tbody,
  table.mobile-card-table tbody,
  .dataTables_wrapper table.dataTable tbody {
    display: block !important;
    width: 100% !important;
  }

  .admin-content-section table tbody tr,
  table.mobile-card-table tbody tr,
  .dataTables_wrapper table.dataTable tbody tr {
    display: block !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
    padding: 1rem !important;
    border-radius: 1.25rem !important;
    background: #ffffff !important;
    border: 1px solid rgba(229, 231, 235, 0.9) !important;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.02) !important;
  }

  [data-theme="dark"] .admin-content-section table tbody tr,
  .dark .admin-content-section table tbody tr,
  [data-theme="dark"] .dataTables_wrapper table.dataTable tbody tr {
    background: #111827 !important;
    border-color: rgba(31, 41, 55, 0.8) !important;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.4) !important;
  }

  .admin-content-section table tbody tr td,
  table.mobile-card-table tbody tr td,
  .dataTables_wrapper table.dataTable tbody tr td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.625rem 0 !important;
    border-bottom: 1px dashed rgba(229, 231, 235, 0.7) !important;
    text-align: right !important;
    font-size: 0.8125rem !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  [data-theme="dark"] .admin-content-section table tbody tr td,
  .dark .admin-content-section table tbody tr td {
    border-bottom-color: rgba(55, 65, 81, 0.6) !important;
  }

  .admin-content-section table tbody tr td:last-child,
  table.mobile-card-table tbody tr td:last-child {
    border-bottom: none !important;
    padding-top: 0.875rem !important;
    justify-content: flex-end !important;
  }

  /* Rótulo automático usando data-label */
  .admin-content-section table tbody tr td[data-label]::before,
  table.mobile-card-table tbody tr td[data-label]::before {
    content: attr(data-label);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-right: 1rem;
    text-align: left;
    flex-shrink: 0;
  }

  [data-theme="dark"] .admin-content-section table tbody tr td[data-label]::before,
  .dark .admin-content-section table tbody tr td[data-label]::before {
    color: #94a3b8;
  }

  /* Ajustes de Modais em Telas Pequenas */
  .fixed.inset-0 > div {
    margin-left: 12px !important;
    margin-right: 12px !important;
    max-height: 92vh !important;
  }
}
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.2);
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 92, 231, 0.4);
}
