* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 5px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.container .lista-section,
.container .cartoes-section,
.container .templates-section,
.container .categorias-section,
.expectativas-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    margin-top: 60px;
}

#mes-atual {
    font-weight: bold;
    font-size: 1.2em;
}

.header-buttons {
    position: absolute;
    top: 30px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.user-status {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    margin: 10px 0;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

body.dark-mode .user-status {
    background: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.notification:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.theme-toggle,
.btn-relatorios,
.btn-voltar {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.theme-toggle {
    border-radius: 50%;
    padding: 10px;
    font-size: 1.2em;
}

.theme-toggle:hover,
.btn-relatorios:hover,
.btn-voltar:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.personal-info {
    background-color: #dfdddd;
    padding: 10px;
    margin-top: 30px;
    border-radius: 10px;
}

body.dark-mode .personal-info {
    background-color: #2d2d2d;
}

.personal-info>div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.copyright p {
    margin: 5px 0;
    color: #6d6a6a;
    font-size: 14px;
}

.redes-sociais a {
    display: inline-block;
    color: #0077b5;
    /* Cor oficial do LinkedIn */
    font-size: 24px;
    transition: color 0.3s ease;
    text-decoration: none;
}

.redes-sociais a:hover {
    color: #005885;
    transform: scale(1.1);
}

/* Para responsividade em mobile */
@media (max-width: 768px) {
    .personal-info>div {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Resumo Financeiro */
.resumo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #f8f9fa;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #666;
}

.card span {
    font-size: 2em;
    font-weight: bold;
    display: block;
}

.card.receitas span {
    color: #28a745;
}

.card.despesas span {
    color: #dc3545;
}

.card.saldo span {
    color: #007bff;
}

/* Gráficos */
.graficos {
    background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 30px 0;
    padding: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 8px 16px rgba(0, 0, 0, 0.05);
}

.grafico-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    height: 300px;
}

/* Formulário */
.form-section {
    padding: 30px;
}

.form-section h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

#form-transacao {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

#form-transacao button {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 200px;
}

/* Campos de parcelamento ocupam toda a largura */
#parcelamento-fields {
    grid-column: 1 / -1;
}

/* Campo de cartão selecionado */
#cartao-selecionado {
    grid-column: span 1;
}

.input-money {
    position: relative;
    display: flex;
    align-items: center;
}

.money-symbol {
    position: absolute;
    left: 15px;
    color: #666;
    font-weight: bold;
    z-index: 1;
}

.input-money input {
    padding-left: 40px !important;
}

#form-transacao input,
#form-transacao select,
#form-transacao button {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* Melhorias para campo de data */
#form-transacao input[type="date"] {
    cursor: pointer;
    position: relative;
    background: white;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-height: 50px;
    display: flex;
    align-items: center;
}

#form-transacao input[type="date"]:hover {
    border-color: #007bff;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

#form-transacao input[type="date"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1), 0 8px 25px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

/* Estilizar o ícone do calendário */
#form-transacao input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23007bff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat center;
    background-size: 20px 20px;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    opacity: 0.8;
    transition: all 0.3s ease;
}

#form-transacao input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Remover aparência padrão do Firefox */
#form-transacao input[type="date"]::-moz-focus-inner {
    border: 0;
}

/* Estilo para quando o campo está vazio */
#form-transacao input[type="date"]:invalid {
    color: #6c757d;
}

#form-transacao input[type="date"]:valid {
    color: #495057;
}

/* Remover seleção azul dos números */
#form-transacao input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    -webkit-user-select: none;
    user-select: none;
}

#form-transacao input[type="date"]::-webkit-datetime-edit {
    -webkit-user-select: none;
    user-select: none;
}

#form-transacao input[type="date"]::-webkit-datetime-edit-month-field:focus,
#form-transacao input[type="date"]::-webkit-datetime-edit-day-field:focus,
#form-transacao input[type="date"]::-webkit-datetime-edit-year-field:focus {
    background: transparent !important;
    color: inherit !important;
    outline: none !important;
}

#form-transacao input[type="date"]::-webkit-datetime-edit-month-field::selection,
#form-transacao input[type="date"]::-webkit-datetime-edit-day-field::selection,
#form-transacao input[type="date"]::-webkit-datetime-edit-year-field::selection {
    background: transparent !important;
}

#form-transacao input[type="date"] {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    caret-color: transparent;
}

#form-transacao input[type="date"]:focus {
    caret-color: transparent;
}

#form-transacao input[type="date"]::selection {
    background: transparent !important;
}

/* Remover destaque azul mais específico */
#form-transacao input[type="date"]::-webkit-datetime-edit-month-field,
#form-transacao input[type="date"]::-webkit-datetime-edit-day-field,
#form-transacao input[type="date"]::-webkit-datetime-edit-year-field {
    background: transparent !important;
    color: inherit !important;
}

#form-transacao input[type="date"]::-webkit-datetime-edit-month-field:hover,
#form-transacao input[type="date"]::-webkit-datetime-edit-day-field:hover,
#form-transacao input[type="date"]::-webkit-datetime-edit-year-field:hover {
    background: transparent !important;
    color: inherit !important;
}

#form-transacao input[type="date"]::-webkit-datetime-edit-month-field:active,
#form-transacao input[type="date"]::-webkit-datetime-edit-day-field:active,
#form-transacao input[type="date"]::-webkit-datetime-edit-year-field:active {
    background: transparent !important;
    color: inherit !important;
}

body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-month-field,
body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-day-field,
body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-year-field {
    background: transparent !important;
    color: #e0e0e0 !important;
}

body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-month-field:hover,
body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-day-field:hover,
body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-year-field:hover {
    background: transparent !important;
    color: #e0e0e0 !important;
}

body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-month-field:active,
body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-day-field:active,
body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-year-field:active {
    background: transparent !important;
    color: #e0e0e0 !important;
}

#form-transacao input:focus,
#form-transacao select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#form-transacao button {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

#form-transacao button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.lista-section h2 {
    margin-bottom: 20px;
    text-align: center;
}

#lista-transacoes {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

.transacao {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 5px solid #007bff;
    transition: all 0.3s ease;
}

.transacao:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.transacao.receita {
    border-left-color: #28a745;
}

.transacao.despesa {
    border-left-color: #dc3545;
}

.transacao.investimento {
    border-left-color: #007bff;
}

.transacao-info {
    flex: 1;
}

.transacao-valor {
    font-weight: bold;
    font-size: 1.3em;
    margin-right: 15px;
}

.transacao-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.transacao.receita .transacao-valor {
    color: #28a745;
}

.transacao.despesa .transacao-valor {
    color: #dc3545;
}

.transacao.investimento .transacao-valor {
    color: #007bff;
}

.transacao .btn-small {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transacao .btn-edit {
    background: #ffc107;
    color: #212529;
}

.transacao .btn-edit:hover {
    background: #e0a800;
    transform: scale(1.1);
}

.transacao .btn-delete {
    background: #dc3545;
    color: white;
}

.transacao .btn-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Manter compatibilidade com btn-excluir antigo */
.btn-excluir {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-excluir:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Backup */
.backup-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
}

.backup-section button {
    padding: 15px 30px;
    margin: 0 10px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#salvar-backup {
    background: #28a745;
    color: white;
}

.backup-section button:last-child {
    background: #007bff;
    color: white;
}

.backup-section button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsivo */
@media (max-width: 768px) {
    .graficos {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 20px;
    }

    .grafico-container {
        max-width: 350px;
        width: 100%;
    }

    .transacoes-separadas {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        padding: 0 20px 20px 20px;
        scroll-snap-type: x mandatory;
    }

    .receitas-section,
    .gastos-section {
        min-width: 280px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    #form-transacao {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    #form-transacao input,
    #form-transacao select,
    #form-transacao button {
        width: 100%;
        box-sizing: border-box;
    }

    /* Parcelamento em mobile */
    .parcelamento-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }

    .header-buttons {
        position: static;
        justify-content: center;
        margin-top: 15px;
        flex-wrap: wrap;
    }

    .transacao {
        flex-direction: column;
        align-items: flex-start;
    }

    .transacao-valor {
        margin: 10px 0;
    }

    .form-section {
        padding: 20px 15px;
    }
}

/* Dark Mode */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

body.dark-mode .container {
    background: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode header {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

body.dark-mode .resumo {
    background: #2d2d2d;
}

body.dark-mode .card {
    background: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #404040;
}

body.dark-mode .graficos {
    background: #1e1e1e;
}

body.dark-mode .card h3 {
    color: #b0b0b0;
}

body.dark-mode .form-section {
    background: #2d2d2d;
}

body.dark-mode .form-section h2 {
    color: #e0e0e0;
}

body.dark-mode #form-transacao input,
body.dark-mode #form-transacao select {
    background: #1a1a1a;
    color: #e0e0e0;
    border: 2px solid #404040;
}

body.dark-mode #form-transacao input:focus,
body.dark-mode #form-transacao select:focus {
    border-color: #666666;
    box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.2);
}

/* Dark Mode para campo de data */
body.dark-mode #form-transacao input[type="date"] {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #404040;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.dark-mode #form-transacao input[type="date"]:hover {
    border-color: #666666;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

body.dark-mode #form-transacao input[type="date"]:focus {
    border-color: #666666;
    background: #2d2d2d;
    box-shadow: 0 0 0 4px rgba(102, 102, 102, 0.2), 0 8px 25px rgba(255, 255, 255, 0.1);
}

/* Ícone do calendário no modo escuro */
body.dark-mode #form-transacao input[type="date"]::-webkit-calendar-picker-indicator {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23e0e0e0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat center;
    background-size: 20px 20px;
    opacity: 0.8;
}

body.dark-mode #form-transacao input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Cores do texto no modo escuro */
body.dark-mode #form-transacao input[type="date"]:invalid {
    color: #b0b0b0;
}

body.dark-mode #form-transacao input[type="date"]:valid {
    color: #e0e0e0;
}

/* Estilos adicionais para melhor compatibilidade */
#form-transacao input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
    background-clip: padding-box;
}

/* Estilo para o placeholder do campo de data */
#form-transacao input[type="date"]::-webkit-datetime-edit-text {
    color: #495057;
    padding: 0 2px;
}

#form-transacao input[type="date"]::-webkit-datetime-edit-month-field,
#form-transacao input[type="date"]::-webkit-datetime-edit-day-field,
#form-transacao input[type="date"]::-webkit-datetime-edit-year-field {
    color: #495057;
    font-weight: 500;
}

body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-text {
    color: #e0e0e0;
}

body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-month-field,
body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-day-field,
body.dark-mode #form-transacao input[type="date"]::-webkit-datetime-edit-year-field {
    color: #e0e0e0;
}

/* Animação suave para o campo de data */
#form-transacao input[type="date"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efeito de foco mais suave */
#form-transacao input[type="date"]:focus {
    animation: focusGlow 0.3s ease-out;
}

@keyframes focusGlow {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    100% {
        box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1), 0 8px 25px rgba(0, 123, 255, 0.15);
    }
}

body.dark-mode #form-transacao input[type="date"]:focus {
    animation: focusGlowDark 0.3s ease-out;
}

@keyframes focusGlowDark {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    100% {
        box-shadow: 0 0 0 4px rgba(102, 102, 102, 0.2), 0 8px 25px rgba(255, 255, 255, 0.1);
    }
}

/* Classe para campo de data melhorado */
.campo-data-melhorado {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.campo-data-melhorado::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: -1;
}

.campo-data-melhorado:hover::before {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(0, 123, 255, 0.02) 100%);
}

body.dark-mode .campo-data-melhorado:hover::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    #form-transacao input[type="date"] {
        min-height: 45px;
        font-size: 16px;
        /* Evita zoom no iOS */
        padding: 12px 15px;
    }

    #form-transacao input[type="date"]::-webkit-calendar-picker-indicator {
        width: 18px;
        height: 18px;
        background-size: 18px 18px;
    }
}

/* Melhorar acessibilidade */
#form-transacao input[type="date"]:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

body.dark-mode #form-transacao input[type="date"]:focus-visible {
    outline-color: #666666;
}

body.dark-mode #form-transacao button {
    background: linear-gradient(135deg, #404040, #2d2d2d);
    color: #e0e0e0;
    border: 2px solid #666666;
    box-shadow: none;
}

body.dark-mode #form-transacao button:hover {
    background: linear-gradient(135deg, #666666, #404040);
    border-color: #808080;
}

body.dark-mode .lista-section {
    background: #2d2d2d;
}

body.dark-mode .templates-section {
    background: #1e1e1e;
}

body.dark-mode .lista-section h2 {
    color: #e0e0e0;
}

body.dark-mode .transacao {
    background: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #404040;
}

body.dark-mode .grafico-container {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .backup-section {
    background: #1a1a1a;
}

body.dark-mode .backup-section button {
    background: #2d2d2d;
    color: #e0e0e0;
    border: 2px solid #404040;
}

body.dark-mode .backup-section button:hover {
    background: #404040;
    border-color: #666666;
}

body.dark-mode .transacao .btn-edit {
    background: #3e5b3f;
    color: #eef6ea;
    border: 1px solid #5a7a52;
}

body.dark-mode .transacao .btn-edit:hover {
    background: #57754f;
    border-color: #6a8a5f;
}

body.dark-mode .transacao .btn-delete {
    background: #6f2f2f;
    color: #fff5f5;
    border: 1px solid #942e2e;
}

body.dark-mode .transacao .btn-delete:hover {
    background: #913535;
    border-color: #b04040;
}

body.dark-mode .btn-excluir {
    background: #8b0000;
    border: 1px solid #a00000;
}

body.dark-mode .money-symbol {
    color: #b0b0b0;
}

body.dark-mode .header-buttons button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .header-buttons button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.valor-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.toggle-visibility {
    background: none !important;
    border: none !important;
    cursor: pointer;
    font-size: 1.2em;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    outline: none !important;
    box-shadow: none !important;
    padding: 5px;
    border-radius: 50%;
}

.toggle-visibility:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1) !important;
}

.toggle-visibility:focus {
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
}

body.dark-mode .toggle-visibility:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.valor-oculto {
    font-family: monospace;
    letter-spacing: 2px;
}

.filtro-mes-container {
    margin: 15px 0;
}

.filtro-mes-container select {
    padding: 10px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    min-width: 200px;
}

.filtro-mes-container select option {
    background: rgba(255, 255, 255, 0.2);
    color: black;
}

body.dark-mode .filtro-mes-container select {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .filtro-mes-container select option {
    background: #2d2d2d;
    color: #e0e0e0;
}

.filtro-container {
    margin-bottom: 20px;
    text-align: center;
}

.filtro-container select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    min-width: 200px;
}

body.dark-mode .filtro-container select {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

#transacoes-por-categoria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.categoria-grupo {
    background: linear-gradient(145deg, #ffffff, #f0f2f5);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #007bff;

    /* Efeitos 3D e flutuação */
    box-shadow:
        0 8px 32px rgba(0, 123, 255, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);

    transform: translateZ(0) translateY(0);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;

    /* Perspectiva 3D */
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Pseudo-elemento para criar profundidade extra */
.categoria-grupo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(0, 123, 255, 0.05) 0%,
            rgba(0, 123, 255, 0.02) 50%,
            transparent 100%);
    border-radius: 15px;
    pointer-events: none;
    z-index: 1;
}

/* Efeito hover - Levitação 3D */
.categoria-grupo:hover {
    transform: translateY(-8px) rotateX(2deg) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 123, 255, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Conteúdo interno com z-index para ficar acima do pseudo-elemento */
.categoria-grupo>* {
    position: relative;
    z-index: 2;
}

.categoria-grupo h3 {
    margin-bottom: 15px;
    color: #333;
}

.categoria-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

body.dark-mode .categoria-grupo {
    background: #2d2d2d;
    border-left-color: #666;
}

body.dark-mode .categoria-grupo:hover {
    border-left-color: none;
}

body.dark-mode .categoria-grupo h3 {
    color: #e0e0e0;
}

/* Remover seta padrão dos selects */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

body.dark-mode select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0e0e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

body.dark-mode select:hover {
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
    border-color: #666666;
}

.categoria-edit-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.edit-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.edit-inputs input {
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
}

.edit-inputs input:first-child {
    flex: 1;
}

.edit-inputs input:nth-child(2) {
    width: 60px;
    text-align: center;
}

.emoji-options {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    padding: 10px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    max-height: 120px;
    overflow-y: auto;
}

.emoji-option {
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    text-align: center;
    font-size: 18px;
    transition: background 0.2s ease;
    border: 1px solid transparent;
}

.emoji-option:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.edit-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-save {
    background: #28a745 !important;
    color: white !important;
}

.btn-cancel {
    background: #6c757d !important;
    color: white !important;
}

body.dark-mode .categoria-edit-form {
    background: #1a1a1a;
}

body.dark-mode .edit-inputs input {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .emoji-options {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .emoji-option:hover {
    background: #404040;
    border-color: #666;
}

.categoria-item.editing {
    background: #f8f9fa;
    padding: 15px;
}

.card.investimentos {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.transacoes-separadas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.expandir-container {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.btn-expandir {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-expandir:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-expandir:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    outline: none;
}

.lista-limitada {
    position: relative;
}

.lista-limitada::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, rgba(248, 249, 250, 0.9));
    pointer-events: none;
}

body.dark-mode .btn-expandir {
    background: linear-gradient(135deg, #404040, #2d2d2d);
    border: 1px solid #666;
}

body.dark-mode .btn-expandir:hover {
    background: linear-gradient(135deg, #555, #404040);
    border-color: #777;
}

body.dark-mode .lista-limitada::after {
    background: linear-gradient(transparent, rgba(45, 45, 45, 0.9));
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-container h2 {
    margin-bottom: 20px;
    color: #333;
}

.login-container p {
    margin-bottom: 30px;
    color: #666;
}

.btn-google {
    background: #4285f4;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background: #3367d6;
    transform: translateY(-2px);
}

.btn-offline {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

.btn-offline:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

body.dark-mode .login-container {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .login-container h2 {
    color: #e0e0e0;
}

body.dark-mode .login-container p {
    color: #b0b0b0;
}

.receitas-section,
.gastos-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.receitas-section h2 {
    color: #28a745;
    border-bottom: 3px solid #28a745;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.gastos-section h2 {
    color: #dc3545;
    border-bottom: 3px solid #dc3545;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.transacao-separada {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.transacao-separada:last-child {
    border-bottom: none;
}

.transacao-separada .valor {
    font-weight: bold;
    font-size: 1.1em;
}

.receitas-section .valor {
    color: #28a745;
}

.gastos-section .valor {
    color: #dc3545;
}

.grafico-container h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

body.dark-mode .receitas-section,
body.dark-mode .gastos-section {
    background: #2d2d2d;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .receitas-section h2,
body.dark-mode .gastos-section h2 {
    color: #e0e0e0;
}

body.dark-mode .transacao-separada {
    border-bottom-color: #404040;
}

body.dark-mode .grafico-container h3 {
    color: #e0e0e0;
}

.resumo-investimentos {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.resumo-investimentos .card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;

    box-shadow:
        0 12px 32px rgba(0, 123, 255, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        inset 0 5px 0 rgba(255, 255, 255, 0.4);

    transform: translateZ(0) translateY(0);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;

    /* Perspectiva 3D */
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.resumo-investimentos .card:hover {
    transform: translateY(-5px);
}

.resumo-investimentos .card h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #666;
}

.resumo-investimentos .card span {
    font-size: 2em;
    font-weight: bold;
    display: block;
    color: #007bff;
}

.resumo-investimentos .card small {
    color: #999;
    font-size: 0.9em;
    display: block;
    margin-top: 10px;
}

.grafico-investimentos-section {
    margin: 30px 0;
    text-align: center;
}

.grafico-investimentos-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.grafico-minimalista {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

.grafico-minimalista canvas {
    width: 100%;
    height: 150px;
}

body.dark-mode .resumo-investimentos .card {
    background: #1a1a1a;
    color: #e0e0e0;
    box-shadow: none;
}

body.dark-mode .resumo-investimentos .card h3 {
    color: #ccc;
}

body.dark-mode .resumo-investimentos .card small {
    color: #999;
}

body.dark-mode .grafico-investimentos-section h3 {
    color: #e0e0e0;
}

body.dark-mode .grafico-minimalista {
    background: #2d2d2d;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* === GRÁFICOS DE PIZZA MENSAIS === */
.graficos-pizza-section {
    margin: 30px 0;
    text-align: center;
}

.graficos-pizza-section h3 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.3em;
}

.pizza-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.pizza-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.pizza-container:hover {
    transform: translateY(-5px);
}

.pizza-container h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.pizza-container canvas {
    display: block;
    margin: 0 auto 15px auto;
}

.pizza-legenda {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9em;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.cor-indicador {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.sem-dados {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

/* Dark Mode para Gráficos de Pizza */
body.dark-mode .graficos-pizza-section h3 {
    color: #e0e0e0;
}

body.dark-mode .pizza-container {
    background: #2d2d2d;
    color: #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .pizza-container h4 {
    color: #e0e0e0;
}

body.dark-mode .sem-dados {
    color: #b0b0b0;
}

/* Responsivo para Gráficos de Pizza */
@media (max-width: 768px) {
    .pizza-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        padding: 10px;
    }

    .pizza-container {
        padding: 15px;
    }

    .pizza-container canvas {
        width: 150px;
        height: 150px;
    }
}

body.dark-mode .categoria-item.editing {
    background: #2d2d2d;
}

/* ===== PÁGINA DE EXPECTATIVAS ===== */

.expectativas-section {
    padding: 30px;
    margin: 20px 0;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-section.expectativa-form {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.dark-mode .form-section.expectativa-form {
    background: #1e1e1e;
}

#form-anual,
#form-mensal {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

#form-anual button,
#form-mensal button {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 250px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#form-anual button:hover,
#form-mensal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.expectativa-form input,
.expectativa-form select {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    background: white !important;
    color: #333;
    transition: all 0.3s ease;
}

.expectativa-form input::placeholder {
    color: #666;
}

.expectativa-form input:focus,
.expectativa-form select:focus {
    outline: none !important;
    border-color: #007bff !important;
    box-shadow: none !important;
}

.expectativa-form select option {
    background: white;
    color: #333;
}

.progresso-section {
    background: linear-gradient(135deg, #fefefe 0%, #f8fafb 50%, #f1f4f6 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: #1a202c;
    position: relative;
    overflow: hidden;
}

/* Efeito sutil de textura */
.progresso-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.015) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Garantir que o conteúdo fique acima do efeito */
.progresso-section>* {
    position: relative;
    z-index: 1;
}

.progresso-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2d3748;
    font-size: 2em;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.progresso-section h3 {
    margin: 30px 0 20px 0;
    color: #4a5568;
    font-size: 1.3em;
    border-bottom: 2px solid rgba(226, 232, 240, 0.8);
    padding-bottom: 10px;
    font-weight: 600;
}

#cards-progresso-anual,
#cards-progresso-mensal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.meta-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.meta-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.meta-actions {
    display: flex;
    gap: 10px;
}

.progresso-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: 16px;
    padding: 25px;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progresso-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(102, 126, 234, 0.3);
}

.progresso-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.progresso-card h4 {
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #2d3748;
    font-weight: 600;
}

.progresso-bar {
    background: linear-gradient(90deg, #e2e8f0 0%, #f1f4f6 100%);
    border-radius: 12px;
    height: 12px;
    margin: 15px 0;
    overflow: hidden;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(255, 255, 255, 0.8);
    position: relative;
}

.progresso-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 50%, #2f855a 100%);
    border-radius: 12px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(72, 187, 120, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

/* Efeito de brilho na barra */
.progresso-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.progresso-texto {
    font-size: 0.9em;
    color: #4a5568;
    margin-top: 10px;
    line-height: 1.4;
    font-weight: 500;
}

/* Dark Mode para Expectativas */
body.dark-mode .progresso-section {
    background: #1e1e1e;
    border-color: rgba(71, 85, 105, 0.4);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-mode .progresso-section::before {
    background:
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.06) 0%, transparent 50%);
}

body.dark-mode .progresso-section h2 {
    color: #f1f5f9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

body.dark-mode .progresso-section h3 {
    color: #cbd5e1;
    border-bottom-color: rgba(71, 85, 105, 0.6);
}

body.dark-mode .progresso-card {
    background: #2d2d2d;
    border: none;
}

body.dark-mode .progresso-card:hover {
    border: none;
    border-color: none;
    box-shadow: none;
}

body.dark-mode .progresso-card h4 {
    color: #f1f5f9;
}

body.dark-mode .progresso-bar {
    background: linear-gradient(90deg, #334155 0%, #1e293b 100%);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(255, 255, 255, 0.05);
}

body.dark-mode .progresso-texto {
    color: #cbd5e1;
}

/* Responsivo */
@media (max-width: 768px) {
    .progresso-section {
        padding: 20px;
        margin: 15px 0;
    }

    #cards-progresso-anual,
    #cards-progresso-mensal {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .progresso-card {
        padding: 20px;
    }
}

body.dark-mode .expectativas-section {
    background: #2d2d2d;
}

body.dark-mode .meta-item {
    background: #1a1a1a;
    border-color: #404040;
    color: #e0e0e0;
}

.form-section.expectativa-form h3 {
    margin-bottom: 25px;
    font-size: 1.5em;
    text-align: center;
}

body.dark-mode .form-section.expectativa-form h3 {
    color: #e0e0e0;
}

body.dark-mode .expectativa-form h3 {
    color: #e0e0e0;
}

body.dark-mode .expectativa-form input,
body.dark-mode .expectativa-form select {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #404040 !important;
}

body.dark-mode .expectativa-form input::placeholder {
    color: #b0b0b0;
}

body.dark-mode .expectativa-form input:focus,
body.dark-mode .expectativa-form select:focus {
    border-color: #666666 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Remover qualquer box-shadow azul dos inputs de expectativas */
.form-section.expectativa-form input,
.form-section.expectativa-form select,
.form-section.expectativa-form input:focus,
.form-section.expectativa-form select:focus {
    box-shadow: none !important;
    outline: none !important;
}

.form-section.expectativa-form input:focus,
.form-section.expectativa-form select:focus {
    border-color: #e9ecef !important;
}

body.dark-mode .form-section.expectativa-form input,
body.dark-mode .form-section.expectativa-form select,
body.dark-mode .form-section.expectativa-form input:focus,
body.dark-mode .form-section.expectativa-form select:focus {
    box-shadow: none !important;
    outline: none !important;
}

body.dark-mode .form-section.expectativa-form input:focus,
body.dark-mode .form-section.expectativa-form select:focus {
    border-color: #404040 !important;
}

body.dark-mode .expectativa-form select option {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode #form-anual button,
body.dark-mode #form-mensal button {
    background: linear-gradient(135deg, #404040, #2d2d2d);
    color: #e0e0e0;
    border: 2px solid #666666;
    box-shadow: none;
}

body.dark-mode #form-anual button:hover,
body.dark-mode #form-mensal button:hover {
    background: linear-gradient(135deg, #666666, #404040);
    border-color: #808080;
}

/* Responsivo para Expectativas */
@media (max-width: 768px) {

    #form-anual,
    #form-mensal {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .expectativa-form {
        padding: 20px;
    }

    .expectativas-section,
    .progresso-section {
        padding: 20px;
        margin: 15px 0;
    }

    #cards-progresso-anual,
    #cards-progresso-mensal {
        grid-template-columns: 1fr;
    }
}

.emoji-selector {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 60px;
}

.emoji-options {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 120px;
    overflow-y: auto;
}

.emoji-option {
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
    transition: background 0.2s ease;
}

.emoji-option:hover {
    background: #f8f9fa;
}

body.dark-mode .emoji-options {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .emoji-option:hover {
    background: #404040;
}

/* Correção específica para selects do form-template no dark mode */
body.dark-mode .template-form #form-template input,
body.dark-mode .template-form #form-template select {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #404040 !important;
}

body.dark-mode .template-form #form-template input:focus,
body.dark-mode .template-form #form-template select:focus {
    border-color: #666666 !important;
    box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.2) !important;
}

/* Mesma cor para inputs do Gerenciar Categorias */
body.dark-mode .categoria-form #form-categoria input {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #404040 !important;
}

body.dark-mode .categoria-form #form-categoria input:focus {
    border-color: #666666 !important;
    box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.2) !important;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-buttons-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: #0056b3;
    /* transform: scale(1.05); */
}

.toggle-btn:active,
.toggle-btn:focus {
    background: linear-gradient(135deg, #667eea 0%, #2e76c7 100%);
    color: white;
    outline: none;
}

.hidden {
    display: none !important;
}

.templates-section {
    padding: 30px;
    background: #f8f9fa;
    margin-top: 20px;
    border-radius: 20px;
}

.categorias-section {
    padding: 30px;
    background: #f8f9fa;
    margin-top: 20px;
    border-radius: 20px;
}

.lista-section {
    padding: 30px;
    margin-top: 20px;
    border-radius: 20px;
}

.lista-section-relatorios {
    padding: 30px;
    background: #f8f9fa;
    margin-top: 20px;
    border-radius: 20px;
}

body.dark-mode .lista-section-relatorios {
    background: #1e1e1e;
}

.templates-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.template-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.template-info {
    flex: 1;
}

.template-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #ffc107;
    color: #212529;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

body.dark-mode .templates-section {
    background: #2d2d2d;
}

body.dark-mode .templates-section select {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #404040 !important;
}

body.dark-mode .template-item {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .toggle-btn {
    background: #404040;
    border: 1px solid #666;
}

body.dark-mode .toggle-btn:hover {
    background: #666;
}

.template-form,
.categoria-form {
    background: #e9e9e9;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 25px;
    border: none;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.template-form::before,
.categoria-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.template-form h3,
.categoria-form h3 {
    margin-bottom: 20px;
    color: #1e1e1e;
    text-align: center;
    font-size: 1.4em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

#form-template {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    position: relative;
    z-index: 1;
}

#form-template input,
#form-template select,
#form-categoria input {
    padding: 15px 20px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #333;
}

#form-template input:focus,
#form-template select:focus,

:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

#form-template input::placeholder,
#form-categoria input::placeholder {
    color: #666;
    opacity: 0.8;
}

#form-template button,
button[type="submit"] {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 250px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

/* Efeito de brilho/shine */
#form-template button::before,
button[type="submit"]::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;
}

#form-template button:hover,
button[type="submit"]:hover {
    transform: translateY(-3px);
    /* Gradiente mais vibrante no hover */
    background: linear-gradient(135deg, #4fd180 0%, #42c46f 100%);
    /* Sombra mais intensa */
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
    /* Leve aumento de escala */
    scale: 1.02;
}

/* Ativa o efeito de brilho no hover */
#form-template button:hover::before,
button[type="submit"]:hover::before {
    left: 100%;
}

/* Efeito ao clicar (active) */
#form-template button:active,
button[type="submit"]:active {
    transform: translateY(-1px);
    scale: 0.98;
    transition: all 0.1s ease;
}

#form-categoria {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.templates-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    justify-content: center;
}

.btn-template {
    background: linear-gradient(135deg, #5061af 0%, #0b2f58 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-template::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-template:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #5c6dbb 0%, #123d6d 100%);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
    scale: 1.02;
}

.btn-template:hover::before {
    left: 100%;
}

.btn-template:hover:active {
    transform: translateY(-1px);
    scale: 0.98;
    transition: all 0.1s ease;
}

.template-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: white;
    border-radius: 15px;
    border-left: 5px solid #28a745;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.categoria-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: white;
    border-radius: 15px;
    border-left: 5px solid #28a745;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.template-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.categoria-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.btn-small {
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-edit {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

body.dark-mode #form-template input,
body.dark-mode #form-template select,
body.dark-mode #form-categoria input {
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode #form-template input:focus,
body.dark-mode #form-template select:focus,
body.dark-mode #form-categoria input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode #form-template input::placeholder,
body.dark-mode #form-categoria input::placeholder {
    color: #bdc3c7;
}

body.dark-mode .template-item,
.categorias-section {
    padding: 30px;
    margin-top: 20px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(240, 147, 251, 0.3);
}

.categoria-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.categoria-emoji {
    font-size: 1.8em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

body.dark-mode .template-form h3,
body.dark-mode .categoria-form h3 {
    color: #ecf0f1;
}

body.dark-mode #form-template input,
body.dark-mode #form-template select,
body.dark-mode #form-categoria input {
    background: rgba(236, 240, 241, 0.1);
    color: #ecf0f1;
    border: 1px solid rgba(236, 240, 241, 0.2);
}

body.dark-mode #form-template input:focus,
body.dark-mode #form-template select:focus,
body.dark-mode #form-categoria input:focus {
    background: rgba(236, 240, 241, 0.15);
    border-color: rgba(236, 240, 241, 0.3);
}

body.dark-mode #form-template input::placeholder,
body.dark-mode #form-categoria input::placeholder {
    color: #bdc3c7;
}

body.dark-mode .template-item,
body.dark-mode .categoria-item {
    background: #2d2d2d;
    color: #e0e0e0;
    border-left-color: #28a745;
}

@media (max-width: 768px) {
    #form-template {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    #form-categoria {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .backup-section {
        margin-top: 20px;
        /* espaço menor no mobile */
    }
}

/* ===== CARTÕES DE CRÉDITO ===== */
.cartoes-section {
    padding: 30px;
    background: #f8f9fa;
    margin-top: 20px;
    border-radius: 20px;
}

.cartao-form {
    background: #e9e9e9;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 25px;
    border: none;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.cartao-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.cartao-form h3 {
    margin-bottom: 20px;
    color: #1e1e1e;
    text-align: center;
    font-size: 1.4em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

#form-cartao {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

#form-cartao input,
#form-cartao select {
    padding: 15px 20px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); */
    transition: all 0.3s ease;
    color: #333;
}

#form-cartao input:focus,
#form-cartao select:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    /* box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15); */
    transform: translateY(-2px);
}

#form-cartao button {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 250px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

#form-cartao button:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #4fd180 0%, #42c46f 100%);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
    scale: 1.02;
}

.cartoes-carousel {
    margin-top: 20px;
}

#lista-cartoes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cartao-item {
    color: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    cursor: pointer;
}

.cartao-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.cartao-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cartao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cartao-nome {
    font-size: 1.4em;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nome-cartao {
    font-size: 1.4em;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cartao-bandeira {
    font-size: 0.9em;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.cartao-limite {
    font-size: 2.2em;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.cartao-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.cartao-vencimento {
    font-size: 0.9em;
    opacity: 0.9;
}

.cartao-actions {
    display: flex;
    gap: 10px;
}

.cartao-actions button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cartao-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Cores dos cartões */
.cartao-item.from-purple-600.to-pink-500 {
    background: linear-gradient(135deg, #9333ea, #ec4899);
}

.cartao-item.from-yellow-500.to-orange-500 {
    background: linear-gradient(135deg, #eab308, #f97316);
}

.cartao-item.from-blue-600.to-indigo-600 {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.cartao-item.from-green-600.to-teal-500 {
    background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.cartao-item.from-red-600.to-pink-600 {
    background: linear-gradient(135deg, #dc2626, #db2777);
}

.cartao-item.from-gray-700.to-gray-900 {
    background: linear-gradient(135deg, #374151, #111827);
}

/* Campo de seleção de cartão */
#cartao-selecionado {
    grid-column: span 1;
}

#cartao-selecionado.hidden {
    display: none;
}

/* Dark Mode para Cartões */
body.dark-mode .cartoes-section {
    background: #2d2d2d;
}

body.dark-mode .cartao-form {
    background: #2d2d2d;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

body.dark-mode .cartao-form h3 {
    color: #ecf0f1;
}

body.dark-mode #form-cartao input,
body.dark-mode #form-cartao select {
    background: #1a1a1a;
    color: #ecf0f1;
    border: 2px solid #404040;
}

body.dark-mode #form-cartao input:focus,
body.dark-mode #form-cartao select:focus {
    background: rgba(236, 240, 241, 0.15);
    border-color: rgba(236, 240, 241, 0.3);
}

body.dark-mode #form-cartao select option {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode #form-cartao input::placeholder {
    color: #bdc3c7;
}

/* Responsivo para Cartões */
@media (max-width: 768px) {
    #form-cartao {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    #lista-cartoes {
        grid-template-columns: 1fr;
    }

    .cartao-item {
        min-height: 140px;
    }
}

/* === DARK MODE COMPLETO === */
/* Templates Section Dark Mode */
body.dark-mode .templates-section {
    background: #2d2d2d;
}

body.dark-mode .template-form h3 {
    color: #ecf0f1;
}

body.dark-mode #form-template input,
body.dark-mode #form-template select {
    background: rgba(236, 240, 241, 0.1);
    color: #ecf0f1;
    border: 1px solid rgba(236, 240, 241, 0.2);
}

body.dark-mode #form-template input:focus,
body.dark-mode #form-template select:focus {
    background: rgba(236, 240, 241, 0.15);
    border-color: rgba(236, 240, 241, 0.3);
}

body.dark-mode #form-template input::placeholder {
    color: #bdc3c7;
}

body.dark-mode .template-item {
    background: linear-gradient(135deg, rgba(52, 73, 94, 0.9) 0%, rgba(44, 62, 80, 0.7) 100%);
    color: #ecf0f1;
    border-left-color: #3498db;
}

/* Categorias Section Dark Mode */
body.dark-mode .categorias-section {
    background: #2d2d2d;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    border: 1px solid #333 !important;
}

body.dark-mode .categoria-form h3 {
    color: #ecf0f1;
}

body.dark-mode #form-categoria input {
    background: rgba(236, 240, 241, 0.1);
    color: #ecf0f1;
    border: 1px solid rgba(236, 240, 241, 0.2);
}

body.dark-mode #form-categoria input:focus {
    background: rgba(236, 240, 241, 0.15);
    border-color: rgba(236, 240, 241, 0.3);
}

body.dark-mode #form-categoria input::placeholder {
    color: #bdc3c7;
}

body.dark-mode .categoria-item {
    background: linear-gradient(135deg, rgba(52, 73, 94, 0.9) 0%, rgba(44, 62, 80, 0.7) 100%);
    color: #ecf0f1;
    border-left-color: #3498db;
}

/* Relatórios Dark Mode */
body.dark-mode .categoria-grupo {
    background: #2d2d2d;
    color: #e0e0e0;
    border-left-color: #666;
    box-shadow: none;
}

body.dark-mode .categoria-grupo h3 {
    color: #e0e0e0;
}

body.dark-mode .categoria-grupo .categoria-item {
    background: #1a1a1a;
    color: #e0e0e0;
    border-bottom-color: #404040;
}

body.dark-mode .filtro-container select {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .filtro-mes-container select {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .filtro-mes-container select option {
    background: #2d2d2d;
    color: #e0e0e0;
}

/* === CORREÇÕES FORÇADAS DARK MODE === */

body.dark-mode .template-form::before,
body.dark-mode .categoria-form::before {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
}

body.dark-mode #form-template input,
body.dark-mode #form-template select,
body.dark-mode #form-categoria input {
    background: rgba(236, 240, 241, 0.1) !important;
    color: #ecf0f1 !important;
    border: 1px solid rgba(236, 240, 241, 0.2) !important;
}

/* === EXPECTATIVAS === */
.expectativas-section {
    padding: 30px;
    margin-top: 20px;
    border-radius: 20px;
}

.expectativa-form h3 {
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.expectativa-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: white;
    border-radius: 15px;
    border-left: 5px solid #28a745;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.expectativa-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.expectativa-item small {
    display: block;
    color: #2d2d2d;
    margin-top: 5px;
}

body.dark-mode .expectativa-item small {
    display: block;
    color: #e0e0e0;
    margin-top: 5px;
}

.progresso-section {
    padding: 30px;
    background: #f8f9fa;
    margin-top: 20px;
    border-radius: 20px;
}

.progresso-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #007bff;
}

.progresso-card.status-bom {
    border-left-color: #28a745;
}

.progresso-card.status-atencao {
    border-left-color: #ffc107;
}

.progresso-card.status-ruim {
    border-left-color: #dc3545;
}

.status-bom .progresso-fill {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.status-atencao .progresso-fill {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.status-ruim .progresso-fill {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    background: #007bff;
}

.status-bom .status-badge {
    background: #28a745;
}

.status-atencao .status-badge {
    background: #ffc107;
    color: #212529;
}

.status-ruim .status-badge {
    background: #dc3545;
}

/* Dark Mode Expectativas */
body.dark-mode .expectativa-item {
    background: none;
}

body.dark-mode .expectativa-form h3 {
    color: #ecf0f1;
}

/* ======= OVERRIDES: botões gerados dinamicamente em Gerenciar Categorias / Templates (Dark Mode) ======= */
/* Aplicar tanto para html.dark-mode quanto body.dark-mode (evitar flash/inconsistências) */
html.dark-mode #lista-categorias .btn-small,
body.dark-mode #lista-categorias .btn-small,
html.dark-mode #lista-templates .btn-small,
body.dark-mode #lista-templates .btn-small,
html.dark-mode .categoria-item .btn-small,
body.dark-mode .categoria-item .btn-small,
html.dark-mode .template-item .btn-small,
body.dark-mode .template-item .btn-small {
    background: linear-gradient(135deg, #3a3a3a 0%, #2d2d2d 100%) !important;
    color: #e0e0e0 !important;
    border: 1px solid #444 !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
}

/* Editar / Excluir - cores distintas mas sem azul */
html.dark-mode #lista-categorias .btn-edit,
body.dark-mode #lista-categorias .btn-edit,
html.dark-mode #lista-templates .btn-edit,
body.dark-mode #lista-templates .btn-edit {
    background: linear-gradient(135deg, #556b4a 0%, #3a5034 100%) !important;
    color: #e0e0e0 !important;
    border: 1px solid #5a7a52 !important;
}

html.dark-mode #lista-categorias .btn-delete,
body.dark-mode #lista-categorias .btn-delete,
html.dark-mode #lista-templates .btn-delete,
body.dark-mode #lista-templates .btn-delete {
    background: linear-gradient(135deg, #7a2b2b 0%, #5c1e1e 100%) !important;
    color: #e0e0e0 !important;
    border: 1px solid #a33 !important;
}

/* Garantir que bordas laterais de itens não fiquem azuis */
html.dark-mode .template-item,
body.dark-mode .template-item,
html.dark-mode .categoria-item,
body.dark-mode .categoria-item {
    border-left-color: #666 !important;
}

/* Forçar que botões não sejam transparentes (evita que gradient do pai apareça) */
html.dark-mode #lista-categorias button,
body.dark-mode #lista-categorias button,
html.dark-mode #lista-templates button,
body.dark-mode #lista-templates button {
    background-image: none !important;
    background-color: rgba(58, 58, 58, 1) !important;
}

/* Itens da lista (template / categoria) - neutralizar gradientes azuis */
html.dark-mode .categoria-item,
body.dark-mode .categoria-item,
html.dark-mode .template-item,
body.dark-mode .template-item {
    background-image: none !important;
    background-color: rgba(36, 36, 36, 0.9) !important;
    /* cinza escuro uniforme */
    background-repeat: no-repeat !important;
    border-left-color: rgba(255, 255, 255, 0.04) !important;
    /* tira o azul brilhante */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65) !important;
}

/* Botões pequenos dentro dos itens (editar/excluir) */
html.dark-mode .categoria-item .btn-small,
body.dark-mode .categoria-item .btn-small,
html.dark-mode .template-item .btn-small,
body.dark-mode .template-item .btn-small,
html.dark-mode #lista-categorias .btn-small,
body.dark-mode #lista-categorias .btn-small,
html.dark-mode #lista-templates .btn-small,
body.dark-mode #lista-templates .btn-small {
    /* remover qualquer imagem/gradiente de fundo definido anteriormente */
    background: none !important;
    background-image: none !important;
    background-color: #3a3a3a !important;
    /* cinza médio */
    color: #eaeaea !important;
    border: 1px solid #4a4a4a !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6) inset, 0 6px 18px rgba(0, 0, 0, 0.45) !important;
    padding: 8px 12px !important;
    transition: background 0.15s ease !important;
}

/* Botão editar (verde escuro discreto) */
html.dark-mode .btn-edit,
body.dark-mode .btn-edit,
html.dark-mode .categoria-item .btn-edit,
body.dark-mode .categoria-item .btn-edit {
    background: none !important;
    background-color: #3e5b3f !important;
    /* verde acinzentado */
    background-image: none !important;
    border: 1px solid #5a7a52 !important;
    color: #eef6ea !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6) inset !important;
}

/* Botão excluir (vermelho escuro) */
html.dark-mode .btn-delete,
body.dark-mode .btn-delete,
html.dark-mode .categoria-item .btn-delete,
body.dark-mode .categoria-item .btn-delete {
    background: none !important;
    background-color: #6f2f2f !important;
    /* vermelho escuro */
    background-image: none !important;
    border: 1px solid #942e2e !important;
    color: #fff5f5 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6) inset !important;
}

/* Hover states */
html.dark-mode .btn-small:hover,
body.dark-mode .btn-small:hover {
    background-color: #4d4d4d !important;
    border-color: #666 !important;
}

html.dark-mode .btn-edit:hover,
body.dark-mode .btn-edit:hover {
    background-color: #57754f !important;
    border-color: #6a8a5f !important;
}

html.dark-mode .btn-delete:hover,
body.dark-mode .btn-delete:hover {
    background-color: #913535 !important;
    border-color: #b04040 !important;
}

/* Em caso de regras muito específicas anteriores que usem background-image,
   forçamos também em todos os seletores de botão para não permitir imagem */
html.dark-mode button.btn-small,
body.dark-mode button.btn-small,
html.dark-mode button.btn-edit,
body.dark-mode button.btn-edit,
html.dark-mode button.btn-delete,
body.dark-mode button.btn-delete {
    background-image: none !important;
}

/* Forçar borda lateral discreta (remove o azul brilhante) */
html.dark-mode .categoria-item,
body.dark-mode .categoria-item,
html.dark-mode .template-item,
body.dark-mode .template-item {
    border-left: 4px solid rgba(255, 255, 255, 0.04) !important;
}

/* ===== Botões de cabeçalho (dark mode) ===== */
body.dark-mode .btn-template,
body.dark-mode #form-template button,
body.dark-mode #form-categoria button,
body.dark-mode #form-cartao button {
    background: #3a3a3a !important;
    /* cinza escuro */
    color: #f0f0f0 !important;
    border: 1px solid #555 !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
    transition: background 0.3s;
}

body.dark-mode .btn-template:hover,
body.dark-mode #form-template button:hover,
body.dark-mode #form-categoria button:hover,
body.dark-mode #form-cartao button:hover {
    background: #555 !important;
    /* tom mais claro no hover */
    border-color: #777 !important;
}

body.dark-mode .template-form,
body.dark-mode .categoria-form {
    background: #2d2d2d;
    box-shadow: 0 15px 35px #2d2d2d;
}

/* Modal de Boas-vindas */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
    line-height: 1.6;
    background: white;
    color: #333;
}

.info-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-section h3 {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 1.1em;
}

.info-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.info-section li {
    margin: 8px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.features-grid span {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    border: 1px solid #e9ecef;
}

.final-note {
    background: #e8f5e8;
    color: #2d5a2d;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #4caf50;
}

.modal-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    background: white;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.modal-body form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-body input,
.modal-body select {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
}

.modal-body input:focus,
.modal-body select:focus {
    border-color: #007bff;
    outline: none;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-top: 15px;
    max-height: 150px;
    overflow-y: auto;
}

.emoji-grid .emoji-option {
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
    text-align: center;
    font-size: 20px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.emoji-grid .emoji-option:hover {
    background: #e9ecef;
    border-color: #007bff;
    transform: scale(1.1);
}

body.dark-mode .modal-body input,
body.dark-mode .modal-body select {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-mode .emoji-grid {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .emoji-grid .emoji-option:hover {
    background: #404040;
    border-color: #666;
}

/* === CARTÕES DE CRÉDITO RELATÓRIOS === */
.cartoes-relatorio-section {
    padding: 30px;
    background: #f8f9fa;
    margin: 30px 0;
    border-radius: 20px;
}

.cartoes-relatorio-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

#cartao-relatorio-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.cartao-relatorio-card {
    color: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cartao-relatorio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.cartao-relatorio-card>* {
    position: relative;
    z-index: 1;
}

/* Cores dos cartões no relatório */
.cartao-relatorio-card.from-purple-600.to-pink-500 {
    background: linear-gradient(135deg, #9333ea, #ec4899);
}

.cartao-relatorio-card.from-yellow-500.to-orange-500 {
    background: linear-gradient(135deg, #eab308, #f97316);
}

.cartao-relatorio-card.from-blue-600.to-indigo-600 {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.cartao-relatorio-card.from-green-600.to-teal-500 {
    background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.cartao-relatorio-card.from-red-600.to-pink-600 {
    background: linear-gradient(135deg, #dc2626, #db2777);
}

.cartao-relatorio-card.from-gray-700.to-gray-900 {
    background: linear-gradient(135deg, #374151, #111827);
}

.cartao-relatorio-info h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cartao-relatorio-info .bandeira {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9em;
    color: white;
    display: inline-block;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.cartao-total {
    font-size: 3em;
    font-weight: bold;
    color: white;
    margin: 20px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cartao-detalhes-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.cartao-detalhes-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.cartao-transacoes {
    margin-top: 20px;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.cartao-transacao-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.cartao-transacao-item:last-child {
    border-bottom: none;
}

.cartao-transacao-info {
    flex: 1;
}

.cartao-transacao-valor {
    font-weight: bold;
    color: white;
}

.cartao-relatorio-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.cartao-relatorio-controls .carousel-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .cartao-relatorio-controls .carousel-btn {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .cartao-detalhes-btn {
    background: rgba(255, 255, 255, 0.15);
}

.cartao-relatorio-controls .carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.cartao-relatorio-controls .carousel-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.no-cartoes {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 50px 0;
}

/* Dark Mode para Cartões Relatório */
body.dark-mode .cartoes-relatorio-section {
    background: #2d2d2d;
}

body.dark-mode .cartoes-relatorio-section h2 {
    color: #e0e0e0;
}

/* Dark mode não altera as cores dos cartões pois eles já têm gradientes próprios */

body.dark-mode .cartao-transacao-item {
    border-bottom-color: #404040;
}

body.dark-mode .no-cartoes {
    color: #b0b0b0;
}

/* === TRANSAÇÕES DE INVESTIMENTOS === */
.investimento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.investimento-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.investimento-item.saque {
    border-left-color: #dc3545;
}

.investimento-item.deposito {
    border-left-color: #28a745;
}

.investimento-info {
    flex: 1;
}

.investimento-info strong {
    display: block;
    margin-bottom: 5px;
}

.investimento-info small {
    color: #666;
    font-size: 0.9em;
}

.investimento-valor {
    font-weight: bold;
    font-size: 1.2em;
}

.investimento-valor.positivo {
    color: #28a745;
}

.investimento-valor.negativo {
    color: #dc3545;
}

.no-investimentos {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 30px 0;
}

/* Dark Mode para Investimentos */
body.dark-mode .investimento-item {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .investimento-info small {
    color: #b0b0b0;
}

body.dark-mode .no-investimentos {
    color: #b0b0b0;
}

/* Responsivo */
@media (max-width: 768px) {
    .cartao-relatorio-card {
        padding: 20px;
        min-height: 250px;
    }

    .cartao-total {
        font-size: 2.5em;
    }

    .cartao-relatorio-controls .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

body.dark-mode .btn-secondary {
    background: #404040;
    border: 1px solid #666;
}

body.dark-mode .btn-secondary:hover {
    background: #555;
}

.modal-overlay.hidden {
    display: none;
}

/* ===== CAROUSEL 3D DE CARTÕES ===== */
.cartoes-carousel-section {
    margin: 30px 0;
}

.cartoes-carousel-section h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.8em;
}

body.dark-mode .cartoes-carousel-section h2 {
    color: #e0e0e0;
}

.cartoes-carousel {
    overflow-x: auto;
    padding: 10px 0;
}

#cartoes-carousel-container {
    display: flex;
    gap: 20px;
    padding: 10px;
    min-height: 200px;
}

.cartao-carousel-item {
    flex: 0 0 320px;
    scroll-snap-align: start;
}

.cartao-card {
    color: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    cursor: pointer;
}

.cartao-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.cartao-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cartao-card .cartao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cartao-card .cartao-nome {
    font-size: 1.4em;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cartao-card .cartao-bandeira {
    font-size: 0.9em;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.cartao-card .cartao-gasto {
    font-size: 2.2em;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.cartao-card .cartao-mes-info {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.cartoes-carousel {
    overflow-x: auto;
    padding: 10px 0;
}

#cartoes-carousel-container {
    display: flex;
    gap: 20px;
    padding: 10px;
    min-height: 200px;
}

.cartao-carousel-item {
    flex: 0 0 320px;
    scroll-snap-align: start;
}

.cartao-card {
    color: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    cursor: pointer;
}

.cartao-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.cartao-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cartao-card .cartao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cartao-card .cartao-nome {
    font-size: 1.4em;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cartao-card .cartao-bandeira {
    font-size: 0.9em;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.cartao-card .cartao-gasto {
    font-size: 2.2em;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.cartao-card .cartao-mes-info {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

/* Cores dos cartões no carousel */
.cartao-card.from-purple-600.to-pink-500 {
    background: linear-gradient(135deg, #9333ea, #ec4899);
}

.cartao-card.from-yellow-500.to-orange-500 {
    background: linear-gradient(135deg, #eab308, #f97316);
}

.cartao-card.from-blue-600.to-indigo-600 {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.cartao-card.from-green-600.to-teal-500 {
    background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.cartao-card.from-red-600.to-pink-600 {
    background: linear-gradient(135deg, #dc2626, #db2777);
}

.cartao-card.from-gray-700.to-gray-900 {
    background: linear-gradient(135deg, #374151, #111827);
}

/* Scrollbar personalizada para o carousel */
.cartoes-carousel::-webkit-scrollbar {
    height: 8px;
}

.cartoes-carousel::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

.cartoes-carousel::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.cartoes-carousel::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Dark Mode para Carousel de Cartões */
body.dark-mode .cartoes-carousel-section {
    background: #2d2d2d;
}

body.dark-mode .cartoes-carousel-section h2 {
    color: #e0e0e0;
}

body.dark-mode .cartoes-carousel::-webkit-scrollbar-track {
    background: #404040;
}

body.dark-mode .cartoes-carousel::-webkit-scrollbar-thumb {
    background: #666;
}

body.dark-mode .cartoes-carousel::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Responsivo para Carousel */
@media (max-width: 768px) {
    .cartao-carousel-item {
        flex: 0 0 280px;
    }

    .cartao-card {
        padding: 20px;
        min-height: 160px;
    }

    .cartao-card .cartao-nome {
        font-size: 1.2em;
    }

    .cartao-card .cartao-gasto {
        font-size: 1.8em;
    }
}

/* === CAMPOS DE PARCELAMENTO === */
.parcelamento-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px solid #e9ecef;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.parcelamento-container:hover {
    border-color: #007bff;
    box-shadow: 0 12px 35px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.parcela-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.parcela-field label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.parcela-field input {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    background: white;
    color: #495057;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;

    /* Remover setas do input number */
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.parcela-field input::-webkit-outer-spin-button,
.parcela-field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.parcela-field input:focus {
    outline: none;
    border-color: #007bff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1), 0 8px 25px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

.parcela-field input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

/* Dark Mode para Parcelamento */
body.dark-mode .parcelamento-container {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-color: #404040;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.dark-mode .parcelamento-container:hover {
    border-color: #666666;
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.1);
}

body.dark-mode .parcela-field label {
    color: #e9ecef;
}

body.dark-mode .parcela-field input {
    background: #1a1a1a;
    color: #e9ecef;
    border-color: #404040;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.dark-mode .parcela-field input:focus {
    border-color: #666666;
    background: #2d2d2d;
    box-shadow: 0 0 0 4px rgba(102, 102, 102, 0.2), 0 8px 25px rgba(255, 255, 255, 0.1);
}

body.dark-mode .parcela-field input::placeholder {
    color: #6c757d;
}

/* Tooltip para parcelamento */
.parcela-field {
    position: relative;
}

.parcela-field[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -35px;
    right: 0;
    background: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.parcela-field[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 15px;
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

body.dark-mode .parcela-field[data-tooltip]:hover::after {
    background: #555;
    color: #e0e0e0;
}

body.dark-mode .parcela-field[data-tooltip]:hover::before {
    border-top-color: #555;
}

/* Responsivo para Parcelamento */
@media (max-width: 768px) {
    .parcelamento-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }

    .parcela-field input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .parcela-field label {
        font-size: 13px;
    }


}

/* Dark Mode para Modal */
body.dark-mode .modal-body {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .modal-footer {
    background: #2d2d2d;
    border-top-color: #404040;
}

body.dark-mode .info-section {
    background: #1a1a1a;
    border-left-color: #667eea;
}

body.dark-mode .info-section h3 {
    color: #667eea;
}

body.dark-mode .features-grid span {
    background: #1a1a1a;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .final-note {
    background: #1a2e1a;
    color: #90ee90;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-body {
        padding: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* === SEÇÃO SEO MELHORADA === */
.seo-content {
    margin-top: 40px;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.seo-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.03) 100%);
    pointer-events: none;
}

.seo-content>* {
    position: relative;
    z-index: 1;
}

.seo-content h2 {
    color: #2d3748;
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: none;
}

.seo-content>p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #4a5568;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.seo-content h3 {
    color: #2d3748;
    font-size: 1.5em;
    font-weight: 600;
    margin: 35px 0 20px 0;
    padding-left: 20px;
    border-left: 4px solid #667eea;
    position: relative;
}

.seo-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.seo-content li {
    background: white;
    margin: 12px 0;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.seo-content li:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.seo-content li strong {
    color: #2d3748;
    font-weight: 600;
}

/* Dark Mode para SEO */
body.dark-mode .seo-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

body.dark-mode .seo-content::before {
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
}

body.dark-mode .seo-content h2 {
    color: #f1f5f9;
    text-shadow: none;
}

body.dark-mode .seo-content>p {
    color: #cbd5e1;
}

body.dark-mode .seo-content h3 {
    color: #f1f5f9;
    border-left-color: #667eea;
}

body.dark-mode .seo-content li {
    background: #1a1a1a;
    border-color: #404040;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

body.dark-mode .seo-content li strong {
    color: #f1f5f9;
}

/* Responsivo para SEO */
@media (max-width: 768px) {
    .seo-content {
        padding: 25px 20px;
        margin-top: 30px;
    }

    .seo-content h2 {
        font-size: 1.8em;
    }

    .seo-content h3 {
        font-size: 1.3em;
        padding-left: 15px;
    }
}