/* Custom Stylesheet - Sistema de Controle Financeiro 2.0
-------------------------------------------------- */

:root {
  /* Paleta de cores principal */
  --primary-color: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --success-color: #10b981;
  --success-light: #34d399;
  --success-dark: #059669;
  --danger-color: #ef4444;
  --danger-light: #f87171;
  --danger-dark: #dc2626;
  --warning-color: #f59e0b;
  --warning-light: #fbbf24;
  --warning-dark: #d97706;
  --info-color: #3b82f6;
  --info-light: #60a5fa;
  --info-dark: #2563eb;
  
  /* Cores neutras */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Cores do sidebar */
  --sidebar-bg: #1e293b;
  --sidebar-text: #ffffff;
  --sidebar-text-muted: rgba(255, 255, 255, 0.6);
  --sidebar-hover: rgba(255, 255, 255, 0.1);
  --sidebar-active: rgba(99, 102, 241, 0.8);
  --sidebar-border: rgba(255, 255, 255, 0.1);
}

/* Estilos Globais */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  padding-top: 50px; /* Reduzido de 56px para 50px */
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--gray-800);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Redefinição de cores do Bootstrap */
.btn-primary, .bg-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.btn-success, .bg-success {
  background-color: var(--success-color) !important;
  border-color: var(--success-color) !important;
}

.btn-success:hover, .btn-success:focus, .btn-success:active {
  background-color: var(--success-dark) !important;
  border-color: var(--success-dark) !important;
}

.btn-danger, .bg-danger {
  background-color: var(--danger-color) !important;
  border-color: var(--danger-color) !important;
}

.btn-danger:hover, .btn-danger:focus, .btn-danger:active {
  background-color: var(--danger-dark) !important;
  border-color: var(--danger-dark) !important;
}

.btn-warning, .bg-warning {
  background-color: var(--warning-color) !important;
  border-color: var(--warning-color) !important;
}

.btn-info, .bg-info {
  background-color: var(--info-color) !important;
  border-color: var(--info-color) !important;
}

.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-outline-success {
  color: var(--success-color) !important;
  border-color: var(--success-color) !important;
}

.btn-outline-success:hover, .btn-outline-success:focus, .btn-outline-success:active {
  background-color: var(--success-color) !important;
  border-color: var(--success-color) !important;
  color: white !important;
}

.btn-outline-danger {
  color: var(--danger-color) !important;
  border-color: var(--danger-color) !important;
}

.btn-outline-danger:hover, .btn-outline-danger:focus, .btn-outline-danger:active {
  background-color: var(--danger-color) !important;
  border-color: var(--danger-color) !important;
  color: white !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-success {
  color: var(--success-color) !important;
}

.text-danger {
  color: var(--danger-color) !important;
}

.text-warning {
  color: var(--warning-color) !important;
}

.text-info {
  color: var(--info-color) !important;
}

.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  line-height: 1.5;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.btn-sm {
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn .mdi, .btn i {
  font-size: 1.1em;
  vertical-align: -2px;
}

/* Card Styling */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  margin-bottom: 1rem;
}

.card:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
}

.card-header .card-title {
  margin-bottom: 0;
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid var(--gray-200);
  padding: 1.25rem 1.5rem;
}

.card-title {
  color: var(--gray-800);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.card-body {
  padding: 1.25rem;
}

/* Nav Pills */
.nav-pills .nav-link {
  color: var(--gray-700);
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
  background-color: var(--gray-100);
}

.nav-pills .nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

/* Form Elements */
.form-control, .form-select {
  border-radius: 8px;
  border-color: var(--gray-300);
  padding: 0.6rem 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-label {
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.input-group-text {
  background-color: var(--gray-100);
  border-color: var(--gray-300);
  border-radius: 8px;
}

.form-check-input {
  border-color: var(--gray-400);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Table Styling */
.table {
  --bs-table-striped-bg: var(--gray-50);
}

.table thead th {
  background-color: var(--gray-100);
  color: var(--gray-700);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: none;
}

.table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  color: var(--gray-800);
}

.table-hover tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.05);
}

/* Badge Styling */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
  border-radius: 6px;
}

/* Stats Cards */
.stats-card {
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  color: white;
  margin-bottom: 1.5rem;
}

.stats-card:hover {
  transform: translateY(-5px);
}

.income-card {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
}

.expense-card {
  background: linear-gradient(135deg, var(--danger-color), var(--danger-light));
}

.balance-card {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.balance-card.negative {
  background: linear-gradient(135deg, var(--danger-color), var(--danger-light));
}

.stats-info h3 {
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-size: 1.75rem;
}

/* Modal Styling */
.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.modal-header {
  border-bottom: 1px solid var(--gray-200);
  padding: 1.25rem 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--gray-200);
  padding: 1.25rem 1.5rem;
}

.modal-title {
  font-weight: 600;
  color: var(--gray-800);
}

/* Alert Styling */
.alert {
  border: none;
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-dark);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-dark);
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-dark);
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--info-dark);
}

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

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Custom Sidebar & Navbar Styling */
.sidebar {
  background-color: white;
  box-shadow: 0 0 20px rgba(0,0,0,0.08);
  height: 100vh;
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  max-width: 260px;
  padding-top: 1rem;
  overflow-y: auto;
  transition: all 0.3s ease;
  z-index: 1040;
}

.sidebar-heading {
  color: var(--sidebar-text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 0.4rem 1.5rem;
  margin-top: 0.4rem;
  margin-bottom: 0.2rem;
}

.sidebar .nav-link {
  color: var(--gray-700);
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  margin: 0.15rem 0.75rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.sidebar .nav-link:hover {
  background-color: var(--gray-100);
  color: var(--primary-color);
}

.sidebar .nav-link.active {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

.sidebar .nav-link i, 
.sidebar .nav-link .mdi {
  margin-right: 0.75rem;
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.sidebar .badge {
  margin-left: auto;
  background-color: var(--gray-200);
  color: var(--gray-700);
  font-weight: 500;
}

.sidebar .nav-link.active .badge {
  background-color: var(--primary-color);
  color: white;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  margin-top: auto;
  border-top: 1px solid var(--sidebar-border);
}

.user-profile {
  padding: 1rem 0.5rem;
}

.avatar-circle {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.avatar-circle i {
  font-size: 28px;
}

.badge {
  background-color: var(--gray-200);
  color: var(--gray-700);
  font-weight: 500;
}

.nav-link.active .badge {
  background-color: var(--primary-color);
  color: white;
}

.navbar {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  height: 50px;
  padding: 0.25rem 1rem;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.25rem;
}

.dropdown-menu {
  border: none;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--gray-100);
  color: var(--primary-color);
}

.dropdown-item i,
.dropdown-item .mdi {
  width: 20px;
  margin-right: 0.5rem;
  font-size: 1.1em;
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-top: 1px solid var(--gray-200);
}

/* Icon selector */
.icon-btn {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 1.5rem;
}

.icon-btn:hover {
  background-color: var(--primary-light);
  color: white;
  transform: scale(1.05);
}

.icon-btn.active {
  background-color: var(--primary-color);
  color: white;
}

/* Main Content */
main {
  margin-left: 260px;
  padding-top: 50px; /* Já reduzido anteriormente */
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* Ajuste do padding do conteúdo */
main .container-fluid {
  padding-top: 0.5rem !important; /* Reduzido de 0.75rem para 0.5rem */
  padding-bottom: 0.5rem !important; /* Reduzido de 0.75rem para 0.5rem */
}

/* Ajuste para títulos de página */
h1, h2, h3 {
  margin-bottom: 0.75rem; /* Reduzido de 1rem para 0.75rem */
}

h4, h5, h6 {
  margin-bottom: 0.5rem; /* Reduzido de 0.75rem para 0.5rem */
}

/* Ajuste para margens de elementos comuns */
.mb-4 {
  margin-bottom: 1.25rem !important; /* Reduzido de 1.5rem para 1.25rem */
}

.mt-4 {
  margin-top: 1.25rem !important; /* Reduzido de 1.5rem para 1.25rem */
}

.py-4 {
  padding-top: 1.25rem !important; /* Reduzido de 1.5rem para 1.25rem */
  padding-bottom: 1.25rem !important; /* Reduzido de 1.5rem para 1.25rem */
}

/* Responsividade para telas pequenas */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  main {
    margin-left: 0;
    width: 100%;
    padding: 1.5rem;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Spinner e Loading */
.spinner-border {
  border-width: 2px;
  color: var(--primary-color);
}

.page-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Pagamento de Contas */
.bill-item {
  transition: all 0.2s ease;
  border-radius: 10px;
  border-left: 4px solid transparent;
}

.bill-item.paid {
  border-left-color: var(--success-color);
}

.bill-item.pending {
  border-left-color: var(--warning-color);
}

.bill-item.overdue {
  border-left-color: var(--danger-color);
}

.bill-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Ajustes para modais de formulário */
.modal-body .form-control,
.modal-body .form-select {
  padding: 0.5rem 0.75rem;
}

.modal-body .form-label {
  font-size: 0.9rem;
}

/* Botões de ação em tabelas */
.btn-action {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1.1rem;
  margin-right: 0.25rem;
}

/* Melhoria nos dropdowns */
.dropdown-toggle::after {
  margin-left: 0.5rem;
  vertical-align: 0.15em;
}

/* Tooltips personalizados */
.tooltip {
  font-size: 0.75rem;
  font-weight: 500;
}

.tooltip-inner {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
}

/* Estilos para páginas de autenticação (login e registro) */
.auth-wrapper {
    min-height: 100vh;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(-45deg, #6366F1, #4F46E5, #7C3AED, #4338CA);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.08);
}

.auth-card::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.08);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo i {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: linear-gradient(135deg, #6366F1 0%, #4338CA 100%);
    color: white;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.auth-logo h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #1F2937;
}

.auth-logo p {
    color: #6B7280;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Estilos para formulários de autenticação */
.auth-card label {
    font-weight: 500;
    color: #4B5563;
    font-size: 0.9rem;
}

.auth-card .input-group-text {
    background-color: #F3F4F6;
    border-color: #E5E7EB;
    color: #6B7280;
}

.auth-card .form-control {
    padding: 0.7rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    font-size: 0.95rem;
}

.auth-card .form-control:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-card .btn-primary {
    background: linear-gradient(135deg, #6366F1 0%, #4338CA 100%);
    border: none;
    padding: 0.7rem 1.5rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.auth-card .btn-primary:hover {
    background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

.auth-card a {
    color: #6366F1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-card a:hover {
    color: #4F46E5;
}

.auth-card .form-check-input:checked {
    background-color: #6366F1;
    border-color: #6366F1;
}

.auth-card .form-text {
    color: #9CA3AF;
    font-size: 0.8rem;
}

.auth-card .alert {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Animações */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

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

/* Responsividade para tablets e dispositivos móveis */
/* Tablets em modo retrato (até 768px) */
@media (max-width: 768px) {
    .auth-card {
        max-width: 90%;
        padding: 2rem;
    }
    
    .auth-wrapper {
        padding: 1rem;
    }
    
    .auth-logo i {
        width: 70px;
        height: 70px;
        line-height: 70px;
        font-size: 2.5rem;
    }
    
    .auth-logo h2 {
        font-size: 1.6rem;
    }
    
    .auth-logo p {
        font-size: 0.9rem;
    }
    
    .auth-card .form-control {
        font-size: 1rem;
        padding: 0.8rem 1rem;
        height: auto;
    }
    
    .auth-card .input-group-text {
        padding: 0.8rem 1rem;
    }
    
    .auth-card .btn-primary {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .auth-card label {
        font-size: 1rem;
    }
}

/* Tablets em modo paisagem (até 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .auth-card {
        max-width: 65%;
        padding: 2.2rem;
    }
    
    .auth-logo i {
        width: 75px;
        height: 75px;
        line-height: 75px;
    }
    
    .auth-card .form-control,
    .auth-card .input-group-text,
    .auth-card .btn-primary {
        padding: 0.75rem 1rem;
    }
}

/* Para iPads Pro e tablets maiores */
@media (min-width: 993px) and (max-width: 1200px) {
    .auth-card {
        max-width: 50%;
    }
}

/* Ajustes para dispositivos móveis */
@media (max-width: 576px) {
    .auth-card {
        padding: 1.5rem;
        max-width: 95%;
    }
    
    .auth-logo i {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 2rem;
    }
    
    .auth-logo h2 {
        font-size: 1.5rem;
    }
    
    .auth-wrapper {
        padding: 0.5rem;
    }
    
    .auth-card .form-control,
    .auth-card .input-group-text {
        padding: 0.7rem 0.9rem;
    }
}

/* Ajustes para orientação de tela */
@media (orientation: landscape) and (max-height: 600px) {
    .auth-wrapper {
        align-items: flex-start;
    }
    
    .auth-card {
        margin: 1rem auto;
        padding: 1.5rem;
    }
    
    .auth-logo {
        margin-bottom: 1.2rem;
    }
    
    .auth-logo i {
        width: 55px;
        height: 55px;
        line-height: 55px;
        font-size: 1.8rem;
    }
    
    .auth-logo h2 {
        font-size: 1.4rem;
        margin-top: 0.5rem;
    }
    
    .auth-logo p {
        font-size: 0.85rem;
    }
    
    .auth-card .mb-3 {
        margin-bottom: 0.8rem !important;
    }
}

/* Melhorias para layout em tablet */
@media (min-width: 576px) and (max-width: 991.98px) {
    /* Ajustes de layout principal para tablets */
    body {
        overflow-x: hidden;
    }
    
    .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Ajustes da navbar para tablets */
    .navbar {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Ajustes do sidebar para tablets */
    .sidebar {
        width: 100%;
        position: fixed;
        left: -100%;
        top: 56px;
        height: calc(100vh - 56px);
        transition: all 0.3s ease;
        z-index: 1050;
        padding-bottom: 0;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    /* Ajustes do conteúdo principal para tablets */
    main {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 1.5rem !important;
        margin-top: 0 !important;
    }
    
    /* Corrigir espaçamento superior */
    .container-fluid .row {
        margin-top: 0;
    }
    
    /* Ajustes para cards em tablets */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Melhorar a exibição de tabelas */
    .table-responsive {
        margin-bottom: 1rem;
    }
}

/* Ajustes específicos para iPad e tablets similares */
@media (min-width: 768px) and (max-width: 991.98px) {
    main {
        padding: 1.75rem !important;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
}

@media (min-width: 992px) {
    body {
        padding-top: 60px; /* Altura da navbar em desktop */
    }
}

/* Novos estilos para o sidebar */
.sidebar-container {
    background-color: var(--sidebar-bg);
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1030;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    padding-top: 50px; /* Reduzido de 56px para 50px para acompanhar a navbar */
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0; /* Reduzido de 1.5rem 0 para 0 */
}

/* Perfil do usuário no sidebar */
.user-profile {
    padding: 0.75rem 1rem; /* Reduzido de 1rem para 0.75rem 1rem */
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 0.75rem; /* Reduzido de 1.5rem para 0.75rem */
}

.avatar-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.avatar-circle i {
    font-size: 28px;
    color: white;
}

.user-profile h6 {
    color: var(--sidebar-text);
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.user-profile p {
    color: var(--sidebar-text-muted);
    font-size: 0.8rem;
    margin-bottom: 0;
}

/* Cabeçalhos de seção no sidebar */
.sidebar-heading {
    color: var(--sidebar-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    padding: 0.4rem 1.5rem;
    margin-top: 0.4rem;
    margin-bottom: 0.2rem;
}

/* Links de navegação no sidebar */
.sidebar-container .nav-link {
    display: flex;
    align-items: center;
    padding: 0.4rem 1.5rem;
    color: var(--sidebar-text);
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0;
    border-left: 3px solid transparent;
    margin-bottom: 0.1rem;
}

.sidebar-container .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.sidebar-container .nav-link.active {
    background-color: var(--sidebar-active);
    border-left-color: var(--primary-light);
    color: white;
}

.sidebar-container .nav-link i,
.sidebar-container .nav-link .mdi {
    font-size: 1.25rem;
    width: 24px;
    margin-right: 0.75rem;
    text-align: center;
    color: var(--sidebar-text);
}

.sidebar-container .nav-link.active i,
.sidebar-container .nav-link.active .mdi {
    color: white;
}

/* Badges no sidebar */
.sidebar-container .badge {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

.sidebar-container .nav-link.active .badge {
    background-color: white;
    color: var(--primary-color);
}

/* Footer do sidebar */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-footer .btn {
    border-color: var(--sidebar-border);
    color: var(--sidebar-text);
    transition: all 0.2s ease;
}

.sidebar-footer .btn:hover {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.sidebar-app-version {
    margin-top: 1rem;
}

.sidebar-app-version small {
    color: var(--sidebar-text-muted);
    font-size: 0.75rem;
}

/* Ajuste do conteúdo principal */
main {
    margin-left: 260px;
    padding-top: 50px; /* Já reduzido anteriormente */
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Ajuste do padding do conteúdo */
main .container-fluid {
    padding-top: 0.5rem !important; /* Reduzido de 0.75rem para 0.5rem */
    padding-bottom: 0.5rem !important; /* Reduzido de 0.75rem para 0.5rem */
}

/* Ajuste para títulos de página */
h1, h2, h3 {
  margin-bottom: 0.75rem; /* Reduzido de 1rem para 0.75rem */
}

h4, h5, h6 {
  margin-bottom: 0.5rem; /* Reduzido de 0.75rem para 0.5rem */
}

/* Ajuste para margens de elementos comuns */
.mb-4 {
  margin-bottom: 1.25rem !important; /* Reduzido de 1.5rem para 1.25rem */
}

.mt-4 {
  margin-top: 1.25rem !important; /* Reduzido de 1.5rem para 1.25rem */
}

.py-4 {
  padding-top: 1.25rem !important; /* Reduzido de 1.5rem para 1.25rem */
  padding-bottom: 1.25rem !important; /* Reduzido de 1.5rem para 1.25rem */
}

/* Responsividade do sidebar */
@media (max-width: 991.98px) {
    .sidebar-container {
        transform: translateX(-100%);
        box-shadow: none;
    }
    
    .sidebar-container.show {
        transform: translateX(0);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1025;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    main {
        margin-left: 0;
    }
} 