body {
  font-family: 'Inter', Arial, sans-serif;
  background: #f4f6f8;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Sidebar moderna */
.sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e3a8a 50%, #1976d2 100%);
  color: #fff;
  width: 260px;
  min-height: 100vh;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.15), 2px 0 12px rgba(25, 118, 210, 0.2);
  padding: 32px 0 24px 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: visible; /* permite que o botão de toggle fique completamente visível */
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 50%, rgba(0,0,0,0.05) 100%);
  pointer-events: none;
}

.sidebar-header {
  font-size: 1em;
  font-weight: 700;
  padding: 0 0 20px 0;
  letter-spacing: 0.8px;
  color: #fff;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  margin: 0 16px 20px 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
}

.sidebar-header h2 {
  font-size: 1.1em;
  font-weight: 700;
  margin: 0;
  padding: 0;
  letter-spacing: 0.5px;
  color: #fff;
}

/* Logo na área do cabeçalho da sidebar */
.sidebar-header .sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 6px 0;
}

.sidebar-header .sidebar-logo img {
  max-width: 120px;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}

.sidebar-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #fff 0%, transparent 100%);
  border-radius: 2px;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar nav ul li {
  margin-bottom: 6px;
  padding: 0 16px;
}

.sidebar nav ul li a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 500;
  font-size: 0.94em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.sidebar nav ul li a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
}

.sidebar nav ul li a::after {
  content: '›';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar nav ul li a:hover::after {
  right: 10px;
  color: rgba(30, 58, 138, 0.5);
}

.sidebar nav ul li a.active::after {
  color: rgba(30, 64, 175, 0.4);
}

.sidebar nav ul li a.active,
.sidebar nav ul li a:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
  color: #1e3a8a;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(96, 165, 250, 0.2);
  transform: translateX(6px);
}

.sidebar nav ul li a.active::before,
.sidebar nav ul li a:hover::before {
  transform: scaleY(1);
}

.sidebar nav ul li a.active {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  color: #1e40af;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(96, 165, 250, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Estilos para submenus */
.submenu-item {
  margin-bottom: 8px;
}

.submenu-header {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
  border-radius: 14px !important;
  margin: 0 !important;
  padding: 14px 18px !important;
  font-weight: 600 !important;
  font-size: 0.94em !important;
  color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  gap: 12px;
}

.submenu-header:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateX(2px);
}

.submenu-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.submenu-arrow {
  font-size: 0.75em;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.submenu-header:hover .submenu-arrow {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.submenu-list {
  list-style: none;
  padding: 8px 0 0 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.1) 100%);
  border-radius: 0 0 14px 14px;
  margin-left: 16px;
  margin-right: 16px;
  border-left: 2px solid rgba(96, 165, 250, 0.3);
}

.submenu-list.open {
  max-height: 600px;
  padding: 12px 0 8px 0;
}

.submenu-list li {
  margin: 0;
  padding: 0 12px;
}

.submenu-list li a {
  padding: 11px 16px !important;
  font-size: 0.88em !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.75) !important;
  border-radius: 10px !important;
  margin: 3px 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 10px !important;
  backdrop-filter: blur(5px);
}

.submenu-list li a:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.15) 100%) !important;
  color: #fff !important;
  font-weight: 500 !important;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.submenu-list li a.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%) !important;
  color: #1e40af !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsividade para submenus */
@media (max-width: 900px) {
  .sidebar {
    min-width: 60px;
    width: 60px;
    padding-top: 8px;
  }

  .sidebar nav ul li a,
  .sidebar-header {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 0.98em;
  }

  .submenu-header {
    padding: 10px 8px !important;
    font-size: 0.9em !important;
  }

  .submenu-list {
    margin-left: 8px;
    margin-right: 4px;
  }

  .submenu-list li a {
    padding: 8px 12px !important;
    font-size: 0.85em !important;
  }

  .main-content {
    padding: 12px 4vw 12px 4vw;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding: 8px 2vw 8px 2vw;
  }

  .sidebar {
    min-width: 40px;
    width: 40px;
    padding-top: 4px;
  }
}

/* Sidebar collapsed */
.sidebar-collapsed {
  width: 56px !important;
  min-width: 56px !important;
  overflow: visible;
}

.sidebar-collapsed .sidebar-header,
.sidebar-collapsed nav ul li a {
  text-align: center;
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow: hidden;
}

.sidebar-collapsed .sidebar-header h2,
.sidebar-collapsed nav ul li a {
  font-size: 0;
  opacity: 0;
  visibility: hidden;
  transition: font-size 0.2s, opacity 0.2s, visibility 0.2s;
}

.sidebar-collapsed nav ul li a:before {
  content: '\25A0';
  /* quadrado como placeholder, pode trocar por ícone */
  font-size: 1.2em;
  color: #1976d2;
  display: inline-block;
  margin-right: 0;
  opacity: 1;
  visibility: visible;
}

/* Garantir que submenus sejam ocultos quando sidebar está colapsado */
.sidebar-collapsed .submenu-list {
  display: none !important;
  max-height: 0 !important;
  overflow: hidden;
}

.sidebar-collapsed .submenu-header {
  display: none !important;
}

.sidebar-collapsed .submenu-item {
  display: none !important;
}

/* Topbar moderna */
.topbar {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(25, 118, 210, 0.1);
  padding: 0;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.topbar-content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 32px;
  gap: 20px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%);
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: default;
}

.topbar-user:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 50%);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
  transform: translateY(-1px);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.user-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-greeting {
  font-size: 11px;
  color: #1565c0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-name {
  font-size: 14px;
  font-weight: 700;
  color: #1565c0;
  line-height: 1;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-logout:hover {
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
  box-shadow: 0 4px 16px rgba(244, 67, 54, 0.4);
  transform: translateY(-2px);
}

.btn-logout:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.btn-logout svg {
  transition: transform 0.3s ease;
}

.btn-logout:hover svg {
  transform: translateX(2px);
}

/* Responsividade do Topbar */
@media (max-width: 768px) {
  .topbar-content {
    padding: 10px 16px;
    gap: 12px;
  }

  .topbar-user {
    padding: 6px 12px;
    gap: 8px;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
  }

  .user-greeting {
    font-size: 10px;
  }

  .user-name {
    font-size: 13px;
  }

  .btn-logout {
    padding: 8px 16px;
    font-size: 13px;
  }

  .btn-logout span {
    display: none;
  }

  .btn-logout {
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .user-greeting {
    display: none;
  }

  .user-info-wrapper {
    gap: 0;
  }

  .topbar-user {
    padding: 6px 10px;
  }

  .user-name {
    font-size: 12px;
  }
}

/* Layout principal */
.layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 24px;
  overflow-x: hidden;
}

/* Cards e boxes */
.card,
.content-area,
.main-header,
.dashboard-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover,
.dashboard-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.main-header {
  padding: 28px 32px;
  margin-bottom: 20px;
}

.main-header h1 {
  font-size: 2em;
  font-weight: 800;
  color: #1976d2;
  margin: 0 0 4px 0;
  letter-spacing: -0.5px;
}

.dashboard-card {
  display: inline-block;
  min-width: 200px;
  margin-right: 20px;
  text-align: left;
  border-left: 4px solid #1976d2;
  padding: 24px 28px;
}

/* Inputs e botões padrão login */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="month"],
input[type="email"],
textarea,
select {
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid #e3f2fd;
  background: #fff;
  font-size: 0.95em;
  margin-bottom: 16px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  font-family: 'Inter', Arial, sans-serif;
  width: 100%;
  box-sizing: border-box;
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="password"]:hover,
input[type="date"]:hover,
input[type="month"]:hover,
input[type="email"]:hover,
textarea:hover,
select:hover {
  border-color: #90caf9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  border: 2px solid #1976d2;
  outline: none;
  background: #f0f8ff;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15), 0 0 0 4px rgba(25, 118, 210, 0.08);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.btn,
button.btn,
.btn-add,
.btn-edit,
.btn-delete {
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 13px 28px;
  font-size: 0.95em;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.25);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
  font-family: 'Inter', Arial, sans-serif;
  position: relative;
  overflow: hidden;
}

.btn::before,
button.btn::before,
.btn-add::before,
.btn-edit::before,
.btn-delete::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn:hover::before,
button.btn:hover::before,
.btn-add:hover::before,
.btn-edit:hover::before,
.btn-delete:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover,
button.btn:hover,
.btn-add:hover,
.btn-edit:hover {
  background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.35);
  transform: translateY(-2px);
}

.btn:active,
button.btn:active,
.btn-add:active,
.btn-edit:active,
.btn-delete:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

.btn-delete {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.btn-delete:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.35);
}

/* Botões específicos do modal de exclusão */
.btn-cancel {
  background: #ffffff;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-size: 15px;
  min-width: 120px;
  cursor: pointer;
}

.btn-cancel:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-cancel:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-delete-confirm {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
  font-size: 15px;
  min-width: 120px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-delete-confirm::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-delete-confirm:hover::before {
  left: 100%;
}

.btn-delete-confirm:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-delete-confirm:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Responsividade para o modal de exclusão */
@media (max-width: 480px) {
  .modal-delete-content {
    margin: 16px;
    padding: 28px 20px 24px 20px;
    max-width: calc(100vw - 32px);
  }
  
  .modal-delete-title {
    font-size: 20px;
  }
  
  .modal-delete-message {
    font-size: 14px;
  }
  
  .modal-delete-warning {
    font-size: 12px;
    padding: 8px 12px;
    max-width: 240px;
  }
  
  .modal-delete-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-cancel,
  .btn-delete-confirm {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
    min-width: auto;
  }
  
  .modal-delete-icon {
    width: 48px;
    height: 48px;
  }
  
  .modal-delete-icon svg {
    width: 28px;
    height: 28px;
  }
}

/* Layout principal */
.layout {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #e3f0fc 0%, #f5faff 100%);
  transition: margin-left 0.25s;
  overflow: hidden;
}

.main-content {
  flex: 1 1 0;
  padding: 32px 40px 32px 40px;
  min-width: 0;
  overflow: hidden;
}

.sidebar-collapsed~.main-content,
.sidebar-collapsed~main.main-content {
  margin-left: 56px !important;
}

/* Remover tema escuro e estilos modernos adicionados. Manter apenas o essencial para configurações e alerta de estoque crítico. */
#menu-configuracoes.active {
  background: #1976d2;
  color: #fff !important;
}

#menu-configuracoes {
  color: #1976d2;
}

#content form#form-config {
  background: #fff;
  padding: 24px 18px;
  border-radius: 10px;
  max-width: 340px;
  margin-top: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#content form#form-config label {
  color: #232b3e;
  font-size: 1.1em;
}

#content form#form-config input[type="number"] {
  background: #f9f9f9;
  color: #232b3e;
  border: 1px solid #bbb;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 1em;
}

#content #config-msg {
  font-size: 1.1em;
}

/* Card de alerta de estoque crítico - visual limpo e agradável */
.dashboard-card.alerta-estoque {
  border: 1.5px solid #e57373;
  background: #fff6f6;
  color: #b71c1c;
  min-width: 220px;
  border-radius: 8px;
  padding: 16px 22px 14px 22px;
  margin-top: 18px;
  font-size: 1em;
}

.dashboard-card.alerta-estoque .card-title {
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  font-size: 1.08em;
}

.dashboard-card.alerta-estoque .card-title:before {
  content: '\1F480 ';
  font-size: 1.1em;
  margin-right: 6px;
}

.dashboard-card.alerta-estoque .card-value ul {
  margin: 0;
  padding-left: 18px;
}

.dashboard-card.alerta-estoque .card-value li {
  margin-bottom: 4px;
  font-size: 0.98em;
  line-height: 1.4;
  color: #b71c1c;
}

/* Dashboard cards - reforço visual */
.dashboard-cards {
  display: flex;
  gap: 28px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.dashboard-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
  padding: 22px 32px 18px 32px;
  min-width: 180px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  font-size: 1.1em;
  border-left: 6px solid #1976d2;
}

.dashboard-card.entradas {
  border-left-color: #43a047;
}

.dashboard-card.saidas {
  border-left-color: #e53935;
}

.dashboard-card.saldo {
  border-left-color: #1976d2;
}

.dashboard-card .card-title {
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 1.08em;
  color: #888;
}

.dashboard-card .card-value {
  font-size: 1.35em;
  font-weight: bold;
  color: #232b3e;
}

@media (max-width: 900px) {
  .dashboard-cards {
    gap: 16px;
  }

  .dashboard-card {
    padding: 18px 10px 12px 16px;
    min-width: 120px;
  }
}

@media (max-width: 600px) {
  .dashboard-cards {
    flex-direction: column;
    gap: 10px;
  }

  .dashboard-card {
    min-width: 0;
    width: 100%;
    padding: 12px 8px 10px 12px;
  }
}

.dashboard-filter-bar {
  margin-bottom: 28px;
}

/* Estilos de login movidos para login.css */

/* Modal moderno centralizado */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal de exclusão específico */
.modal-delete {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  animation: modalDeleteFadeIn 0.3s ease-out;
}

@keyframes modalDeleteFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

/* Modal de edição com z-index maior */
#modal-edit {
  z-index: 2000 !important;
}

/* Modal de detalhes com z-index intermediário */
#modal-detalhes-evento {
  z-index: 1500 !important;
}

.modal[style*='display: flex'] {
  display: flex !important;
}

.modal-content {
  background: #ffffff;
  border-radius: 20px;
  min-width: 400px;
  max-width: 90vw;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.06);
  animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
}

.modal-header {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  position: relative;
  z-index: 1;
}

.modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  font-size: 24px;
  padding: 0;
  outline: none;
  position: relative;
  z-index: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.modal-close:active {
  transform: scale(0.95);
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  background: #fafbfc;
}

.modal-footer {
  padding: 20px 32px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Botões modernos do modal */
.btn-modal-cancel,
.btn-modal-save {
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-modal-cancel {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.btn-modal-cancel:hover {
  background: #e5e7eb;
  color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-modal-cancel:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.btn-modal-save {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-modal-save:hover {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

.btn-modal-save:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.btn-modal-cancel svg,
.btn-modal-save svg {
  width: 18px;
  height: 18px;
}

/* Formulários dentro do modal */
#edit-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#edit-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
  margin-bottom: 8px;
}

#edit-form input,
#edit-form select,
#edit-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #1f2937;
  background: #ffffff;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#edit-form input:focus,
#edit-form select:focus,
#edit-form textarea:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

#edit-form input:hover,
#edit-form select:hover,
#edit-form textarea:hover {
  border-color: #cbd5e1;
}

#edit-form textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

#edit-form input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  cursor: pointer;
}

#edit-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Responsividade para modais */
@media (max-width: 768px) {
  .modal-content {
    min-width: 95vw;
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 16px;
  }
  
  .modal-header {
    padding: 20px 24px;
  }
  
  .modal-header h2 {
    font-size: 1.25rem;
  }
  
  .modal-close {
    width: 36px;
    height: 36px;
  }
  
  .modal-body {
    padding: 24px 20px;
  }
  
  .modal-footer {
    padding: 16px 20px;
    flex-direction: column-reverse;
  }
  
  .btn-modal-cancel,
  .btn-modal-save {
    width: 100%;
    justify-content: center;
  }
  
  #edit-form {
    gap: 16px;
  }
  
  #edit-form label {
    font-size: 0.85rem;
    margin-bottom: 6px;
  }
  
  #edit-form input,
  #edit-form select,
  #edit-form textarea {
    padding: 10px 14px;
    font-size: 16px; /* Evita zoom no iOS */
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Conteúdo específico do modal de exclusão */
.modal-delete-content {
  background: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 32px 28px 28px 28px;
  max-width: 400px;
  width: 90%;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.1),
    0 10px 30px rgba(0, 0, 0, 0.05);
  animation: modalDeleteSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.modal-delete-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  border-radius: 16px 16px 0 0;
}

@keyframes modalDeleteSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Cabeçalho do modal de exclusão */
.modal-delete-header {
  text-align: center;
  margin-bottom: 28px;
}

.modal-delete-icon {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 56px;
  height: 56px;
  background: #fef2f2;
  border-radius: 50%;
  margin: 0 auto 16px auto;
  animation: modalDeleteIconFadeIn 0.6s ease-out;
}

@keyframes modalDeleteIconFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-delete-title {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.modal-delete-message {
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.modal-delete-warning {
  font-size: 13px;
  color: #92400e;
  font-weight: 500;
  margin: 0;
  padding: 10px 14px;
  background: #fffbeb;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 280px;
}

/* Ações do modal de exclusão */
.modal-delete-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  padding: 0 24px 24px 24px; /* respiro lateral e na base */
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.5em;
  color: #1976d2;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
}

.modal-close:hover {
  color: #e53935;
  background: rgba(25, 118, 210, 0.1);
}

/* Desktop: botões do modal de exclusão com tamanho equilibrado */
@media (min-width: 481px) {
  .modal-delete-actions .btn-cancel,
  .modal-delete-actions .btn-delete-confirm {
    width: auto;
    min-width: 160px;
    padding: 12px 24px;
    border-radius: 12px;
  }
}

/* Botão de fechar específico para modal de detalhes */
.modal-close-detalhes {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: bold;
  line-height: 1;
  z-index: 10;
}

.modal-close-detalhes:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.modal-content h2,
.modal-content h3 {
  color: #1976d2;
  font-size: 1.25em;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: center;
}

.modal-content button.btn,
.modal-content .btn {
  margin-top: 12px;
  margin-right: 8px;
  min-width: 110px;
}

@media (max-width: 600px) {
  .modal-content {
    padding: 18px 2vw 18px 2vw;
    min-width: 0;
    max-width: 99vw;
  }
}

.content-area {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 32px;
  margin-bottom: 24px;
  overflow-x: auto;
  max-width: 98vw;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(0, 0, 0, 0.04);
  min-height: 400px;
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 12px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px #1976d210;
  overflow: hidden;
  font-size: 0.97em;
}

th,
td {
  padding: 8px 7px;
  text-align: left;
}

th {
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 700;
  font-size: 1.07em;
  border-bottom: 2px solid #bbdefb;
}

td {
  border-bottom: 1px solid #f0f4f8;
  color: #222;
  font-weight: 500;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
}

tbody tr:nth-child(even) {
  background: #fafbfc;
}

tbody tr:hover {
  background: #e3f2fd;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.12);
  transform: scale(1.005);
}

tbody tr:last-child td:first-child {
  border-bottom-left-radius: 16px;
}

tbody tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

tbody tr:last-child td {
  border-bottom: none;
}

td:last-child,
th:last-child {
  text-align: center;
}

/* Botões de ação na tabela - padronizados (tamanho/cores) */
td .btn {
  margin-right: 8px;
  margin-top: 0;
  margin-bottom: 0;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 10px;
  font-weight: 600;
  /* esconder qualquer texto interno como "Editar/Excluir" */
  font-size: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: hidden;
}

td .btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

td .btn:hover::before {
  width: 200px;
  height: 200px;
}

/* Editar = azul padrão da marca */
td .btn-edit {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(25, 118, 210, 0.25);
}

td .btn-edit:hover {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  box-shadow: 0 5px 15px rgba(25, 118, 210, 0.35);
  transform: translateY(-2px);
}

/* Excluir = vermelho padrão */
td .btn-delete {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.25);
}

td .btn-delete:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.35);
  transform: translateY(-2px);
}

td .btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

td .btn:last-child {
  margin-right: 0;
}

/* Ícones (fallback com emojis se não houver SVG dentro) */
td .btn-edit:not(:has(svg))::after {
  content: '✏️';
  font-size: 1rem;
}

td .btn-delete:not(:has(svg))::after {
  content: '🗑️';
  font-size: 1rem;
}

/* Garantir centralização de SVGs/ícones */
td .btn svg,
td .btn i {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* Versão alternativa: ícones SVG inline (mais profissional) */
/* Para usar: adicione a classe .svg-icon aos botões */
td .btn.svg-icon::after {
  content: '';
  display: none;
}

td .btn-edit.svg-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>');
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  background-size: 14px;
  padding-right: 32px;
}

td .btn-delete.svg-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>');
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  background-size: 14px;
  padding-right: 32px;
}

/* Botão ícone padrão (usado em algumas tabelas) */
td .btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Na coluna Ações: primeiro botão (editar) azul, segundo (excluir) vermelho */
.data-table td .btn-icon:first-child {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: #ffffff;
  border-color: transparent;
}

.data-table td .btn-icon:first-child:hover {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(25, 118, 210, 0.35);
}

.data-table td .btn-icon:last-child {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border-color: transparent;
}

.data-table td .btn-icon:last-child:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.35);
}

/* Animação de pulso ao carregar */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Container de ações para melhor organização */
.actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* Actions Bar melhorada */
.actions-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

#section-buttons-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

#search-input {
  flex: 1;
  max-width: 450px;
  padding: 14px 20px 14px 50px;
  border: 2px solid #e3f2fd;
  border-radius: 50px;
  font-size: 0.95em;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%231976d2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>') no-repeat 18px center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

#search-input:hover {
  border-color: #90caf9;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

#search-input:focus {
  outline: none;
  border-color: #1976d2;
  background-color: #f0f8ff;
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.15), 0 0 0 4px rgba(25, 118, 210, 0.08);
  transform: translateY(-1px);
}

#search-input::placeholder {
  color: #90a4ae;
  font-style: italic;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-add::after {
  content: '+';
  font-size: 1.2em;
  font-weight: 700;
  display: none;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
  border-radius: 10px;
  border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
}

.sidebar #sidebar-toggle {
  position: absolute;
  top: 20px;
  right: -2px; /* com menu aberto, mantém o botão visível */
  z-index: 5000; /* garante que fique acima do conteúdo principal */
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border: 2px solid rgba(25, 118, 210, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  outline: none;
  color: #1976d2;
}

#sidebar-toggle:hover {
  background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
  box-shadow: 0 6px 24px rgba(25, 118, 210, 0.25), 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: scale(1.08);
  border-color: rgba(25, 118, 210, 0.4);
}

#sidebar-toggle:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

#sidebar-toggle span#sidebar-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 20px;
  height: 20px;
}

#sidebar-toggle span#sidebar-arrow svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.sidebar-collapsed #sidebar-toggle {
  right: -20px;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.sidebar-collapsed #sidebar-toggle:hover {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  border-color: rgba(255, 255, 255, 0.5);
}

.sidebar-collapsed #sidebar-toggle span#sidebar-arrow {
  transform: rotate(180deg);
  color: #ffffff;
}

.modal-content form {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 18px;
  align-items: start;
}

.modal-content label {
  color: #1976d2;
  font-weight: 700;
  font-size: 1.13em;
  margin-bottom: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-content input[type="text"],
.modal-content input[type="number"],
.modal-content select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
  height: 44px;
  font-size: 1.08em;
  padding: 10px 14px;
  border-radius: 7px;
  border: 1px solid #90caf9;
  background: #f8fbff;
  margin-bottom: 0;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px #1976d110;
}

.modal-content .full-row {
  grid-column: 1 / -1;
}

.modal-content button.btn {
  grid-column: 1 / -1;
  width: 100%;
  margin: 18px 0 0 0;
  font-size: 1.08em;
  padding: 12px 0;
  border-radius: 8px;
}

@media (max-width: 700px) {
  .modal-content form {
    grid-template-columns: 1fr;
    max-width: 99vw;
    gap: 12px 0;
  }
}

#modal-title,
.modal-content h2 {
  color: #1976d2;
  font-size: 1.45em;
  font-weight: 800;
  margin-bottom: 18px;
  text-align: center;
  letter-spacing: 0.5px;
}

/* --- Controles do header do DRE --- */
.dre-header-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
  padding: 0 8px;
}

.btn-comparativo {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.btn-comparativo:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

.btn-comparativo.ativo {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-comparativo.ativo:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-comparativo svg {
  flex-shrink: 0;
}

/* --- DRE comparativa lado a lado --- */
.dre-compare-container {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
  box-sizing: border-box;
  overflow-x: auto;
  transition: all 0.4s ease;
}

/* Quando não está no modo comparativo, primeira box ocupa 100% */
.dre-compare-container:not(.comparativo-ativo) .dre-compare-box-esq {
  flex: 1 1 100%;
  max-width: 100%;
}

/* Quando está no modo comparativo, ambas ocupam 50% */
.dre-compare-container.comparativo-ativo .dre-compare-box-esq,
.dre-compare-container.comparativo-ativo .dre-compare-box-dir {
  flex: 0 0 50%;
  max-width: 50%;
}

.dre-compare-box-esq,
.dre-compare-box-dir {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.12);
  padding: 18px 12px 24px 12px;
  box-sizing: border-box;
  transition: all 0.4s ease;
}

.dre-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dre-box-header label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
}

.dre-box-header input[type="month"] {
  padding: 8px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.dre-box-header input[type="month"]:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsivo (mobile) */
@media (max-width: 900px) {
  .dre-compare-container {
    flex-direction: column;
  }

  .dre-compare-box-esq,
  .dre-compare-box-dir {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }
  
  .dre-header-controls {
    justify-content: center;
  }
  
  .btn-comparativo {
    width: 100%;
    justify-content: center;
  }
}

/* --- Detalhamento de Categorias no DRE --- */
.dre-categoria-header {
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

.btn-categoria-toggle {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-categoria-toggle:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-color: #94a3b8;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.btn-categoria-toggle .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 12px;
  color: #64748b;
}

.btn-categoria-toggle.expanded .arrow {
  transform: rotate(90deg);
}

.dre-categorias-detail {
  display: none;
  background: #fefefe;
  border-left: 3px solid #3b82f6;
}

.dre-categorias-detail.show {
  display: table-row;
}

.dre-categorias-wrapper {
  padding: 12px 24px 12px 48px;
  animation: slideDown 0.3s ease;
}

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

.dre-categorias-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dre-categorias-table tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s ease;
}

.dre-categorias-table tr:last-child {
  border-bottom: none;
}

.dre-categorias-table tr:hover {
  background: #f8fafc;
}

.dre-categorias-table td {
  padding: 10px 16px;
  font-size: 14px;
}

.categoria-nome {
  color: #334155;
  font-weight: 500;
  width: 60%;
}

.categoria-valor {
  color: #dc2626;
  font-weight: 600;
  text-align: right;
  width: 40%;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Courier New', monospace;
}

/* --- Fim DRE comparativa --- */

/* ===== SISTEMA DE TOAST/NOTIFICAÇÕES ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  margin-bottom: 10px;
  min-width: 300px;
  max-width: 400px;
  border-left: 4px solid;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.success {
  border-left-color: #1e40af;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.toast.success .toast-icon {
  color: #1e40af;
}

.toast.error {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.toast.info {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.toast.warning {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: #1e40af;
}

.toast.error .toast-icon {
  color: #ef4444;
}

.toast.info .toast-icon {
  color: #3b82f6;
}

.toast.warning .toast-icon {
  color: #f59e0b;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: #1f2937;
}

.toast-message {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #6b7280;
}

/* Responsividade para toast */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* Estilos para Notas Fiscais */
.notas-fiscais-container {
  padding: 20px;
}

.filtros-container {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: end;
}

.filtro-grupo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filtro-grupo label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.filtro-grupo input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.filtro-grupo input:focus {
  border-color: #1976d2;
  outline: none;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.total-container {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.total-container h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

#total-valor {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Responsividade para filtros */
@media (max-width: 768px) {
  .filtros-container {
    flex-direction: column;
    gap: 15px;
  }

  .filtro-grupo {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .filtro-grupo label {
    min-width: 120px;
  }
}

/* Estilos para Módulos de Fluxo de Caixa */
.fluxo-container {
  padding: 20px;
}

.fluxo-container .filtros-container {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: end;
}

.fluxo-container .total-container {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.fluxo-container .total-container h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.fluxo-container #total-valor {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsividade para módulos de fluxo */
@media (max-width: 768px) {
  .fluxo-container .filtros-container {
    flex-direction: column;
    gap: 15px;
  }

  .fluxo-container .filtro-grupo {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .fluxo-container .filtro-grupo label {
    min-width: 120px;
  }
}

/* Estilos para Módulo de Contas a Pagar */
.contas-pagar-container {
  padding: 20px;
}

.contas-pagar-container .filtros-container {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: end;
}

.contas-pagar-container .resumo-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.contas-pagar-container .resumo-item {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contas-pagar-container .resumo-item .numero {
  font-size: 32px;
  font-weight: 800;
  display: block;
  margin-bottom: 8px;
}

.contas-pagar-container .resumo-item .label {
  font-size: 14px;
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
}

.info-filtro {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

.info-filtro span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.contas-pagar-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contas-pagar-table th {
  background: #f8f9fa;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e9ecef;
}

.contas-pagar-table td {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
}

.contas-pagar-table tr:hover {
  background: #f8f9fa;
}

.status-badge {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0;
  border: 2px solid transparent;
}

.status-pendente {
  background: #fff3cd;
  color: #856404;
}

.status-pago {
  background: #d4edda;
  color: #155724;
}

.status-atrasado {
  background: #f8d7da;
  color: #721c24;
}

.btn-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

td .btn-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  border-radius: 12px;
}

td .btn-success::before {
  display: none;
}

td .btn-success:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
  transform: translateY(-2px);
}

/* Responsividade para contas a pagar */
@media (max-width: 768px) {
  .contas-pagar-container .filtros-container {
    flex-direction: column;
    gap: 15px;
  }

  .contas-pagar-container .resumo-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .contas-pagar-table {
    font-size: 14px;
  }

  .contas-pagar-table th,
  .contas-pagar-table td {
    padding: 10px 8px;
  }
}

@media (max-width: 600px) {
  .contas-pagar-container .resumo-container {
    grid-template-columns: 1fr;
  }

  .contas-pagar-table {
    font-size: 12px;
  }
}

/* ===== MÓDULO PARCIAL CAIXA ===== */
.parcial-caixa-container {
  padding: 20px;
}

.resumo-parcial-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.resumo-parcial-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.resumo-parcial-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resumo-parcial-item.total-geral {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #ffffff;
  border: none;
}

.resumo-parcial-item .numero {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.resumo-parcial-item .numero.positivo {
  color: #1e40af;
}

.resumo-parcial-item .numero.negativo {
  color: #dc2626;
}

.resumo-parcial-item.total-geral .numero {
  color: #ffffff;
}

.resumo-parcial-item .label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
}

.resumo-parcial-item.total-geral .label {
  color: rgba(255, 255, 255, 0.9);
}

.parcial-detalhes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.parcial-secao {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.parcial-secao h3 {
  margin: 0 0 20px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 10px;
  flex-shrink: 0;
}

.parcial-secao>div {
  flex: 1;
  overflow: auto;
}

.parcial-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-height: 300px;
}

.parcial-table th {
  background: #f9fafb;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.parcial-table td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.parcial-table tr:hover {
  background: #f9fafb;
}

.parcial-table tbody {
  min-height: 200px;
}

.valor-positivo {
  color: #1e40af;
  font-weight: 600;
}

.valor-negativo {
  color: #dc2626;
  font-weight: 600;
}

/* Responsividade para parcial caixa */
@media (max-width: 1200px) {
  .parcial-detalhes {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .resumo-parcial-container {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }

  .parcial-detalhes {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .resumo-parcial-item .numero {
    font-size: 1.25rem;
  }

  .parcial-table {
    font-size: 0.8rem;
  }

  .parcial-table th,
  .parcial-table td {
    padding: 8px;
  }

  .parcial-secao {
    min-height: 300px;
  }
}

/* ===== MÓDULO AGENDA ===== */
.agenda-container {
  padding: 20px;
}

.agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agenda-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.agenda-controls h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  min-width: 200px;
  text-align: center;
}

.agenda-controls button {
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agenda-controls button:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.agenda-actions {
  display: flex;
  gap: 10px;
}

.agenda-filtros {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agenda-filtros .filtro-grupo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agenda-filtros label {
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

.agenda-filtros select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  background: #fff;
  min-width: 120px;
}

.agenda-filtros select:focus {
  border-color: #1976d2;
  outline: none;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.agenda-calendario {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 30px;
}

.calendario-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
}

.calendario-header>div {
  padding: 15px 10px;
  text-align: center;
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

.calendario-dias {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  min-height: 400px;
}

.dia {
  border-right: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  padding: 10px;
  min-height: 80px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
}

.dia:nth-child(7n) {
  border-right: none;
}

.dia:hover {
  background: #f9fafb;
}

.dia.hoje {
  background: #eff6ff;
  border: 2px solid #1976d2;
}

.dia.vazio {
  background: #f9fafb;
  cursor: default;
}

.dia-numero {
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

.eventos-dia {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.evento-mini {
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: white;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.evento-mini:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.evento-mini-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.evento-mini-titulo {
  font-weight: 600;
  font-size: 0.7rem;
  line-height: 1.2;
}

.evento-mini-hora {
  font-size: 0.65rem;
  opacity: 0.9;
  font-weight: 400;
}

.mais-eventos {
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.mais-eventos:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Tooltip detalhado */
.tooltip-detalhado {
  position: fixed;
  z-index: 10000;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid #e5e7eb;
  max-width: 350px;
  min-width: 280px;
  overflow: hidden;
  animation: tooltipFadeIn 0.3s ease;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tooltip-header {
  padding: 16px 20px;
  color: white;
  position: relative;
}

.tooltip-titulo {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 6px;
  line-height: 1.3;
}

.tooltip-tipo {
  font-size: 0.8rem;
  opacity: 0.9;
  font-weight: 500;
}

.tooltip-content {
  padding: 16px 20px;
}

.tooltip-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
}

.tooltip-item:last-child {
  margin-bottom: 0;
}

.tooltip-icon {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 1px;
  width: 16px;
  text-align: center;
}

.tooltip-actions {
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 8px;
}

.btn-tooltip {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-tooltip:hover {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

/* Modal de eventos do dia */
.modal-eventos-dia {
  max-width: 600px;
}

.modal-eventos-dia h2 {
  margin-bottom: 20px;
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
}

.eventos-dia-lista {
  max-height: 400px;
  overflow-y: auto;
}

.evento-dia-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
}

.evento-dia-item:hover {
  background: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.evento-dia-cor {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  flex-shrink: 0;
}

.evento-dia-info {
  flex: 1;
}

.evento-dia-titulo {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.evento-dia-hora {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 2px;
}

.evento-dia-tipo {
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
  font-weight: 500;
}

/* Melhorias visuais para prioridades no tooltip */
.prioridade-baixa {
  color: #7b1fa2;
  font-weight: 600;
}

.prioridade-normal {
  color: #388e3c;
  font-weight: 600;
}

.prioridade-alta {
  color: #f57c00;
  font-weight: 600;
}

.prioridade-urgente {
  color: #d32f2f;
  font-weight: 600;
}

.agenda-lista {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(25, 118, 210, 0.15);
  padding: 24px;
  border: 2px solid #e3f2fd;
  position: relative;
  overflow: hidden;
}

.agenda-lista::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
}

.agenda-lista h3 {
  margin: 0 0 24px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1976d2;
  border-bottom: 2px solid #bbdefb;
  padding-bottom: 12px;
  position: relative;
}

.agenda-lista h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
}

.sem-eventos {
  text-align: center;
  padding: 60px 20px;
  color: #374151;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px dashed #d1d5db;
}

.sem-eventos-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.sem-eventos-texto {
  font-size: 1.1rem;
  font-weight: 500;
  color: #6b7280;
}

.evento-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 2px solid #e3f2fd;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}

.evento-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
  transition: width 0.3s ease;
}

.evento-item:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 118, 210, 0.2);
  border-color: #1976d2;
}

.evento-item:hover::before {
  width: 6px;
}

.evento-item.hoje {
  border-color: #1976d2;
  background: #eff6ff;
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.15);
}

.evento-item.hoje::before {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  width: 6px;
}

.evento-item.passado {
  opacity: 0.8;
  background: #f9fafb;
  border-color: #d1d5db;
}

.evento-item.passado::before {
  background: #9ca3af;
}

.evento-cor {
  width: 6px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 4px;
  height: calc(100% - 8px);
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
}

.evento-info {
  flex: 1;
  min-width: 0;
}

.evento-titulo {
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
  font-size: 1.1rem;
  line-height: 1.3;
}

.evento-detalhes {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.evento-tipo {
  background: #e3f2fd;
  color: #1976d2;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #bbdefb;
}

.evento-prioridade {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}

.evento-prioridade.baixa {
  background: #f3e5f5;
  color: #7b1fa2;
  border-color: #ce93d8;
}

.evento-prioridade.normal {
  background: #e8f5e8;
  color: #388e3c;
  border-color: #a5d6a7;
}

.evento-prioridade.alta {
  background: #fff3e0;
  color: #f57c00;
  border-color: #ffcc80;
}

.evento-prioridade.urgente {
  background: #ffebee;
  color: #d32f2f;
  border-color: #ef9a9a;
}

.evento-horario {
  color: #1976d2;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.evento-horario::before {
  content: '⏰';
  font-size: 0.8rem;
}

.evento-local {
  color: #1976d2;
  font-size: 0.875rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.evento-local::before {
  content: '📍';
  font-size: 0.8rem;
}

.evento-descricao {
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #1976d2;
}

.evento-acoes {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Responsividade para agenda */
@media (max-width: 1200px) {
  .agenda-header {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }

  .agenda-controls {
    justify-content: center;
  }

  .agenda-actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .agenda-filtros {
    flex-direction: column;
    gap: 15px;
  }

  .agenda-filtros .filtro-grupo {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .agenda-filtros label {
    min-width: 80px;
  }

  .calendario-dias {
    min-height: 300px;
  }

  .dia {
    min-height: 60px;
    padding: 5px;
  }

  .evento-mini {
    font-size: 0.7rem;
    padding: 1px 4px;
  }

  .evento-detalhes {
    flex-direction: column;
    gap: 5px;
  }

  .tooltip-detalhado {
    max-width: 280px;
    min-width: 250px;
  }

  .evento-detalhes-actions {
    flex-direction: column;
  }

  .evento-detalhes-actions .btn {
    width: 100%;
  }

  /* Responsividade para modal de detalhes */
  .modal-detalhes {
    max-width: 95vw;
    margin: 20px;
  }

  .evento-detalhes-header {
    padding: 20px;
    min-height: 70px;
  }

  .evento-detalhes-header .modal-close {
    top: 12px;
    right: 16px;
    width: 28px;
    height: 28px;
    font-size: 20px;
  }

  .evento-detalhes-title h2 {
    font-size: 1.25rem;
  }

  .evento-detalhes-badges {
    gap: 6px;
  }

  .badge-tipo,
  .badge-prioridade {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .evento-detalhes-content {
    padding: 20px;
  }

  .detalhe-item {
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
  }

  .detalhe-icon {
    font-size: 1.25rem;
    width: 20px;
  }

  .detalhe-label {
    font-size: 0.7rem;
  }

  .detalhe-value {
    font-size: 0.9rem;
  }

  .evento-detalhes-actions {
    padding: 16px 20px;
    gap: 8px;
  }

  .evento-detalhes-actions .btn {
    padding: 10px 12px;
    font-size: 0.8rem;
    min-height: 40px;
  }

  .btn-icon {
    font-size: 0.9rem;
  }
}

/* Estilos específicos para o modal de edição da agenda */
#modal-edit .modal-content {
  max-width: 800px;
  width: 100%;
  padding: 30px;
}

#modal-edit .modal-content h2 {
  margin-bottom: 25px;
  color: #1976d2;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

#modal-edit form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#modal-edit .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

#modal-edit .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#modal-edit .form-group.full-width {
  grid-column: 1 / -1;
}

#modal-edit .form-group.half-width {
  grid-column: span 1;
}

#modal-edit .form-group label {
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
  margin-bottom: 0;
}

#modal-edit .form-group input,
#modal-edit .form-group select,
#modal-edit .form-group textarea {
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  background: #fff;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

#modal-edit .form-group input:focus,
#modal-edit .form-group select:focus,
#modal-edit .form-group textarea:focus {
  border-color: #1976d2;
  outline: none;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

#modal-edit .form-group textarea {
  resize: vertical;
  min-height: 80px;
}

#modal-edit .form-group input[type="color"] {
  height: 50px;
  padding: 8px;
  cursor: pointer;
}

#modal-edit .form-group input[type="datetime-local"] {
  font-family: inherit;
}

#modal-edit button[type="submit"] {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
  width: 100%;
}

#modal-edit button[type="submit"]:hover {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

/* Responsividade para o modal de edição */
@media (max-width: 1024px) {
  #modal-edit .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  #modal-edit .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  #modal-edit .modal-content {
    padding: 20px;
    margin: 20px;
  }

  #modal-edit .form-group input,
  #modal-edit .form-group select,
  #modal-edit .form-group textarea {
    font-size: 16px;
    /* Evita zoom no iOS */
  }
}

/* Estilos para os novos relatórios estratégicos */

/* Dashboard Executivo */
.dashboard-kpi {
  font-weight: 600;
  color: #1976d2;
}

.dashboard-valor {
  font-size: 1.1em;
  font-weight: 700;
}

/* Alertas Inteligentes */
.alerta {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
}

.alerta.estoque_baixo {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alerta.produtos_parados {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alerta.contas_vencidas {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alerta.contas_vencendo {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alerta.eventos_hoje {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Análise de Rentabilidade */
.analise-rentabilidade {
  font-weight: 600;
}

.variacao-positiva {
  color: #1e40af;
  font-weight: 700;
}

.variacao-negativa {
  color: #dc3545;
  font-weight: 700;
}

/* Melhorias gerais para relatórios */
.resumo-item .numero.positivo {
  color: #1e40af;
}

.resumo-item .numero.negativo {
  color: #dc3545;
}

/* Responsividade para novos relatórios */
@media (max-width: 768px) {
  .alerta {
    font-size: 0.75em;
    padding: 2px 6px;
  }

  .dashboard-valor {
    font-size: 1em;
  }
}

/* ===== MÓDULO DE COMISSÕES ===== */

.comissoes-container {
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comissoes-filtros {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  flex-wrap: wrap;
}

.filtro-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filtro-group label {
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.filtro-group select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  background: #ffffff;
  min-width: 120px;
}

.comissoes-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.comissoes-tab {
  padding: 12px 24px;
  background: #f3f4f6;
  border: none;
  border-radius: 6px 6px 0 0;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comissoes-tab:hover {
  background: #e5e7eb;
  color: #374151;
}

.comissoes-tab.active {
  background: #ffffff;
  color: #1f2937;
  border-bottom: 2px solid #3b82f6;
}

.comissoes-content {
  background: #ffffff;
  border-radius: 0 0 6px 6px;
}

.comissoes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 0 15px 0;
  border-bottom: 1px solid #e5e7eb;
}

.comissoes-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
}

.btn-primary {
  background: #3b82f6;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #6b7280;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: #4b5563;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.badge-master {
  background: #fef3c7;
  color: #92400e;
}

.badge-ouro {
  background: #fbbf24;
  color: #92400e;
}

.btn-edit,
.btn-delete {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 2px;
  transition: all 0.2s ease;
}

.btn-edit {
  background: #3b82f6;
  color: #ffffff;
}

.btn-edit:hover {
  background: #2563eb;
}

.btn-delete {
  background: #ef4444;
  color: #ffffff;
}

.btn-delete:hover {
  background: #dc2626;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #ffffff;
  margin: auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
}

.close {
  color: #6b7280;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close:hover {
  color: #374151;
}

.modal-content form {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .comissoes-filtros {
    flex-direction: column;
    gap: 15px;
  }

  .filtro-group select {
    min-width: auto;
  }

  .comissoes-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .modal-content {
    width: 95%;
    margin: 20px;
  }
}

/* Relatório de Comissões */
.relatorio-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.resumo-card {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.resumo-card h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resumo-card span {
  font-size: 24px;
  font-weight: bold;
  display: block;
}

/* Status badges */
.status-badge {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0;
  border: 2px solid transparent;
}

.status-excelente {
  background: #10b981;
}

.status-bom {
  background: #3b82f6;
}

.status-regular {
  background: #f59e0b;
}

.status-ruim {
  background: #ef4444;
}

/* Progress bars melhoradas */
.progress-bar {
  width: 100%;
  height: 12px;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
  margin: 8px 0;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.5s ease;
  position: relative;
  border-radius: 6px;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Barras de progresso por status */
.progress-fill.excelente {
  background: linear-gradient(90deg, #059669, #10b981);
}

.progress-fill.bom {
  background: linear-gradient(90deg, #0d9488, #14b8a6);
}

.progress-fill.regular {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.progress-fill.ruim {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}

/* Destaque para valores importantes */
.valor-destaque {
  font-weight: bold;
  color: #1e40af;
  text-shadow: 0 1px 2px rgba(30, 64, 175, 0.1);
}

.valor-negativo {
  color: #dc2626;
  font-weight: 600;
}

/* Melhorar espaçamento das tabelas */
.comissoes-table {
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.comissoes-table th {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  padding: 16px 12px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.comissoes-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.comissoes-table tbody tr:hover {
  background: #f8fafc;
  transition: background 0.2s ease;
}

/* Scroll horizontal para tabelas de comissões */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
}

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

.table-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #1e40af, #3b82f6);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
}

/* Garantir largura mínima para tabelas */
.data-table {
  min-width: 1200px;
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  white-space: nowrap;
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.data-table th {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table tbody tr:hover {
  background: #f8fafc;
  transition: background 0.2s ease;
}

/* Zebra alternado para melhorar leitura */
.data-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

/* Melhorar cards de resumo */
.relatorio-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.resumo-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resumo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.resumo-card h4 {
  margin: 0 0 10px 0;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resumo-card span {
  font-size: 24px;
  font-weight: bold;
  color: #1e40af;
  display: block;
}

/* Responsividade */
@media (max-width: 768px) {
  .relatorio-resumo {
    grid-template-columns: repeat(2, 1fr);
  }

  .resumo-card {
    padding: 15px;
  }

  .resumo-card span {
    font-size: 20px;
  }
}

/* Espaçamento extra para evitar corte */
.comissoes-content {
  padding-bottom: 50px;
}

.comissoes-table {
  margin-bottom: 40px;
}

/* Melhorar visualização em telas menores */
@media (max-width: 1024px) {
  .comissoes-table {
    font-size: 13px;
  }
  
  .comissoes-table th,
  .comissoes-table td {
    padding: 10px 8px;
  }
  
  .progress-bar {
    height: 10px;
  }
  
  .data-table {
    min-width: 1400px;
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }
}

/* Estilos específicos para tabela de relatório */
#comissoes-content-relatorio .table-container {
  overflow-x: auto;
  max-width: 100%;
  position: relative;
}

#comissoes-content-relatorio .table-container::after {
  content: none;
  display: none;
}

#comissoes-content-relatorio .table-container.show-scroll-indicator::after {
  content: '← Arraste para ver mais colunas →';
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.9;
  pointer-events: none;
  white-space: nowrap;
  display: block;
}

#comissoes-content-relatorio .table-container[data-scroll-direction="left"]::after {
  --scroll-content: '← Arraste para ver mais colunas';
}

#comissoes-content-relatorio .table-container[data-scroll-direction="right"]::after {
  --scroll-content: 'Arraste para ver mais colunas →';
}

#comissoes-content-relatorio .table-container[data-scroll-direction="both"]::after {
  --scroll-content: '← Arraste para ver mais colunas →';
}

#comissoes-content-relatorio .data-table {
  min-width: 1600px;
}

/* Melhorar visualização das colunas específicas do relatório */
.data-table th:nth-child(1), /* Funcionário */
.data-table td:nth-child(1) {
  min-width: 150px;
  max-width: 200px;
}

.data-table th:nth-child(6), /* Atingimento */
.data-table td:nth-child(6) {
  min-width: 120px;
}

.data-table th:nth-child(12), /* Status */
.data-table td:nth-child(12) {
  min-width: 100px;
}

/* Alinhamento à direita para valores numéricos/percentuais no relatório */
#comissoes-content-relatorio .data-table td:nth-child(2), /* Meta Total */
#comissoes-content-relatorio .data-table td:nth-child(3), /* Vendas Master */
#comissoes-content-relatorio .data-table td:nth-child(4), /* Vendas Ouro */
#comissoes-content-relatorio .data-table td:nth-child(5), /* Vendas Total */
#comissoes-content-relatorio .data-table td:nth-child(7), /* % Vendas Master */
#comissoes-content-relatorio .data-table td:nth-child(8), /* % Vendas Ouro */
#comissoes-content-relatorio .data-table td:nth-child(9), /* Comissão Master */
#comissoes-content-relatorio .data-table td:nth-child(10), /* Comissão Ouro */
#comissoes-content-relatorio .data-table td:nth-child(11) /* Comissão Total */{
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Centralizar coluna de Status para melhor leitura */
#comissoes-content-relatorio .data-table th:nth-child(12),
#comissoes-content-relatorio .data-table td:nth-child(12) {
  text-align: center;
}

/* Barra de progresso de atingimento */
.progress-bar {
  background: #e5e7eb;
  height: 12px;
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.3s ease;
}

.progress-fill.excelente { background: #10b981; }
.progress-fill.bom { background: #3b82f6; }
.progress-fill.regular { background: #f59e0b; }
.progress-fill.ruim { background: #ef4444; }

/* Badges de status */
.status-badge {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0;
  border: 2px solid transparent;
}
.status-excelente { background: #10b981; }
.status-bom { background: #3b82f6; }
.status-regular { background: #f59e0b; }
.status-ruim { background: #ef4444; }

/* Minhas Vendas */
.minhas-vendas-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.resumo-item {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.resumo-item h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resumo-item span {
  font-size: 24px;
  font-weight: bold;
  display: block;
}

/* Meta da Loja */
.meta-loja-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.meta-loja-form .form-group label {
  color: #1976d2;
  font-weight: 700;
}

.meta-loja-form .form-group input,
.meta-loja-form .form-group select {
  height: 40px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .minhas-vendas-resumo {
    grid-template-columns: repeat(2, 1fr);
  }

  .resumo-item {
    padding: 15px;
  }

  .resumo-item span {
    font-size: 20px;
  }
}

/* Garantir que o botão de toggle seja sempre visível e acessível */
#sidebar-toggle {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  pointer-events: all !important;
}

#sidebar-toggle span#sidebar-arrow {
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-flex !important;
}