/* Reset y Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #1a1a2e;
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body.light-mode {
    background: #F8F1E9; /* Blanco cálido */
    color: #2D3748; /* Gris oscuro suave */
}

body.bitcoin-mode {
    background: #2C2520; /* Marrón grisáceo oscuro */
    color: #F5E6CC; /* Crema suave */
}

/* Contenedor Principal */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Navegación Lateral */
.sidebar {
    width: 250px;
    background: #16213e;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100%;
    transition: transform 0.3s ease;
    z-index: 1000;
    transform: translateX(-100%);
}

body.light-mode .sidebar {
    background: #EDE4E0; /* Beige claro */
}

body.bitcoin-mode .sidebar {
    background: #40352F; /* Marrón grisáceo medio */
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #00d4ff;
}

body.light-mode .sidebar-header h2 {
    color: #4A90E2; /* Azul suave */
}

body.bitcoin-mode .sidebar-header h2 {
    color: #F7931A; /* Naranja Bitcoin */
}

.close-sidebar {
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1.75rem;
    cursor: pointer;
    transition: color 0.3s;
}

body.light-mode .close-sidebar {
    color: #2D3748;
}

body.bitcoin-mode .close-sidebar {
    color: #F5E6CC;
}

.close-sidebar:hover {
    color: #00d4ff;
}

body.light-mode .close-sidebar:hover {
    color: #4A90E2;
}

body.bitcoin-mode .close-sidebar:hover {
    color: #F7931A;
}

.sidebar-menu {
    list-style: none;
    flex-grow: 1;
    margin-top: 2rem;
}

.menu-item {
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.menu-item:hover {
    background: #0f3460;
    transform: translateX(5px);
}

body.light-mode .menu-item:hover {
    background: #D3E0EA; /* Azul grisáceo claro */
}

body.bitcoin-mode .menu-item:hover {
    background: #8C5523; /* Marrón cálido */
}

.menu-item.active {
    background: #00d4ff;
    color: #1a1a2e;
}

body.light-mode .menu-item.active {
    background: #4A90E2; /* Azul suave */
    color: #FFFFFF;
}

body.bitcoin-mode .menu-item.active {
    background: #F7931A; /* Naranja Bitcoin */
    color: #2C2520;
}

.sidebar-footer {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
}

/* Botón Menu Toggle */
.menu-toggle {
    background: #0f3460;
    border: none;
    color: #e2e8f0;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 0.75rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s, left 0.3s ease;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
}

body.light-mode .menu-toggle {
    background: #A3BFFA; /* Azul claro pastel */
    color: #2D3748;
}

body.bitcoin-mode .menu-toggle {
    background: #8C5523; /* Marrón cálido */
    color: #F5E6CC;
}

.menu-toggle:hover {
    background: #00d4ff;
    transform: scale(1.1);
}

body.light-mode .menu-toggle:hover {
    background: #4A90E2;
    color: #FFFFFF;
}

body.bitcoin-mode .menu-toggle:hover {
    background: #F7931A;
    color: #2C2520;
}

/* Contenido Principal */
.main-content {
    flex-grow: 1;
    padding: 1.5rem;
    background: #1a1a2e;
    width: 100%;
}

body.light-mode .main-content {
    background: #F8F1E9; /* Blanco cálido */
}

body.bitcoin-mode .main-content {
    background: #2C2520; /* Marrón grisáceo oscuro */
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 2rem;
}

body.light-mode h1 {
    color: #4A90E2; /* Azul suave */
}

body.bitcoin-mode h1 {
    color: #F7931A; /* Naranja Bitcoin */
}

h2 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #a0aec0;
    margin: 1rem 0;
}

body.light-mode h2 {
    color: #718096; /* Gris medio */
}

body.bitcoin-mode h2 {
    color: #D4A017; /* Amarillo cálido */
}

/* Botones Comunes */
.btn {
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-circle {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.quick-actions .actions-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    background: #0f3460;
    color: #e2e8f0;
    padding: 0.75rem;
    font-size: 1.25rem;
    border-radius: 0.75rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.3s;
}

body.light-mode .action-btn {
    background: #A3BFFA; /* Azul claro pastel */
    color: #2D3748;
}

body.bitcoin-mode .action-btn {
    background: #8C5523; /* Marrón cálido */
    color: #F5E6CC;
}

.action-btn:hover {
    background: #00d4ff;
    transform: scale(1.1);
}

body.light-mode .action-btn:hover {
    background: #4A90E2;
    color: #FFFFFF;
}

body.bitcoin-mode .action-btn:hover {
    background: #F7931A;
    color: #2C2520;
}

.action-btn[aria-label="Exportar"] {
    background: #4caf50;
}

.action-btn[aria-label="Exportar"]:hover {
    background: #388e3c;
}

.action-btn[aria-label="Importar"] {
    background: #1976d2;
}

.action-btn[aria-label="Importar"]:hover {
    background: #1565c0;
}

.action-btn[aria-label="Deshacer"] {
    background: #ffb300;
}

.action-btn[aria-label="Deshacer"]:hover {
    background: #ff8f00;
}

.action-btn[aria-label="Rehacer"] {
    background: #7b1fa2;
}

.action-btn[aria-label="Rehacer"]:hover {
    background: #6a1b9a;
}

.action-btn[aria-label="Borrar todo"] {
    background: #e53e3e;
}

.action-btn[aria-label="Borrar todo"]:hover {
    background: #b71c1c;
}

.action-btn[aria-label="Ver en Bitcoin"] {
    background: #f7931a;
}

.action-btn[aria-label="Ver en Bitcoin"]:hover {
    background: #e07b00;
}

/* Botón Agregar Movimiento */
.add-movement-btn {
    background: #38a169;
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, background 0.3s, box-shadow 0.3s;
    border: 2px solid #2f855a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.light-mode .add-movement-btn {
    background: #48BB78; /* Verde claro */
    border-color: #38A169;
    color: #FFFFFF;
}

body.bitcoin-mode .add-movement-btn {
    background: #D97706; /* Naranja oscuro */
    border-color: #8C5523; /* Marrón cálido */
    color: #FFFFFF;
}

.add-movement-btn:hover {
    background: #2f855a;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

body.light-mode .add-movement-btn:hover {
    background: #38A169;
}

body.bitcoin-mode .add-movement-btn:hover {
    background: #B35900;
}

/* Dashboard */
.balances-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.accounts-grid,
.totals-grid,
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.totals-separator {
    text-align: center;
    padding: 0.5rem 0;
    border-top: 1px dashed #00d4ff;
}

body.light-mode .totals-separator {
    border-color: #4A90E2; /* Azul suave */
}

body.bitcoin-mode .totals-separator {
    border-color: #F7931A; /* Naranja Bitcoin */
}

.balance-card {
    background: #16213e;
    padding: 1.25rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
}

body.light-mode .balance-card {
    background: #FFFFFF; /* Blanco puro */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.bitcoin-mode .balance-card {
    background: #40352F; /* Marrón grisáceo medio */
}

.balance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.balance-card h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.balance-card .amount {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.balance-card canvas {
    max-height: 60px;
}

.total-card {
    background: #0f3460;
    border: 2px solid #00d4ff;
}

body.light-mode .total-card {
    background: #D3E0EA; /* Azul grisáceo claro */
    border: 2px solid #4A90E2;
}

body.bitcoin-mode .total-card {
    background: #8C5523; /* Marrón cálido */
    border: 2px solid #F7931A;
}

.summary-card {
    background: #16213e;
    padding: 1.25rem;
    border-radius: 0.75rem;
}

body.light-mode .summary-card {
    background: #FFFFFF;
}

body.bitcoin-mode .summary-card {
    background: #40352F;
}

/* Colores de saldos */
.bitcoin { color: #f7931a; }
.pesos { color: #3182ce; }
.dolares { color: #38a169; }
.euros { color: #8b5cf6; }
.deuda { color: #e53e3e; }

/* Movimientos */
.filters-container {
    margin: 1rem 0;
}

.filter-toggle {
    padding: 0.75rem 1.5rem;
    background: #0f3460;
    color: #e2e8f0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.light-mode .filter-toggle {
    background: #A3BFFA; /* Azul claro pastel */
    color: #2D3748;
}

body.bitcoin-mode .filter-toggle {
    background: #8C5523; /* Marrón cálido */
    color: #F5E6CC;
}

.filter-toggle:hover {
    background: #00d4ff;
    color: #1a1a2e;
}

body.light-mode .filter-toggle:hover {
    background: #4A90E2;
    color: #FFFFFF;
}

body.bitcoin-mode .filter-toggle:hover {
    background: #F7931A;
    color: #2C2520;
}

.filters-bar {
    display: none;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: #16213e;
    border-radius: 0.75rem;
    animation: slideIn 0.3s ease-out;
}

body.light-mode .filters-bar {
    background: #EDE4E0; /* Beige claro */
}

body.bitcoin-mode .filters-bar {
    background: #40352F; /* Marrón grisáceo medio */
}

.filters-bar.active {
    display: flex;
}

.apply-btn {
    background: #38a169;
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

body.light-mode .apply-btn {
    background: #48BB78; /* Verde claro */
}

body.bitcoin-mode .apply-btn {
    background: #D97706; /* Naranja oscuro */
}

.apply-btn:hover {
    background: #2f855a;
}

body.light-mode .apply-btn:hover {
    background: #38A169;
}

body.bitcoin-mode .apply-btn:hover {
    background: #B35900;
}

.movements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.movement-item {
    background: #16213e;
    padding: 1rem;
    border-radius: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1fr 1fr 1fr;
    gap: 0.5rem;
    align-items: center;
}

body.light-mode .movement-item {
    background: #FFFFFF;
}

body.bitcoin-mode .movement-item {
    background: #40352F;
}

.movement-item.ingreso { background: rgba(56, 161, 105, 0.1); }
.movement-item.egreso { background: rgba(229, 62, 62, 0.1); }
.movement-item.cambio { background: rgba(0, 212, 255, 0.1); }
.movement-item.ajuste { background: rgba(255, 235, 59, 0.1); }

.movement-item span {
    font-size: 0.9rem;
}

.movement-item .action-buttons {
    display: flex;
    gap: 0.5rem;
}

.movement-item .delete-btn {
    background: #e53e3e;
    color: #fff;
    padding: 0.5rem;
}

.movement-item .delete-btn:hover {
    background: #c53030;
}

.movement-item .edit-btn {
    background: #00d4ff;
    color: #1a1a2e;
    padding: 0.5rem;
}

body.light-mode .movement-item .edit-btn {
    background: #4A90E2; /* Azul suave */
    color: #FFFFFF;
}

body.bitcoin-mode .movement-item .edit-btn {
    background: #F7931A; /* Naranja Bitcoin */
    color: #2C2520;
}

.movement-item .edit-btn:hover {
    background: #00b8e6;
}

body.light-mode .movement-item .edit-btn:hover {
    background: #357ABD;
}

body.bitcoin-mode .movement-item .edit-btn:hover {
    background: #E07B00;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #16213e;
    padding: 1.5rem;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

body.light-mode .modal-content {
    background: #EDE4E0; /* Beige claro */
}

body.bitcoin-mode .modal-content {
    background: #40352F; /* Marrón grisáceo medio */
}

.modal-content h2 {
    font-size: 1.5rem;
    color: #00d4ff;
    margin-bottom: 1rem;
}

body.light-mode .modal-content h2 {
    color: #4A90E2; /* Azul suave */
}

body.bitcoin-mode .modal-content h2 {
    color: #F7931A; /* Naranja Bitcoin */
}

.modal-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.modal-content button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
}

.movement-form {
    display: grid;
    gap: 1rem;
}

.form-group {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.5rem 1rem;
    align-items: center;
}

.field-group {
    display: none;
    grid-template-columns: 1fr 2fr;
    gap: 0.5rem 1rem;
    align-items: center;
}

.field-group.active {
    display: grid;
}

.form-group label,
.field-group label {
    font-size: 0.9rem;
    color: #e2e8f0;
}

body.light-mode .form-group label,
body.light-mode .field-group label {
    color: #2D3748;
}

body.bitcoin-mode .form-group label,
body.bitcoin-mode .field-group label {
    color: #F5E6CC;
}

.form-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

select, input {
    padding: 0.75rem;
    background: #0f3460;
    color: #e2e8f0;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    width: 100%;
    transition: box-shadow 0.3s;
}

body.light-mode select, body.light-mode input {
    background: #D3E0EA; /* Azul grisáceo claro */
    color: #2D3748;
}

body.bitcoin-mode select, body.bitcoin-mode input {
    background: #8C5523; /* Marrón cálido */
    color: #F5E6CC;
}

select:focus, input:focus {
    outline: none;
    box-shadow: 0 0 5px #00d4ff;
}

body.light-mode select:focus, body.light-mode input:focus {
    box-shadow: 0 0 5px #4A90E2;
}

body.bitcoin-mode select:focus, body.bitcoin-mode input:focus {
    box-shadow: 0 0 5px #F7931A;
}

input[readonly] {
    background: #1a1a2e;
    color: #a0aec0;
}

body.light-mode input[readonly] {
    background: #EDE4E0; /* Beige claro */
    color: #718096;
}

body.bitcoin-mode input[readonly] {
    background: #2C2520; /* Marrón grisáceo oscuro */
    color: #D4A017;
}

.submit-btn {
    background: #38a169;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.light-mode .submit-btn {
    background: #48BB78; /* Verde claro */
}

body.bitcoin-mode .submit-btn {
    background: #D97706; /* Naranja oscuro */
}

.submit-btn:hover {
    background: #2f855a;
}

body.light-mode .submit-btn:hover {
    background: #38A169;
}

body.bitcoin-mode .submit-btn:hover {
    background: #B35900;
}

.cancel-btn {
    background: #e53e3e;
    color: #fff;
}

.cancel-btn:hover {
    background: #c53030;
}

.error-text {
    color: #e53e3e;
    font-size: 0.9rem;
}

/* Ajustes */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.settings-card {
    background: #16213e;
    padding: 1.25rem;
    border-radius: 0.75rem;
}

body.light-mode .settings-card {
    background: #FFFFFF;
}

body.bitcoin-mode .settings-card {
    background: #40352F;
}

.settings-card h3 {
    font-size: 1.25rem;
    color: #00d4ff;
    margin-bottom: 1rem;
}

body.light-mode .settings-card h3 {
    color: #4A90E2; /* Azul suave */
}

body.bitcoin-mode .settings-card h3 {
    color: #F7931A; /* Naranja Bitcoin */
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #0f3460;
    border-radius: 0.5rem;
    transition: transform 0.2s;
}

body.light-mode .settings-item {
    background: #D3E0EA; /* Azul grisáceo claro */
}

body.bitcoin-mode .settings-item {
    background: #8C5523; /* Marrón cálido */
}

.settings-item:hover {
    transform: translateX(5px);
}

.settings-item button {
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s;
}

body.light-mode .settings-item button {
    color: #2D3748;
}

body.bitcoin-mode .settings-item button {
    color: #F5E6CC;
}

.settings-item button:hover {
    color: #e53e3e;
}

.settings-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Botones */
.theme-switch {
    background: #00d4ff;
    color: #1a1a2e;
    padding: 1rem;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    transition: transform 0.2s, background 0.3s;
}

body.light-mode .theme-switch {
    background: #FFCA28; /* Amarillo suave */
    color: #2D3748;
}

body.bitcoin-mode .theme-switch {
    background: #F7931A; /* Naranja Bitcoin */
    color: #2C2520;
}

.theme-switch:hover {
    background: #00b8e6;
}

body.light-mode .theme-switch:hover {
    background: #FFB300;
}

body.bitcoin-mode .theme-switch:hover {
    background: #E07B00;
}

.help-btn {
    background: #607d8b;
    color: #e2e8f0;
    padding: 1rem;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    transition: transform 0.2s, background 0.3s;
}

body.light-mode .help-btn {
    background: #90A4AE; /* Gris azulado claro */
    color: #2D3748;
}

body.bitcoin-mode .help-btn {
    background: #8C5523; /* Marrón cálido */
    color: #F5E6CC;
}

.help-btn:hover {
    background: #455a64;
}

body.light-mode .help-btn:hover {
    background: #78909C;
}

body.bitcoin-mode .help-btn:hover {
    background: #6B3E1A;
}

/* Animaciones */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Task Manager Styles */
.tasks-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.section {
    flex: 1;
    min-width: 300px;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: #16213e;
    transition: background 0.3s ease;
}

body.light-mode .section {
    background: #F5F5F5; /* Fondo claro suave */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.bitcoin-mode .section {
    background: #40352F; /* Marrón grisáceo medio */
}

.section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Estilos para Notas */
.notes-list {
    list-style: none;
    margin-bottom: 1rem;
}

.note-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: #0f3460;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background 0.3s;
}

body.light-mode .note-item {
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.bitcoin-mode .note-item {
    background: #8C5523; /* Marrón cálido */
}

.note-item:hover {
    transform: translateX(3px);
}

.note-item input {
    flex: 1;
    border: none;
    padding: 0.5rem;
    font-size: 1rem;
    background: transparent;
    color: #e2e8f0;
}

body.light-mode .note-item input {
    color: #2D3748;
}

body.bitcoin-mode .note-item input {
    color: #F5E6CC;
}

.note-item input:focus {
    outline: none;
    box-shadow: 0 0 5px #00d4ff;
}

body.light-mode .note-item input:focus {
    box-shadow: 0 0 5px #4A90E2;
}

body.bitcoin-mode .note-item input:focus {
    box-shadow: 0 0 5px #F7931A;
}

.note-item button {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.3s;
}

.note-item button:hover {
    color: #c53030;
}

/* Estilos para Objetivos */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.goal-card {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    background: #fff;
    transition: all 0.3s ease;
    overflow: hidden; /* Evita que el contenido se desborde */
}

body.dark-mode .goal-card {
    background: #16213e;
    border-color: #0f3460;
}

body.light-mode .goal-card {
    background: #FFFFFF;
    border-color: #D3E0EA;
}

body.bitcoin-mode .goal-card {
    background: #40352F;
    border-color: #8C5523;
}

.goal-card.completed {
    opacity: 0.7;
    background: #e6ffe6;
}

body.dark-mode .goal-card.completed {
    background: #0f3460cc;
}

body.light-mode .goal-card.completed {
    background: #D3E0EAaa;
}

body.bitcoin-mode .goal-card.completed {
    background: #8C5523aa;
}

.priority-high { border-left: 5px solid #ff4444; }
.priority-medium { border-left: 5px solid #ffbb33; }
.priority-low { border-left: 5px solid #00C851; }

.progress-container {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.progress-bar {
    flex-grow: 1;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

body.dark-mode .progress-bar {
    background: #1a1a2e;
}

body.light-mode .progress-bar {
    background: #EDE4E0;
}

body.bitcoin-mode .progress-bar {
    background: #2C2520;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

body.dark-mode .progress-fill {
    background: #00d4ff;
}

body.light-mode .progress-fill {
    background: #4A90E2;
}

body.bitcoin-mode .progress-fill {
    background: #F7931A;
}

.progress-text { 
    margin-left: 10px; 
    font-size: 0.9rem;
    color: #a0aec0;
}

body.light-mode .progress-text {
    color: #718096;
}

body.bitcoin-mode .progress-text {
    color: #D4A017;
}

.task-container { 
    margin-top: 5px; 
    width: 100%; /* Asegura que ocupe el ancho disponible */
}

.task-list { 
    list-style: none; 
    padding-left: 0; /* Elimina el padding por defecto */
    width: 100%; /* Asegura que no se desborde */
}

.task-item { 
    display: flex; 
    align-items: center; 
    margin: 5px 0; 
    flex-wrap: nowrap; /* Mantiene los elementos en una línea */
    width: 100%; /* Asegura que no exceda el contenedor */
}

.toggle-tasks-btn {
    width: 100%;
    text-align: left;
    padding: 5px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    border-radius: 0.5rem;
    color: #333;
    transition: background 0.3s;
}

body.dark-mode .toggle-tasks-btn {
    background: #0f3460;
    color: #e2e8f0;
}

body.light-mode .toggle-tasks-btn {
    background: #D3E0EA;
    color: #2D3748;
}

body.bitcoin-mode .toggle-tasks-btn {
    background: #8C5523;
    color: #F5E6CC;
}

.toggle-tasks-btn:hover { 
    background: #e0e0e0; 
}

body.dark-mode .toggle-tasks-btn:hover {
    background: #00d4ff;
    color: #1a1a2e;
}

body.light-mode .toggle-tasks-btn:hover {
    background: #A3BFFA;
    color: #2D3748;
}

body.bitcoin-mode .toggle-tasks-btn:hover {
    background: #F7931A;
    color: #2C2520;
}

.goal-options { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 5px; 
    flex-wrap: wrap; /* Permite ajuste en móviles */
    gap: 0.5rem;
}

.recurring-label, .overdue-label {
    font-size: 0.8em;
    margin-top: 5px;
}

body.dark-mode .recurring-label {
    color: #a0aec0;
}

body.light-mode .recurring-label {
    color: #7F8C8D;
}

body.bitcoin-mode .recurring-label {
    color: #D4A017;
}

.overdue-label { 
    color: #ff4444; 
}

.goal-card h3 {
    margin-bottom: 0.75rem;
    color: #00d4ff;
    font-size: 1.1rem;
}

body.light-mode .goal-card h3 {
    color: #2C3E50; /* Gris oscuro */
}

body.bitcoin-mode .goal-card h3 {
    color: #F5E6CC; /* Crema suave */
}

.goal-card input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    border: none;
    background: #1a1a2e;
    color: #e2e8f0;
    border-radius: 0.5rem;
}

body.light-mode .goal-card input[type="text"] {
    background: #EDE4E0;
    color: #2D3748;
}

body.bitcoin-mode .goal-card input[type="text"] {
    background: #2C2520;
    color: #F5E6CC;
}

.goal-card input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 5px #00d4ff;
}

body.light-mode .goal-card input[type="text"]:focus {
    box-shadow: 0 0 5px #4A90E2;
}

body.bitcoin-mode .goal-card input[type="text"]:focus {
    box-shadow: 0 0 5px #F7931A;
}

.task-item input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #00d4ff;
    flex-shrink: 0; /* Evita que el checkbox se encoja */
}

body.light-mode .task-item input[type="checkbox"] {
    accent-color: #4A90E2;
}

body.bitcoin-mode .task-item input[type="checkbox"] {
    accent-color: #F7931A;
}

.task-item span {
    flex: 1;
    font-size: 0.9rem;
    min-width: 0; /* Permite que se encoja pero no desaparezca */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-item button {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.3s;
    flex-shrink: 0; /* Evita que los botones se encojan */
}

.task-item button:hover {
    color: #c53030;
}

.goal-card input[type="date"] {
    padding: 0.5rem;
    border: none;
    background: #1a1a2e;
    color: #e2e8f0;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

body.light-mode .goal-card input[type="date"] {
    background: #EDE4E0;
    color: #2D3748;
}

body.bitcoin-mode .goal-card input[type="date"] {
    background: #2C2520;
    color: #F5E6CC;
}

.goal-card input[type="date"]:focus {
    outline: none;
    box-shadow: 0 0 5px #00d4ff;
}

body.light-mode .goal-card input[type="date"]:focus {
    box-shadow: 0 0 5px #4A90E2;
}

body.bitcoin-mode .goal-card input[type="date"]:focus {
    box-shadow: 0 0 5px #F7931A;
}

.add-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.light-mode .add-btn {
    background: #4A90E2; /* Azul suave */
}

body.bitcoin-mode .add-btn {
    background: #F7931A; /* Naranja Bitcoin */
}

.add-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

body.light-mode .add-btn:hover {
    background: #357ABD;
}

body.bitcoin-mode .add-btn:hover {
    background: #E07B00;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.goal-header input[type="text"] {
    flex: 1;
    margin-right: 0.5rem;
}

.priority-select {
    padding: 0.5rem;
    background: #1a1a2e;
    color: #e2e8f0;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

body.light-mode .priority-select {
    background: #EDE4E0;
    color: #2D3748;
}

body.bitcoin-mode .priority-select {
    background: #2C2520;
    color: #F5E6CC;
}

.priority-select:focus {
    outline: none;
    box-shadow: 0 0 5px #00d4ff;
}

body.light-mode .priority-select:focus {
    box-shadow: 0 0 5px #4A90E2;
}

body.bitcoin-mode .priority-select:focus {
    box-shadow: 0 0 5px #F7931A;
}

.delete-goal-btn {
    background: #e53e3e;
    color: #fff;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.delete-goal-btn:hover {
    background: #c53030;
}

.complete-goal-btn {
    background: #38a169;
    color: #fff;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.complete-goal-btn:hover {
    background: #2f855a;
}

body.light-mode .complete-goal-btn {
    background: #48BB78;
}

body.light-mode .complete-goal-btn:hover {
    background: #38A169;
}

body.bitcoin-mode .complete-goal-btn {
    background: #D97706;
}

body.bitcoin-mode .complete-goal-btn:hover {
    background: #B35900;
}

.delete-task-btn {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.3s;
    flex-shrink: 0; /* Evita que los botones se encojan */
}

.delete-task-btn:hover {
    color: #c53030;
}

.sortable-ghost { 
    opacity: 0.5; 
    background: #f0f0f0; 
}

body.dark-mode .sortable-ghost {
    background: #0f3460;
}

body.light-mode .sortable-ghost {
    background: #D3E0EA;
}

body.bitcoin-mode .sortable-ghost {
    background: #8C5523;
}

/* Media Queries */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
    }

    .main-content {
        padding: 1rem;
    }

    .quick-actions {
        justify-content: space-between;
        padding: 0.5rem 0;
        overflow-x: auto;
        position: relative;
    }

    .menu-toggle {
        width: 2.5rem;
        height: 2.5rem;
        padding: 0.5rem;
        font-size: 1rem;
        position: static;
    }

    .sidebar.active + .main-content .menu-toggle {
        display: none;
    }

    .action-btn {
        width: 2.5rem;
        height: 2.5rem;
        padding: 0.5rem;
        font-size: 1rem;
    }

    .add-movement-btn {
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        width: 5rem;
        height: 5rem;
        border-radius: 50%;
        padding: 0;
        font-size: 1rem;
        justify-content: center;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
        z-index: 100;
    }

    .accounts-grid,
    .totals-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .totals-separator {
        margin: 1rem 0;
    }

    .movement-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .movement-item .action-buttons {
        justify-content: center;
    }

    .filters-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-group,
    .field-group {
        grid-template-columns: 1fr;
    }

    .form-group label,
    .field-group label {
        font-weight: 500;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
    }

    .tasks-container {
        flex-direction: column;
        gap: 1rem;
    }

    .section {
        min-width: 100%;
    }

    .goals-grid {
        grid-template-columns: 1fr;
    }

    .goal-options { 
        flex-direction: column; 
        align-items: flex-start; 
    }

    .goal-options > * { 
        margin: 2px 0; 
        width: 100%; /* Asegura que los elementos ocupen el ancho completo */
    }

    /* Ajustes específicos para tareas en móviles */
    .goal-card {
        padding: 0.75rem; /* Reduce el padding para ahorrar espacio */
    }

    .task-container {
        padding: 0; /* Elimina padding extra */
    }

    .task-list {
        padding-left: 0;
        margin: 0;
    }

    .task-item {
        flex-wrap: nowrap;
        overflow: visible; /* Permite que el contenido sea visible */
        gap: 0.5rem; /* Añade espacio entre elementos */
    }

    .task-item span {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 40px); /* Deja espacio solo para checkbox y botón (20px cada uno) */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .task-item input[type="checkbox"] {
        width: 20px; /* Tamaño fijo para el checkbox */
        height: 20px;
    }

    .task-item button {
        width: 20px; /* Tamaño fijo para el botón */
        height: 20px;
        padding: 0;
        font-size: 0.9rem;
    }

    .goal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .goal-header input[type="text"] {
        margin-right: 0;
    }

    .goal-actions {
        display: flex;
        gap: 0.5rem;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (min-width: 769px) {
    .quick-actions {
        justify-content: flex-end;
        position: relative;
        gap: 0.5rem;
        flex-wrap: nowrap;
        align-items: center;
        width: 100%;
    }

    .menu-toggle {
        left: 1rem;
    }

    .sidebar.active + .main-content .menu-toggle {
        display: none;
    }

    .add-movement-btn {
        order: -1;
        margin-right: 0.5rem;
        position: static;
    }

    .quick-actions .actions-group {
        order: 0;
    }

    .accounts-grid,
    .totals-grid,
    .summary-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

.bitcoin-price {
    padding: 10px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.bitcoin-price h3 {
    font-size: 1.1em;
    margin: 0 0 5px 0;
    color: var(--text-color);
}

.bitcoin-price span {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: #f7931a; /* Color naranja típico de Bitcoin */
}

.bitcoin-mode .bitcoin-price span {
    color: #f7931a; /* Ajuste para el tema bitcoin-mode */
}

.light-mode .bitcoin-price span {
    color: #f7931a; /* Mantener el color en modo claro */
}