    :root {
        --bg-primary: #f8fafc; --bg-secondary: #ffffff; --bg-tertiary: #f1f5f9; --border-color: #e2e8f0; --text-primary: #0f172a; --text-secondary: #64748b; --accent-color: #3b82f6; --accent-hover: #2563eb; --success-color: #16a34a; --error-color: #dc2626;
        --badge-bg: #e2e8f0; --badge-text: #334155;
    }
    html.dark {
        --bg-primary: #0f172a; --bg-secondary: #1e293b; --bg-tertiary: #334155; --border-color: #475569; --text-primary: #f1f5f9; --text-secondary: #94a3b8;
        --badge-bg: #334155; --badge-text: #f1f5f9;
    }
    body { background-color: var(--bg-primary); color: var(--text-primary); font-family: 'Inter', sans-serif; }
    .card { background-color: var(--bg-secondary); border-radius: 1rem; box-shadow: 0 4px 12px -1px rgb(0 0 0 / 0.07), 0 2px 8px -2px rgb(0 0 0 / 0.04); animation: fadeInUp 0.5s ease-out forwards; opacity: 0; }
    /* Pega esta nueva regla justo debajo de la línea anterior */
    .input-field { background-color: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-primary); transition: all 0.2s ease; border-radius: 0.5rem; padding: 0.75rem; width: 100%;}
    .input-field:focus, .input-field.focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 20%, transparent); }
    .input-error { border-color: var(--error-color) !important; }
    .iti { width: 100%; } .iti.input-error { border: 1px solid var(--error-color) !important; border-radius: 0.5rem; }
    .iti input.input-field { padding-left: 95px !important; border: none !important; box-shadow: none !important; }
    .iti__country-list { background-color: var(--bg-secondary); border-color: var(--border-color); color: var(--text-primary); } .iti__country:hover { background-color: var(--bg-tertiary); } .iti__dial-code { color: var(--text-secondary); }
    .custom-select-options { transition: opacity 0.2s, transform 0.2s; z-index: 50; }
    .product-row.z-10 { z-index: 10 !important; }
    .custom-select button.input-error { border: 1px solid var(--error-color); }
    .product-row { transition: transform 0.25s ease, box-shadow 0.25s ease; }
    .custom-select button, .price-container { transition: transform 0.2s ease; }
    .custom-select button:hover, .price-container:hover { transform: scale(1.03); }
    .category-badge { background-color: var(--badge-bg); color: var(--badge-text); font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.625rem; border-radius: 9999px; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); display: inline-block; line-height: 1.25; }
    .trash-icon { color: var(--text-secondary); } .trash-icon:hover { color: var(--error-color); transform: scale(1.1); }
    
    /* --- INICIO: ESTILOS MODIFICADOS PARA EL MODAL --- */
    .clickable-link {
        font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
        text-decoration-color: color-mix(in srgb, var(--text-primary) 40%, transparent);
        transition: text-decoration-color 0.2s ease;
    }
    .clickable-link:hover { text-decoration-color: var(--accent-color); }

    .accounts-modal-overlay { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; z-index: 1000; animation: fadeIn 0.2s ease; }
    .accounts-modal { background-color: var(--bg-secondary); color: var(--text-primary); border-radius: 1rem; box-shadow: 0 10px 25px rgba(0,0,0,0.1); width: 90%; max-width: 480px; animation: slideUp 0.2s ease; display: flex; flex-direction: column; max-height: 90vh; }
    .modal-content-area { overflow-y: auto; padding: 1.5rem; }
    .modal-header { position: relative; margin-bottom: 1rem; }
    #modal-title { text-align: center; }
    
    /* CAMBIO CLAVE: Posición y tamaño del botón de cierre */
    #modal-close-btn {
        position: absolute;
        top: 50%;
        right: 0; /* Movido de -10px a 0 */
        transform: translateY(-50%);
        font-size: 1.75rem; /* Aumentado de 1.5rem (text-2xl) */
        padding: 0.25rem; /* Añadido un pequeño padding para mejorar área de clic */
    }

    .accounts-modal ul li { display: flex; justify-content: space-between; align-items: center; padding: 0.375rem 0.75rem; border-radius: 0.5rem; min-height: 44px; }
    .accounts-modal ul li:nth-child(odd) { background-color: var(--bg-tertiary); }
    
    .copy-icon-btn { position: relative; background: none; border: none; cursor: pointer; padding: 0.5rem; border-radius: 99px; font-size: 1rem; color: var(--text-secondary); transition: background-color 0.2s, color 0.2s; }
    .copy-icon-btn:hover { background-color: var(--bg-tertiary); color: var(--text-primary); }
    .copy-icon-btn[data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background-color: #333; color: white; padding: 4px 8px; border-radius: 4px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; margin-bottom: 8px; }
    html.dark .copy-icon-btn[data-tooltip]::after { background-color: var(--bg-tertiary); color: var(--text-primary); }
    .copy-icon-btn[data-tooltip]:hover::after { opacity: 1; }
    .copy-icon-btn.copied { color: var(--success-color) !important; }

    @media (max-width: 767px) {
        .accounts-modal { width: 90%; max-width: 90%; height: auto; max-height: 90vh; }
        .modal-content-area { padding: 1rem 1rem 1.25rem 1rem; }
        .modal-header { margin-bottom: 0.75rem; }
        #modal-title { font-size: 1.125rem; }
        .modal-content-area p { font-size: 0.875rem; margin-bottom: 1rem; }
        .accounts-modal ul li { padding: 0.2rem 0.5rem; min-height: auto; font-size: 0.875rem; }
        .copy-icon-btn { font-size: 1.125rem; padding: 0.3rem; }
    }
    /* --- FIN: ESTILOS MODIFICADOS --- */

    /* --- INICIO: ANIMACIONES Y ESTILOS ORIGINALES (SIN CAMBIOS) --- */
    @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
    .shake { animation: shake-anim 0.5s; }
    @keyframes shake-anim { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); } 20%, 40%, 60%, 80% { transform: translateX(5px); } }
    #confirm-btn { transition: all 0.3s ease; animation: pulse-glow 2.5s infinite ease-in-out; }
    #confirm-btn:hover { transform: scale(1.05); box-shadow: 0 0 20px 5px color-mix(in srgb, var(--success-color) 20%, transparent); animation-play-state: paused; }
    @keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 10px 0px color-mix(in srgb, var(--success-color) 20%, transparent); } 50% { box-shadow: 0 0 20px 5px color-mix(in srgb, var(--success-color) 35%, transparent); } }
    .flash-update { animation: flash-bg 0.6s ease-out; }
    @keyframes flash-bg { from { background-color: color-mix(in srgb, var(--accent-color) 25%, transparent); transform: scale(1.02); } to { background-color: transparent; transform: scale(1); } }
    @keyframes pop-effect { 0% { transform: scale(1); } 50% { transform: scale(1.4); color: var(--success-color); font-weight: 800; } 100% { transform: scale(1); } }
    .pop-animation { animation: pop-effect 0.3s ease-in-out; }
    .toast-notification { background-color: #2c3e50; color: white; padding: 0.75rem 1.25rem; border-radius: 0.5rem; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.2); animation: toastIn 0.3s ease forwards; }
    @keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes slideUp { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
    /* --- FIN: ANIMACIONES Y ESTILOS ORIGINALES --- */
    /* --- INICIO: NUEVOS ESTILOS PARA EL TOGGLE DE TEMA ANIMADO --- */
.theme-switch {
    display: inline-block;
    cursor: pointer;
    padding: 6px; /* Ajusta el área de clic */
    border-radius: 9999px;
    transition: background-color 0.2s;
}
.theme-switch:hover {
    background-color: color-mix(in srgb, var(--text-primary) 10%, transparent);
}

.theme-switch__checkbox {
    display: none; /* Ocultamos el checkbox real */
}

.theme-switch__container {
    width: 24px;
    height: 24px;
    position: relative;
}

.theme-switch__sun-moon {
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Animación de rotación */
}

/* Estado Inicial (Modo Claro) */
.theme-switch__sun-moon svg {
    width: 100%;
    height: 100%;
    stroke: var(--text-primary);
}
.theme-switch__sun-moon .sun {
    fill: var(--text-primary);
    transform-origin: center center;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.theme-switch__sun-moon .sun-beams {
    transform-origin: center center;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

/* Estado Activado (Modo Oscuro) */
html.dark .theme-switch__sun-moon {
    transform: rotate(45deg);
}

html.dark .theme-switch__sun-moon .sun {
    /* La máscara SVG crea el efecto de luna creciente */
    transform: scale(0.9);
}

html.dark .theme-switch__sun-moon .sun-beams {
    transform: scale(0);
    opacity: 0;
}
/* --- FIN: NUEVOS ESTILOS PARA EL TOGGLE --- */
/* --- INICIO: ESTILOS RESTAURADOS PARA EL MODAL DE SELECCIÓN DE DESTINATARIO (MÓVIL) --- */
.recipient-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

.recipient-modal-overlay.active {
    display: flex; /* Se muestra al añadir la clase 'active' */
}

.recipient-modal {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    width: 90%;
    max-width: 400px;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    animation: slideUp 0.4s ease;
}

.recipient-modal-option {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    border: 1px solid var(--border-color);
}

.recipient-modal-option:hover {
    background-color: var(--bg-tertiary);
    transform: scale(1.02);
}
/* --- FIN: ESTILOS RESTAURADOS --- */
    /* ... (justo después de los estilos de .trash-icon, por ejemplo) ... */
    .trash-icon { color: var(--text-secondary); } .trash-icon:hover { color: var(--error-color); transform: scale(1.1); }
    
    /* --- INICIO: ESTILOS PARA MODAL DE CONFIRMACIÓN --- */
    #confirmation-modal {
        max-width: 420px;
        animation: slideUp 0.3s ease-out;
    }
    #confirmation-modal-overlay {
        animation: fadeIn 0.3s ease-out;
    }
    /* --- FIN: ESTILOS PARA MODAL DE CONFIRMACIÓN --- */

    /* --- INICIO: ESTILOS MODIFICADOS PARA EL MODAL --- */
    /* ... el resto de tus estilos ... */