/* ========== SIDEBAR PREMIUM ========== */
/* ========== SIDEBAR RESPONSIVO ========== */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #08093E 0%, #1A1C5E 100%);
  color: #FFFFFF;
  position: fixed;
  height: 100vh;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  transform: translateX(0);
}

.sidebar.collapsed {
  width: 80px;
  overflow: hidden;
}

/* Header da Sidebar */
.sidebar-header {
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar.collapsed .sidebar-header {
  padding: 1.5rem 0.5rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.sidebar.collapsed .user-profile {
  justify-content: center;
}

.avatar-sidebar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.sidebar.collapsed .avatar-sidebar {
  width: 40px;
  height: 40px;
}

.user-info {
  transition: opacity 0.3s;
}

.sidebar.collapsed .user-info {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.sidebar-brand {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  white-space: nowrap;
}

.user-email {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.header-accent {
  height: 3px;
  background: linear-gradient(90deg, #FF0401, #FF6B6B);
  margin-top: 1rem;
  border-radius: 3px;
  width: 100%;
}

.sidebar.collapsed .header-accent {
  width: 40px;
}

/* Menu de Navegação */
.sidebar-menu {
  padding: 1rem 0;
  height: calc(100vh - 180px);
  overflow-y: auto;
}

.menu-section {
  margin-bottom: 1.5rem;
}

.section-label {
  display: block;
  padding: 0.5rem 1.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

.sidebar.collapsed .section-label {
  padding: 0.5rem;
  text-align: center;
  writing-mode: vertical-rl;
  
}

.menu-item {
  padding: 0.3rem 1rem;
}

.sidebar.collapsed .menu-item {
  padding: 0.3rem 0.5rem;
  display: flex;
  justify-content: center;
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s;
  position: relative;
  white-space: nowrap;
}

.sidebar.collapsed .menu-link {
  padding: 0.8rem;
  justify-content: center;
}

.menu-link:hover {
  background: rgba(255, 4, 1, 0.2);
  color: #FFFFFF;
}

.menu-link.active {
  background: rgba(255, 4, 1, 0.3);
  color: #FFFFFF;
}

.menu-icon-container {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  transition: all 0.3s;
}

.sidebar.collapsed .menu-icon-container {
  margin-right: 0;
}

.menu-icon {
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
}

.menu-text {
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.3s;
}

.sidebar.collapsed .menu-text {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.active-indicator {
  width: 4px;
  height: 20px;
  background: #FFFFFF;
  border-radius: 2px;
  position: absolute;
  right: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.menu-link.active .active-indicator {
  opacity: 1;
}

.sidebar.collapsed .active-indicator {
  right: auto;
  left: 0;
}

/* Botão de Recolher */
.toggle-btn {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.sidebar.collapsed .toggle-btn {
  right: 50%;
  transform: translateX(50%);
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar.collapsed .toggle-btn i {
  transform: rotate(180deg);
}

/* Menu Mobile */
.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(8, 9, 62, 0.8);
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ========== SIDEBAR RESPONSIVO SEM BARRA DE ROLAGEM ========== */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #08093E 0%, #1A1C5E 100%);
  color: #FFFFFF;
  position: fixed;
  height: 100vh;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  transform: translateX(0);
  overflow: hidden; /* Impede barras de rolagem */
}

.sidebar.collapsed {
  width: 80px;
}

/* Corrige overflow no menu */
.sidebar-menu {
  padding: 1rem 0;
  height: calc(100vh - 180px);
  overflow-y: auto;
  overflow-x: hidden; /* Remove barra horizontal */
}

.sidebar.collapsed .sidebar-menu {
  overflow: visible; /* Remove todas as barras no modo colapsado */
}

/* Ajustes específicos para itens colapsados */
.sidebar.collapsed .menu-item {
  position: relative;
}

/* Tooltips para modo colapsado */
.sidebar.collapsed .menu-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: #08093E;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  margin-left: 10px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.sidebar.collapsed .menu-link:hover::after {
  opacity: 1;
}

/* Ajuste fino no toggle */
.sidebar.collapsed .toggle-btn {
  right: 20px;
  transform: translateX(0);
}

/* Correção para mobile */
@media (max-width: 992px) {
  .sidebar {
    overflow-y: auto; /* Permite rolagem apenas em mobile */
  }
  
  .sidebar.collapsed {
    overflow: hidden;
  }
  
  .sidebar.collapsed .sidebar-menu {
    height: 100vh; /* Ajuste para mobile */
  }
}

/* Responsivo */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
    width: 280px;
  }
  
  .sidebar.collapsed {
    transform: translateX(-100%);
  }
  
  .sidebar.collapsed.open {
    transform: translateX(0);
    width: 80px;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
}

/* Transições suaves */
.sidebar, .sidebar-menu, .menu-link, .menu-icon-container {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 992px) {
  .sidebar {
      transform: translateX(-100%);
  }
.sidebar.open {
  transform: translateX(0);
}

.mobile-menu-toggle {
  display: flex;
}

}
/* ========== CONTEÚDO PRINCIPAL ========== */
.main-content {
  margin-left: 280px;
  transition: all 0.3s;
}
.sidebar.collapsed + .main-content {
  margin-left: 80px;
}
@media (max-width: 992px) {
  .main-content {
      margin-left: 0;
  }
}
/* Seção de boas-vindas */
.welcome-section {
  padding: 1.5rem 2rem;
  /* background: linear-gradient(90deg, #ffffff, #f8f9fa); */
  color: #d9081c;
  display: flex
;
  justify-content: space-between;
  align-items: center;
}
.welcome-text {
  font-size: 1.2rem;
  font-weight: 500;
}
/* Topbar actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  position: relative;
}
.avatar-top {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 100;
}
.topbar-user:focus .dropdown-menu,
.topbar-user:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
}
.dropdown-menu a {
  display: block;
  padding: 0.7rem 1.5rem;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.dropdown-menu a:hover {
  background: #f5f5f5;
  color: #0072ff;
}
.dropdown-menu a i {
  margin-right: 0.7rem;
  width: 20px;
  text-align: center;
}
.dropdown-divider {
  height: 1px;
  background: #eee;
  margin: 0.5rem 0;
}
/* ========== RESUMO FINANCEIRO ========== */
.financial-dashboard {
  padding: 2rem;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #0072ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}
.welcome-message {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}
.user-name {
  color: #0072ff;
}
.account-info {
  font-size: 0.9rem;
  color: #666;
}
.current-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}
/* Cartão de saldo */
.balance-card {
  background: linear-gradient(135deg, #0072ff, #00c6ff);
  border-radius: 12px;
  padding: 1.5rem;
  color: #fff;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 114, 255, 0.3);
}
.card-content {
  display: flex;
  justify-content: space-between;
}
.balance-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}
.amount {
  font-size: 1.8rem;
  font-weight: 700;
}
.trend {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  margin-left: 1rem;
}
.trend.positive {
  background: rgba(255, 255, 255, 0.2);
}
.trend i {
  margin-right: 0.3rem;
  font-size: 0.7rem;
}
.balance-actions {
  display: flex;
  gap: 1rem;
  align-self: flex-end;
}
.action-btn {
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  border: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s;
}
.action-btn.transfer {
  background: #fff;
  color: #0072ff;
}
.action-btn.deposit {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}
.action-btn i {
  font-size: 1rem;
}
/* Resumo financeiro */
.financial-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.summary-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.2rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}
.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.card-header i {
  font-size: 1.2rem;
  margin-right: 0.7rem;
}
.card-header h3 {
  font-size: 1.1rem;
  font-weight: 500;
}
.summary-card.income .card-header i {
  color: #00c853;
}
.summary-card.expense .card-header i {
  color: #ff3d00;
}
.summary-card.limits .card-header i {
  color: #0072ff;
}
.card-body .amount {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.progress-container {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  margin-bottom: 0.8rem;
}
.progress-bar {
  height: 100%;
  border-radius: 3px;
}
.summary-card.income .progress-bar {
  background: linear-gradient(90deg, #00c853, #64dd17);
}
.summary-card.expense .progress-bar {
  background: linear-gradient(90deg, #ff3d00, #ff6e40);
}
.comparison {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
}
.comparison i {
  margin-right: 0.5rem;
}
.comparison.positive {
  color: #00c853;
}
.comparison.negative {
  color: #ff3d00;
}
/* Limites */
.limit-item {
  margin-bottom: 1rem;
}
.limit-item:last-child {
  margin-bottom: 0;
}
.limit-label {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.3rem;
}
.limit-value {
  font-size: 0.9rem;
  font-weight: 500;
}
.limit-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  margin: 0.5rem 0;
}
.limit-used {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #0072ff, #00c6ff);
}
/* Atalhos rápidos */
.quick-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.quick-actions::-webkit-scrollbar {
  height: 5px;
}
.quick-actions::-webkit-scrollbar-track {
  background: #f1f1f1;
}
.quick-actions::-webkit-scrollbar-thumb {
  background: #0072ff;
  border-radius: 5px;
}
.quick-action {
  min-width: 80px;
  padding: 1rem 0.5rem;
  border-radius: 8px;
  background: #fff;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}
.quick-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.action-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 114, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0072ff;
  font-size: 1.2rem;
}
.quick-action span {
  font-size: 0.8rem;
  font-weight: 500;
}
/* Responsividade */
@media (max-width: 768px) {
  .dashboard-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
  }
.card-content {
  flex-direction: column;
  gap: 1.5rem;
}

.balance-actions {
  align-self: flex-start;
}

.quick-actions {
  flex-wrap: wrap;
}

}