
/* Flexbox para espaçamento interno dos cards de projeção financeira */
.projecao-card-flex {
    display: flex;
    justify-content: flex-start;
    gap: 32px;
    padding-left: 32px;
    padding-right: 32px;
}

@media (max-width: 768px) {
    .projecao-card-flex {
        gap: 20px;
        padding-left: 24px;
        padding-right: 24px;
    }
}
/* Fixar rodapé da sidebar na parte inferior */
.sidebar {
    position: relative;
    min-height: 100vh;
}

.projecao-card {
    box-sizing: border-box !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    margin-left: auto;
    margin-right: auto;
    margin-inline: 8px;
}

.sidebar-content {
    padding-bottom: 120px; /* espaço para o rodapé */
}


:root {
    /* Cores Primárias */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    /* Cores Neutras */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Raios de Borda */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* ========================================================================
   RESET E BASE
   ======================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
}

/* ========================================================================
   TELA DE LOGIN MODERNA
   ======================================================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 2rem;
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff" fill-opacity="0.05" points="0,1000 1000,0 1000,1000"/></svg>');
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    animation: slideUp 0.6s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
}

.login-title {
    font-size: 1.875rem;
    font-weight: 700;
    background: var(--primary-gradient);

    .projecao-card {
        box-sizing: border-box !important;
        padding-left: 48px !important;
        padding-right: 48px !important;
        padding-top: 16px !important;
        padding-bottom: 16px !important;
        max-width: 92%;
        margin-left: auto;
        margin-right: auto;
        margin-inline: 8px;
    }

    .projecao-card .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .projecao-card .col-4 {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    @media (max-width: 768px) {
        .projecao-card {
            box-sizing: border-box !important;
            padding-left: 40px !important;
            padding-right: 40px !important;
            padding-top: 14px !important;
            padding-bottom: 14px !important;
            max-width: 95%;
            margin-left: auto;
            margin-right: auto;
            margin-inline: 6px;
        }
        .projecao-card .col-4 {
            padding-left: 6px !important;
            padding-right: 6px !important;
        }
    }
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ========================================================================
   FORMULÁRIOS MODERNOS
   ======================================================================== */

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #a0aec0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::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.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    transform: translateY(-1px);
}

/* ========================================================================
   ALERTAS MODERNOS
   ======================================================================== */

.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: none;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

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

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ========================================================================
   NAVBAR MODERNA
   ======================================================================== */

.navbar-fixed-custom {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    padding: 0.75rem 0 !important;
}

.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
}

/* Compensar altura do navbar fixo */
body.has-navbar-fixed {
    padding-top: 60px !important;
}

/* Logo Moderna */
.logo-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-modern:hover {
    transform: translateY(-2px) scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(102, 126, 234, 0.4));
}

.logo-modern svg {
    display: block;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover {
    opacity: 0.85;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-primary);
    color: #667eea;
    transform: translateY(-1px);
}

.dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    z-index: 1050 !important;
    max-height: 400px;
    overflow-y: auto;
}

/* Navbar fixes para dropdowns */
.navbar {
    overflow: visible !important;
}

.navbar .dropdown {
    position: static;
}

.navbar .dropdown-menu {
    position: absolute !important;
    will-change: transform;
}

.navbar .nav-item.dropdown {
    position: relative;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--bg-primary);
    color: #667eea;
}

/* ========================================================================
   SIDEBAR MODERNA
   ======================================================================== */

.sidebar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-md);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav-item {
    margin-bottom: 0.5rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar-nav-link:hover {
    background: var(--bg-primary);
    color: #667eea;
    transform: translateX(5px);
}

.sidebar-nav-link.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.sidebar-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: white;
}

/* ========================================================================
   CARDS MODERNOS
   ======================================================================== */

.card-modern {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-header-modern {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-body-modern {
    padding: 1.5rem;
}

.stats-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stats-card-primary::before {
    background: var(--primary-gradient);
}

.stats-card-success::before {
    background: var(--success-gradient);
}

.stats-card-warning::before {
    background: var(--warning-gradient);
}

.stats-card-danger::before {
    background: var(--danger-gradient);
}

.stats-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ========================================================================
   RESPONSIVIDADE
   ======================================================================== */

@media (max-width: 991px) {
    /* Ocultar sidebar por padrão no mobile */
    #sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 1050;
        width: 280px;
        transition: left 0.3s ease-in-out;
        background: white;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    /* Mostrar sidebar quando ativo */
    #sidebar.show {
        left: 0;
    }
    
    /* Ajustar conteúdo principal */
    .col-lg-10 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    /* Overlay quando sidebar está aberto */
    #sidebar.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 280px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    .sidebar-modern {
        height: 100vh;
        position: relative;
        border-right: 1px solid var(--border-color);
    }
}

@media (max-width: 768px) {
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .navbar-modern {
        padding: 0.5rem 0;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    /* Ajustar tamanho do sidebar no mobile */
    #sidebar {
        width: 260px;
    }
    
    #sidebar.show::before {
        left: 260px;
    }
    
    /* Esconder texto do usuário no navbar mobile */
    .navbar .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    /* Cards em coluna única */
    .col-lg-3, .col-md-6 {
        width: 100%;
        max-width: 100%;
    }
    
    /* Sidebar full width em telas muito pequenas */
    #sidebar {
        width: 85%;
    }
    
    #sidebar.show::before {
        left: 85%;
    }
}

/* ========================================================================
   ANIMAÇÕES E EFEITOS
   ======================================================================== */

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* ========================================================================
   SCROLL PERSONALIZADO
   ======================================================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a67d8, #6b46c1);
}

/* ========================================================================
   UTILITÁRIOS
   ======================================================================== */

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

.bg-gradient-success {
    background: var(--success-gradient);
}

.bg-gradient-warning {
    background: var(--warning-gradient);
}

.bg-gradient-danger {
    background: var(--danger-gradient);
}

.shadow-modern {
    box-shadow: var(--shadow-lg);
}

.border-radius-modern {
    border-radius: var(--radius-lg);
}

/* ========================================================================
   BOTÕES DE AÇÃO RÁPIDA
   ======================================================================== */

.hover-lift {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-lg {
    padding: 1.5rem 1rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: var(--radius-lg);
    border: none;
}

.btn-lg:hover {
    text-decoration: none;
    color: white;
}

.btn-lg i {
    margin-bottom: 0.5rem;
}

.btn-lg .font-weight-bold {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.btn-lg small {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ========================================================================
   BADGES CUSTOMIZADOS
   ======================================================================== */

.badge-sm {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    font-weight: 600;
    vertical-align: middle;
}

.badge-lg {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
}

/* ========================================================================
   TIMELINE MODERNA - PROJEÇÕES
   ======================================================================== */

.timeline-moderna {
    position: relative;
}

.timeline-item-moderna {
    position: relative;
    transition: all 0.3s ease;
}

.timeline-item-moderna:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.timeline-indicator {
    position: relative;
}

.timeline-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.timeline-item-moderna:hover .timeline-dot {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.stat-box {
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
}

/* ========================================================================
   RESPONSIVIDADE AVAN�ADA ADICIONADA - MOBILE FIRST
   ======================================================================== */

/* Tablets e dispositivos m�dios (992px+) - Ajustes sutis */
@media (min-width: 992px) and (max-width: 1199px) {
    .container-fluid { padding: 0 1.5rem; }
    .card-modern { margin-bottom: 1.5rem; }
}

/* Smartphones landscape e tablets portrait (768px - 991px) */
@media (max-width: 991px) {
    .col-lg-10 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: 1rem !important;
    }
    
    .col-lg-2 { width: 0 !important; padding: 0 !important; }
    
    /* Cards responsivos */
    .card-modern { margin-bottom: 1rem; }
    
    /* Tabelas com scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Bot�es em coluna */
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    .btn-group .btn { width: 100%; }
}

/* Tablets pequenos e smartphones (576px - 768px) */
@media (max-width: 768px) {
    body { font-size: 13px; }
    
    /* Login */
    .login-card {
        padding: 1.5rem;
        margin: 0.5rem;
        width: 95%;
    }
    .login-title { font-size: 1.5rem; }
    
    /* Navbar */
    .navbar-modern { padding: 0.5rem 1rem; }
    .navbar-brand { font-size: 1.1rem; }
    
    /* Stats cards */
    .stats-card { margin-bottom: 1rem; }
    .stats-card h3 { font-size: 1.5rem; }
    
    /* Sidebar ajustado */
    #sidebar { width: 260px; }
    #sidebar.show::before { left: 260px; }
    
    /* Grid responsivo */
    .row > [class*='col-'] { margin-bottom: 1rem; }
    
    /* Modais */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    /* Formul�rios */
    .form-control {
        font-size: 14px;
        padding: 0.625rem 0.875rem;
    }
    
    /* Tabelas */
    table { font-size: 0.875rem; }
    table th, table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    /* Gr�ficos */
    canvas { max-height: 250px !important; }
}

/* Smartphones (at� 576px) */
@media (max-width: 576px) {
    body { font-size: 12px; }
    
    /* Container */
    .container-fluid { padding: 0.5rem; }
    
    /* Todas as colunas em 100% */
    .col-lg-3, .col-lg-4, .col-lg-6,
    .col-md-6, .col-md-4, .col-md-3 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: 0.5rem !important;
    }
    
    /* Sidebar 85% */
    #sidebar { width: 85%; }
    #sidebar.show::before { left: 85%; }
    
    /* Login compacto */
    .login-container { padding: 1rem; }
    .login-card {
        padding: 1.25rem;
        margin: 0.25rem;
    }
    .login-title { font-size: 1.25rem; }
    
    /* Cards compactos */
    .card-modern {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    .card-header-modern {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    .card-body { padding: 0.75rem; }
    
    /* Stats reduzidos */
    .stats-card h3 { font-size: 1.25rem; }
    .stats-card .display-4 { font-size: 1.5rem; }
    
    /* Bot�es full width */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    .btn-group .btn {
        border-radius: var(--radius-md) !important;
        margin-bottom: 0.5rem;
    }
    
    /* Navbar compacta */
    .navbar-brand { font-size: 1rem; }
    
    /* Modais tela cheia */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }
    .modal-content {
        height: 100%;
        border-radius: 0;
    }
    
    /* Formul�rios */
    .form-group { margin-bottom: 0.75rem; }
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    /* Tabelas formato lista */
    table { font-size: 0.75rem; }
    
    /* IMPORTANTE: NÃO esconder thead - removido para corrigir bug de exibição */
    /* Regra removida: table:not(.table-hover) thead { display: none; } */
    
    /* FORÇAR exibição do cabeçalho em tabelas de projeção */
    .table-responsive table.table thead,
    .table-responsive table.table-hover thead,
    table.table thead,
    table.table-hover thead {
        display: table-header-group !important;
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: #212529 !important;
    }
    
    /* Garantir que as células do thead também sejam visíveis */
    .table-responsive table.table thead th,
    .table-responsive table.table-hover thead th,
    table.table thead th,
    table.table-hover thead th {
        display: table-cell !important;
    }
    
    table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        background: white;
        padding: 0.75rem;
    }
    
    /* Exceção: manter formato de tabela normal para projeções */
    table.table-hover tr,
    .table-responsive table tr {
        display: table-row !important;
        margin-bottom: 0;
        border: none;
        border-radius: 0;
        padding: 0;
    }
    table td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Exceção: células de tabela normal para projeções */
    table.table-hover td,
    .table-responsive table td {
        display: table-cell !important;
        justify-content: initial;
        padding: 0.5rem;
        border-bottom: none;
    }
    
    table td:last-child { border-bottom: 0; }
    table td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 1rem;
    }
    
    /* Exceção: remover data-label de tabelas de projeção */
    table.table-hover td::before,
    .table-responsive table td::before {
        content: none !important;
    }
    
    /* Gr�ficos menores */
    canvas { max-height: 200px !important; }
    
    /* Ajuste de headings */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1rem; }
    
    /* Padding reduzido */
    .p-4 { padding: 1rem !important; }
    .p-3 { padding: 0.75rem !important; }
}

/* Smartphones muito pequenos (at� 375px) */
@media (max-width: 375px) {
    body { font-size: 11px; }
    .login-card { padding: 1rem; }
    .card-modern { padding: 0.75rem; }
    .btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        padding: 1rem;
        align-items: flex-start;
    }
    .login-card {
        margin: 1rem auto;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Touch devices - �rea de toque maior */
@media (hover: none) and (pointer: coarse) {
    .btn, .sidebar-nav-link, .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    input, select, textarea {
        font-size: 16px !important; /* Evita zoom iOS */
    }
}

/* Utilit�rios */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}
.show-mobile { display: none !important; }
@media (max-width: 768px) {
    .show-mobile { display: block !important; }
}

/* ========================================================================
   TRANSA��ES - LAYOUT MOBILE OTIMIZADO
   ======================================================================== */

@media (max-width: 768px) {
    /* Ocultar tabela desktop de TRANSAÇÕES APENAS e mostrar cards mobile */
    .table-responsive table.table:not(.table-hover) {
        display: none;
    }
    
    /* EXCEÇÃO: Manter visível a tabela de projeções de investimentos */
    .table-responsive table.table-hover {
        display: table !important;
    }
    
    .table-responsive table.table-hover thead {
        display: table-header-group !important;
    }
    
    .table-responsive table.table-hover thead th {
        display: table-cell !important;
    }
    
    /* FIX: Garantir exibição da tabela de projeção em mobile */
    .tabela-projecao {
        display: table !important;
        width: 100% !important;
    }
    
    .tabela-projecao thead {
        display: table-header-group !important;
    }
    
    .tabela-projecao tbody {
        display: table-row-group !important;
    }
    
    .tabela-projecao tr {
        display: table-row !important;
        margin-bottom: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }
    
    .tabela-projecao th,
    .tabela-projecao td {
        display: table-cell !important;
        justify-content: initial !important;
    }
    
    .container-projecao {
        display: block !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Container de cards mobile */
    .transacoes-mobile-list {
        display: block !important;
    }
}

@media (min-width: 769px) {
    /* Desktop: mostrar tabela, ocultar cards */
    .transacoes-mobile-list {
        display: none !important;
    }
}

/* Cards de transa��es para mobile */
.transacao-card-mobile {
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid;
    transition: all 0.2s ease;
}

.transacao-card-mobile.receita {
    border-left-color: #28a745;
}

.transacao-card-mobile.despesa {
    border-left-color: #dc3545;
}

.transacao-card-mobile:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.transacao-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.transacao-descricao-mobile {
    flex: 1;
    margin-right: 0.5rem;
}

.transacao-descricao-mobile h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.transacao-descricao-mobile small {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.transacao-valor-mobile {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
}

.transacao-valor-mobile.receita {
    color: #28a745;
}

.transacao-valor-mobile.despesa {
    color: #dc3545;
}

.transacao-meta-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.transacao-meta-mobile .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.transacao-actions-mobile {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.transacao-actions-mobile .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
}

/* Observa��es expans�veis */
.transacao-obs-mobile {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    display: none;
}

.transacao-obs-mobile.show {
    display: block;
}

/* Filtros compactos para mobile */
@media (max-width: 768px) {
    .filtros-transacoes {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .filtros-transacoes .form-control,
    .filtros-transacoes .form-select {
        width: 100%;
        font-size: 0.875rem;
    }
    
    .filtros-transacoes .btn {
        width: 100%;
    }
}

/* Stats compactas */
@media (max-width: 768px) {
    .stats-summary-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-item-mobile {
        background: white;
        padding: 0.75rem;
        border-radius: var(--radius-md);
        text-align: center;
        box-shadow: var(--shadow-sm);
    }
    
    .stat-item-mobile .label {
        font-size: 0.7rem;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .stat-item-mobile .value {
        font-size: 1.1rem;
        font-weight: 700;
        margin-top: 0.25rem;
    }
    
    .stat-item-mobile.receita .value {
        color: #28a745;
    }
    
    .stat-item-mobile.despesa .value {
        color: #dc3545;
    }
    
    .stat-item-mobile.saldo .value {
        color: #007bff;
    }
}

/* ========================================================================
   DASHBOARD - LAYOUT MOBILE OTIMIZADO
   ======================================================================== */

@media (max-width: 768px) {
    /* Cards de resumo mais compactos */
    .card.border-left-success,
    .card.border-left-danger,
    .card.border-left-info,
    .card.border-left-primary {
        margin-bottom: 0.75rem !important;
    }
    
    .card.border-left-success .card-body,
    .card.border-left-danger .card-body,
    .card.border-left-info .card-body,
    .card.border-left-primary .card-body {
        padding: 0.75rem !important;
    }
    
    /* T�tulo do dashboard */
    .h3.text-gray-800 {
        font-size: 1.25rem !important;
    }
    
    /* �cones menores nos cards */
    .card-body .fa-2x {
        font-size: 1.5rem !important;
    }
    
    /* Texto dos cards */
    .text-xs {
        font-size: 0.7rem !important;
    }
    
    .h5 {
        font-size: 1rem !important;
    }
    
    /* Gr�ficos responsivos */
    .chart-area,
    .chart-pie {
        height: 200px !important;
    }
    
    canvas {
        max-height: 200px !important;
    }
    
    /* �ltimas transa��es compactas */
    .list-group-item {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
    }
    
    .list-group-item .badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    /* Card headers menores */
    .card-header {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Espa�amento entre se��es */
    .row.mb-4 {
        margin-bottom: 1rem !important;
    }
    
    /* Bot�es compactos */
    .btn-sm {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    /* Dashboard super compacto */
    .container-fluid {
        padding: 0.5rem !important;
    }
    
    /* Cards de resumo ainda menores */
    .card.border-left-success .card-body,
    .card.border-left-danger .card-body,
    .card.border-left-info .card-body,
    .card.border-left-primary .card-body {
        padding: 0.5rem !important;
    }
    
    /* Ocultar �cones grandes em telas muito pequenas */
    .card-body .col-auto {
        display: none !important;
    }
    
    /* Valores maiores sem �cone ao lado */
    .card-body .col {
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    .h5 {
        font-size: 1.1rem !important;
    }
    
    /* Gr�ficos menores */
    .chart-area,
    .chart-pie {
        height: 180px !important;
    }
    
    canvas {
        max-height: 180px !important;
    }
    
    /* Lista de transa��es ultra compacta */
    .list-group-item {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.8rem !important;
    }
    
    .list-group-item strong {
        font-size: 0.85rem !important;
    }
    
    .list-group-item small {
        font-size: 0.7rem !important;
    }
}

/* Grid espec�fico para cards do dashboard */
@media (max-width: 991px) {
    .col-xl-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (max-width: 576px) {
    .col-xl-3,
    .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Otimiza��o de bordas coloridas */
.card.border-left-success {
    border-left-width: 4px !important;
}
.card.border-left-danger {
    border-left-width: 4px !important;
}
.card.border-left-info {
    border-left-width: 4px !important;
}
.card.border-left-primary {
    border-left-width: 4px !important;
}

/* ========================================================================
   TOTALIZADORES (CARDS DE RESUMO) - ULTRA COMPACTOS MOBILE
   ======================================================================== */

@media (max-width: 768px) {
    /* Cards de totais mais compactos */
    .card.border-left-success,
    .card.border-left-danger,
    .card.border-left-info,
    .card.border-left-primary {
        margin-bottom: 0.5rem !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }
    
    .card.border-left-success .card-body,
    .card.border-left-danger .card-body,
    .card.border-left-info .card-body,
    .card.border-left-primary .card-body {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Textos menores */
    .card-body .text-xs {
        font-size: 0.65rem !important;
        letter-spacing: 0.3px;
        line-height: 1.2;
    }
    
    /* Valores financeiros compactos mas leg�veis */
    .card-body .h5 {
        font-size: 0.95rem !important;
        margin: 0.25rem 0 0 0 !important;
        font-weight: 700 !important;
    }
    
    /* �cones proporcionais */
    .card-body .fa-2x {
        font-size: 1.25rem !important;
    }
    
    /* Remover espa�amento extra */
    .card.h-100 {
        height: auto !important;
    }
    
    .card.py-2 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Grid de 2 colunas mais eficiente */
    .col-xl-3.col-md-6 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Linha de totais mais junta */
    .row.mb-4 {
        margin-bottom: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    /* Mobile pequeno: valores ainda menores */
    .card-body .h5 {
        font-size: 0.9rem !important;
    }
    
    .card-body .text-xs {
        font-size: 0.6rem !important;
    }
    
    .card-body .fa-2x {
        font-size: 1.1rem !important;
    }
    
    /* Cards super compactos */
    .card.border-left-success .card-body,
    .card.border-left-danger .card-body,
    .card.border-left-info .card-body,
    .card.border-left-primary .card-body {
        padding: 0.4rem 0.6rem !important;
    }
    
    /* Coluna �nica para totais se necess�rio */
    .col-xl-3.col-md-6.force-single {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Otimiza��o espec�fica para row no-gutters */
.row.no-gutters {
    margin-right: 0;
    margin-left: 0;
}

.row.no-gutters > .col,
.row.no-gutters > [class*="col-"] {
    padding-right: 0.25rem;
    padding-left: 0.25rem;
}

/* Texto uppercase mais compacto */
.text-uppercase {
    letter-spacing: 0.3px !important;
}

/* Cards de totais ULTRA COMPACTOS mobile */
@media (max-width: 768px) {
    .card.border-left-success, .card.border-left-danger, .card.border-left-info, .card.border-left-primary {
        margin-bottom: 0.5rem !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }
    .card.border-left-success .card-body, .card.border-left-danger .card-body, .card.border-left-info .card-body, .card.border-left-primary .card-body {
        padding: 0.5rem 0.75rem !important;
    }
    .card-body .text-xs {
        font-size: 0.65rem !important;
        letter-spacing: 0.3px;
        line-height: 1.2;
    }
    .card-body .h5 {
        font-size: 0.95rem !important;
        margin: 0.25rem 0 0 0 !important;
        font-weight: 700 !important;
    }
    .card-body .fa-2x {
        font-size: 1.25rem !important;
    }
    .card.h-100 {
        height: auto !important;
    }
    .card.py-2 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    .col-xl-3.col-md-6 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .row.mb-4 {
        margin-bottom: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    .card-body .h5 {
        font-size: 0.9rem !important;
    }
    .card-body .text-xs {
        font-size: 0.6rem !important;
    }
    .card-body .fa-2x {
        font-size: 1.1rem !important;
    }
    .card.border-left-success .card-body, .card.border-left-danger .card-body, .card.border-left-info .card-body, .card.border-left-primary .card-body {
        padding: 0.4rem 0.6rem !important;
    }
}

/* TOTALIZADORES ULTRA COMPACTOS - SOBRESCREVER */
@media (max-width: 768px) {
    .card.border-left-success, 
    .card.border-left-danger, 
    .card.border-left-info, 
    .card.border-left-primary {
        margin-bottom: 0.4rem !important;
        min-height: auto !important;
        border-radius: 8px !important;
    }
    
    .card.border-left-success .card-body, 
    .card.border-left-danger .card-body, 
    .card.border-left-info .card-body, 
    .card.border-left-primary .card-body {
        padding: 0.4rem 0.5rem !important;
        min-height: auto !important;
    }
    
    /* Labels super pequenas */
    .card-body .text-xs.font-weight-bold.text-uppercase {
        font-size: 0.55rem !important;
        margin-bottom: 0.15rem !important;
        line-height: 1 !important;
        letter-spacing: 0.2px !important;
        display: block !important;
    }
    
    /* Valores menores mas destacados */
    .card-body .h5.mb-0.font-weight-bold {
        font-size: 0.85rem !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    /* �cones bem pequenos */
    .card-body .col-auto .fa-2x {
        font-size: 1rem !important;
        opacity: 0.3 !important;
    }
    
    /* Remover padding vertical extra */
    .card.py-2 {
        padding-top: 0.2rem !important;
        padding-bottom: 0.2rem !important;
    }
    
    .card.h-100 {
        height: auto !important;
        min-height: auto !important;
    }
    
    /* Row compacta */
    .row.no-gutters .col {
        padding: 0 !important;
    }
    
    .row.no-gutters .col-auto {
        padding-left: 0.3rem !important;
    }
    
    /* Espa�amento entre cards */
    .col-xl-3.col-md-6.mb-4 {
        margin-bottom: 0.4rem !important;
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }
}

@media (max-width: 576px) {
    /* Mobile: valores ainda menores */
    .card-body .text-xs.font-weight-bold.text-uppercase {
        font-size: 0.5rem !important;
        margin-bottom: 0.1rem !important;
    }
    
    .card-body .h5.mb-0.font-weight-bold {
        font-size: 0.8rem !important;
    }
    
    .card-body .col-auto .fa-2x {
        font-size: 0.9rem !important;
    }
    
    .card.border-left-success .card-body, .card.border-left-danger .card-body, .card.border-left-info .card-body, .card.border-left-primary .card-body {
        padding: 0.35rem 0.45rem !important;
    }
}

/* For�ar altura m�nima dos cards */
.card.shadow.h-100 {
    min-height: 45px !important;
}

@media (max-width: 576px) {
    .card.shadow.h-100 {
        min-height: 40px !important;
    }
}

/* ========================================================================
   TOTALIZADORES EXTREMAMENTE COMPACTOS - FOR�AR OVERRIDE
   ======================================================================== */

/* RESETAR TODOS OS ESTILOS ANTERIORES */
@media (max-width: 768px) {
    /* Cards principais - altura m�xima 45px */
    .card.border-left-success, 
    .card.border-left-danger, 
    .card.border-left-info, 
    .card.border-left-primary {
        margin-bottom: 0.35rem !important;
        padding: 0 !important;
        min-height: 40px !important;
        max-height: 45px !important;
        border-radius: 6px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
    }
    
    /* Body do card - padding m�nimo */
    .card-body {
        padding: 0.3rem 0.5rem !important;
        min-height: auto !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* Row dentro do card */
    .card-body .row.no-gutters {
        margin: 0 !important;
        width: 100% !important;
        align-items: center !important;
    }
    
    /* Coluna principal */
    .card-body .col.mr-2 {
        padding: 0 !important;
        margin-right: 0.3rem !important;
        flex: 1 !important;
    }
    
    /* Labels - texto min�sculo */
    .text-xs.font-weight-bold.text-uppercase {
        font-size: 0.5rem !important;
        margin-bottom: 0.1rem !important;
        line-height: 1 !important;
        letter-spacing: 0px !important;
        font-weight: 600 !important;
    }
    
    /* Valores - tamanho reduzido */
    .h5.mb-0.font-weight-bold.text-gray-800 {
        font-size: 0.75rem !important;
        margin: 0 !important;
        line-height: 1.1 !important;
        font-weight: 700 !important;
    }
    
    /* Ocultar �cones completamente */
    .card-body .col-auto {
        display: none !important;
    }
    
    /* Remover padding/margin extra */
    .card.py-2 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .card.h-100 {
        height: auto !important;
        min-height: auto !important;
    }
    
    /* Grid de cards */
    .col-xl-3.col-md-6 {
        padding: 0 0.3rem !important;
        margin-bottom: 0.35rem !important;
    }
    
    .row.mb-4 {
        margin-bottom: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    /* Mobile: ainda menor - altura m�xima 38px */
    .card.border-left-success, 
    .card.border-left-danger, 
    .card.border-left-info, 
    .card.border-left-primary {
        min-height: 35px !important;
        max-height: 38px !important;
        margin-bottom: 0.3rem !important;
    }
    
    .card-body {
        padding: 0.25rem 0.4rem !important;
    }
    
    .text-xs.font-weight-bold.text-uppercase {
        font-size: 0.45rem !important;
        margin-bottom: 0.05rem !important;
    }
    
    .h5.mb-0.font-weight-bold.text-gray-800 {
        font-size: 0.7rem !important;
    }
    
    .col-xl-3.col-md-6 {
        padding: 0 0.25rem !important;
        margin-bottom: 0.3rem !important;
    }
}

/* Garantir que border-left seja vis�vel mas fina */
.card.border-left-success {
    border-left: 3px solid #1cc88a !important;
}
.card.border-left-danger {
    border-left: 3px solid #e74a3b !important;
}
.card.border-left-info {
    border-left: 3px solid #36b9cc !important;
}
.card.border-left-primary {
    border-left: 3px solid #4e73df !important;
}

/* Remover sombras excessivas */
.card.shadow {
    box-shadow: 0 1px 2px rgba(0,0,0,0.08) !important;
}

/* ========================================================================
   LAYOUT DE CARDS PARA TRANSAÇÕES - MOBILE FRIENDLY
   ======================================================================== */

.transaction-card {
    background: #fff;
    transition: all 0.3s ease;
    border-left: 4px solid #e2e8f0 !important;
}

.transaction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

/* Borda colorida baseada no tipo */
.transaction-card:has(.badge.bg-success) {
    border-left-color: #10b981 !important;
}

.transaction-card:has(.badge.bg-danger) {
    border-left-color: #ef4444 !important;
}

.transaction-card:has(.badge.bg-primary) {
    border-left-color: #3b82f6 !important;
}

/* Mobile - Cards em lista vertical */
@media (max-width: 768px) {
    .transaction-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .transaction-card {
        margin-bottom: 0 !important;
        padding: 0.75rem !important;
    }
    
    .transaction-card h6 {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .transaction-card h5 {
        font-size: 1.1rem;
        font-weight: 700;
    }
    
    .transaction-card small {
        font-size: 0.75rem;
    }
    
    .transaction-card .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Desktop - Manter espaçamento normal */
@media (min-width: 769px) {
    .transaction-list {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ========================================================================
   PROJECTION CARDS - MOBILE FRIENDLY
   ======================================================================== */

.projecao-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.projecao-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Current month highlighting */
.projecao-card.border-primary {
    border-width: 2px !important;
    border-color: #007bff !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.projecao-card h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.projecao-card .projecao-saldo {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: block;
}

.projecao-card .projecao-valores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.projecao-card .projecao-item {
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    background: #f8f9fa;
}

.projecao-card .projecao-item i {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.projecao-card .projecao-item small {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: #6c757d;
    font-weight: 500;
}

.projecao-card .projecao-item strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
}

.projecao-card .badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    margin-left: 4px;
}

/* Color variations for projection items */
.projecao-item.receita {
    background: #d4edda;
    color: #155724;
}

.projecao-item.receita i {
    color: #28a745;
}

.projecao-item.despesa {
    background: #f8d7da;
    color: #721c24;
}

.projecao-item.despesa i {
    color: #dc3545;
}

.projecao-item.aporte {
    background: #d1ecf1;
    color: #0c5460;
}

.projecao-item.aporte i {
    color: #17a2b8;
}

/* Summary boxes */
.projecao-resumo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.projecao-resumo h6 {
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.projecao-resumo h4 {
    color: white;
    font-weight: 700;
    margin: 0;
    font-size: 1.5rem;
}

/* Final summary row */
.projecao-totais {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.projecao-totais h6 {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 12px;
    text-align: center;
}

.projecao-totais .row {
    margin: 0;
}

.projecao-totais .col-4 {
    padding: 0 8px;
}

.projecao-totais .projecao-item {
    background: white;
    border: 1px solid #dee2e6;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .projecao-card {
        padding: 14px;
        margin-bottom: 10px;
    }
    
    .projecao-card h6 {
        font-size: 0.95rem;
    }
    
    .projecao-card .projecao-saldo {
        font-size: 1.15rem;
    }
    
    .projecao-card .projecao-valores {
        gap: 6px;
    }
    
    .projecao-card .projecao-item {
        padding: 6px 4px;
    }
    
    .projecao-card .projecao-item small {
        font-size: 0.7rem;
    }
    
    .projecao-card .projecao-item strong {
        font-size: 0.85rem;
    }
    
    .projecao-resumo {
        padding: 16px;
    }
    
    .projecao-resumo h6 {
        font-size: 0.75rem;
    }
    
    .projecao-resumo h4 {
        font-size: 1.3rem;
    }
    
    .projecao-totais {
        padding: 12px;
    }
    
    .projecao-totais h6 {
        font-size: 0.85rem;
    }
}

/* PADRÃO GLOBAL DE LARGURA PARA LISTAS E CARDS - CORRIGIDO */
.transaction-list, .projecao-list, .card, .card-modern, .projecao-card {
    width: 100% !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.transaction-card, .projecao-card, .card, .card-modern {
    width: 100% !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* Garantir que não haja overflow lateral em mobile */
@media (max-width: 768px) {
    .transaction-list, .projecao-list, .card, .card-modern, .projecao-card {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0;
        right: 0;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* CORREÇÃO PROJEÇÃO FINANCEIRA - CARDS E LISTA */
.projecao-list, .projecao-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
}

@media (max-width: 768px) {
    .projecao-list, .projecao-card {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* CORREÇÃO FINAL DE LARGURA E OVERFLOW PARA MOBILE */
body, .container, .container-fluid, .row {
    overflow-x: hidden !important;
}

.card, .card-modern, .transaction-list, .transaction-card, .projecao-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 12px !important;
}

@media (max-width: 768px) {
    .card, .card-modern, .transaction-list, .transaction-card, .projecao-card {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Fixar rodapé da sidebar na parte inferior */
.sidebar {
    position: relative;
    min-height: 100vh;
}
.sidebar-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
    background: rgba(255,255,255,0.97);
    border-top: 1px solid var(--border-color);
    z-index: 10;
}
.sidebar-content {
    padding-bottom: 120px; /* espaço para o rodapé */
}
/* ========================================================================
   Sistema Financeiro - Design Moderno
   Estilo contemporâneo com gradientes, sombras e animações
   ======================================================================== */

:root {
    /* Cores Primárias */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* Cores Neutras */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Sombras */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Raios de Borda */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* ========================================================================
   RESET E BASE
   ======================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
}

/* ========================================================================
   TELA DE LOGIN MODERNA
   ======================================================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 2rem;
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff" fill-opacity="0.05" points="0,1000 1000,0 1000,1000"/></svg>');
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    animation: slideUp 0.6s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
}

.login-title {
    font-size: 1.875rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ========================================================================
  

/* ========================================================================
   RESPONSIVIDADE GLOBAL - APLICADA A TODO O SISTEMA
   ======================================================================== */

/* Garante que todos os elementos respeitem o box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Previne overflow horizontal em todo o site */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Mobile - Smartphones pequenos (320px - 575px) */
@media (max-width: 575px) {
    .card, .card-modern { padding: 1rem !important; }
    .btn { font-size: 0.85rem !important; padding: 0.5rem 0.75rem !important; }
    .form-control, .form-select { font-size: 0.9rem !important; }
    h1, .h1 { font-size: 1.75rem !important; }
    h2, .h2 { font-size: 1.5rem !important; }
    h3, .h3 { font-size: 1.25rem !important; }
    table { display: block; overflow-x: auto; }
    .modal-dialog { margin: 0.5rem !important; }
}

